luci-app-nlbwmon: use legacy L.dom attribute

Until it is converted to a proper view, we need to use the legacy alias.

Fixes: #3835
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit af6fd6dfab)
This commit is contained in:
Jo-Philipp Wich 2020-04-04 12:00:20 +02:00
parent 6ca21c45f9
commit 4decb6e3f2

View file

@ -63,7 +63,7 @@ Chart.defaults.global.tooltipTemplate = function(tip) {
function kpi(id, val1, val2, val3) function kpi(id, val1, val2, val3)
{ {
var e = dom.elem(id) ? id : document.getElementById(id); var e = L.dom.elem(id) ? id : document.getElementById(id);
if (val1 && val2 && val3) if (val1 && val2 && val3)
e.innerHTML = _('%s, %s and %s').format(val1, val2, val3); e.innerHTML = _('%s, %s and %s').format(val1, val2, val3);
@ -96,8 +96,8 @@ function pie(id, data)
} }
} }
var node = dom.elem(id) ? id : document.getElementById(id), var node = L.dom.elem(id) ? id : document.getElementById(id),
key = dom.elem(id) ? id.id : id, key = L.dom.elem(id) ? id.id : id,
ctx = node.getContext('2d'); ctx = node.getContext('2d');
if (chartRegistry.hasOwnProperty(key)) if (chartRegistry.hasOwnProperty(key))
@ -279,7 +279,7 @@ function renderHostDetail(tooltip)
var rxData = [], txData = []; var rxData = [], txData = [];
dom.content(tooltip, [ L.dom.content(tooltip, [
E('div', { 'class': 'head' }, [ E('div', { 'class': 'head' }, [
E('div', { 'class': 'pie' }, [ E('div', { 'class': 'pie' }, [
E('label', _('Download')), E('label', _('Download')),