summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--shorewall-config-html.lsp1
-rw-r--r--shorewall-controller.lua24
-rw-r--r--shorewall-details-html.lsp1
-rw-r--r--shorewall-listfiles-html.lsp4
-rw-r--r--shorewall-logfile-html.lsp1
-rw-r--r--shorewall-model.lua12
l---------shorewall-startstop-html.lsp1
7 files changed, 12 insertions, 32 deletions
diff --git a/shorewall-config-html.lsp b/shorewall-config-html.lsp
index d7b2118..9ad95c3 100644
--- a/shorewall-config-html.lsp
+++ b/shorewall-config-html.lsp
@@ -1,5 +1,4 @@
<% local form,viewlibrary = ...
-require("viewfunctions")
local descr = {
['interfaces'] = {
diff --git a/shorewall-controller.lua b/shorewall-controller.lua
index 99b31c4..6b27c27 100644
--- a/shorewall-controller.lua
+++ b/shorewall-controller.lua
@@ -1,25 +1,5 @@
module(..., package.seeall)
-require("controllerfunctions")
---[[
-local newrecordtxt = "[New]"
-
--- ################################################################################
--- LOCAL FUNCTIONS
-
-local function displaycmdsave(self)
- -- Add a cmd button to the view
- local cmdsave = cfe({ name="cmdsave",
- label="Save/Apply above settings",
- value="Save",
- type="submit",
- })
- return cmdsave
-end
---]]
--- ################################################################################
--- PUBLIC FUNCTIONS
-
default_action = "status"
function status(self)
@@ -31,7 +11,7 @@ function details(self)
end
function startstop(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
function listfiles(self)
@@ -39,7 +19,7 @@ function listfiles(self)
end
function edit(self)
- return controllerfunctions.handle_form(self, function() return self.model.getfiledetails(self.clientdata.filename) end, self.model.updatefiledetails, self.clientdata, "Save", "Edit File", "File Saved")
+ return self.handle_form(self, function() return self.model.getfiledetails(self.clientdata.filename) end, self.model.updatefiledetails, self.clientdata, "Save", "Edit File", "File Saved")
end
function check(self)
diff --git a/shorewall-details-html.lsp b/shorewall-details-html.lsp
index 00cf92f..9b087e7 100644
--- a/shorewall-details-html.lsp
+++ b/shorewall-details-html.lsp
@@ -1,5 +1,4 @@
<% local data, viewlibrary = ...
-require("viewfunctions")
%>
<% if viewlibrary and viewlibrary.dispatch_component then
diff --git a/shorewall-listfiles-html.lsp b/shorewall-listfiles-html.lsp
index 17d9d00..20892fa 100644
--- a/shorewall-listfiles-html.lsp
+++ b/shorewall-listfiles-html.lsp
@@ -1,8 +1,8 @@
<% local data, viewlibrary, page_info, session = ...
-require("viewfunctions")
+require("htmlviewfunctions")
%>
-<% displaycommandresults({"edit", "check"}, session) %>
+<% htmlviewfunctions.displaycommandresults({"edit", "check"}, session) %>
<% if viewlibrary and viewlibrary.dispatch_component then
viewlibrary.dispatch_component("status")
diff --git a/shorewall-logfile-html.lsp b/shorewall-logfile-html.lsp
index b99560c..e712df2 100644
--- a/shorewall-logfile-html.lsp
+++ b/shorewall-logfile-html.lsp
@@ -1,5 +1,4 @@
<% local data, viewlibrary = ...
-require("viewfunctions")
%>
<% if viewlibrary and viewlibrary.dispatch_component then
diff --git a/shorewall-model.lua b/shorewall-model.lua
index 3669fc0..5aef6f8 100644
--- a/shorewall-model.lua
+++ b/shorewall-model.lua
@@ -2,8 +2,8 @@ module(..., package.seeall)
-- Load libraries
require("modelfunctions")
-require("fs")
-require("format")
+fs = require("acf.fs")
+format = require("acf.format")
-- Set variables
local configfile = "/etc/shorewall/shorewall.conf"
@@ -181,8 +181,12 @@ function getstatusdetails()
return cfe({ value=programstate, label="Shorewall status report" })
end
-function startstop_service(action)
- return modelfunctions.startstop_service(processname, action)
+function get_startstop(clientdata)
+ return modelfunctions.get_startstop(processname)
+end
+
+function startstop_service(startstop, action)
+ return modelfunctions.startstop_service(startstop, action)
end
function configcheck ()
diff --git a/shorewall-startstop-html.lsp b/shorewall-startstop-html.lsp
deleted file mode 120000
index 0ea2627..0000000
--- a/shorewall-startstop-html.lsp
+++ /dev/null
@@ -1 +0,0 @@
-../startstop-html.lsp \ No newline at end of file