luci-app-statistics: CPU plugin: hide 'idle', tweak defaults
authorHannu Nyman <hannu.nyman@iki.fi>
Sun, 8 Nov 2020 07:29:03 +0000 (09:29 +0200)
committerHannu Nyman <hannu.nyman@iki.fi>
Sun, 8 Nov 2020 07:29:03 +0000 (09:29 +0200)
commit1cff10022156ad290b131ea0d5bb9b83e0db5cf2
tree8c39ea7ae5f0dc70e4c752551a985936374a7fe6
parent167435b094903a4557371de44fdbc12bf4b61955
luci-app-statistics: CPU plugin: hide 'idle', tweak defaults

* Add functionality to hide the metric of 'idle' state
  from the chart and data table. Many routers are mostly idle,
  and the 98% 'idle' dominates the graph reducing its usefulness.
  Without 'idle', the smaller CPU usage spikes are visible.

* Hide 'idle' by default. Provide config option to show it.
  (note: the option in inside LuCI, and has no impact on actual
   data collection by collectd.)

* Tweak the defaults to use the percentage data by default.
  It makes more sense to average users than jiffies.

* Set the current LuCI defaults also in the config file.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
applications/luci-app-statistics/htdocs/luci-static/resources/statistics/rrdtool/definitions/cpu.js
applications/luci-app-statistics/htdocs/luci-static/resources/view/statistics/plugins/cpu.js
applications/luci-app-statistics/root/etc/config/luci_statistics