From ec63339ae5258509cf7a8829d4dd79519948c256 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Sun, 28 Oct 2018 22:38:20 +0100 Subject: Add missing variable declarations in JavaScript code This fixes errors reported by LGTM. Signed-off-by: Stefan Weil --- applications/luci-app-olsr/luasrc/view/status-olsr/common_js.htm | 2 +- applications/luci-app-olsr/luasrc/view/status-olsr/hna.htm | 2 ++ applications/luci-app-olsr/luasrc/view/status-olsr/smartgw.htm | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) (limited to 'applications/luci-app-olsr') diff --git a/applications/luci-app-olsr/luasrc/view/status-olsr/common_js.htm b/applications/luci-app-olsr/luasrc/view/status-olsr/common_js.htm index 1ee763e11..213013f22 100644 --- a/applications/luci-app-olsr/luasrc/view/status-olsr/common_js.htm +++ b/applications/luci-app-olsr/luasrc/view/status-olsr/common_js.htm @@ -9,7 +9,7 @@ function css(selector, property, value) { } window.onload = function() { - buttons = '' + var buttons = '' buttons += '' document.getElementById('togglebuttons').innerHTML = buttons; diff --git a/applications/luci-app-olsr/luasrc/view/status-olsr/hna.htm b/applications/luci-app-olsr/luasrc/view/status-olsr/hna.htm index 1c178f181..f04d92691 100644 --- a/applications/luci-app-olsr/luasrc/view/status-olsr/hna.htm +++ b/applications/luci-app-olsr/luasrc/view/status-olsr/hna.htm @@ -47,12 +47,14 @@ XHR.poll(10, '<%=REQUEST_URI%>', { status: 1 }, linkgw = '' + hna.gateway + '' } + var validity; if (hna.validityTime != undefined) { validity = hna.validityTime + 's' } else { validity = '-' } + var hostname; if (hna.hostname != undefined) { hostname = ' / ' + hna.hostname + '' } else { diff --git a/applications/luci-app-olsr/luasrc/view/status-olsr/smartgw.htm b/applications/luci-app-olsr/luasrc/view/status-olsr/smartgw.htm index 9afd367d1..46cc27dec 100644 --- a/applications/luci-app-olsr/luasrc/view/status-olsr/smartgw.htm +++ b/applications/luci-app-olsr/luasrc/view/status-olsr/smartgw.htm @@ -55,6 +55,7 @@ XHR.poll(10, '<%=REQUEST_URI%>', { status: 1 }, for (var idx = 0; idx < info.length; idx++) { var smartgw = info[idx]; + var linkgw; s += '
' if (smartgw.proto == '6') { linkgw = '' + smartgw.ipAddress + '' -- cgit v1.2.3