summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorHenrique de Moraes Holschuh <henrique@nic.br>2021-03-01 13:18:00 -0300
committerHannu Nyman <hannu.nyman@iki.fi>2021-04-06 23:20:26 +0300
commit80a1a9a555fd47f1fd3311cd75be3923839edc1d (patch)
tree7a10ad7a40700d5c0c3951b234aa0a4d33bb49e0
parent3561927effcfa01ff5e27efc335797244a8d584c (diff)
luci-mod-system: implement system.description, system.notes
Implement two new text "options" for UCI system config, intended to help humans describe the device. "system.description" is a short, single-line description suitable for selector UIs in remote administration applications, or remote UCI (over ubus RPC), etc. It would also be suitable as a default for LLDP/SNMP "system description". "system.notes" is a multi-line, free-form text field that can be used in any way the user wishes, e.g. to hold installation notes, or unit serial number and inventory number, location, etc. Signed-off-by: Henrique de Moraes Holschuh <henrique@nic.br>
-rw-r--r--modules/luci-mod-system/htdocs/luci-static/resources/view/system/system.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/system.js b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/system.js
index e4c0a7cebe..1c2aa46c52 100644
--- a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/system.js
+++ b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/system.js
@@ -121,6 +121,13 @@ return view.extend({
o = s.taboption('general', form.Value, 'hostname', _('Hostname'));
o.datatype = 'hostname';
+ /* could be used also as a default for LLDP, SNMP "system description" in the future */
+ o = s.taboption('general', form.Value, 'description', _('Description'), _('An optional, short description for this device'));
+ o.optional = true;
+
+ o = s.taboption('general', form.TextValue, 'notes', _('Notes'), _('Optional, free-form notes about this device'));
+ o.optional = true;
+
o = s.taboption('general', form.ListValue, 'zonename', _('Timezone'));
o.value('UTC');