From f524a6f6edf59eaf6e20043d4e54fe866f7f1357 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Fri, 9 Jan 2009 22:00:23 +0000 Subject: Virtual rewrite of opennhrp to change config to listinterfaces and editinterface. Modified expert to allow writing of file with errors. git-svn-id: svn://svn.alpinelinux.org/acf/opennhrp/trunk@1673 ab2d0c66-481e-0410-8bed-d214d4d58bed --- opennhrp-controller.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'opennhrp-controller.lua') diff --git a/opennhrp-controller.lua b/opennhrp-controller.lua index aab365d..94ea3eb 100644 --- a/opennhrp-controller.lua +++ b/opennhrp-controller.lua @@ -16,8 +16,12 @@ function startstop(self) return controllerfunctions.handle_startstop(self, self.model.startstop_service, self.model.getstatus, self.clientdata) end -function config(self) - return controllerfunctions.handle_form(self, function() return self.model:getconfig() end, function(value) return self.model:setconfig(value) end, self.clientdata, "Save", "Edit Config", "Configuration Set") +function listinterfaces(self) + return self.model.listinterfaces(self) +end + +function editinterface(self) + return controllerfunctions.handle_form(self, function() return self.model.getinterfacedetails(self.clientdata.interface) end, self.model.updateinterfacedetails, self.clientdata, "Save", "Edit Interface Config", "Interface Configuration Set") end function expert (self) -- cgit v1.2.3