luci-app-statistics: adjust cpufreq graph for single/dual-core CPUs
authorHannu Nyman <hannu.nyman@iki.fi>
Thu, 10 Nov 2016 18:34:08 +0000 (20:34 +0200)
committerHannu Nyman <hannu.nyman@iki.fi>
Thu, 10 Nov 2016 18:34:08 +0000 (20:34 +0200)
The original data model definition assumed data from a quad-core CPU,
which caused errors with single- and dual-core processors.
Adjust the data model to work with also them.

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

index bd30ededa0a3f5791b421eeb3e82e4273d9d2169..25a72d22855182cc69bf1ce8f32fc9188f910958 100644 (file)
@@ -10,8 +10,8 @@ function rrdargs( graph, plugin, plugin_instance, dtype )
                vlabel = "Frequency (Hz)",
                number_format = "%3.2lf%s",
                data = {
-                       instances = {
-                               cpufreq = { "3", "2", "1", "0" }
+                       sources = {
+                               cpufreq = { "" }
                        },
                        options = {
                                cpufreq_0 = { color = "ff0000", title = "Core 0", noarea=true, overlay=true },