summaryrefslogtreecommitdiffstats
path: root/dhcp-controller.lua
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2008-08-12 12:07:14 +0000
committerTed Trask <ttrask01@yahoo.com>2008-08-12 12:07:14 +0000
commitaf2b190d33683aafc06c73b0bab1ae743e69468a (patch)
treebffc185e18806da99144c01ce824313e21cb8571 /dhcp-controller.lua
parente45a01ccebf7c9a756e3d27e3fe6abbeb8797a36 (diff)
downloadacf-dhcp-af2b190d33683aafc06c73b0bab1ae743e69468a.tar.bz2
acf-dhcp-af2b190d33683aafc06c73b0bab1ae743e69468a.tar.xz
Modified dhcp to add host support.
git-svn-id: svn://svn.alpinelinux.org/acf/dhcp/trunk@1376 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'dhcp-controller.lua')
-rw-r--r--dhcp-controller.lua16
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