X-Git-Url: http://git.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=applications%2Fluci-app-statistics%2Fhtdocs%2Fluci-static%2Fresources%2Fview%2Fstatistics%2Fplugins%2Fapcups.js;fp=applications%2Fluci-app-statistics%2Fhtdocs%2Fluci-static%2Fresources%2Fview%2Fstatistics%2Fplugins%2Fapcups.js;h=32f0cecdabebea20879ad524beee0c1847095c2b;hp=17ec51be5379ec7742070a7f3a964220c4ebaec7;hb=8816c8fff7e8e30f19e85c0f1c7f70b6914be701;hpb=c6b4d4ab5a2c57889bcf14fafac17e73d22205c6 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 17ec51be53..32f0cecdab 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 @@ -11,13 +11,10 @@ return baseclass.extend({ o = s.option(form.Flag, 'enable', _('Enable this plugin')); - o = s.option(form.DynamicList, 'Host', _('Monitor host')); + o = s.option(form.Value, 'Host', _('Monitor host')); 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'; @@ -26,11 +23,6 @@ return baseclass.extend({ }, configSummary: function(section) { - var hosts = L.toArray(section.Host); - if (hosts.length) - return N_(hosts.length, - 'Monitoring APC UPS at host %s, port %d', - 'Monitoring APC UPS at hosts %s, port %d' - ).format(hosts.join(', '), section.Port || 3551); + return _('Monitoring APC UPS at host %s, port %d').format(section.Host || 'localhost', section.Port || 3551); } });