Files
luci/applications/luci-app-statistics/htdocs/luci-static/resources/view/statistics/plugins/processes.js
Paul Donald 2bebe21493 luci-app-statistics: js linting fixes / ES6 treatment
Fix errors

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2026-02-16 01:42:57 +01:00

28 lines
766 B
JavaScript

'use strict';
'require baseclass';
'require form';
return baseclass.extend({
title: _('Processes Plugin Configuration'),
description: _('The processes plugin collects information like cpu time, page faults and memory usage of selected processes.'),
addFormOptions(s) {
let o;
o = s.option(form.Flag, 'enable', _('Enable this plugin'));
o = s.option(form.DynamicList, 'Processes', _('Monitor processes'));
o.default = 'uhttpd dropbear dnsmasq';
o.depends('enable', '1');
},
configSummary(section) {
const processes = L.toArray(section.Processes);
if (processes.length)
return N_(processes.length, 'Monitoring one process', 'Monitoring %d processes').format(processes.length);
else
return _('Basic process monitoring enabled');
}
});