summaryrefslogtreecommitdiffstats
path: root/logfiles-controller.lua
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2015-11-20 21:46:04 +0000
committerTed Trask <ttrask01@yahoo.com>2015-11-20 21:46:04 +0000
commit92baed49c0b6780fbd55ebb2e0fb9b1ee13e220e (patch)
tree1032c944e2030d464f3384fdec47c89bd44ab5b7 /logfiles-controller.lua
parentc653804d7ca2c0b6c2c60b58f6cc41a6eb8b1519 (diff)
downloadacf-alpine-baselayout-92baed49c0b6780fbd55ebb2e0fb9b1ee13e220e.tar.bz2
acf-alpine-baselayout-92baed49c0b6780fbd55ebb2e0fb9b1ee13e220e.tar.xz
Better error handling for view/tail/download and fix download to use proper cfe for input
Diffstat (limited to 'logfiles-controller.lua')
-rw-r--r--logfiles-controller.lua11
1 files changed, 7 insertions, 4 deletions
diff --git a/logfiles-controller.lua b/logfiles-controller.lua
index 54548be..b4c1cc4 100644
--- a/logfiles-controller.lua
+++ b/logfiles-controller.lua
@@ -18,10 +18,13 @@ mymodule.view = function (self)
end
mymodule.download = function (self)
- local filestatus = mymodule.view(self)
- local filecontent = filestatus.value.filecontent
- filecontent.label = posix.basename(filestatus.value.filename.value)
- return filecontent
+ local filedetails = mymodule.view(self)
+ local filecontent = filedetails.value.filecontent
+ if filecontent then
+ filecontent.type = "raw"
+ filecontent.label = posix.basename(filedetails.value.filename.value)
+ end
+ return filedetails
end
mymodule.tail = function (self)