return result.length ? result : null;
}
-function isValidMAC(sid, s) {
+function isValidMAC(s) {
if (!s) return true;
for (const mac of L.toArray(s))
return _('The MAC address %h is already used by another static lease in the same DHCP pool')
.format(host_macs.find(lm => this_macs.includes(lm)));
}
- return isValidMAC(section_id, value);
+ return isValidMAC(value);
}
Object.keys(hosts).forEach(function(mac) {
let vendor;
dom.content(node, [
E('img', {
- 'src': L.resource('icons/%s%s.svg').format(dev ? dev.getType() : 'ethernet', ifc.isUp() ? '' : '_disabled'),
+ 'src': L.resource('icons/%s%s.svg').format(dev ? dev.getType() : 'ethernet', ifc && ifc.isUp() ? '' : '_disabled'),
'title': dev ? dev.getTypeI18n() : _('Not present')
}),
ifc ? render_status(E('span'), ifc, true) : E('em', _('Interface not present or not connected yet.'))
const badge = row.querySelector('[data-name="_badge"] > div');
const stat = row.querySelector('[data-name="_stat"]');
const btns = row.querySelectorAll('.cbi-section-actions button');
+ if (btns.length < 3) return;
const busy = btns[0].classList.contains('spinning') || btns[1].classList.contains('spinning') || btns[2].classList.contains('spinning');
if (radioDev) {
s.load = function() {
return network.getWifiDevices().then(L.bind(function(radios) {
this.radios = radios.sort(function(a, b) {
- return a.getName() > b.getName();
+ return a.getName().localeCompare(b.getName());
});
const tasks = [];