From 290d71b1b8bba45be46087a78bdcbdd516199985 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Fri, 29 May 2009 11:47:59 +0200 Subject: initial commit based on weblog.tar.gz ncopa got by email. --- weblog-adhocquery-html.lsp | 82 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 weblog-adhocquery-html.lsp (limited to 'weblog-adhocquery-html.lsp') diff --git a/weblog-adhocquery-html.lsp b/weblog-adhocquery-html.lsp new file mode 100644 index 0000000..538bd54 --- /dev/null +++ b/weblog-adhocquery-html.lsp @@ -0,0 +1,82 @@ +<% local form, viewlibrary, page_info = ... +require("viewfunctions") +%> + +<% if form.value.result then %> +

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

+<% require("html") %> +<%= html.cfe_unpack(form.value.result.value) %> +
+ +
+
Download query result
+
+
+<% end %> + +

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

+<% displayformstart(form, page_info) %> +
+<% displayformitem(form.value.query, "query") %> +
+<% displayformend(form) %> + +This form accepts a Postgresql SELECT statement and displays the results. Examples: + +The available database tables and descriptions are as follows:
+

PubWeblog and PubBlocklog

+These tables contain the combined squid access log and dansguardian log for every access and blocked accesses respectively. The definition of the table is as follows: +
+(
+    sourcename character varying(40),
+    clientip inet NOT NULL,
+    clientuserid character varying(64) NOT NULL,
+    logdatetime timestamp(3) without time zone NOT NULL,
+    uri text NOT NULL,
+    bytes integer NOT NULL,
+    reason text,
+    score integer
+)
+
+

dbHistLog

+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: +
+(
+    logdatetime timestamp(0) without time zone NOT NULL,
+    msgtext text
+)
+
+

Source

+This table contains the list of log file sources. The definition of the table is as follows: +
+(
+    sourcename character varying(40) NOT NULL,
+    method character varying(100) NOT NULL,
+    userid character varying(32),
+    passwd character varying(255),
+    source character varying(255) NOT NULL,
+    tzislocal boolean,
+    enabled boolean
+)
+
+

Usagestat

+This table contains a historical record of pages requested and blocked by hour. The definition of the table is as follows: +
+(
+    sourcename character varying(40) NOT NULL,
+    date timestamp(0) without time zone NOT NULL,
+    numrequest integer,
+    numblock integer
+)
+
+

Watchlist

+This table contains the user watch list. The definition of the table is as follows: +
+(
+    clientuserid character varying(64) NOT NULL,
+    expiredatetime timestamp(0) without time zone NOT NULL
+)
+
-- cgit v1.2.3