aboutsummaryrefslogtreecommitdiff
path: root/modern/src/settings
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2023-01-24 17:45:35 -0800
committerAnton Tananaev <anton@traccar.org>2023-01-24 17:45:35 -0800
commited01ae96f146c3c02fbfa13be7106519609f4d1a (patch)
tree4ad2308f11af6be89ee9d7a3231fa6e30476af88 /modern/src/settings
parent390d4ee3936750285d70dfbd88791f7f61ee6b2f (diff)
downloadtrackermap-web-ed01ae96f146c3c02fbfa13be7106519609f4d1a.tar.gz
trackermap-web-ed01ae96f146c3c02fbfa13be7106519609f4d1a.tar.bz2
trackermap-web-ed01ae96f146c3c02fbfa13be7106519609f4d1a.zip
Computed attributes for properties
Diffstat (limited to 'modern/src/settings')
-rw-r--r--modern/src/settings/ComputedAttributePage.js4
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,