luci-app-statistics: update misleading load view
authorFlorian Eckert <fe@dev.tdt.de>
Sat, 30 Nov 2019 17:30:23 +0000 (19:30 +0200)
committerHannu Nyman <hannu.nyman@iki.fi>
Sat, 30 Nov 2019 17:30:23 +0000 (19:30 +0200)
Fixes: #3301

During my tests and developing with the collectd and so
luci-app-statistics I noticed that the values displayed in the Y-axis
are misleading, because probably the individual values are added
together in each case. So the view is not corrected.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit b50974a20c9dac0d6b8b479d2e6b54b3c5703ab6)
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/load.lua

index b06c8c41486b1b96dd37f1a8100b514d5b79bd86..2caf6a0b1c94a7d2721d12d60ae1098c50e94845 100644 (file)
@@ -19,9 +19,24 @@ function rrdargs( graph, plugin, plugin_instance, dtype )
                        },
 
                        options = {
-                               load__shortterm = { color = "ff0000", title = "1 minute", noarea = true },
-                               load__midterm   = { color = "ff6600", title = "5 minutes", noarea = true },
-                               load__longterm  = { color = "ffaa00", title = "15 minutes", noarea = true }
+                               load__shortterm = {
+                                       color = "ff0000",
+                                       title = "1 minute",
+                                       noarea = true,
+                                       weight = 3
+                               },
+                               load__midterm = {
+                                       color = "ff6600",
+                                       title = "5 minutes",
+                                       overlay = true,
+                                       weight = 1
+                               },
+                               load__longterm = {
+                                       color = "ffaa00",
+                                       title = "15 minutes",
+                                       overlay = true,
+                                       weight = 2
+                               }
                        }
                }
        }