diff options
Diffstat (limited to 'asterisk-controller.lua')
-rw-r--r-- | asterisk-controller.lua | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/asterisk-controller.lua b/asterisk-controller.lua index 404a141..0f04d00 100644 --- a/asterisk-controller.lua +++ b/asterisk-controller.lua @@ -1,21 +1,22 @@ -- the squid controller +local mymodule = {} -module (..., package.seeall) +mymodule.default_action = "status" -default_action = "status" - -status = function( self ) +mymodule.status = function( self ) return self.model.get_status() end -startstop = function( self ) +mymodule.startstop = function( self ) return self.handle_form(self, self.model.get_startstop, self.model.startstop_service, self.clientdata) end -listfiles = function( self ) +mymodule.listfiles = function( self ) return self.model.list_files() end -edit = function( self ) +mymodule.edit = function( self ) return self.handle_form(self, self.model.get_file, self.model.update_file, self.clientdata, "Save", "Edit File", "File Saved") end + +return mymodule |