summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-statistics/htdocs/luci-static
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2021-04-26 17:38:48 +0200
committerJo-Philipp Wich <jo@mein.io>2021-04-26 17:40:23 +0200
commitdd5d96afdba698e11d12880f4adf28e24a140305 (patch)
tree507da96c057626877b9cb6004947d90f927823b9 /applications/luci-app-statistics/htdocs/luci-static
parent52297b1359e22a68b8a7f99666a7bf237909d156 (diff)
luci-app-statistics: fix APC UPS host configuration
Ensure that list of hosts is stored as space separated list, like it was done in the previous Lua implementation. Fixes: #5010 Fixes: e7d22dce5 ("luci-app-statistics: convert collectd configuration to client side views") Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'applications/luci-app-statistics/htdocs/luci-static')
-rw-r--r--applications/luci-app-statistics/htdocs/luci-static/resources/view/statistics/plugins/apcups.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/applications/luci-app-statistics/htdocs/luci-static/resources/view/statistics/plugins/apcups.js b/applications/luci-app-statistics/htdocs/luci-static/resources/view/statistics/plugins/apcups.js
index 89b861a84b..17ec51be53 100644
--- a/applications/luci-app-statistics/htdocs/luci-static/resources/view/statistics/plugins/apcups.js
+++ b/applications/luci-app-statistics/htdocs/luci-static/resources/view/statistics/plugins/apcups.js
@@ -15,6 +15,9 @@ return baseclass.extend({
o.default = 'localhost';
o.datatype = 'host';
o.depends('enable', '1');
+ o.write = function(section_id, value) {
+ return form.Value.prototype.write.call(this, section_id, L.toArray(value).join(' '));
+ };
o = s.option(form.Value, 'Port', _('Port for apcupsd communication'));
o.default = '3551';