},
render: function(data) {
+
var table = E('table', { 'class': 'table', 'id': 'upnp_status_table' }, [
E('tr', { 'class': 'tr table-titles' }, [
E('th', { 'class': 'th' }, _('Client Name')),
]);
var rules = Array.isArray(data[0].rules) ? data[0].rules : [];
+
var rows = rules.map(function(rule) {
return [
rule.host_hint || _('Unknown'),
}, [ _('Delete') ])
];
});
+
cbi_update_table(table, rows, E('em', _('There are no active port maps.')));
+
return table;
}
});
},
poll_status: function(nodes, data) {
+
var rules = Array.isArray(data[0].rules) ? data[0].rules : [];
+
var rows = rules.map(function(rule) {
return [
rule.host_hint || _('Unknown'),
}, [ _('Delete') ])
];
});
+
cbi_update_table(nodes.querySelector('#upnp_status_table'), rows, E('em', _('There are no active port maps.')));
+
+ return;
},
render: function(data) {
+
var m, s, o;
var protocols = '%s & %s/%s'.format(
]);
var rules = Array.isArray(data[0].rules) ? data[0].rules : [];
+
var rows = rules.map(function(rule) {
return [
rule.host_hint || _('Unknown'),
}, [ _('Delete') ])
];
});
+
cbi_update_table(table, rows, E('em', _('There are no active port maps.')));
+
return E('div', { 'class': 'cbi-section cbi-tblsection' }, [
E('h3', _('Active Service Port Maps')), table ]);
}, o, this);
_('Start autonomous port mapping service'));
o.rmempty = false;
- s.taboption('setup', form.Flag, 'enable_upnp', _('Enable UPnP IGD protocol'))
- s.default = '1';
+ s.taboption('setup', form.Flag, 'enable_upnp', _('Enable UPnP IGD protocol')).default = '1';
- s.taboption('setup', form.Flag, 'enable_natpmp', _('Enable PCP/NAT-PMP protocols'))
- s.default = '1';
+ s.taboption('setup', form.Flag, 'enable_natpmp', _('Enable PCP/NAT-PMP protocols')).default = '1';
o = s.taboption('setup', form.Flag, 'igdv1', _('UPnP IGDv1 compatibility mode'),
_('Advertise as IGDv1 (IPv4 only) device instead of IGDv2'));