summaryrefslogtreecommitdiffhomepage
path: root/applications
diff options
context:
space:
mode:
authorFlorian Eckert <fe@dev.tdt.de>2019-09-13 14:01:36 +0200
committerFlorian Eckert <fe@dev.tdt.de>2019-09-13 14:14:35 +0200
commitcb252b2c03189446fb8a8413e1371c84bcb044dd (patch)
treeadaf068178e023cf0cfbe99ae6f8408845d83a45 /applications
parent00fc5548ffb35184e5915c130889ed8ad9912fa6 (diff)
luci-app-statistics: cleanup ping definitions
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Diffstat (limited to 'applications')
-rw-r--r--applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/ping.lua57
1 files changed, 38 insertions, 19 deletions
diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/ping.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/ping.lua
index e290af549..6ad11985e 100644
--- a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/ping.lua
+++ b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/ping.lua
@@ -9,25 +9,44 @@ end
function rrdargs( graph, plugin, plugin_instance, dtype )
- return {
- -- Ping roundtrip time
- { title = "%H: ICMP Round Trip Time",
- vlabel = "ms",
- number_format = "%5.1lf ms",
- data = {
- sources = { ping = { "value" } },
- options = { ping__value = {
- noarea = true, overlay = true, title = "%di" } }
- } },
+ local ping = {
+ title = "%H: ICMP Round Trip Time",
+ vlabel = "ms",
+ number_format = "%5.1lf ms",
+ data = {
+ sources = {
+ ping = {
+ "value"
+ }
+ },
+ options = {
+ ping__value = {
+ noarea = true,
+ overlay = true,
+ title = "%di"
+ }
+ }
+ }
+ }
- -- Ping droprate
- { title = "%H: ICMP Drop Rate",
- vlabel = "%",
- number_format = "%5.2lf %%",
- data = {
- types = { "ping_droprate" },
- options = { ping_droprate = {
- noarea = true, overlay = true, title = "%di", transform_rpn = "100,*" } }
- } }
+ local droprate = {
+ title = "%H: ICMP Drop Rate",
+ vlabel = "%",
+ number_format = "%5.2lf %%",
+ data = {
+ types = {
+ "ping_droprate"
+ },
+ options = {
+ ping_droprate = {
+ noarea = true,
+ overlay = true,
+ title = "%di",
+ transform_rpn = "100,*"
+ }
+ }
+ }
}
+
+ return { ping, droprate }
end