diff options
author | Ted Trask <ttrask01@yahoo.com> | 2009-09-17 16:18:32 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2009-09-17 16:18:32 +0000 |
commit | e4580cd98e5e42612dfa49ccfa2bb79fc47cfab5 (patch) | |
tree | 8db120c961cbde070b672c51c2a2446e3e7b6a39 /qos-details-html.lsp | |
download | acf-iproute2-qos-e4580cd98e5e42612dfa49ccfa2bb79fc47cfab5.tar.bz2 acf-iproute2-qos-e4580cd98e5e42612dfa49ccfa2bb79fc47cfab5.tar.xz |
First cut at ACF for iproute2-qosv0.1.0
Diffstat (limited to 'qos-details-html.lsp')
-rw-r--r-- | qos-details-html.lsp | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/qos-details-html.lsp b/qos-details-html.lsp new file mode 100644 index 0000000..2409387 --- /dev/null +++ b/qos-details-html.lsp @@ -0,0 +1,40 @@ +<% local data, viewlibrary, page_info, session = ... +require("viewfunctions") +%> + +<% displaycommandresults({"enable","config","expert","startstop"}, session) %> + +<% viewlibrary.dispatch_component("status") %> + +<H2><%= html.html_escape(data.label) %></H2> +<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:left;" class="header">Interface</TD> + <TD style="padding-right:20px;white-space:nowrap;text-align:left;" class="header">Status</TD> + <TD style="white-space:nowrap;text-align:left;" class="header"></TD> + </TR> +<% for i,intf in ipairs(data.value) do %> + <TR> + <TD style="padding-right:20px;white-space:nowrap;"> + <% if intf.enabled then %> + <% io.write(html.link{value = "config?DEV="..intf.interface.."&redir="..page_info.orig_action, label="Edit " }) %> + <% io.write(html.link{value = "expert?interface="..intf.interface.."&redir="..page_info.orig_action, label="Expert " }) %> + <% io.write(html.link{value = page_info.script .. "/alpine-baselayout/rc/edit?servicename="..intf.init.."&redir=".. page_info.orig_action, label="Autostart " }) %> + <% else %> + <% io.write(html.link{value = "enable?interface="..intf.interface.."&redir="..page_info.orig_action, label="Enable " }) %> + <% end %> + </TD> + <TD style="padding-right:20px;white-space:nowrap;"><%= html.html_escape(intf.interface) %></TD> + <TD style="white-space:nowrap;" width="90%"><%= html.html_escape(intf.status) %></TD> + <% if intf.enabled then %> + <TD><form action="<%= html.html_escape(page_info.script .. page_info.prefix .. page_info.controller .. "/startstop") %>" method="POST"> + <input type="hidden" name="init" value="<%= intf.init %>"> + <input class="submit" type="submit" name="action" value="Start"> + <input class="submit" type="submit" name="action" value="Stop"> + <input class="submit" type="submit" name="action" value="Restart"> + </form></TD> + <% end %> + </TR> +<% end %> +</TABLE> |