diff options
Diffstat (limited to 'applications/luci-app-olsr/luasrc/view/status-olsr/smartgw.htm')
-rw-r--r-- | applications/luci-app-olsr/luasrc/view/status-olsr/smartgw.htm | 85 |
1 files changed, 42 insertions, 43 deletions
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 6aa7a75461..9afd367d1f 100644 --- a/applications/luci-app-olsr/luasrc/view/status-olsr/smartgw.htm +++ b/applications/luci-app-olsr/luasrc/view/status-olsr/smartgw.htm @@ -44,7 +44,6 @@ end <%+header%> -<script type="text/javascript" src="<%=resource%>/cbi.js"></script> <script type="text/javascript">//<![CDATA[ XHR.poll(10, '<%=REQUEST_URI%>', { status: 1 }, function(x, info) @@ -56,7 +55,7 @@ XHR.poll(10, '<%=REQUEST_URI%>', { status: 1 }, for (var idx = 0; idx < info.length; idx++) { var smartgw = info[idx]; - s += '<tr class="cbi-section-table-row cbi-rowstyle-'+(1 + (idx % 2))+' proto-' + smartgw.proto + '">' + 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>' } else { @@ -64,18 +63,18 @@ XHR.poll(10, '<%=REQUEST_URI%>', { status: 1 }, } s += String.format( - '<td class="cbi-section-table-cell">%s</td>' + - '<td class="cbi-section-table-cell">%s</td>' + - '<td class="cbi-section-table-cell">%s</td>' + - '<td class="cbi-section-table-cell">%s</td>' + - '<td class="cbi-section-table-cell">%s</td>' + - '<td class="cbi-section-table-cell">%s</td>' + - '<td class="cbi-section-table-cell">%s</td>' + - '<td class="cbi-section-table-cell">%s</td>' + - '<td class="cbi-section-table-cell">%s</td>', + '<div class="td cbi-section-table-cell">%s</div>' + + '<div class="td cbi-section-table-cell">%s</div>' + + '<div class="td cbi-section-table-cell">%s</div>' + + '<div class="td cbi-section-table-cell">%s</div>' + + '<div class="td cbi-section-table-cell">%s</div>' + + '<div class="td cbi-section-table-cell">%s</div>' + + '<div class="td cbi-section-table-cell">%s</div>' + + '<div class="td cbi-section-table-cell">%s</div>' + + '<div class="td cbi-section-table-cell">%s</div>', linkgw, smartgw.status, smartgw.tcPathCost, smartgw.hopCount, smartgw.uplinkSpeed, smartgw.downlinkSpeed, smartgw.v4, smartgw.v6, smartgw.externalPrefix ) - s += '</tr>' + s += '</div>' } smartgwdiv.innerHTML = s; } @@ -94,23 +93,23 @@ XHR.poll(10, '<%=REQUEST_URI%>', { status: 1 }, <fieldset class="cbi-section"> <legend><%:Overview of smart gateways in this network%></legend> - <table class="cbi-section-table"> - <thead> - <tr class="cbi-section-table-titles"> - <th class="cbi-section-table-cell"><%:Gateway%></th> - <th class="cbi-section-table-cell"><%:Status%></th> - <th class="cbi-section-table-cell"><%:ETX%></th> - <th class="cbi-section-table-cell"><%:Hops%></th> - <th class="cbi-section-table-cell"><%:Uplink%></th> - <th class="cbi-section-table-cell"><%:Downlink%></th> - <th class="cbi-section-table-cell"><%:IPv4%></th> - <th class="cbi-section-table-cell"><%:IPv6%></th> - <th class="cbi-section-table-cell"><%:Prefix%></th> - - </tr> - </thead> - - <tbody id="olsrd_smartgw"> + <div class="table cbi-section-table"> + <div class="thead"> + <div class="tr cbi-section-table-titles"> + <div class="th cbi-section-table-cell"><%:Gateway%></div> + <div class="th cbi-section-table-cell"><%:Status%></div> + <div class="th cbi-section-table-cell"><%:ETX%></div> + <div class="th cbi-section-table-cell"><%:Hops%></div> + <div class="th cbi-section-table-cell"><%:Uplink%></div> + <div class="th cbi-section-table-cell"><%:Downlink%></div> + <div class="th cbi-section-table-cell"><%:IPv4%></div> + <div class="th cbi-section-table-cell"><%:IPv6%></div> + <div class="th cbi-section-table-cell"><%:Prefix%></div> + + </div> + </div> + + <div class="tbody" id="olsrd_smartgw"> <% for k, gw in ipairs(gws) do gw.tcPathCost = tonumber(gw.tcPathCost)/1024 or 0 @@ -119,27 +118,27 @@ XHR.poll(10, '<%=REQUEST_URI%>', { status: 1 }, end %> - <tr class="cbi-section-table-row cbi-rowstyle-<%=i%> proto-<%=proto%>"> + <div class="tr cbi-section-table-row cbi-rowstyle-<%=i%> proto-<%=proto%>"> <% if gw.proto == '6' then %> - <td class="cbi-section-table-cell"><a href="http://[<%=gw.ipAddress%>]/cgi-bin-status.html"><%=gw.ipAddress%></a></td> + <div class="td cbi-section-table-cell"><a href="http://[<%=gw.ipAddress%>]/cgi-bin-status.html"><%=gw.ipAddress%></a></div> <% else %> - <td class="cbi-section-table-cell"><a href="http://<%=gw.ipAddress%>/cgi-bin-status.html"><%=gw.ipAddress%></a></td> + <div class="td cbi-section-table-cell"><a href="http://<%=gw.ipAddress%>/cgi-bin-status.html"><%=gw.ipAddress%></a></div> <% end %> - <td class="cbi-section-table-cell"><%=gw.ipv4Status or gw.ipv6Status or '-' %></td> - <td class="cbi-section-table-cell"><%=string.format("%.3f", gw.tcPathCost)%></td> - <td class="cbi-section-table-cell"><%=gw.hopCount%></td> - <td class="cbi-section-table-cell"><%=gw.uplinkSpeed%></td> - <td class="cbi-section-table-cell"><%=gw.downlinkSpeed%></td> - <td class="cbi-section-table-cell"><%=gw.ipv4 and luci.i18n.translate('yes') or luci.i18n.translate('no')%></td> - <td class="cbi-section-table-cell"><%=gw.ipv6 and luci.i18n.translate('yes') or luci.i18n.translate('no')%></td> - <td class="cbi-section-table-cell"><%=gw.externalPrefix%></td> - </tr> + <div class="td cbi-section-table-cell"><%=gw.ipv4Status or gw.ipv6Status or '-' %></div> + <div class="td cbi-section-table-cell"><%=string.format("%.3f", gw.tcPathCost)%></div> + <div class="td cbi-section-table-cell"><%=gw.hopCount%></div> + <div class="td cbi-section-table-cell"><%=gw.uplinkSpeed%></div> + <div class="td cbi-section-table-cell"><%=gw.downlinkSpeed%></div> + <div class="td cbi-section-table-cell"><%=gw.ipv4 and luci.i18n.translate('yes') or luci.i18n.translate('no')%></div> + <div class="td cbi-section-table-cell"><%=gw.ipv6 and luci.i18n.translate('yes') or luci.i18n.translate('no')%></div> + <div class="td cbi-section-table-cell"><%=gw.externalPrefix%></div> + </div> <% i = ((i % 2) + 1) end %> - </tbody> - </table> + </div> + </div> </fieldset> <% else %> |