summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMika Havela <mika.havela@gmail.com>2008-08-22 15:47:10 +0000
committerMika Havela <mika.havela@gmail.com>2008-08-22 15:47:10 +0000
commit8bc0a1d1e27bf1adba6dd84df9281a1b417302de (patch)
tree3b55cc149093e5b685bdd7483ad2e2ce3b4b11c9
parent9ead7ba1fd547c929a1fd7043dc34b631e2586c5 (diff)
downloadacf-openssh-8bc0a1d1e27bf1adba6dd84df9281a1b417302de.tar.bz2
acf-openssh-8bc0a1d1e27bf1adba6dd84df9281a1b417302de.tar.xz
Changed config-page to use CFE's, coming from controller/model to visualize information.
git-svn-id: svn://svn.alpinelinux.org/acf/openssh/trunk@1398 ab2d0c66-481e-0410-8bed-d214d4d58bed
-rw-r--r--openssh-config-html.lsp79
1 files changed, 25 insertions, 54 deletions
diff --git a/openssh-config-html.lsp b/openssh-config-html.lsp
index ed1efb5..e76d1a2 100644
--- a/openssh-config-html.lsp
+++ b/openssh-config-html.lsp
@@ -1,67 +1,38 @@
-<% local form = ...
+<% local form, viewlibrary, page_info, session = ...
require("viewfunctions")
-%>
-
-<!-- <%
+--[[
io.write("<H1>DEBUGGING</H1><span style='color:red'><H2>DEBUG INFO: CFE</H2>")
io.write(html.cfe_unpack(form))
io.write("</span>")
-%> --!>
-
-<%
-function checked(b)
- if b then
- return "checked"
- end
- return ""
-end
+--]]
+%>
-port = form.config.Port
-listen_address = form.config.ListenAddress
-use_dns = checked(form.config.UseDNS)
-password_authentication = checked(form.config.PasswordAuthentication)
-permit_root_login = checked(form.config.PermitRootLogin)
+<% if viewlibrary and viewlibrary.dispatch_component then
+ viewlibrary.dispatch_component("status")
+end %>
+<H1>Configuration</H1>
+<H2>Guided Configuration</H2>
+<FORM NAME="configuration" ACTION="" METHOD="POST">
+<H3>Settings</H3>
+<DL>
+<%
+local myform = form
+local tags = { "Port", "ListenAddress", "PasswordAuthentication", "UseDNS",}
+displayinfo(myform,tags)
%>
+</DL>
-<H1>SSH Configuration</H1>
+<H3>Save</H3>
<DL>
<%
-local myform = form.status
-local tags = { "status", "version", "autostart", }
--- displayinfo(myform,tags,"viewonly")
+local myform = form
+local tags = { "cmdsave",}
+displayinfo(myform,tags)
%>
</DL>
+</FORM>
-<form name="cmd" action="" method="POST">
-<dl>
- <dt><label for="port">Port</label></dt>
- <dd><input class="text" type="text" id="port" value="<%= port %>"/></dd>
-
- <dt><label for="address">Listen address</label></dt>
- <dd><input class="text" type="text" id="address" value="<%= listen_address %>"/></dd>
-
- <dt><label for="PermitRootLogin">Permit Root Login</label></dt>
- <dd><input type="checkbox" name="PermitRootLogin" id="PermitRootLogin"
- <%= permit_root_login %> />
-
- <dt><label for="PasswordAuthentication">Password Authentication</label></dt>
- <dd><input type="checkbox" name="PasswordAuthentication" id="PasswordAuthentication" <%= password_authentication %>/>
-
- <dt><label for="UseDNS">Use DNS</label></dt>
- <dd><input type="checkbox" name="UseDNS" id="UseDNS" <%= use_dns %>/>
-
- <dt>&nbsp;</dt>
- <dd><input type="submit" id="Apply" value="Apply"/></dd>
-</dl>
-<%
--- Management buttons
-local myform = form.management
-local tags = { "start", "stop", "restart" }
-if (myform) then
- io.write("<H1>MANAGEMENT</H1>\n<DL>")
- displaymanagement(myform,tags)
- io.write("</DL>")
-end
-%>
-</form>
+<% if viewlibrary and viewlibrary.dispatch_component and session.permissions[page_info.controller].startstop then
+ viewlibrary.dispatch_component("startstop")
+end %>