luci/applications/luci-app-apinger/htdocs/luci-static/resources/view/apinger/alarm_loss.js
Jaymin Patel 6c151fcddb luci-app-apinger: Add LuCI for Apinger
LuCI Support for Apinger

Signed-off-by: Jaymin Patel <jem.patel@gmail.com>
2022-08-01 02:24:52 +05:30

30 lines
767 B
JavaScript

'use strict';
'require view';
'require form';
return view.extend({
render: function() {
var m, s, o;
m = new form.Map('apinger', _('Apinger - Loss Alarms'),
_('This alarm will be fired when packet loss goes over "Loss High"') + '<br />' +
_('This alarm will be canceled, when the loss drops below "Loss Low"'));
s = m.section(form.GridSection, 'alarm_loss');
s.anonymous = false;
s.addremove = true;
s.addbtntitle = _('Add Loss Alarm');
o = s.option(form.Value, 'percent_low', _('Loss Low (%)'));
o.datatype = 'range(1-100)';
o.default = '10';
o.placeholder = '10';
o = s.option(form.Value, 'percent_high', _('Loss High (%)'));
o.datatype = 'range(1-100)';
o.default = '20';
o.placeholder = '20';
return m.render();
},
});