diff options
author | Anton Tananaev <anton@traccar.org> | 2023-01-24 17:45:35 -0800 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2023-01-24 17:45:35 -0800 |
commit | ed01ae96f146c3c02fbfa13be7106519609f4d1a (patch) | |
tree | 4ad2308f11af6be89ee9d7a3231fa6e30476af88 /modern | |
parent | 390d4ee3936750285d70dfbd88791f7f61ee6b2f (diff) | |
download | trackermap-web-ed01ae96f146c3c02fbfa13be7106519609f4d1a.tar.gz trackermap-web-ed01ae96f146c3c02fbfa13be7106519609f4d1a.tar.bz2 trackermap-web-ed01ae96f146c3c02fbfa13be7106519609f4d1a.zip |
Computed attributes for properties
Diffstat (limited to 'modern')
-rw-r--r-- | modern/src/settings/ComputedAttributePage.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modern/src/settings/ComputedAttributePage.js b/modern/src/settings/ComputedAttributePage.js index 287a4340..3bae8231 100644 --- a/modern/src/settings/ComputedAttributePage.js +++ b/modern/src/settings/ComputedAttributePage.js @@ -24,6 +24,8 @@ import SelectField from '../common/components/SelectField'; import { useCatch } from '../reactHelper'; import { snackBarDurationLongMs } from '../common/util/duration'; +const allowedProperties = ['valid', 'latitude', 'longitude', 'altitude', 'speed', 'course', 'address', 'accuracy']; + const useStyles = makeStyles((theme) => ({ details: { display: 'flex', @@ -43,7 +45,7 @@ const ComputedAttributePage = () => { const [deviceId, setDeviceId] = useState(); const [result, setResult] = useState(); - const options = Object.entries(positionAttributes).filter(([, value]) => !value.property).map(([key, value]) => ({ + const options = Object.entries(positionAttributes).filter(([key, value]) => !value.property || allowedProperties.includes(key)).map(([key, value]) => ({ key, name: value.name, type: value.type, |