From 254083c17cef6e4b84c19be7ffb751810c849f64 Mon Sep 17 00:00:00 2001 From: Henrique de Moraes Holschuh Date: Mon, 1 Mar 2021 13:18:00 -0300 Subject: [PATCH] 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 --- .../htdocs/luci-static/resources/view/system/system.js | 7 +++++++ 1 file changed, 7 insertions(+) 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 ee97bd82f9..9e701f1006 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 @@ -119,6 +119,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'); -- 2.30.2