luci-app-statistics: fix read of hostname 5072/head
authorAnderson McKinley <78775943+ajmckinley@users.noreply.github.com>
Wed, 26 May 2021 06:41:49 +0000 (06:41 +0000)
committerAnderson McKinley <coyoso@tuta.io>
Wed, 26 May 2021 07:01:59 +0000 (07:01 +0000)
Existing javascript did not read a non-default statistics hostname due to
incorrect config ids.

Signed-off-by: Anderson McKinley <coyoso@tuta.io>
applications/luci-app-statistics/htdocs/luci-static/resources/view/statistics/collectd.js

index 282b867c4d2678d67b68f4ebd0194c61a40b8c6b..6c2d5ffa467930258d2fade2cb7f78a39b6929a4 100644 (file)
@@ -52,7 +52,7 @@ return view.extend({
                o.load = function() {
                        return fs.trimmed('/proc/sys/kernel/hostname').then(L.bind(function(name) {
                                this.placeholder = name;
-                               return uci.get('collectd', 'statistics', 'hostname');
+                               return uci.get('luci_statistics', 'collectd', 'Hostname');
                        }, this));
                };