aboutsummaryrefslogtreecommitdiff
path: root/web/app/view
diff options
context:
space:
mode:
Diffstat (limited to 'web/app/view')
-rw-r--r--web/app/view/StateController.js2
-rw-r--r--web/app/view/dialog/DeviceDistance.js2
-rw-r--r--web/app/view/edit/ComputedAttributes.js7
-rw-r--r--web/app/view/permissions/DeviceAttributes.js7
-rw-r--r--web/app/view/permissions/GroupAttributes.js7
-rw-r--r--web/app/view/permissions/UserAttributes.js7
6 files changed, 6 insertions, 26 deletions
diff --git a/web/app/view/StateController.js b/web/app/view/StateController.js
index 1525db26..0723dc13 100644
--- a/web/app/view/StateController.js
+++ b/web/app/view/StateController.js
@@ -124,7 +124,7 @@ Ext.define('Traccar.view.StateController', {
if (aliasIndex !== -1) {
name = this.aliasesStore.getAt(aliasIndex).get('alias');
} else {
- name = Ext.getStore('PositionAttributes').getAttributeName(key);
+ name = Ext.getStore('PositionAttributes').getAttributeName(key, true);
}
store.add(Ext.create('Traccar.model.Attribute', {
priority: 1024,
diff --git a/web/app/view/dialog/DeviceDistance.js b/web/app/view/dialog/DeviceDistance.js
index f908e45e..c6ac9f20 100644
--- a/web/app/view/dialog/DeviceDistance.js
+++ b/web/app/view/dialog/DeviceDistance.js
@@ -39,7 +39,7 @@ Ext.define('Traccar.view.dialog.DeviceDistance', {
}
}, {
xtype: 'customNumberField',
- convert: 'distance',
+ dataType: 'distance',
reference: 'totalDistance',
fieldLabel: Strings.deviceTotalDistance
}],
diff --git a/web/app/view/edit/ComputedAttributes.js b/web/app/view/edit/ComputedAttributes.js
index 741a1048..b4699e84 100644
--- a/web/app/view/edit/ComputedAttributes.js
+++ b/web/app/view/edit/ComputedAttributes.js
@@ -48,12 +48,7 @@ Ext.define('Traccar.view.edit.ComputedAttributes', {
text: Strings.sharedAttribute,
dataIndex: 'attribute',
renderer: function (value) {
- var attribute = Ext.getStore('PositionAttributes').getById(value);
- if (attribute) {
- return attribute.get('name');
- } else {
- return value;
- }
+ return Ext.getStore('PositionAttributes').getAttributeName(value);
}
}, {
text: Strings.sharedExpression,
diff --git a/web/app/view/permissions/DeviceAttributes.js b/web/app/view/permissions/DeviceAttributes.js
index baca9d3e..2ce07633 100644
--- a/web/app/view/permissions/DeviceAttributes.js
+++ b/web/app/view/permissions/DeviceAttributes.js
@@ -32,12 +32,7 @@ Ext.define('Traccar.view.permissions.DeviceAttributes', {
flex: 1,
minWidth: Traccar.Style.columnWidthNormal,
renderer: function (value) {
- var attribute = Ext.getStore('PositionAttributes').getById(value);
- if (attribute) {
- return attribute.get('name');
- } else {
- return value;
- }
+ return Ext.getStore('PositionAttributes').getAttributeName(value);
}
}]
}
diff --git a/web/app/view/permissions/GroupAttributes.js b/web/app/view/permissions/GroupAttributes.js
index 3972dbec..44089daf 100644
--- a/web/app/view/permissions/GroupAttributes.js
+++ b/web/app/view/permissions/GroupAttributes.js
@@ -32,12 +32,7 @@ Ext.define('Traccar.view.permissions.GroupAttributes', {
flex: 1,
minWidth: Traccar.Style.columnWidthNormal,
renderer: function (value) {
- var attribute = Ext.getStore('PositionAttributes').getById(value);
- if (attribute) {
- return attribute.get('name');
- } else {
- return value;
- }
+ return Ext.getStore('PositionAttributes').getAttributeName(value);
}
}]
}
diff --git a/web/app/view/permissions/UserAttributes.js b/web/app/view/permissions/UserAttributes.js
index 8a8a4543..7bca6223 100644
--- a/web/app/view/permissions/UserAttributes.js
+++ b/web/app/view/permissions/UserAttributes.js
@@ -32,12 +32,7 @@ Ext.define('Traccar.view.permissions.UserAttributes', {
flex: 1,
minWidth: Traccar.Style.columnWidthNormal,
renderer: function (value) {
- var attribute = Ext.getStore('PositionAttributes').getById(value);
- if (attribute) {
- return attribute.get('name');
- } else {
- return value;
- }
+ return Ext.getStore('PositionAttributes').getAttributeName(value);
}
}]
}