diff options
author | Ted Trask <ttrask01@yahoo.com> | 2012-04-18 01:21:25 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2012-04-18 01:21:25 +0000 |
commit | 72dedfca943bb7a74598415d4f5d40cd555b0dec (patch) | |
tree | ce5a7a340b8d6ce0eb8cdf1da7d2530c58e8d475 | |
parent | 86c509c01b3ee85ea2d35bc3f21936772d6e16f0 (diff) | |
download | acf-ipsec-tools-72dedfca943bb7a74598415d4f5d40cd555b0dec.tar.bz2 acf-ipsec-tools-72dedfca943bb7a74598415d4f5d40cd555b0dec.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-- | ipsectools-controller.lua | 17 | ||||
-rw-r--r-- | ipsectools-details-html.lsp | 4 | ||||
-rw-r--r-- | ipsectools-expert-html.lsp | 4 | ||||
-rw-r--r-- | ipsectools-listcerts-html.lsp | 6 | ||||
-rw-r--r-- | ipsectools-logfile-html.lsp | 1 | ||||
-rw-r--r-- | ipsectools-model.lua | 14 | ||||
l--------- | ipsectools-startstop-html.lsp | 1 | ||||
-rw-r--r-- | ipsectools-uploadcert-html.lsp | 4 |
8 files changed, 22 insertions, 29 deletions
diff --git a/ipsectools-controller.lua b/ipsectools-controller.lua index 545b675..f6d7e4f 100644 --- a/ipsectools-controller.lua +++ b/ipsectools-controller.lua @@ -1,14 +1,5 @@ module(..., package.seeall) --- Load libraries -require("controllerfunctions") - --- ################################################################################ --- LOCAL FUNCTIONS - --- ################################################################################ --- PUBLIC FUNCTIONS - default_action = "status" function status(self) @@ -16,7 +7,7 @@ function status(self) 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 details(self) @@ -24,11 +15,11 @@ function details(self) end function editracoon (self) - return controllerfunctions.handle_form(self, self.model.get_racoonfiledetails, self.model.update_racoonfiledetails, self.clientdata, "Save", "Edit Racoon Config", "Configuration Set") + return self.handle_form(self, self.model.get_racoonfiledetails, self.model.update_racoonfiledetails, self.clientdata, "Save", "Edit Racoon Config", "Configuration Set") end function editipsec (self) - return controllerfunctions.handle_form(self, self.model.get_ipsecfiledetails, self.model.update_ipsecfiledetails, self.clientdata, "Save", "Edit IPSec Config", "Configuration Set") + return self.handle_form(self, self.model.get_ipsecfiledetails, self.model.update_ipsecfiledetails, self.clientdata, "Save", "Edit IPSec Config", "Configuration Set") end function listcerts(self) @@ -40,7 +31,7 @@ function deletecert(self) end function uploadcert (self) - return controllerfunctions.handle_form(self, self.model.new_upload_cert, self.model.upload_cert, self.clientdata, "Upload", "Upload Certificate", "Certificate Uploaded") + return self.handle_form(self, self.model.new_upload_cert, self.model.upload_cert, self.clientdata, "Upload", "Upload Certificate", "Certificate Uploaded") end function viewcert(self) diff --git a/ipsectools-details-html.lsp b/ipsectools-details-html.lsp index 6abf881..6dc4d0a 100644 --- a/ipsectools-details-html.lsp +++ b/ipsectools-details-html.lsp @@ -1,5 +1,5 @@ <% local data, viewlibrary, page_info = ... -require("viewfunctions") +--require("htmlviewfunctions") %> <% viewlibrary.dispatch_component("status") %> @@ -31,6 +31,6 @@ else end end end ---displayitem(data.value.ip_xfrm_policy) +--htmlviewfunctions.displayitem(data.value.ip_xfrm_policy) %> </DL> diff --git a/ipsectools-expert-html.lsp b/ipsectools-expert-html.lsp index 9f8c397..4b214cb 100644 --- a/ipsectools-expert-html.lsp +++ b/ipsectools-expert-html.lsp @@ -1,7 +1,7 @@ <% local data, viewlibrary, page_info, session = ... %> -<% require("viewfunctions") %> +<% require("htmlviewfunctions") %> -<% displaycommandresults({"editracoon", "editipsec"}, session, true) %> +<% htmlviewfunctions.displaycommandresults({"editracoon", "editipsec"}, session, true) %> <% viewlibrary.dispatch_component("status") diff --git a/ipsectools-listcerts-html.lsp b/ipsectools-listcerts-html.lsp index c6aa9cf..ff8b133 100644 --- a/ipsectools-listcerts-html.lsp +++ b/ipsectools-listcerts-html.lsp @@ -1,8 +1,8 @@ <% local view, viewlibrary, page_info, session = ... %> -<% require("viewfunctions") %> +<% require("htmlviewfunctions") %> -<% displaycommandresults({"deletecert"}, session) %> -<% displaycommandresults({"uploadcert"}, session, true) %> +<% htmlviewfunctions.displaycommandresults({"deletecert"}, session) %> +<% htmlviewfunctions.displaycommandresults({"uploadcert"}, session, true) %> <H1><%= html.html_escape(view.label) %></H1> diff --git a/ipsectools-logfile-html.lsp b/ipsectools-logfile-html.lsp index 5543322..1102aea 100644 --- a/ipsectools-logfile-html.lsp +++ b/ipsectools-logfile-html.lsp @@ -1,5 +1,4 @@ <% local data, viewlibrary = ... -require("viewfunctions") %> <% if viewlibrary and viewlibrary.dispatch_component then diff --git a/ipsectools-model.lua b/ipsectools-model.lua index 9a8ab8d..4e67dbd 100644 --- a/ipsectools-model.lua +++ b/ipsectools-model.lua @@ -3,9 +3,9 @@ module(..., package.seeall) -- Load libraries require("posix") require("modelfunctions") -require("fs") -require("format") -require("validator") +fs = require("acf.fs") +format = require("acf.format") +validator = require("acf.validator") -- Set variables local configfile = "/etc/racoon/racoon.conf" @@ -119,8 +119,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/ipsectools-startstop-html.lsp b/ipsectools-startstop-html.lsp deleted file mode 120000 index 0ea2627..0000000 --- a/ipsectools-startstop-html.lsp +++ /dev/null @@ -1 +0,0 @@ -../startstop-html.lsp
\ No newline at end of file diff --git a/ipsectools-uploadcert-html.lsp b/ipsectools-uploadcert-html.lsp index fc1b408..4e524e6 100644 --- a/ipsectools-uploadcert-html.lsp +++ b/ipsectools-uploadcert-html.lsp @@ -1,5 +1,5 @@ <% local form, viewlibrary, page_info = ... %> -<% require("viewfunctions") %> +<% require("htmlviewfunctions") %> <H1><%= html.html_escape(form.label) %></H1> <% @@ -8,5 +8,5 @@ form.value.cert.type="file" form.value.password.type="password" local order = {"cert", "password"} - displayform(form, order) + htmlviewfunctions.displayform(form, order) %> |