+<script type="text/javascript" src="<%=resource%>/cbi.js"></script>
+<script type="text/javascript">//<![CDATA[
+XHR.poll(10, '<%=REQUEST_URI%>', { status: 1 },
+ function(x, info)
+ {
+ var hnadiv = document.getElementById('olsrd_hna');
+ if (hnadiv)
+ {
+ var s = '';
+ for (var idx = 0; idx < info.length; idx++)
+ {
+ var hna = info[idx];
+ var linkgw = ''
+ s += '<tr class="cbi-section-table-row cbi-rowstyle-'+(1 + (idx % 2))+' proto-' + hna.proto + '">'
+ if (hna.proto == '6') {
+ linkgw = '<a href="http://[' + hna.gateway + ']/cgi-bin-status.html">' + hna.gateway + '</a>'
+ } else {
+ linkgw = '<a href="http://' + hna.gateway + '/cgi-bin-status.html">' + hna.gateway + '</a>'
+ }
+
+ if (hna.validityTime != undefined) {
+ validity = hna.validityTime + 's'
+ } else {
+ validity = '-'
+ }
+
+ if (hna.hostname != undefined) {
+ hostname = ' / <a href="http://' + hna.hostname + '/cgi-bin-status.html">' + hna.hostname + '</a>'
+ } else {
+ hostname = ''
+ }
+
+ 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>', hna.destination + '/' + hna.genmask, linkgw + hostname, validity
+ )
+ s += '</tr>'
+ }
+ hnadiv.innerHTML = s;
+ }
+}
+);
+//]]></script>
+