From a3b838873fd04b83285fe3f955d012d5a0da71c5 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Mon, 3 Feb 2014 21:35:45 +0000 Subject: Cleanup HTML including removing DL/DT/DD, use tablesorter where possible, and use lowercase tags --- opennhrp-editinterface-html.lsp | 2 +- opennhrp-listinterfaces-html.lsp | 49 ++++++++++++++++++++++++++++------------ opennhrp-show-html.lsp | 27 ++++++++++------------ 3 files changed, 47 insertions(+), 31 deletions(-) diff --git a/opennhrp-editinterface-html.lsp b/opennhrp-editinterface-html.lsp index 76d37a2..ef5ebe6 100644 --- a/opennhrp-editinterface-html.lsp +++ b/opennhrp-editinterface-html.lsp @@ -25,7 +25,7 @@ html = require("acf.html") }); -

<%= html.html_escape(form.label) %>

+

<%= html.html_escape(form.label) %>

<% form.value.interface.readonly = true local option = {"interface", "type", "map"} diff --git a/opennhrp-listinterfaces-html.lsp b/opennhrp-listinterfaces-html.lsp index 044de2e..a684c2d 100644 --- a/opennhrp-listinterfaces-html.lsp +++ b/opennhrp-listinterfaces-html.lsp @@ -3,24 +3,43 @@ htmlviewfunctions = require("htmlviewfunctions") html = require("acf.html") %> + + + + + + <% htmlviewfunctions.displaycommandresults({"editinterface"}, session) %>

<%= html.html_escape(view.label) %>

-
- - - - - - +
ActionInterfaceTypeComment
+ + + + + + + <% for i,intf in ipairs(view.value) do %> - - + - - - - + + + + + <% end %> -
ActionInterfaceTypeComment
+
<% io.write(html.link{value = "editinterface?interface="..intf.interface.."&redir="..page_info.orig_action, label="Edit " }) %> - <%= html.html_escape(intf.interface) %><%= html.html_escape(intf.type) %>

<%= string.gsub(html.html_escape(intf.errtxt), "\n", "
") %>

<%= html.html_escape(intf.interface) %><%= html.html_escape(intf.type) %>

<%= string.gsub(html.html_escape(intf.errtxt), "\n", "
") %>

+ diff --git a/opennhrp-show-html.lsp b/opennhrp-show-html.lsp index e168863..0ea960a 100644 --- a/opennhrp-show-html.lsp +++ b/opennhrp-show-html.lsp @@ -7,22 +7,21 @@ html = require("acf.html") viewlibrary.dispatch_component("status") end %> -

<%= html.html_escape(data.label) %>

-
+

<%= html.html_escape(data.label) %>

<% htmlviewfunctions.displayitem(data.value.status) %> -
<%= html.html_escape(data.value.peers_list.label) %>
-
+

<%= html.html_escape(data.value.peers_list.label) %>

+
<% local found for intf,addresses in pairs(data.value.peers_list.value) do found = true %> - - +
<%= html.html_escape(intf) %>
+ <% for i,entries in ipairs(addresses) do - io.write("\n") + io.write(".png' width='16' height='16' title='" .. html.html_escape(entries.Type.descr) .. "'> " .. html.html_escape(entries["Protocol-Address"].value) .. "\n") for j,entry in pairs(entries) do if j ~= "Protocol-Address" then - io.write("\n") + io.write("\n") end end end - io.write("\t\t\t
<%= html.html_escape(intf) %>
" .. html.html_escape(entries["Protocol-Address"].value) .. "
"..html.html_escape(entry.label)..""..html.html_escape(entry.value)) + io.write("
"..html.html_escape(entry.label)..""..html.html_escape(entry.value)) if entry.descr then - io.write(" (" .. html.html_escape(entry.descr) .. ")") + io.write(" (" .. html.html_escape(entry.descr) .. ")") end - io.write("
") + io.write("\t\t\t") end if not found then io.write("No peers found\n") end %> -
-
- + -- cgit v1.2.3