From 8ba14caa082f7b1195db58f96375f6240630200c Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Wed, 18 Apr 2012 01:28:54 +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 Updated for viewfunctions to htmlviewfunctions and modified require statements for acf libraries --- opennhrp-controller.lua | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'opennhrp-controller.lua') diff --git a/opennhrp-controller.lua b/opennhrp-controller.lua index 305898b..4468997 100644 --- a/opennhrp-controller.lua +++ b/opennhrp-controller.lua @@ -1,7 +1,5 @@ module(..., package.seeall) -require("controllerfunctions") - default_action = "status" function status(self) @@ -13,7 +11,7 @@ function show(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 listinterfaces(self) @@ -21,9 +19,9 @@ function listinterfaces(self) end function editinterface(self) - return controllerfunctions.handle_form(self, function() return self.model.getinterfacedetails(self.clientdata.interface) end, self.model.updateinterfacedetails, self.clientdata, "Save", "Edit Interface Config", "Interface Configuration Set") + return self.handle_form(self, function() return self.model.getinterfacedetails(self.clientdata.interface) end, self.model.updateinterfacedetails, self.clientdata, "Save", "Edit Interface Config", "Interface Configuration Set") end function expert (self) - return controllerfunctions.handle_form(self, function() return self.model:getconfigfile() end, function(value) return self.model:setconfigfile(value) end, self.clientdata, "Save", "Edit Config", "Configuration Set") + return self.handle_form(self, function() return self.model:getconfigfile() end, function(value) return self.model:setconfigfile(value) end, self.clientdata, "Save", "Edit Config", "Configuration Set") end -- cgit v1.2.3