diff options
author | Ted Trask <ttrask01@yahoo.com> | 2012-04-18 01:18:30 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2012-04-18 01:18:30 +0000 |
commit | 39f60af92aae372c9a386e8ecb94ee31d4ea8b25 (patch) | |
tree | 6c79afa7259932bf278c69a784dced7ab80895f3 | |
parent | f8a8ab3c1367ee6f55e7b982c8095022cae85af4 (diff) | |
download | acf-freeswitch-39f60af92aae372c9a386e8ecb94ee31d4ea8b25.tar.bz2 acf-freeswitch-39f60af92aae372c9a386e8ecb94ee31d4ea8b25.tar.xz |
Started work on updating for acf-core-0.15
Removed controllerfunctions library (still needs more work and corresponding work in model)
Updated startstop functionality and deleted view
Updated for viewfunctions to htmlviewfunctions and modified require statements for acf libraries
-rw-r--r-- | freeswitch-controller.lua | 8 | ||||
-rw-r--r-- | freeswitch-listfiles-html.lsp | 8 | ||||
-rw-r--r-- | freeswitch-logfile-html.lsp | 1 | ||||
-rw-r--r-- | freeswitch-model.lua | 14 | ||||
l--------- | freeswitch-startstop-html.lsp | 1 |
5 files changed, 16 insertions, 16 deletions
diff --git a/freeswitch-controller.lua b/freeswitch-controller.lua index 607d718..e7be60d 100644 --- a/freeswitch-controller.lua +++ b/freeswitch-controller.lua @@ -1,7 +1,5 @@ module (..., package.seeall) -require("controllerfunctions") - default_action = "status" status = function( self ) @@ -9,7 +7,7 @@ status = function( self ) end startstop = function( self ) - return controllerfunctions.handle_startstop(self, self.model.startstop_service, self.clientdata) + return self.handle_form(self, self.model.get_startstop, self.model.startstop_service, self.clientdata) end listfiles = function( self ) @@ -17,11 +15,11 @@ listfiles = function( self ) end editfile = function( self ) - return controllerfunctions.handle_form(self, function() return self.model.get_file(self.clientdata.filename) end, self.model.update_file, self.clientdata, "Save", "Edit File", "File Saved") + return self.handle_form(self, function() return self.model.get_file(self.clientdata.filename) end, self.model.update_file, self.clientdata, "Save", "Edit File", "File Saved") end function createfile(self) - return controllerfunctions.handle_form(self, self.model.getnewfile, self.model.createfile, self.clientdata, "Create", "Create New Freeswitch File", "Freeswitch File Created") + return self.handle_form(self, self.model.getnewfile, self.model.createfile, self.clientdata, "Create", "Create New Freeswitch File", "Freeswitch File Created") end function deletefile(self) diff --git a/freeswitch-listfiles-html.lsp b/freeswitch-listfiles-html.lsp index ae47535..f2a2fbe 100644 --- a/freeswitch-listfiles-html.lsp +++ b/freeswitch-listfiles-html.lsp @@ -1,9 +1,9 @@ <% local view, viewlibrary, page_info, session = ... -require("viewfunctions") +require("htmlviewfunctions") %> -<% displaycommandresults({"editfile", "deletefile", "reloadxml"}, session) %> -<% displaycommandresults({"createfile"}, session, true) %> +<% htmlviewfunctions.displaycommandresults({"editfile", "deletefile", "reloadxml"}, session) %> +<% htmlviewfunctions.displaycommandresults({"createfile"}, session, true) %> <% if viewlibrary and viewlibrary.dispatch_component then viewlibrary.dispatch_component("status") @@ -40,7 +40,7 @@ end %> <H2><%= html.html_escape(createform.label) %></H2> <% createform.action = page_info.script .. page_info.prefix .. page_info.controller .. "/createfile" - displayform(createform) + htmlviewfunctions.displayform(createform) end %> <% if viewlibrary.check_permission("reloadxml") then %> diff --git a/freeswitch-logfile-html.lsp b/freeswitch-logfile-html.lsp index 4dcc8d0..b5b9481 100644 --- a/freeswitch-logfile-html.lsp +++ b/freeswitch-logfile-html.lsp @@ -1,5 +1,4 @@ <% local data, viewlibrary = ... -require("viewfunctions") %> <% if viewlibrary and viewlibrary.dispatch_component then diff --git a/freeswitch-model.lua b/freeswitch-model.lua index 3c2cb95..e42fd1f 100644 --- a/freeswitch-model.lua +++ b/freeswitch-model.lua @@ -3,9 +3,9 @@ module (..., package.seeall) -- Load libraries require("modelfunctions") require("posix") -require("fs") -require("format") -require("validator") +fs = require("acf.fs") +format = require("acf.format") +validator = require("acf.validator") -- Set variables local processname = "freeswitch" @@ -29,8 +29,12 @@ get_status = function() return modelfunctions.getstatus(processname, packagename, "Freeswitch Status") end -function startstop_service(action) - return modelfunctions.startstop_service(processname, action, {"Start", "Stop", "Restart"}) +function get_startstop(clientdata) + return modelfunctions.get_startstop(processname) +end + +function startstop_service(startstop, action) + return modelfunctions.startstop_service(startstop, action) end function reload_xml() diff --git a/freeswitch-startstop-html.lsp b/freeswitch-startstop-html.lsp deleted file mode 120000 index 0ea2627..0000000 --- a/freeswitch-startstop-html.lsp +++ /dev/null @@ -1 +0,0 @@ -../startstop-html.lsp
\ No newline at end of file |