From: Hannu Nyman Date: Thu, 10 Nov 2016 18:34:08 +0000 (+0200) Subject: luci-app-statistics: adjust cpufreq graph for single/dual-core CPUs X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=5566b3acef245873d7cbb294f637a63a7f58f634;p=oweals%2Fluci.git luci-app-statistics: adjust cpufreq graph for single/dual-core CPUs 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 --- diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/cpufreq.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/cpufreq.lua index bd30ededa..25a72d228 100644 --- a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/cpufreq.lua +++ b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/cpufreq.lua @@ -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 },