luci-app-statistics: backport 'reorder interface and netlink datasources'
authorHannu Nyman <hannu.nyman@iki.fi>
Sat, 24 Oct 2015 10:39:36 +0000 (13:39 +0300)
committerHannu Nyman <hannu.nyman@iki.fi>
Sat, 24 Oct 2015 10:39:36 +0000 (13:39 +0300)
Backport from commit 78c61d6d the interface and netlink plugin changes.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/interface.lua
applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/netlink.lua

index efa631d557c1714196ecaa8e381d2381c9ccdff7..6f687d218ddb4e340726659421a328f058bae341 100644 (file)
@@ -66,36 +66,40 @@ function rrdargs( graph, plugin, plugin_instance )
                        options = {
                                -- processed packets (tx DS)
                                if_packets__tx = {
+                                       weight  = 1,
                                        overlay = true,         -- don't summarize
                                        total   = true,         -- report total amount of bytes
                                        color   = "00ff00",     -- processed tx is green
-                                       title   = "Processed (tx)"
+                                       title   = "Processed (TX)"
                                },
 
                                -- processed packets (rx DS)
                                if_packets__rx = {
+                                       weight  = 2,
                                        overlay = true,         -- don't summarize
                                        flip    = true,         -- flip rx line
                                        total   = true,         -- report total amount of bytes
                                        color   = "0000ff",     -- processed rx is blue
-                                       title   = "Processed (rx)"
+                                       title   = "Processed (RX)"
                                },
 
                                -- packet errors (tx DS)
                                if_errors__tx = {
+                                       weight  = 0,
                                        overlay = true,         -- don't summarize
                                        total   = true,         -- report total amount of packets
                                        color   = "ff5500",     -- tx errors are orange
-                                       title   = "Errors (tx)"
+                                       title   = "Errors    (TX)"
                                },
 
                                -- packet errors (rx DS)
                                if_errors__rx = {
+                                       weight  = 3,
                                        overlay = true,         -- don't summarize
                                        flip    = true,         -- flip rx line
                                        total   = true,         -- report total amount of packets
                                        color   = "ff0000",     -- rx errors are red
-                                       title   = "Errors (rx)"
+                                       title   = "Errors    (RX)"
                                }
                        }
                }
index 9e879a44a6fe046ae1474785dc39415e8b24f9e3..7b6acf36633262ef57a14d09eebcad49bc52790d 100644 (file)
@@ -61,6 +61,7 @@ function rrdargs( graph, plugin, plugin_instance )
                        options = {
                                -- processed packets (tx DS)
                                if_packets__tx = {
+                                       weight  = 2,
                                        title   = "Total   (TX)",
                                        overlay = true,         -- don't summarize
                                        total   = true,         -- report total amount of bytes
@@ -69,6 +70,7 @@ function rrdargs( graph, plugin, plugin_instance )
 
                                -- processed packets (rx DS)
                                if_packets__rx = {
+                                       weight  = 3,
                                        title   = "Total   (RX)",
                                        overlay = true,         -- don't summarize
                                        flip    = true,         -- flip rx line
@@ -78,6 +80,7 @@ function rrdargs( graph, plugin, plugin_instance )
 
                                -- dropped packets (tx DS)
                                if_dropped__tx = {
+                                       weight  = 1,
                                        title   = "Dropped (TX)",
                                        overlay = true,         -- don't summarize
                                        total   = true,         -- report total amount of bytes
@@ -86,6 +89,7 @@ function rrdargs( graph, plugin, plugin_instance )
 
                                -- dropped packets (rx DS)
                                if_dropped__rx = {
+                                       weight  = 4,
                                        title   = "Dropped (RX)",
                                        overlay = true,         -- don't summarize
                                        flip    = true,         -- flip rx line
@@ -95,6 +99,7 @@ function rrdargs( graph, plugin, plugin_instance )
 
                                -- packet errors (tx DS)
                                if_errors__tx = {
+                                       weight  = 0,
                                        title   = "Errors  (TX)",
                                        overlay = true,         -- don't summarize
                                        total   = true,         -- report total amount of packets
@@ -103,6 +108,7 @@ function rrdargs( graph, plugin, plugin_instance )
 
                                -- packet errors (rx DS)
                                if_errors__rx = {
+                                       weight  = 5,
                                        title   = "Errors  (RX)",
                                        overlay = true,         -- don't summarize
                                        flip    = true,         -- flip rx line