Commit 87898906 authored by Mika Havela's avatar Mika Havela

Graphical fix. Modifying <DL> to fix skin issues.\n Removing hardcoded...

Graphical fix. Modifying <DL> to fix skin issues.\n Removing hardcoded backgroundcolor from table and using class=header instead to have the skins do the choosing of colors.
parent f4ed3e24
......@@ -4,30 +4,29 @@ require("viewfunctions")
<% if form.value.result then %>
<H1><%= html.html_escape(form.value.result.label) %></H1>
<DL>
<% require("html") %>
<%= html.cfe_unpack(form.value.result.value) %>
<form action="/cgi-bin/acf/weblog/weblog/downloadadhocquery" method="POST">
<input class="hidden" type="hidden" name="query" value="<%= html.html_escape(form.value.query.value) %>" >
<DL>
<DT>Download query result</DT><DD><input class="submit" type="submit" name="Download" value="Download"></DD>
</DL>
</FORM>
</DL>
<% end %>
<H1><%= html.html_escape(form.label) %></H1>
<% displayformstart(form, page_info) %>
<DL>
<% displayformitem(form.value.query, "query") %>
</DL>
<% displayformend(form) %>
This form accepts a Postgresql SELECT statement and displays the results. Examples:
<ul>
<li><pre>SELECT clientuserid, sum(bytes) AS total FROM weblog GROUP BY clientuserid ORDER BY total DESC</pre>
<li><pre>SELECT extract(hour from date) AS hour, sum(numrequest) AS numrequest, sum(numblock) AS numblock FROM usagestat GROUP BY extract(hour from date) ORDER BY hour</pre>
</ul>
The available database tables and descriptions are as follows:<br>
<% displayformend(form) %>
<H3>PubWeblog and PubBlocklog</H3>
<DL>
These tables contain the combined squid access log and dansguardian log for every access and blocked access respectively. The definition of the table is as follows:
<pre>
(
......@@ -41,16 +40,19 @@ These tables contain the combined squid access log and dansguardian log for ever
score integer,
shortreason text
)
</pre>
</pre></DL>
<H3>dbHistLog</H3>
<DL>
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:
<pre>
(
logdatetime timestamp(3) without time zone NOT NULL,
msgtext text
)
</pre>
</pre></DL>
<H3>Source</H3>
<DL>
This table contains the list of log file sources. The definition of the table is as follows:
<pre>
(
......@@ -62,8 +64,9 @@ This table contains the list of log file sources. The definition of the table is
tzislocal boolean,
enabled boolean
)
</pre>
</pre></DL>
<H3>Usagestat</H3>
<DL>
This table contains a historical record of pages requested and blocked by hour. The definition of the table is as follows:
<pre>
(
......@@ -72,12 +75,13 @@ This table contains a historical record of pages requested and blocked by hour.
numrequest integer,
numblock integer
)
</pre>
</pre></DL>
<H3>Watchlist</H3>
<DL>
This table contains the user watch list. The definition of the table is as follows:
<pre>
(
clientuserid character varying(64) NOT NULL,
expiredatetime timestamp(0) without time zone NOT NULL
)
</pre>
</pre></DL>
......@@ -5,7 +5,7 @@ require("viewfunctions")
<% displaycommandresults({"deletesource", "editsource", "testsource", "createsource", "importlogs"}, session) %>
<h1><%= html.html_escape(data.label) %></h1>
<DL>
<TABLE>
<TR style="background:#eee;font-weight:bold;">
<TD style="padding-right:20px;white-space:nowrap;text-align:left;" class="header">Action</TD>
......@@ -38,15 +38,13 @@ require("viewfunctions")
<p>No sources found</p>
<% end %>
<DL>
<form action="<%= html.html_escape(page_info.script .. page_info.prefix .. page_info.controller .. "/createsource") %>">
<DT>Create New Source</DT>
<input class="hidden" type="hidden" name="redir" value="<%= html.html_escape(page_info.orig_action) %>" >
<DD><input class="submit" type="submit" value="Create"></DD>
</form>
</DL>
<DL>
<form action="<%= html.html_escape(page_info.script .. page_info.prefix .. page_info.controller .. "/importlogs") %>">
<DT>Import Logs</DT>
<DD><input class="submit" type="submit" value="Import"></DD>
......
......@@ -5,23 +5,30 @@ require("viewfunctions")
<% displaycommandresults({"createdatabase"}, session, true) %>
<H1>Weblog Database Status</H1>
<DL>
<% local status
if viewlibrary and viewlibrary.dispatch_component then
if session.permissions.postgresql and session.permissions.postgresql.status then
status = viewlibrary.dispatch_component("postgresql/postgresql/status", nil, true)
end
end
if status then %>
<p>Database is <%= status.value.status.value %>
end %>
<DT>Database status</DT><DD>
<% if status then %>
<%= status.value.status.value %>
<% else %>
<p>Database status unknown
unknown
<% end %>
</DD>
<DT>Weblog Database</DT><DD>
<% if data.value then %>
<p>Weblog Database present
present
<% else %>
<p>Weblog Database missing
missing
<% if viewlibrary and viewlibrary.dispatch_component then
viewlibrary.dispatch_component("createdatabase")
end %>
<% end %>
</DD>
</DL>
......@@ -4,9 +4,10 @@
<% local subdata, pagedata = paginate(data.value, page_info.clientdata, 100) %>
<H1><%= html.html_escape(data.label) %></H1>
<DL>
<% displaypagination(pagedata, page_info) %>
<TABLE>
<TR style="background:#eee;font-weight:bold;">
<TR class="header">
<TD style="padding-right:20px;white-space:nowrap;" class="header">Date</TD>
<TD style="white-space:nowrap;" WIDTH="90%" class="header">Message</TD>
</TR>
......@@ -25,3 +26,4 @@
<% if #data.value == 0 then %>
<p>No history found</p>
<% end %>
</DL>
......@@ -19,8 +19,9 @@
</DL>
<H1><%= html.html_escape(data.label) %></H1>
<DL>
<TABLE id="audit" class="tablesorter"><THEAD>
<TR style="background:#eee;font-weight:bold;">
<TR style="font-weight:bold;">
<TH><% if data.value.groupby.value == "clientip" then %>Client IP<% else %>User ID<% end %></TH>
<TH>Blocks</TH>
<TH>Maximum Score</TH>
......@@ -40,7 +41,6 @@
<p>No blocks, try adjusting the audit dates</p>
<% end %>
<DL>
<form action="<%= html.html_escape(page_info.script .. page_info.prefix .. page_info.controller .. "/completeaudit") %>">
<DT>Complete Audit</DT>
<DD><input class="submit" type="submit" value="Complete"></DD>
......
......@@ -62,7 +62,7 @@ end
<H1><%= html.html_escape(data.label) %></H1>
<TABLE>
<TR style="background:#eee;font-weight:bold;">
<TR class="header">
<TD class="header">Timestamp</TD>
<TD class="header">Client IP</TD>
<TD class="header">User ID</TD>
......
......@@ -4,6 +4,7 @@
<% local subdata, pagedata = paginate(data.value, page_info.clientdata, 100) %>
<H1><%= html.html_escape(data.label) %></H1>
<DL>
<% displaypagination(pagedata, page_info) %>
<TABLE>
<TR style="background:#eee;font-weight:bold;">
......@@ -29,3 +30,4 @@
<% if #data.value == 0 then %>
<p>No usage stats found</p>
<% end %>
</DL>
......@@ -14,6 +14,7 @@
<% displaycommandresults({"createwatchlistentry"}, session, true) %>
<H1><%= html.html_escape(data.label) %></H1>
<DL>
<TABLE id="watchlist" class="tablesorter"><THEAD>
<TR style="background:#eee;font-weight:bold;">
<TH>Delete</TH>
......@@ -36,7 +37,10 @@
<% if #data.value == 0 then %>
<p>No watchlist entries found</p>
<% end %>
</DL>
<% if viewlibrary and viewlibrary.dispatch_component and session.permissions[page_info.controller].createwatchlistentry then
viewlibrary.dispatch_component("createwatchlistentry")
end %>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment