summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2015-10-05 14:03:35 +0000
committerTed Trask <ttrask01@yahoo.com>2015-10-05 14:03:35 +0000
commit58e27d2cd614cb56d193f2e344d1866a751f8800 (patch)
tree2376853d2a7acabc408e37398c6fc687c3254658
parent10b78269ed0bc055c0e89881644fe57d6b8a2669 (diff)
downloadacf-clamsmtp-58e27d2cd614cb56d193f2e344d1866a751f8800.tar.bz2
acf-clamsmtp-58e27d2cd614cb56d193f2e344d1866a751f8800.tar.xz
Modify logfile to use common view
-rw-r--r--clamsmtp-controller.lua4
l---------[-rw-r--r--]clamsmtp-logfile-html.lsp7
-rw-r--r--clamsmtp-model.lua9
3 files changed, 12 insertions, 8 deletions
diff --git a/clamsmtp-controller.lua b/clamsmtp-controller.lua
index e51af13..c9475a0 100644
--- a/clamsmtp-controller.lua
+++ b/clamsmtp-controller.lua
@@ -18,4 +18,8 @@ function mymodule.expert(self)
return self.handle_form(self, self.model.get_filedetails, self.model.update_filedetails, self.clientdata, "Save", "Edit ClamSMTP Config", "Configuration Set")
end
+function mymodule.logfile(self)
+ return self.model.get_logfile(self, self.clientdata)
+end
+
return mymodule
diff --git a/clamsmtp-logfile-html.lsp b/clamsmtp-logfile-html.lsp
index ab076ff..ac8854f 100644..120000
--- a/clamsmtp-logfile-html.lsp
+++ b/clamsmtp-logfile-html.lsp
@@ -1,6 +1 @@
-<% local data, viewlibrary = ...
-%>
-
-<% if viewlibrary and viewlibrary.dispatch_component then
- viewlibrary.dispatch_component("alpine-baselayout/logfiles/view", {filename="/var/log/messages", grep="clamsmtp"})
-end %>
+../logfile-html.lsp \ No newline at end of file
diff --git a/clamsmtp-model.lua b/clamsmtp-model.lua
index ac09576..df610ad 100644
--- a/clamsmtp-model.lua
+++ b/clamsmtp-model.lua
@@ -10,8 +10,6 @@ local configfile = "/etc/clamsmtpd.conf"
local processname = "clamsmtpd"
local packagename = "clamsmtp"
-local path = "PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin "
-
-- ################################################################################
-- LOCAL FUNCTIONS
@@ -42,4 +40,11 @@ function mymodule.update_filedetails(self, filedetails)
return modelfunctions.setfiledetails(self, filedetails, {configfile})
end
+function mymodule.get_logfile(self, clientdata)
+ local retval = cfe({ type="group", value={}, label="Log File Configuration" })
+ retval.value.facility = cfe({value="mail", label="Syslog Facility"})
+ retval.value.grep = cfe({ value="clamsmtp", label="Grep" })
+ return retval
+end
+
return mymodule