From 0475c30f9133a5835bc13dc784f03df0812bc483 Mon Sep 17 00:00:00 2001 From: Mika Havela Date: Thu, 6 Dec 2007 07:14:37 +0000 Subject: Renamed files and deleted old files git-svn-id: svn://svn.alpinelinux.org/acf/openntpd/trunk@414 ab2d0c66-481e-0410-8bed-d214d4d58bed --- openntpd-controller.lua | 62 ------------------------------------- openntpd-logfile-html.lsp | 21 +++++++++++++ openntpd-settings-html.lsp | 76 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 97 insertions(+), 62 deletions(-) delete mode 100644 openntpd-controller.lua create mode 100644 openntpd-logfile-html.lsp create mode 100644 openntpd-settings-html.lsp diff --git a/openntpd-controller.lua b/openntpd-controller.lua deleted file mode 100644 index 9e520c6..0000000 --- a/openntpd-controller.lua +++ /dev/null @@ -1,62 +0,0 @@ -module (..., package.seeall) - --- Cause an http redirect to our "read" action --- We use the self.conf table because it already has prefix,controller,etc --- The redir code is defined in the application error handler (acf-controller) -require("posix") -local list_redir = function (self) - self.conf.action = "read" - self.conf.type = "redir" - error (self.conf) -end - -mvc={} -mvc.on_load = function(self, parent) - if (self.worker[self.conf.action] == nil ) or ( self.conf.action == "init" ) then - self.worker[self.conf.action] = list_redir(self) - end -end - - -settings = function (self) - local cmd = self.clientdata.cmd - local url = ENV["SCRIPT_NAME"] .. self.conf.prefix .. self.conf.controller - if ( cmd ~= nil ) then - local startstop = self.model:startstop_service( cmd ) - posix.sleep(1) -- Wait for the process to start|stop - local statusinfo = self.model:get() - return ( {startstop = startstop, statusinfo = statusinfo, url = url } ) - else - return ( {statusinfo = self.model:get(), startstop = "", url = url } ) - end -end - -logfile = function (self) - return ( {logfile = self.model:get_logfile(), url = url } ) -end - -read = function (self) - local cmd = self.clientdata.cmd - local url = ENV["SCRIPT_NAME"] .. self.conf.prefix .. self.conf.controller - return ( {statusinfo = self.model:get(), url = url } ) -end - -advanced = function (self) - local filecontent = self.clientdata.modifications or "" - local cmd = self.clientdata.cmd - local url = ENV["SCRIPT_NAME"] .. self.conf.prefix .. self.conf.controller - - if ( filecontent ~= "") then - local me = ( {filecontent = self.model:update_filecontent(filecontent), url = url } ) - return ( {startstop = "", statusinfo = self.model:get(), filecontent = self.model:get_filecontent(), url = url } ) - else - if ( cmd ~= nil ) then - local startstop = self.model:startstop_service( cmd ) - posix.sleep(1) -- Wait for the process to start|stop - return ( {startstop = startstop, statusinfo = self.model:get(), filecontent = self.model:get_filecontent(), url = url } ) - else - return ( {startstop = "", statusinfo = self.model:get(), filecontent = self.model:get_filecontent(), url = url } ) - end - end -end - diff --git a/openntpd-logfile-html.lsp b/openntpd-logfile-html.lsp new file mode 100644 index 0000000..748bd09 --- /dev/null +++ b/openntpd-logfile-html.lsp @@ -0,0 +1,21 @@ + + + +

LOGFILE

+ +

Details

+ +
Logfile
+
+ +

Content

+ + + + + diff --git a/openntpd-settings-html.lsp b/openntpd-settings-html.lsp new file mode 100644 index 0000000..f79da46 --- /dev/null +++ b/openntpd-settings-html.lsp @@ -0,0 +1,76 @@ + + +

System time

+ +

SYSTEM INFO

+ +
Process status
+
+ +
Start or stop process
+
+ + +

NTPD SETTINGS

+ + +
Set time immediately at startup
+
+ +
Save the above settings
+
(see above)
+ + +

'SET TIME' OPTIONS

+ +
Timeserver hosts...
+
+
+In most cases you could use pool.ntp.org or
[countryname].pool.ntp.org (if listed in http://www.pool.ntp.org/). +
+ + +
Delete selected host
+
(see above)
+ +
Add new host
+
+ + +

'PRESENT TIME' OPTIONS (ACT AS TIME SERVER)

+
Listen on address...
+
+
Empty list = Listening (acting as server) is disabled
"*" = Listen on all local addresses +
+ + +
Delete selected address
+
(see above)
+ + +
Add new listen address
+
+ + + + + -- cgit v1.2.3