luci-app-statistics: treat APC UPS "host" setting as single value option
[project/luci.git] / applications / luci-app-statistics / htdocs / luci-static / resources / view / statistics / plugins / disk.js
index a2664d4eb28da6ea6e9f7197bc1a0dc0bc4cb629..c36df10258e16b2c11d52fb3c5e6791f5537a58c 100644 (file)
@@ -1,8 +1,9 @@
 'use strict';
+'require baseclass';
 'require fs';
 'require form';
 
-return L.Class.extend({
+return baseclass.extend({
        title: _('Disk Plugin Configuration'),
        description: _('The disk plugin collects detailed usage statistics for selected partitions or whole disks.'),
 
@@ -10,11 +11,9 @@ return L.Class.extend({
                var o;
 
                o = s.option(form.Flag, 'enable', _('Enable this plugin'));
-               o.default = '0';
 
                o = s.option(form.DynamicList, 'Disks', _('Monitor disks and partitions'),
                        _('When none selected, all disks will be monitored.'));
-               o.rmempty = true;
                o.depends('enable', '1');
                o.load = function(section_id) {
                        return fs.trimmed('/proc/partitions').then(L.bind(function(str) {
@@ -31,7 +30,6 @@ return L.Class.extend({
                };
 
                o = s.option(form.Flag, 'IgnoreSelected', _('Monitor all except specified'));
-               o.default = '0';
                o.depends('enable', '1');
        },