summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--freeswitch-controller.lua8
-rw-r--r--freeswitch-listfiles-html.lsp8
-rw-r--r--freeswitch-logfile-html.lsp1
-rw-r--r--freeswitch-model.lua14
l---------freeswitch-startstop-html.lsp1
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