summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2012-04-18 01:29:21 +0000
committerTed Trask <ttrask01@yahoo.com>2012-04-18 01:29:21 +0000
commit7e4ee0dd94ad37c10cd722916935822d79eea4fc (patch)
treee922e271714fd7e0cb350ad47d540b67a152c0db
parentfb75da980e3c877575571108f0cc6747ba8f7b67 (diff)
downloadacf-openntpd-7e4ee0dd94ad37c10cd722916935822d79eea4fc.tar.bz2
acf-openntpd-7e4ee0dd94ad37c10cd722916935822d79eea4fc.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--openntpd-config-html.lsp4
-rw-r--r--openntpd-controller.lua12
-rw-r--r--openntpd-details-html.lsp6
-rw-r--r--openntpd-logfile-html.lsp1
-rw-r--r--openntpd-model.lua12
l---------openntpd-startstop-html.lsp1
6 files changed, 16 insertions, 20 deletions
diff --git a/openntpd-config-html.lsp b/openntpd-config-html.lsp
index 8033857..2cd2cb3 100644
--- a/openntpd-config-html.lsp
+++ b/openntpd-config-html.lsp
@@ -1,5 +1,5 @@
<% local form, viewlibrary, page_info, session = ...
-require("viewfunctions")
+require("htmlviewfunctions")
%>
<% if viewlibrary and viewlibrary.dispatch_component then
@@ -10,5 +10,5 @@ end %>
<%
form.action = page_info.script .. page_info.prefix .. page_info.controller .. "/" .. page_info.action
local order = { "setstimeonstartup", "listen", "server", "servers" }
- displayform(form, order)
+ htmlviewfunctions.displayform(form, order)
%>
diff --git a/openntpd-controller.lua b/openntpd-controller.lua
index f735e84..dc90eb4 100644
--- a/openntpd-controller.lua
+++ b/openntpd-controller.lua
@@ -1,15 +1,9 @@
module (..., package.seeall)
--- Load libraries
-require("controllerfunctions")
-
--- ################################################################################
--- PUBLIC FUNCTIONS
-
default_action = "status"
function config(self)
- return controllerfunctions.handle_form(self, self.model.read_config, self.model.update_config, self.clientdata, "Save", "Edit OpenNTPD Config", "OpenNTPD Configuration Saved")
+ return self.handle_form(self, self.model.read_config, self.model.update_config, self.clientdata, "Save", "Edit OpenNTPD Config", "OpenNTPD Configuration Saved")
end
function status (self)
@@ -21,9 +15,9 @@ function details (self)
end
function expert (self)
- return controllerfunctions.handle_form(self, self.model.get_filedetails, self.model.update_filedetails, self.clientdata, "Save", "Edit Config", "Configuration Set")
+ return self.handle_form(self, self.model.get_filedetails, self.model.update_filedetails, self.clientdata, "Save", "Edit Config", "Configuration Set")
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
diff --git a/openntpd-details-html.lsp b/openntpd-details-html.lsp
index bb68ed2..db71acd 100644
--- a/openntpd-details-html.lsp
+++ b/openntpd-details-html.lsp
@@ -1,5 +1,5 @@
<% local data, viewlibrary = ...
-require("viewfunctions")
+require("htmlviewfunctions")
%>
<% if viewlibrary and viewlibrary.dispatch_component then
@@ -9,8 +9,8 @@ end %>
<H2><%= html.html_escape(data.label) %></H2>
<DL>
<%
-displayitem(data.value.date)
-displayitem(data.value.timechanged)
+htmlviewfunctions.displayitem(data.value.date)
+htmlviewfunctions.displayitem(data.value.timechanged)
%>
</DL>
diff --git a/openntpd-logfile-html.lsp b/openntpd-logfile-html.lsp
index 23f732e..993c95a 100644
--- a/openntpd-logfile-html.lsp
+++ b/openntpd-logfile-html.lsp
@@ -1,5 +1,4 @@
<% local data, viewlibrary = ...
-require("viewfunctions")
%>
<% if viewlibrary and viewlibrary.dispatch_component then
diff --git a/openntpd-model.lua b/openntpd-model.lua
index a3dbbae..9924701 100644
--- a/openntpd-model.lua
+++ b/openntpd-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/ntpd.conf"
@@ -52,8 +52,12 @@ end
-- ################################################################################
-- PUBLIC FUNCTIONS
-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 getstatus()
diff --git a/openntpd-startstop-html.lsp b/openntpd-startstop-html.lsp
deleted file mode 120000
index 0ea2627..0000000
--- a/openntpd-startstop-html.lsp
+++ /dev/null
@@ -1 +0,0 @@
-../startstop-html.lsp \ No newline at end of file