list perf: use textContent instead of innerHTML
This commit is contained in:
parent
c7b051e73b
commit
cbd87c85c8
|
@ -192,9 +192,9 @@ export class ListView extends View {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
lastseen.innerHTML = FromNowAgo(node.lastseen);
|
lastseen.textContent = FromNowAgo(node.lastseen);
|
||||||
|
|
||||||
nodeID.innerHTML = node.node_id;
|
nodeID.textContent = node.node_id;
|
||||||
|
|
||||||
hostnameInput.value = node.hostname;
|
hostnameInput.value = node.hostname;
|
||||||
hostnameInput.readOnly = true;
|
hostnameInput.readOnly = true;
|
||||||
|
@ -219,13 +219,13 @@ export class ListView extends View {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
domlib.newAt(freq, 'span').innerHTML = '2.4 Ghz';
|
domlib.newAt(freq, 'span').textContent = '2.4 Ghz';
|
||||||
domlib.newAt(freq, 'span').innerHTML = '5 Ghz';
|
domlib.newAt(freq, 'span').textContent = '5 Ghz';
|
||||||
|
|
||||||
/* eslint-disable no-underscore-dangle */
|
/* eslint-disable no-underscore-dangle */
|
||||||
if (node._wireless) {
|
if (node._wireless) {
|
||||||
domlib.newAt(curchannel, 'span').innerHTML = node._wireless.channel24 || '-';
|
domlib.newAt(curchannel, 'span').textContent = node._wireless.channel24 || '-';
|
||||||
domlib.newAt(curchannel, 'span').innerHTML = node._wireless.channel5 || '-';
|
domlib.newAt(curchannel, 'span').textContent = node._wireless.channel5 || '-';
|
||||||
}
|
}
|
||||||
/* eslint-enable no-underscore-dangle */
|
/* eslint-enable no-underscore-dangle */
|
||||||
|
|
||||||
|
@ -285,8 +285,8 @@ export class ListView extends View {
|
||||||
|
|
||||||
/* eslint-disable no-underscore-dangle */
|
/* eslint-disable no-underscore-dangle */
|
||||||
if (node._wireless) {
|
if (node._wireless) {
|
||||||
domlib.newAt(curpower, 'span').innerHTML = node._wireless.txpower24 || '-';
|
domlib.newAt(curpower, 'span').textContent = node._wireless.txpower24 || '-';
|
||||||
domlib.newAt(curpower, 'span').innerHTML = node._wireless.txpower5 || '-';
|
domlib.newAt(curpower, 'span').textContent = node._wireless.txpower5 || '-';
|
||||||
}
|
}
|
||||||
/* eslint-enable no-underscore-dangle */
|
/* eslint-enable no-underscore-dangle */
|
||||||
|
|
||||||
|
@ -342,8 +342,8 @@ export class ListView extends View {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
domlib.newAt(client, 'span').innerHTML = node.statistics.clients.wifi24;
|
domlib.newAt(client, 'span').textContent = node.statistics.clients.wifi24;
|
||||||
domlib.newAt(client, 'span').innerHTML = node.statistics.clients.wifi5;
|
domlib.newAt(client, 'span').textContent = node.statistics.clients.wifi5;
|
||||||
|
|
||||||
/* eslint-disable id-length, no-magic-numbers,one-var */
|
/* eslint-disable id-length, no-magic-numbers,one-var */
|
||||||
const chanUtil24 = node.statistics.wireless
|
const chanUtil24 = node.statistics.wireless
|
||||||
|
@ -354,11 +354,11 @@ export class ListView extends View {
|
||||||
: {};
|
: {};
|
||||||
/* eslint-enable id-length, no-magic-numbers,one-var */
|
/* eslint-enable id-length, no-magic-numbers,one-var */
|
||||||
|
|
||||||
domlib.newAt(chanUtil, 'span').innerHTML = chanUtil24.ChanUtil || '-';
|
domlib.newAt(chanUtil, 'span').textContent = chanUtil24.ChanUtil || '-';
|
||||||
domlib.newAt(chanUtil, 'span').innerHTML = chanUtil5.ChanUtil || '-';
|
domlib.newAt(chanUtil, 'span').textContent = chanUtil5.ChanUtil || '-';
|
||||||
|
|
||||||
edit.classList.add('btn');
|
edit.classList.add('btn');
|
||||||
edit.innerHTML = 'Edit';
|
edit.textContent = 'Edit';
|
||||||
edit.addEventListener('click', () => {
|
edit.addEventListener('click', () => {
|
||||||
gui.router.navigate(gui.router.generate('node', {'nodeID': node.node_id}));
|
gui.router.navigate(gui.router.generate('node', {'nodeID': node.node_id}));
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue