diff options
-rw-r--r-- | lighttpd-controller.lua | 7 | ||||
-rw-r--r-- | lighttpd-listfiles-html.lsp | 4 | ||||
-rw-r--r-- | lighttpd-logfile-html.lsp | 1 | ||||
-rw-r--r-- | lighttpd-model.lua | 12 | ||||
l--------- | lighttpd-startstop-html.lsp | 1 |
5 files changed, 12 insertions, 13 deletions
diff --git a/lighttpd-controller.lua b/lighttpd-controller.lua index d9f5d58..9cd8240 100644 --- a/lighttpd-controller.lua +++ b/lighttpd-controller.lua @@ -1,8 +1,5 @@ module(..., package.seeall) --- Load libraries -require("controllerfunctions") - default_action = "status" function status(self) @@ -10,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 listfiles(self) @@ -18,7 +15,7 @@ function listfiles(self) end function expert(self) - return controllerfunctions.handle_form(self, function() return self.model.getfiledetails(self.clientdata.filename) end, self.model.updatefiledetails, self.clientdata, "Save", "Edit Lighttpd File", "File Saved") + return self.handle_form(self, function() return self.model.getfiledetails(self.clientdata.filename) end, self.model.updatefiledetails, self.clientdata, "Save", "Edit Lighttpd File", "File Saved") end function logfile(self) diff --git a/lighttpd-listfiles-html.lsp b/lighttpd-listfiles-html.lsp index 374146c..6420120 100644 --- a/lighttpd-listfiles-html.lsp +++ b/lighttpd-listfiles-html.lsp @@ -1,8 +1,8 @@ <% local data, viewlibrary, page_info, session = ... -require("viewfunctions") +require("htmlviewfunctions") %> -<% displaycommandresults({"expert"}, session) %> +<% htmlviewfunctions.displaycommandresults({"expert"}, session) %> <% if viewlibrary and viewlibrary.dispatch_component then viewlibrary.dispatch_component("status") diff --git a/lighttpd-logfile-html.lsp b/lighttpd-logfile-html.lsp index fbe7221..7cedd8b 100644 --- a/lighttpd-logfile-html.lsp +++ b/lighttpd-logfile-html.lsp @@ -1,5 +1,4 @@ <% local data, viewlibrary = ... -require("viewfunctions") %> <% if viewlibrary and viewlibrary.dispatch_component then diff --git a/lighttpd-model.lua b/lighttpd-model.lua index 6e04c88..ca77c64 100644 --- a/lighttpd-model.lua +++ b/lighttpd-model.lua @@ -2,8 +2,8 @@ module(..., package.seeall) -- Load libraries require("modelfunctions") -require("fs") -require("format") +fs = require("acf.fs") +format = require("acf.format") -- Set variables local processname = "lighttpd" @@ -18,8 +18,12 @@ local path = "PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin -- ################################################################################ -- 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/lighttpd-startstop-html.lsp b/lighttpd-startstop-html.lsp deleted file mode 120000 index 0ea2627..0000000 --- a/lighttpd-startstop-html.lsp +++ /dev/null @@ -1 +0,0 @@ -../startstop-html.lsp
\ No newline at end of file |