summaryrefslogtreecommitdiffstats
path: root/weblog-controller.lua
diff options
context:
space:
mode:
Diffstat (limited to 'weblog-controller.lua')
-rw-r--r--weblog-controller.lua14
1 files changed, 7 insertions, 7 deletions
diff --git a/weblog-controller.lua b/weblog-controller.lua
index c645d11..cf7a99b 100644
--- a/weblog-controller.lua
+++ b/weblog-controller.lua
@@ -61,7 +61,6 @@ function downloadweblog(self)
for i,log in ipairs(retval.value.log.value) do
content[#content+1] = string.format("%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,",
log.clientuserid, log.clientip, log.logdatetime, log.uri, log.bytes, log.reason, log.score or "0", log.reason, log.badyesno, log.deniedyesno, log.bypassyesno )
-
end
file.value = table.concat(content, "\n")
return file
@@ -84,14 +83,14 @@ end
function downloadselected(self)
thisdate=os.date()
self.conf.viewtype = "stream"
- local retval = viewselected(self)
+ local retval = viewselected(self)
local file = cfe({ type="longtext", value="", label="Weblog-resnet-selected-"..thisdate..".tab" })
local content = {"clientuserid\tclientip\tlogdatetime\turi\tbytes\treason\tscore\treason\tbadyesno\tdeniedyesno\tbypassyesno"}
for i,log in ipairs(retval.value.log.value) do
content[#content+1] = string.format("%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t",
log.clientuserid, log.clientip, log.logdatetime, log.uri, log.bytes, log.reason, log.score or "0", log.reason, log.badyesno, log.deniedyesno, log.bypassyesno )
- end
- file.value = table.concat(content, "\n")
+ end
+ file.value = table.concat(content, "\n")
return file
end
@@ -100,7 +99,8 @@ function checkselected(self)
self.conf.viewtype = "silent"
return self.model.editselected(self.clientdata.chkdata)
--return file
-end
+end
+
function clearselected(self)
return self:redirect_to_referrer(self.model.clearselected())
end
@@ -131,7 +131,7 @@ function downloadadhocquery(self)
local retval = self.model.getnewadhocquery()
controllerfunctions.handle_clientdata(retval, self.clientdata)
retval = self.model.adhocquery(retval)
-
+
local file = cfe({ type="longtext", value="", label="query" })
if retval.value.result and #retval.value.result.value > 0 then
local columns = {}
@@ -148,7 +148,7 @@ function downloadadhocquery(self)
end
file.value = table.concat(content, "\n")
end
-
+
return file
end