summaryrefslogtreecommitdiffstats
path: root/asterisk-controller.lua
blob: 0f04d004ff34797dd74bcbca6476457204de9e3f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
-- the squid  controller
local mymodule = {}

mymodule.default_action = "status"

mymodule.status = function( self )
	return self.model.get_status()
end

mymodule.startstop = function( self )
	return self.handle_form(self, self.model.get_startstop, self.model.startstop_service, self.clientdata)
end

mymodule.listfiles = function( self )
	return self.model.list_files()
end

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