luci-app-statistics: Fix disk usage graphing
authorDaniel Dickinson <openwrt@daniel.thecshore.com>
Fri, 25 Mar 2016 08:04:58 +0000 (04:04 -0400)
committerHannu Nyman <hannu.nyman@iki.fi>
Tue, 29 Mar 2016 07:35:00 +0000 (10:35 +0300)
Disk usage graphing was broken.  This fixes it.

Signed-off-by: Daniel Dickinson <openwrt@daniel.thecshore.com>
(cherry picked from commit 6d2163eb622a6f4da43b6ecc8379a1fc891b5b0b)

applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/df.lua

index 78c9ef50442dae026a01b3c9cb3486a1c15a26c3..6266ff3ba5affd89d3236167cf854b0b8a3aaaa6 100644 (file)
@@ -12,21 +12,27 @@ function rrdargs( graph, plugin, plugin_instance, dtype )
                number_format = "%5.1lf%sB",
 
                data = {
-                       sources = {
-                               df = { "free", "used" }
+                       instances = {
+                               df_complex = { "free", "used", "reserved" }
                        },
 
                        options = {
-                               df__free = {
+                               df_complex_free = {
                                        color = "00ff00",
                                        overlay = false,
                                        title = "free"
                                },
 
-                               df__used = {
+                               df_complex_used = {
                                        color = "ff0000",
                                        overlay = false,
                                        title = "used"
+                               },
+
+                               df_complex_reserved = {
+                                       color = "0000ff",
+                                       overlay = false,
+                                       title = "reserved"
                                }
                        }
                }