From 9147842a752d598f4cdc596d8568d26cb5e61faf Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Thu, 10 Apr 2014 06:27:41 +0000 Subject: Changes to use new htmlviewfunctions functions --- qos-details-html.lsp | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/qos-details-html.lsp b/qos-details-html.lsp index 8592ff8..7b5f9ff 100644 --- a/qos-details-html.lsp +++ b/qos-details-html.lsp @@ -17,7 +17,7 @@ html = require("acf.html") @@ -25,7 +25,7 @@ html = require("acf.html") <% viewlibrary.dispatch_component("status") %> -

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

+<% local header_level = htmlviewfunctions.displaysectionstart(data, page_info) %> @@ -33,27 +33,26 @@ html = require("acf.html") +<% local redir = cfe({ type="hidden", value=page_info.orig_action }) %> <% for i,intf in ipairs(data.value) do %> <% if intf.enabled then %> - + <% end %> <% end %>
ActionStatus
<% 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?filename="..intf.filename.."&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 " }) %> + <% htmlviewfunctions.displayitem(cfe({type="link", value={DEV=cfe({type="hidden", value=intf.interface}), redir=redir}, label="", option="Edit", action="config"}), page_info, -1) %> + <% htmlviewfunctions.displayitem(cfe({type="link", value={filename=cfe({type="hidden", value=intf.filename}), redir=redir}, label="", option="Expert", action="expert"}), page_info, -1) %> + <% htmlviewfunctions.displayitem(cfe({type="link", value={servicename=cfe({type="hidden", value=intf.init}), redir=redir}, label="", option="Autostart", action=page_info.script.."/alpine-baselayout/rc/edit"}), page_info, -1) %> <% else %> - <% io.write(html.link{value = "enable?submit=true&interface="..intf.interface, label="Enable " }) %> + <% htmlviewfunctions.displayitem(cfe({type="form", value={interface=cfe({type="hidden", value=intf.interface})}, label="", option="Enable", action="enable"}), page_info, -1) %> <% end %> <%= html.html_escape(intf.interface) %> <%= html.html_escape(intf.status) %>
" method="post"> - - - - -
+ <% htmlviewfunctions.displayitem(cfe({type="form", value={init=cfe({type="hidden", value=intf.init})}, label="", option={"Start", "Stop", "Restart"}, action="startstopinterface"}), page_info, -1) %> +
+<% htmlviewfunctions.displaysectionend(header_level) %> -- cgit v1.2.3