From c3f8353377eedecab9f3b973645e613c9ff2c80a Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sun, 4 Nov 2018 14:38:49 +1300 Subject: Alarm types filtering option --- web/app/view/edit/Notifications.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'web/app/view/edit/Notifications.js') diff --git a/web/app/view/edit/Notifications.js b/web/app/view/edit/Notifications.js index 9e24d3d0..7983c4db 100644 --- a/web/app/view/edit/Notifications.js +++ b/web/app/view/edit/Notifications.js @@ -59,6 +59,23 @@ Ext.define('Traccar.view.edit.Notifications', { dataIndex: 'always', renderer: Traccar.AttributeFormatter.getFormatter('always'), filter: 'boolean' + }, { + text: Strings.sharedAlarms, + dataIndex: 'attributes', + renderer: function (value) { + var i, key, result = '', alarms = value && value['alarms']; + if (alarms) { + alarms = alarms.split(','); + for (i = 0; i < alarms.length; i++) { + var key = 'alarm' + alarms[i].charAt(0).toUpperCase() + alarms[i].slice(1); + if (result) { + result += ', '; + } + result += Strings[key] || key; + } + } + return result; + } }, { text: Strings.notificationNotificators, dataIndex: 'notificators', -- cgit v1.2.3