--- /dev/null
+L.ui.view.extend({
+ title: L.tr('Hostnames'),
+ description: L.tr('Manage static host records to let the local DNS server resolve certain names to specific IP addresses.'),
+
+ execute: function() {
+ var m = new L.cbi.Map('dhcp', {
+ readonly: !this.options.acls.hostnames
+ });
+
+ var s = m.section(L.cbi.TableSection, 'domain', {
+ caption: function(sid) { return sid ? (this.fields.name.textvalue(sid) || L.tr('Unnamed LED')) : '' },
+ teasers: [ 'sysfs', 'default', 'trigger', '_net_dev', 'mode', '_usb_dev', 'delayon', 'delayoff' ],
+ collabsible: true,
+ addremove: true,
+ add_caption: L.tr('Add new hostname'),
+ remove_caption: L.tr('Remove hostname')
+ });
+
+ s.option(L.cbi.InputValue, 'name', {
+ caption: L.tr('Hostname'),
+ datatype: 'hostname'
+ });
+
+ s.option(L.cbi.InputValue, 'ip', {
+ caption: L.tr('IP address'),
+ datatype: 'ipaddr'
+ });
+
+ return m.insertInto('#map');
+ }
+});
"view": "network/switch",
"index": 30
},
+ "network/hosts": {
+ "title": "Hostnames",
+ "acls": [ "hostnames" ],
+ "view": "network/hosts",
+ "index": 50
+ },
"network/diagnostics": {
"title": "Diagnostics",
"acls": [ "diagnostics" ],