diff options
Diffstat (limited to 'dhcp-controller.lua')
-rw-r--r-- | dhcp-controller.lua | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/dhcp-controller.lua b/dhcp-controller.lua index 13639f0..5f36d7f 100644 --- a/dhcp-controller.lua +++ b/dhcp-controller.lua @@ -33,6 +33,22 @@ listsubnets = function ( self ) return self.model.get_subnets() 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") +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") +end + +delhost = function(self) + return self:redirect_to_referrer(self.model.host_delete(self.clientdata.host)) +end + +listhosts = function ( self ) + return self.model.get_hosts() +end + viewleases = function ( self ) return self.model.getleases() end |