summaryrefslogtreecommitdiffstats
path: root/opennhrp-listinterfaces-html.lsp
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2009-01-09 22:00:23 +0000
committerTed Trask <ttrask01@yahoo.com>2009-01-09 22:00:23 +0000
commitf524a6f6edf59eaf6e20043d4e54fe866f7f1357 (patch)
tree79bc7b7cffa77313526ae0d05026184b4e7bddbd /opennhrp-listinterfaces-html.lsp
parentccdcb4b6983ee1f32842aebae229e4d8700d80e2 (diff)
downloadacf-opennhrp-f524a6f6edf59eaf6e20043d4e54fe866f7f1357.tar.bz2
acf-opennhrp-f524a6f6edf59eaf6e20043d4e54fe866f7f1357.tar.xz
Virtual rewrite of opennhrp to change config to listinterfaces and editinterface. Modified expert to allow writing of file with errors.
git-svn-id: svn://svn.alpinelinux.org/acf/opennhrp/trunk@1673 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'opennhrp-listinterfaces-html.lsp')
-rw-r--r--opennhrp-listinterfaces-html.lsp25
1 files changed, 25 insertions, 0 deletions
diff --git a/opennhrp-listinterfaces-html.lsp b/opennhrp-listinterfaces-html.lsp
new file mode 100644
index 0000000..ca3fdb6
--- /dev/null
+++ b/opennhrp-listinterfaces-html.lsp
@@ -0,0 +1,25 @@
+<% local view, viewlibrary, page_info, session = ...
+require("viewfunctions")
+%>
+
+<% displaycommandresults({"editinterface"}, session) %>
+
+<h1><%= view.label %></h1>
+<TABLE>
+ <TR style="background:#eee;font-weight:bold;">
+ <TD style="padding-right:20px;white-space:nowrap;text-align:left;" class="header">Action</TD>
+ <TD style="padding-right:20px;white-space:nowrap;text-align:right;" class="header">Interface</TD>
+ <TD style="padding-right:20px;white-space:nowrap;text-align:left;" class="header">Type</TD>
+ <TD style="white-space:nowrap;text-align:left;" class="header">Comment</TD>
+ </TR>
+<% for i,intf in ipairs(view.value) do %>
+ <TR>
+ <TD style="padding-right:20px;white-space:nowrap;">
+ <% io.write(html.link{value = "editinterface?interface="..intf.interface.."&redir="..page_info.orig_action, label="Edit " }) %>
+ </TD>
+ <TD style="padding-right:20px;white-space:nowrap;text-align:right;"><%= intf.interface %></TD>
+ <TD style="padding-right:20px;white-space:nowrap;"><%= intf.type %></TD>
+ <TD style="white-space:nowrap;" width="90%"><P class="error"><%= string.gsub(intf.errtxt or "", "\n", "<BR>") %></P></TD>
+ </TR>
+<% end %>
+</TABLE>