diff options
author | Hannu Nyman <hannu.nyman@iki.fi> | 2017-05-09 09:42:42 +0300 |
---|---|---|
committer | Hannu Nyman <hannu.nyman@iki.fi> | 2017-05-09 09:46:50 +0300 |
commit | 0a6ce204234c9485549e290230e51484b1fceb64 (patch) | |
tree | e5fcd26722d34f4af6da11ff7ea96fa4fc9a7aca /applications/luci-app-statistics | |
parent | aba7981deaffe1871d279196e7a43e3af255d748 (diff) |
luci-app-statistics: processes: fix graph visibility
Fix graph visibility on processes page based on plugin
instance. The overview instance is empty, while monitored
processes have their own instances.
Original version of the patch created by @koblack and
discussed in #1021
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
Diffstat (limited to 'applications/luci-app-statistics')
-rw-r--r-- | applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/processes.lua | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/processes.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/processes.lua index 323c3c230..62d054597 100644 --- a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/processes.lua +++ b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/processes.lua @@ -5,8 +5,8 @@ module("luci.statistics.rrdtool.definitions.processes", package.seeall) function rrdargs( graph, plugin, plugin_instance, dtype ) + if plugin_instance == "" then return { - { title = "%H: Processes", vlabel = "Processes/s", data = { @@ -26,8 +26,9 @@ function rrdargs( graph, plugin, plugin_instance, dtype ) ps_state_zombies = { color = "ff0000", title = "Zombies" } } } - }, - + } + else + return { { title = "%H: CPU time used by %pi", vlabel = "Jiffies", @@ -112,4 +113,5 @@ function rrdargs( graph, plugin, plugin_instance, dtype ) } } } + end end |