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>
This commit is contained in:
parent
aba7981dea
commit
0a6ce20423
1 changed files with 5 additions and 3 deletions
|
@ -5,8 +5,8 @@ module("luci.statistics.rrdtool.definitions.processes", package.seeall)
|
||||||
|
|
||||||
function rrdargs( graph, plugin, plugin_instance, dtype )
|
function rrdargs( graph, plugin, plugin_instance, dtype )
|
||||||
|
|
||||||
|
if plugin_instance == "" then
|
||||||
return {
|
return {
|
||||||
{
|
|
||||||
title = "%H: Processes",
|
title = "%H: Processes",
|
||||||
vlabel = "Processes/s",
|
vlabel = "Processes/s",
|
||||||
data = {
|
data = {
|
||||||
|
@ -26,8 +26,9 @@ function rrdargs( graph, plugin, plugin_instance, dtype )
|
||||||
ps_state_zombies = { color = "ff0000", title = "Zombies" }
|
ps_state_zombies = { color = "ff0000", title = "Zombies" }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
|
else
|
||||||
|
return {
|
||||||
{
|
{
|
||||||
title = "%H: CPU time used by %pi",
|
title = "%H: CPU time used by %pi",
|
||||||
vlabel = "Jiffies",
|
vlabel = "Jiffies",
|
||||||
|
@ -112,4 +113,5 @@ function rrdargs( graph, plugin, plugin_instance, dtype )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue