summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-statistics
diff options
context:
space:
mode:
authorHannu Nyman <hannu.nyman@iki.fi>2017-07-24 08:02:18 +0300
committerGitHub <noreply@github.com>2017-07-24 08:02:18 +0300
commit17de308ab792249d0f9d3b85abaf2ed50b148fa4 (patch)
treee41d91bc05157e84e74d54ef82333d02b64a1b32 /applications/luci-app-statistics
parent8f62b28948f8b24f1eb8239074a19d868a02cad6 (diff)
parent2145b7b33bbc4c142b243ac032e6e9c1c28ca835 (diff)
Merge pull request #1240 from bobmseagithub/luci-app-statistics_Voltage_graphs
luci-app-statistics: Voltage graphs - AC and DC
Diffstat (limited to 'applications/luci-app-statistics')
-rw-r--r--applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/apcups.lua26
1 files changed, 21 insertions, 5 deletions
diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/apcups.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/apcups.lua
index 04eee93051..2a8aceec08 100644
--- a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/apcups.lua
+++ b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/apcups.lua
@@ -5,18 +5,34 @@ module("luci.statistics.rrdtool.definitions.apcups",package.seeall)
function rrdargs( graph, plugin, plugin_instance, dtype )
+ local voltagesdc = {
+ title = "%H: Voltages on APC UPS - Battery",
+ vlabel = "Volts DC",
+ alt_autoscale = true,
+ number_format = "%5.1lfV",
+ data = {
+ instances = {
+ voltage = { "battery" }
+ },
+
+ options = {
+ voltage = { title = "Battery voltage", noarea=true }
+ }
+ }
+ }
+
local voltages = {
- title = "%H: Voltages on APC UPS ",
- vlabel = "V",
+ title = "%H: Voltages on APC UPS - AC",
+ vlabel = "Volts AC",
+ alt_autoscale = true,
number_format = "%5.1lfV",
data = {
instances = {
- voltage = { "battery", "input", "output" }
+ voltage = { "input", "output" }
},
options = {
voltage_output = { color = "00e000", title = "Output voltage", noarea=true, overlay=true },
- voltage_battery = { color = "0000ff", title = "Battery voltage", noarea=true, overlay=true },
voltage_input = { color = "ffb000", title = "Input voltage", noarea=true, overlay=true }
}
}
@@ -97,5 +113,5 @@ function rrdargs( graph, plugin, plugin_instance, dtype )
}
}
- return { voltages, percentload, charge_percent, temperature, timeleft, frequency }
+ return { voltages, voltagesdc, percentload, charge_percent, temperature, timeleft, frequency }
end