From fb7ce759c1045daf20e416547e6111f796030b60 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Thu, 17 Apr 2014 00:55:44 +0000 Subject: Started changes to use new htmlviewfunctions functions Still work to do to remove styling and long messy links --- weblog-adhocquery-html.lsp | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'weblog-adhocquery-html.lsp') diff --git a/weblog-adhocquery-html.lsp b/weblog-adhocquery-html.lsp index 7c3d804..0e381da 100644 --- a/weblog-adhocquery-html.lsp +++ b/weblog-adhocquery-html.lsp @@ -39,7 +39,7 @@ end <% if form.value.result then %> -

<%= html.html_escape(form.value.result.label) %>

+ <% local header_level = htmlviewfunctions.displaysectionstart(form.value.result, page_info) %> <% if #form.value.result.value == 0 then %>

No results, try adjusting query

<% else %> @@ -63,32 +63,26 @@ end <% if viewlibrary.check_permission("downloadadhocquery") then %> -
- - -

Download query result

-
- -
-
+ <% local query = cfe({ type="hidden", value=form.value.query.value }) %> + <% local viewtype = cfe({ type="hidden", value="stream" }) %> + <% htmlviewfunctions.displayitem(cfe({type="form", value={query=query, viewtype=viewtype}, label="Download query result", option="Download", action="downloadadhocquery" }), page_info, 0) %> <% end %> <% end %> + <% htmlviewfunctions.displaysectionend(header_level) %> <% end %> -

<%= html.html_escape(form.label) %>

-<% htmlviewfunctions.displayformstart(form, page_info) %> +<% local header_level = htmlviewfunctions.displaysectionstart(form, page_info) %>

This form accepts a Postgresql SELECT statement and displays the results. Examples:

The available database tables and descriptions are listed below.

-<% htmlviewfunctions.displayformitem(form.value.query, "query") %> -<% htmlviewfunctions.displayformend(form) %> +<% htmlviewfunctions.displayform(form, page_info, htmlviewfunctions.incrementheader(header_level)) %> -

Available Database Tables

-

pubweblog and pubweblog_history

+<% local header_level2 = htmlviewfunctions.displaysectionstart(cfe({label="Available Database Tables"}), page_info, htmlviewfunctions.incrementheader(header_level)) %> +<% local header_level3 = htmlviewfunctions.displaysectionstart(cfe({label="pubweblog and pubweblog_history"}), page_info, htmlviewfunctions.incrementheader(header_level2)) %>

These tables contain the pre-purge and historical access logs respectively. The definition of the table is as follows:

 (
@@ -110,8 +104,9 @@ The available database tables and descriptions are listed below.

id int, )
+<% htmlviewfunctions.displaysectionend(header_level3) %> -

dbhistlog

+<% htmlviewfunctions.displaysectionstart(cfe({label="dbhistlog"}), page_info, header_level3) %>

This table contains the database history, including such information as which log files were loaded and how many entries they contained. The definition of the table is as follows:

 (
@@ -119,8 +114,9 @@ The available database tables and descriptions are listed below.

msgtext text )
+<% htmlviewfunctions.displaysectionend(header_level3) %> -

source

+<% htmlviewfunctions.displaysectionstart(cfe({label="source"}), page_info, header_level3) %>

This table contains the list of log file sources. The definition of the table is as follows:

 (
@@ -133,8 +129,9 @@ The available database tables and descriptions are listed below.

enabled boolean )
+<% htmlviewfunctions.displaysectionend(header_level3) %> -

usagestat

+<% htmlviewfunctions.displaysectionstart(cfe({label="usagestat"}), page_info, header_level3) %>

This table contains a historical record of pages requested and blocked by hour. The definition of the table is as follows:

 (
@@ -144,3 +141,6 @@ The available database tables and descriptions are listed below.

numblock integer )
+<% htmlviewfunctions.displaysectionend(header_level3) %> +<% htmlviewfunctions.displaysectionend(header_level2) %> +<% htmlviewfunctions.displaysectionend(header_level) %> -- cgit v1.2.3