diff options
author | Jo-Philipp Wich <jo@mein.io> | 2018-11-02 13:52:37 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-02 13:52:37 +0100 |
commit | d1c24c8972f9323aa616c142019cbc89d6dd0272 (patch) | |
tree | fdd75e2206f6b2e4798692833dbffca3754f9dd6 /applications/luci-app-olsr/luasrc | |
parent | 1c076cd26dde1d510658e8cb7cb2ca0ba0205a82 (diff) | |
parent | ec63339ae5258509cf7a8829d4dd79519948c256 (diff) |
Merge pull request #2252 from stweil/lgtm
Add missing variable declarations in JavaScript code
Diffstat (limited to 'applications/luci-app-olsr/luasrc')
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>' |