summaryrefslogtreecommitdiffstats
path: root/applications/luci-app-apinger/htdocs/luci-static/resources/view/apinger/alarm_delay.js
blob: 74dff5c4826a86b4e128e3d01db1b3a4596a43c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
'use strict';
'require view';
'require form';

return view.extend({
	render: function() {
		let m, s, o;

		m = new form.Map('apinger', _('Apinger - Delay Alarms'), 
			 ('This alarm will be fired when target responses are delayed more than "Delay High"') + '<br />' +
			_('This alarm will be canceled, when the delay drops below "Delay Low"') + '<br />');

		s = m.section(form.GridSection, 'alarm_delay');
		s.anonymous = false;
		s.addremove = true;
		s.addbtntitle = _('Add Delay/Latency Alarm');

		o = s.option(form.Value, 'delay_low', _('Delay Low (ms)'));
		o.datatype = 'range(1-500)';
		o.default = '30';
		o.placeholder = '30';

		o = s.option(form.Value, 'delay_high', _('Delay High (ms)'));
		o.datatype = 'range(1-500)';
		o.default = '50';
		o.placeholder = '50';

		return m.render();
	},
});