From d9397d5fd90208b20c0cb44872a4c596b61f036d Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Sat, 31 Oct 2015 18:56:05 +0000 Subject: Modify logfile to use common view --- mysql-controller.lua | 4 ++++ mysql-logfile-html.lsp | 7 +------ mysql-model.lua | 7 +++++++ 3 files changed, 12 insertions(+), 6 deletions(-) mode change 100644 => 120000 mysql-logfile-html.lsp diff --git a/mysql-controller.lua b/mysql-controller.lua index c504167..5d26d6a 100644 --- a/mysql-controller.lua +++ b/mysql-controller.lua @@ -18,6 +18,10 @@ function mymodule.expert(self) return self.handle_form(self, self.model.getfiledetails, self.model.updatefiledetails, self.clientdata, "Save", "Edit MariaDB File", "File Saved") end +function mymodule.logfile(self) + return self.model.get_logfile(self, self.clientdata) +end + -- Use acf-db to allow editing of the database dbcontrollerfunctions = require("dbcontrollerfunctions") for n,f in pairs(dbcontrollerfunctions) do diff --git a/mysql-logfile-html.lsp b/mysql-logfile-html.lsp deleted file mode 100644 index 2a820c4..0000000 --- a/mysql-logfile-html.lsp +++ /dev/null @@ -1,6 +0,0 @@ -<% local data, viewlibrary = ... -%> - -<% if viewlibrary and viewlibrary.dispatch_component then - viewlibrary.dispatch_component("alpine-baselayout/logfiles/view", {filename="/var/log/messages", grep="mariadb"}) -end %> diff --git a/mysql-logfile-html.lsp b/mysql-logfile-html.lsp new file mode 120000 index 0000000..ac8854f --- /dev/null +++ b/mysql-logfile-html.lsp @@ -0,0 +1 @@ +../logfile-html.lsp \ No newline at end of file diff --git a/mysql-model.lua b/mysql-model.lua index de867f9..1db6a71 100644 --- a/mysql-model.lua +++ b/mysql-model.lua @@ -49,6 +49,13 @@ function mymodule.updatefiledetails(self, filedetails) return modelfunctions.setfiledetails(self, filedetails, {conffile}) end +function mymodule.get_logfile(self, clientdata) + local retval = cfe({ type="group", value={}, label="Log File Configuration" }) + retval.value.facility = cfe({value="daemon", label="Syslog Facility"}) + retval.value.grep = cfe({ value="mariadb", label="Grep" }) + return retval +end + for n,f in pairs(dbmodelfunctions) do mymodule[n] = function(...) return f(determineconnection, ...) -- cgit v1.2.3