From d6e8f214d59c9f70cd6c53cf82c9977328705245 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Thu, 17 Apr 2014 00:43:17 +0000 Subject: Changes to use new htmlviewfunctions functions and standardize logfile viewer This closes a bug where log filename was not validated --- vlc-logfile-html.lsp | 48 ++++-------------------------------------------- 1 file changed, 4 insertions(+), 44 deletions(-) (limited to 'vlc-logfile-html.lsp') diff --git a/vlc-logfile-html.lsp b/vlc-logfile-html.lsp index 78baaa5..16c583a 100644 --- a/vlc-logfile-html.lsp +++ b/vlc-logfile-html.lsp @@ -1,46 +1,6 @@ -<% local form, viewlibrary, page_info = ... %> -<% htmlviewfunctions = require("htmlviewfunctions") %> -<% html = require("acf.html") %> - -

Logfile

-

File Details

-<% -htmlviewfunctions.displayitem(form.value.filename) -htmlviewfunctions.displayitem(form.value.filesize) -htmlviewfunctions.displayitem(form.value.mtime) ---if form.value.grep.value ~= "" then --- htmlviewfunctions.displayitem(form.value.grep) ---end +<% local data, viewlibrary = ... %> -

File Content

-<% if form.type == "form" then %> -<% form.action = page_info.script .. page_info.prefix .. page_info.controller .. "/" .. page_info.action %> -<% htmlviewfunctions.displayformstart(form) %> - -<% end %> - -<% if form.value.filecontent.errtxt then %>

<%= string.gsub(html.html_escape(form.value.filecontent.errtxt), "\n", "
") %>

<% end %> -<% if form.value.filecontent.descr then %>

<%= string.gsub(html.html_escape(form.value.filecontent.descr), "\n", "
") %>

<% end %> - -<% if form.type == "form" then %> -<% htmlviewfunctions.displayformend(form) %> -<% end %> - - -<% ---[[ -print("

Debug info for page '"..tostring(page_info.action).."'

") ---form["value"]["filecontent"]["value"]=nil -print("

form

") -print(htmlviewfunctions.cfe_unpack(form)) -print("

viewlibrary

") -print(htmlviewfunctions.cfe_unpack(viewlibrary)) -print("

page_info

") -print(htmlviewfunctions.cfe_unpack(page_info)) -print("

session

") -print(htmlviewfunctions.cfe_unpack(session)) ---]] -%> +<% if viewlibrary and viewlibrary.dispatch_component then + viewlibrary.dispatch_component("alpine-baselayout/logfiles/view", {filename=data.value}) +end %> -- cgit v1.2.3