summaryrefslogtreecommitdiffstats
path: root/kamailio-controller.lua
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2011-01-08 19:54:34 +0000
committerTed Trask <ttrask01@yahoo.com>2011-01-08 19:54:34 +0000
commit7737dbd5def8fe3f38553e6e5c91bfc389fcae64 (patch)
tree6b8f4a5d052e80a113a3700a57f18b5fae34d9c9 /kamailio-controller.lua
parent0b38e3b87b7dad7b6f76ac8857b85120ae256a7a (diff)
downloadacf-kamailio-7737dbd5def8fe3f38553e6e5c91bfc389fcae64.tar.bz2
acf-kamailio-7737dbd5def8fe3f38553e6e5c91bfc389fcae64.tar.xz
Added actions for listing and editing database tables. Relys on kamctlrc.
Diffstat (limited to 'kamailio-controller.lua')
-rw-r--r--kamailio-controller.lua21
1 files changed, 21 insertions, 0 deletions
diff --git a/kamailio-controller.lua b/kamailio-controller.lua
index a4bff67..69d3d1d 100644
--- a/kamailio-controller.lua
+++ b/kamailio-controller.lua
@@ -36,3 +36,24 @@ end
function updateuser(self)
return controllerfunctions.handle_form(self, function() return self.model.get_user(self.clientdata.username) end, self.model.update_user, self.clientdata, "Update", "Update User")
end
+
+function listtables(self)
+ return self.model.list_tables()
+end
+
+function viewtable(self)
+ return self.model.list_table_entries(self.clientdata.table)
+end
+
+function deletetableentry(self)
+ return self:redirect_to_referrer(self.model.delete_table_entry(self.clientdata.table, self.clientdata.id))
+end
+
+function updatetableentry(self)
+ return controllerfunctions.handle_form(self, function() return self.model.get_table_entry(self.clientdata.table, self.clientdata.id) end, self.model.update_table_entry, self.clientdata, "Update", "Update Table Entry", "Entry updated")
+end
+
+function createtableentry(self)
+ return controllerfunctions.handle_form(self, function() return self.model.get_table_entry(self.clientdata.table) end, self.model.create_table_entry, self.clientdata, "Create", "Create New Table Entry", "Entry created")
+end
+