diff options
author | Ted Trask <ttrask01@yahoo.com> | 2008-08-12 12:07:14 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2008-08-12 12:07:14 +0000 |
commit | af2b190d33683aafc06c73b0bab1ae743e69468a (patch) | |
tree | bffc185e18806da99144c01ce824313e21cb8571 /dhcp-controller.lua | |
parent | e45a01ccebf7c9a756e3d27e3fe6abbeb8797a36 (diff) | |
download | acf-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.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 |