summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-olsr
diff options
context:
space:
mode:
authorStefan Weil <sw@weilnetz.de>2018-10-28 22:38:20 +0100
committerStefan Weil <sw@weilnetz.de>2018-10-28 22:38:20 +0100
commitec63339ae5258509cf7a8829d4dd79519948c256 (patch)
tree1ae6ab68f92f6c483b0e466b72e9b2ce9a702037 /applications/luci-app-olsr
parent35b543e270428357d22ede5ceff39653b3371a1b (diff)
Add missing variable declarations in JavaScript code
This fixes errors reported by LGTM. Signed-off-by: Stefan Weil <sw@weilnetz.de>
Diffstat (limited to 'applications/luci-app-olsr')
-rw-r--r--applications/luci-app-olsr/luasrc/view/status-olsr/common_js.htm2
-rw-r--r--applications/luci-app-olsr/luasrc/view/status-olsr/hna.htm2
-rw-r--r--applications/luci-app-olsr/luasrc/view/status-olsr/smartgw.htm1
3 files changed, 4 insertions, 1 deletions
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 = '<input type="button" name="show-proto-4" id="show-proto-4" class="cbi-button cbi-button-apply" style="margin-right: 5px" value="<%:Hide IPv4%>">'
+ var buttons = '<input type="button" name="show-proto-4" id="show-proto-4" class="cbi-button cbi-button-apply" style="margin-right: 5px" value="<%:Hide IPv4%>">'
buttons += '<input type="button" name="show-proto-6" id="show-proto-6" class="cbi-button cbi-button-apply" value="<%:Hide IPv6%>">'
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 = '<a href="http://' + hna.gateway + '/cgi-bin-status.html">' + hna.gateway + '</a>'
}
+ var validity;
if (hna.validityTime != undefined) {
validity = hna.validityTime + 's'
} else {
validity = '-'
}
+ var hostname;
if (hna.hostname != undefined) {
hostname = ' / <a href="http://' + hna.hostname + '/cgi-bin-status.html">' + hna.hostname + '</a>'
} 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 += '<div class="tr cbi-section-table-row cbi-rowstyle-'+(1 + (idx % 2))+' proto-' + smartgw.proto + '">'
if (smartgw.proto == '6') {
linkgw = '<a href="http://[' + smartgw.ipAddress + ']/cgi-bin-status.html">' + smartgw.ipAddress + '</a>'