From: Jo-Philipp Wich Date: Sun, 23 Feb 2020 11:10:35 +0000 (+0100) Subject: luci-app-statistics: cpufreq: re-add ExtraItems config X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=0c3ce36ea88425876c089eae9205711957fa2975;p=project%2Fluci.git luci-app-statistics: cpufreq: re-add ExtraItems config Signed-off-by: Jo-Philipp Wich --- diff --git a/applications/luci-app-statistics/htdocs/luci-static/resources/view/statistics/plugins/cpufreq.js b/applications/luci-app-statistics/htdocs/luci-static/resources/view/statistics/plugins/cpufreq.js index d336f97dea..64c260877c 100644 --- a/applications/luci-app-statistics/htdocs/luci-static/resources/view/statistics/plugins/cpufreq.js +++ b/applications/luci-app-statistics/htdocs/luci-static/resources/view/statistics/plugins/cpufreq.js @@ -5,7 +5,20 @@ return L.Class.extend({ title: _('CPU Frequency Plugin Configuration'), description: _('This plugin collects statistics about the processor frequency scaling.'), + addFormOptions: function(s) { + var o; + + o = s.option(form.Flag, 'enable', _('Enable this plugin')); + o.default = '0'; + + o = s.option(form.Flag, 'ExtraItems', _('Extra items'), + _('More details about frequency usage and transitions')); + o.depends('enable', '1'); + }, + configSummary: function(section) { - return _('CPU frequency monitoring enabled'); + return (section.ExtraItems == '1') + ? _('Detailled CPU frequency monitoring enabled') + : _('Simple CPU frequency monitoring enabled'); } });