summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-statistics/luasrc/model/cbi
diff options
context:
space:
mode:
authorFlorian Eckert <fe@dev.tdt.de>2019-09-13 11:55:36 +0200
committerFlorian Eckert <fe@dev.tdt.de>2019-09-13 12:58:57 +0200
commit2be8aefe7f7a7e368d82d332b1aeb5494aefa9b5 (patch)
treef7eef2f173d48a4cc883097c0b11fff9076ac606 /applications/luci-app-statistics/luasrc/model/cbi
parent6482e48ac6aa3bd0f0af7fda7fb52d50bcae79e3 (diff)
luci-app-statistics: add new cpu plugin options
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Diffstat (limited to 'applications/luci-app-statistics/luasrc/model/cbi')
-rw-r--r--applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/cpu.lua21
1 files changed, 21 insertions, 0 deletions
diff --git a/applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/cpu.lua b/applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/cpu.lua
index ee3fd254fb..56af1cc96a 100644
--- a/applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/cpu.lua
+++ b/applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/cpu.lua
@@ -12,4 +12,25 @@ s = m:section( NamedSection, "collectd_cpu", "luci_statistics" )
enable = s:option( Flag, "enable", translate("Enable this plugin") )
enable.default = 0
+-- collectd_cpu.reportbycpu (ReportByCpu)
+reportbycpu = s:option( Flag, "ReportByCpu",
+ translate("Report by CPU"),
+ translate("By setting this, CPU is not aggregate of all processors on the system"))
+reportbycpu.default = 1
+reportbycpu:depends( "enable", 1 )
+
+-- collectd_cpu.reportbystate (ReportByState)
+reportbystate = s:option( Flag, "ReportByState",
+ translate("Report by state"),
+ translate("When set to true, reports per-state metric (system, user, idle)"))
+reportbystate.default = 1
+reportbystate:depends( "enable", 1 )
+
+-- collectd_cpu.valuespercentage (ValuesPercentage)
+valuespercentage = s:option( Flag, "ValuesPercentage",
+ translate("Report in percent"),
+ translate("When set to true, we request percentage values"))
+valuespercentage.default = 0
+valuespercentage:depends({ enable = 1, ReportByCpu = 1, ReportByState = 1 })
+
return m