summaryrefslogtreecommitdiffstats
path: root/opennhrp-controller.lua
diff options
context:
space:
mode:
Diffstat (limited to 'opennhrp-controller.lua')
-rw-r--r--opennhrp-controller.lua8
1 files changed, 3 insertions, 5 deletions
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