projects
/
project
/
luci.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
luci-statistics: add transform_rpn option to graphs, use it for nut battery life
[project/luci.git]
/
applications
/
luci-statistics
/
luasrc
/
statistics
/
rrdtool
/
definitions
/
nut.lua
diff --git
a/applications/luci-statistics/luasrc/statistics/rrdtool/definitions/nut.lua
b/applications/luci-statistics/luasrc/statistics/rrdtool/definitions/nut.lua
index
421c7a2
..
4072d4d
100644
(file)
--- a/
applications/luci-statistics/luasrc/statistics/rrdtool/definitions/nut.lua
+++ b/
applications/luci-statistics/luasrc/statistics/rrdtool/definitions/nut.lua
@@
-86,7
+86,7
@@
function rrdargs( graph, plugin, plugin_instance, dtype )
local timeleft = {
title = "%H: Time left on UPS \"%pi\"",
vlabel = "Minutes",
local timeleft = {
title = "%H: Time left on UPS \"%pi\"",
vlabel = "Minutes",
- number_format = "%
7
lfm",
+ number_format = "%
.1
lfm",
data = {
sources = {
timeleft = { "timeleft" }
data = {
sources = {
timeleft = { "timeleft" }
@@
-95,7
+95,7
@@
function rrdargs( graph, plugin, plugin_instance, dtype )
timeleft = { "battery" }
},
options = {
timeleft = { "battery" }
},
options = {
- timeleft_battery = { color = "0000ff", title = "Time left"}
+ timeleft_battery = { color = "0000ff", title = "Time left"
, transform_rpn = "60,/"
}
}
}
}
}
}
}