diff options
author | Ted Trask <ttrask01@yahoo.com> | 2012-04-18 01:29:47 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2012-04-18 01:29:47 +0000 |
commit | 0b9bf67d6e1407f0ada461f20bacdca2b8201abc (patch) | |
tree | c3dc7a1bcb2ea406e1cc5d4c14c2ab69e161e1b0 | |
parent | 681852c990ed9bcaeebce9d62e110239b7ca0498 (diff) | |
download | acf-openssh-0b9bf67d6e1407f0ada461f20bacdca2b8201abc.tar.bz2 acf-openssh-0b9bf67d6e1407f0ada461f20bacdca2b8201abc.tar.xz |
Started work on updating for acf-core-0.15
Removed controllerfunctions library (still needs more work and corresponding work in model)
Updated startstop functionality and deleted view
Updated for viewfunctions to htmlviewfunctions and modified require statements for acf libraries
-rw-r--r-- | openssh-addauth-html.lsp | 4 | ||||
-rw-r--r-- | openssh-config-html.lsp | 4 | ||||
-rw-r--r-- | openssh-connectedpeers-html.lsp | 1 | ||||
-rw-r--r-- | openssh-controller.lua | 11 | ||||
-rw-r--r-- | openssh-listauth-html.lsp | 6 | ||||
-rw-r--r-- | openssh-listusers-html.lsp | 1 | ||||
-rw-r--r-- | openssh-model.lua | 14 | ||||
l--------- | openssh-startstop-html.lsp | 1 |
8 files changed, 20 insertions, 22 deletions
diff --git a/openssh-addauth-html.lsp b/openssh-addauth-html.lsp index f532b68..1f9dbd5 100644 --- a/openssh-addauth-html.lsp +++ b/openssh-addauth-html.lsp @@ -1,10 +1,10 @@ <% local form, viewlibrary, page_info = ... -require("viewfunctions") +require("htmlviewfunctions") %> <H1><%= html.html_escape(form.label) %></H1> <% form.action = page_info.script .. page_info.prefix .. page_info.controller .. "/" .. page_info.action form.value.user.type = "hidden" - displayform(form) + htmlviewfunctions.displayform(form) %> diff --git a/openssh-config-html.lsp b/openssh-config-html.lsp index aee05a9..1bc7873 100644 --- a/openssh-config-html.lsp +++ b/openssh-config-html.lsp @@ -1,5 +1,5 @@ <% local form, viewlibrary, page_info, session = ... -require("viewfunctions") +require("htmlviewfunctions") %> <% if viewlibrary and viewlibrary.dispatch_component then @@ -10,5 +10,5 @@ end %> <% form.action = page_info.script .. page_info.prefix .. page_info.controller .. "/" .. page_info.action local order = {"Port", "ListenAddress", "PermitRootLogin", "PasswordAuthentication", "UseDNS"} - displayform(form, order) + htmlviewfunctions.displayform(form, order) %> diff --git a/openssh-connectedpeers-html.lsp b/openssh-connectedpeers-html.lsp index 6b3d7a0..74eb0ce 100644 --- a/openssh-connectedpeers-html.lsp +++ b/openssh-connectedpeers-html.lsp @@ -1,5 +1,4 @@ <% local data, viewlibrary, page_info = ... -require("viewfunctions") %> <H1>Connected peers</H1> diff --git a/openssh-controller.lua b/openssh-controller.lua index 99b7650..9e2f866 100644 --- a/openssh-controller.lua +++ b/openssh-controller.lua @@ -1,8 +1,5 @@ module(..., package.seeall) --- Load libraries -require("controllerfunctions") - default_action = "status" function status(self) @@ -10,15 +7,15 @@ function status(self) end function config(self) - return controllerfunctions.handle_form(self, self.model.read_config, self.model.update_config, self.clientdata, "Save", "Edit Config", "Configuration Saved") + return self.handle_form(self, self.model.read_config, self.model.update_config, self.clientdata, "Save", "Edit Config", "Configuration Saved") end function startstop(self) - return controllerfunctions.handle_startstop(self, self.model.startstop_service, self.clientdata) + return self.handle_form(self, self.model.get_startstop, self.model.startstop_service, self.clientdata) end function expert(self) - return controllerfunctions.handle_form(self, self.model.getconfigfile, self.model.setconfigfile, self.clientdata, "Save", "Edit Config", "Configuration Saved") + return self.handle_form(self, self.model.getconfigfile, self.model.setconfigfile, self.clientdata, "Save", "Edit Config", "Configuration Saved") end function connectedpeers(self) @@ -38,5 +35,5 @@ function deleteauth(self) end function addauth(self) - return controllerfunctions.handle_form(self, function() return self.model.get_auth(self.clientdata.user) end, self.model.create_auth, self.clientdata, "Add", "Add New Authorized Key", "Key Added") + return self.handle_form(self, function() return self.model.get_auth(self.clientdata.user) end, self.model.create_auth, self.clientdata, "Add", "Add New Authorized Key", "Key Added") end diff --git a/openssh-listauth-html.lsp b/openssh-listauth-html.lsp index 6df3f0a..61abe47 100644 --- a/openssh-listauth-html.lsp +++ b/openssh-listauth-html.lsp @@ -1,8 +1,8 @@ <% local view, viewlibrary, page_info, session = ... %> -<% require("viewfunctions") %> +<% require("htmlviewfunctions") %> -<% displaycommandresults({"deleteauth"}, session) %> -<% displaycommandresults({"addauth"}, session, true) %> +<% htmlviewfunctions.displaycommandresults({"deleteauth"}, session) %> +<% htmlviewfunctions.displaycommandresults({"addauth"}, session, true) %> <H1>Authorized Keys for <%= html.html_escape(view.value.user.value) %></H1> <DL><TABLE> diff --git a/openssh-listusers-html.lsp b/openssh-listusers-html.lsp index d5e0fbc..85f35b2 100644 --- a/openssh-listusers-html.lsp +++ b/openssh-listusers-html.lsp @@ -1,5 +1,4 @@ <% local view, viewlibrary, page_info, session = ... %> -<% require("viewfunctions") %> <H1>System User Accounts</H1> <DL> diff --git a/openssh-model.lua b/openssh-model.lua index 2ece192..ab3f61b 100644 --- a/openssh-model.lua +++ b/openssh-model.lua @@ -3,9 +3,9 @@ module(..., package.seeall) -- Load libraries require("modelfunctions") require("posix") -require("validator") -require("fs") -require("format") +validator = require("acf.validator") +fs = require("acf.fs") +format = require("acf.format") -- Set variables local configfile = "/etc/ssh/sshd_config" @@ -47,8 +47,12 @@ end -- ################################################################################ -- PUBLIC FUNCTIONS -function startstop_service(action) - return modelfunctions.startstop_service(processname, action) +function get_startstop(clientdata) + return modelfunctions.get_startstop(processname) +end + +function startstop_service(startstop, action) + return modelfunctions.startstop_service(startstop, action) end function getstatus() diff --git a/openssh-startstop-html.lsp b/openssh-startstop-html.lsp deleted file mode 120000 index 0ea2627..0000000 --- a/openssh-startstop-html.lsp +++ /dev/null @@ -1 +0,0 @@ -../startstop-html.lsp
\ No newline at end of file |