diff options
Diffstat (limited to 'dhcp-controller.lua')
-rw-r--r-- | dhcp-controller.lua | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/dhcp-controller.lua b/dhcp-controller.lua index a3bda73..b48bcfd 100644 --- a/dhcp-controller.lua +++ b/dhcp-controller.lua @@ -1,8 +1,6 @@ -- the dhcpd controller module (..., package.seeall) -require("controllerfunctions") - default_action = "status" status = function ( self ) @@ -10,19 +8,19 @@ status = function ( self ) end startstop = function ( 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 settings = function( self ) - return controllerfunctions.handle_form(self, self.model.read_settings, self.model.update_settings, self.clientdata, "Save", "Update Global Settings", "Global Settings Updated") + return self.handle_form(self, self.model.read_settings, self.model.update_settings, self.clientdata, "Save", "Update Global Settings", "Global Settings Updated") end editsubnet = function ( self ) - return controllerfunctions.handle_form(self, function() return self.model.subnet_read(self.clientdata.subnet) end, self.model.subnet_update, self.clientdata, "Save", "Edit Subnet", "Subnet Settings Updated") + return self.handle_form(self, function() return self.model.subnet_read(self.clientdata.subnet) end, self.model.subnet_update, self.clientdata, "Save", "Edit Subnet", "Subnet Settings Updated") end createsubnet = function ( self ) - return controllerfunctions.handle_form(self, self.model.create_new_subnet, self.model.subnet_create, self.clientdata, "Create", "Create new subnet", "New subnet Created") + return self.handle_form(self, self.model.create_new_subnet, self.model.subnet_create, self.clientdata, "Create", "Create new subnet", "New subnet Created") end delsubnet = function(self) @@ -34,11 +32,11 @@ listsubnets = function ( self ) end edithost = function ( self ) - return controllerfunctions.handle_form(self, function() return self.model.host_read(self.clientdata.host) end, self.model.host_update, self.clientdata, "Save", "Edit Host", "Host Settings Updated") + return self.handle_form(self, function() return self.model.host_read(self.clientdata.host) end, self.model.host_update, self.clientdata, "Save", "Edit Host", "Host Settings Updated") end createhost = function ( self ) - return controllerfunctions.handle_form(self, self.model.create_new_host, self.model.host_create, self.clientdata, "Create", "Create new host", "New host Created") + return self.handle_form(self, self.model.create_new_host, self.model.host_create, self.clientdata, "Create", "Create new host", "New host Created") end delhost = function(self) @@ -58,5 +56,5 @@ listfiles = function(self) end expert = function(self) - return controllerfunctions.handle_form(self, function() return self.model.getconfigfile(self.clientdata.filename) end, self.model.setconfigfile, self.clientdata, "Save", "Edit DHCP File", "File Saved") + return self.handle_form(self, function() return self.model.getconfigfile(self.clientdata.filename) end, self.model.setconfigfile, self.clientdata, "Save", "Edit DHCP File", "File Saved") end |