From 3d14538d699a162cd07df5004bb7de36a3cd4c9f Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Wed, 18 Apr 2012 01:32:16 +0000 Subject: 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 Modified require statements for acf libraries --- pingu-controller.lua | 7 ++----- pingu-model.lua | 12 ++++++++---- pingu-startstop-html.lsp | 1 - 3 files changed, 10 insertions(+), 10 deletions(-) delete mode 120000 pingu-startstop-html.lsp diff --git a/pingu-controller.lua b/pingu-controller.lua index b088d04..f70e7ac 100644 --- a/pingu-controller.lua +++ b/pingu-controller.lua @@ -1,8 +1,5 @@ module(..., package.seeall) --- Load libraries -require("controllerfunctions") - default_action = "status" function status(self) @@ -10,9 +7,9 @@ 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 expert(self) - return controllerfunctions.handle_form(self, self.model.get_filedetails, self.model.update_filedetails, self.clientdata, "Save", "Edit Pingu Config", "Configuration Set") + return self.handle_form(self, self.model.get_filedetails, self.model.update_filedetails, self.clientdata, "Save", "Edit Pingu Config", "Configuration Set") end diff --git a/pingu-model.lua b/pingu-model.lua index 0ed716b..15ed34d 100644 --- a/pingu-model.lua +++ b/pingu-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 configfile = "/etc/pingu/pingu.conf" @@ -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/pingu-startstop-html.lsp b/pingu-startstop-html.lsp deleted file mode 120000 index 0ea2627..0000000 --- a/pingu-startstop-html.lsp +++ /dev/null @@ -1 +0,0 @@ -../startstop-html.lsp \ No newline at end of file -- cgit v1.2.3