From af2b190d33683aafc06c73b0bab1ae743e69468a Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Tue, 12 Aug 2008 12:07:14 +0000 Subject: Modified dhcp to add host support. git-svn-id: svn://svn.alpinelinux.org/acf/dhcp/trunk@1376 ab2d0c66-481e-0410-8bed-d214d4d58bed --- dhcp-controller.lua | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'dhcp-controller.lua') 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 -- cgit v1.2.3