From 5e061276793706d52240c0700d950c7486cd865a Mon Sep 17 00:00:00 2001 From: Mika Havela Date: Wed, 8 Jul 2009 15:17:38 +0000 Subject: Created templates that goes into the popupwindow --- rrdtool-viewgraph-html.lsp | 14 -------------- rrdtool-viewgraph-popup.lsp | 14 ++++++++++++++ template-popup.lsp | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+), 14 deletions(-) delete mode 100644 rrdtool-viewgraph-html.lsp create mode 100644 rrdtool-viewgraph-popup.lsp create mode 100644 template-popup.lsp diff --git a/rrdtool-viewgraph-html.lsp b/rrdtool-viewgraph-html.lsp deleted file mode 100644 index ecc2702..0000000 --- a/rrdtool-viewgraph-html.lsp +++ /dev/null @@ -1,14 +0,0 @@ -<% local data, viewlibrary, page_info, session = ... -require("viewfunctions") -%> - -<% ---[[ DEBUG INFORMATION -io.write("

DEBUGGING

DEBUG INFO: CFE

") -io.write(html.cfe_unpack(data)) -io.write("
") ---]] -%> -
<%= data.descr %>
- - diff --git a/rrdtool-viewgraph-popup.lsp b/rrdtool-viewgraph-popup.lsp new file mode 100644 index 0000000..ecc2702 --- /dev/null +++ b/rrdtool-viewgraph-popup.lsp @@ -0,0 +1,14 @@ +<% local data, viewlibrary, page_info, session = ... +require("viewfunctions") +%> + +<% +--[[ DEBUG INFORMATION +io.write("

DEBUGGING

DEBUG INFO: CFE

") +io.write(html.cfe_unpack(data)) +io.write("
") +--]] +%> +
<%= data.descr %>
+ + diff --git a/template-popup.lsp b/template-popup.lsp new file mode 100644 index 0000000..7787c5a --- /dev/null +++ b/template-popup.lsp @@ -0,0 +1,33 @@ +<% local viewtable, viewlibrary, pageinfo, session = ... + html=require("html") %> +Status: 200 OK +Content-Type: text/html +<% if (session.id) then + io.write( html.cookie.set("sessionid", session.id) ) + else + io.write (html.cookie.unset("sessionid")) + end +%> + + + + + +<% +local hostname = "" +if viewlibrary and viewlibrary.dispatch_component then + local result = viewlibrary.dispatch_component("alpine-baselayout/hostname/read", nil, true) + if result and result.value then + hostname = result.value + end +end +%> +<%= html.html_escape(hostname .. " - " .. pageinfo.controller .. "->" .. pageinfo.action) %> + + + + <% local func = haserl.loadfile(pageinfo.viewfile) %> + <% func (viewtable, viewlibrary, pageinfo, session) %> + + + -- cgit v1.2.3