From 3aff30bd7b6c820089392d8b8defec9ea400637d Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Thu, 25 Aug 2011 20:18:56 +0000 Subject: Added / removed files --- bypass.png | Bin 0 -> 1395 bytes denied.png | Bin 0 -> 1376 bytes dodgy.png | Bin 0 -> 1357 bytes weblog-maintenance-html.lsp | 17 -------------- weblog-summary-html.lsp | 17 -------------- weblog-viewauditstats-html.lsp | 47 +++++++++++++++++++++++++++++++++++++ weblog-viewusagestats-html.lsp | 33 ++++++++++++++++++++++++++ weblogviewfunctions.lua | 52 ----------------------------------------- 8 files changed, 80 insertions(+), 86 deletions(-) create mode 100644 bypass.png create mode 100644 denied.png create mode 100644 dodgy.png delete mode 100644 weblog-maintenance-html.lsp delete mode 100644 weblog-summary-html.lsp create mode 100644 weblog-viewauditstats-html.lsp create mode 100644 weblog-viewusagestats-html.lsp delete mode 100644 weblogviewfunctions.lua diff --git a/bypass.png b/bypass.png new file mode 100644 index 0000000..896070e Binary files /dev/null and b/bypass.png differ diff --git a/denied.png b/denied.png new file mode 100644 index 0000000..0238f3d Binary files /dev/null and b/denied.png differ diff --git a/dodgy.png b/dodgy.png new file mode 100644 index 0000000..b035ba9 Binary files /dev/null and b/dodgy.png differ diff --git a/weblog-maintenance-html.lsp b/weblog-maintenance-html.lsp deleted file mode 100644 index 2ca1dc7..0000000 --- a/weblog-maintenance-html.lsp +++ /dev/null @@ -1,17 +0,0 @@ -<% local form, viewlibrary, page_info = ... -require("viewfunctions") -%> - - - -

Maintenance

-<% displayformstart(form, page_info) %> -<% displayformitem(form.value.query, "query") %> -<% displayformend(form) %> -

Purge Database Operations

-

Analysis Operations

-

Actions

diff --git a/weblog-summary-html.lsp b/weblog-summary-html.lsp deleted file mode 100644 index 60040b5..0000000 --- a/weblog-summary-html.lsp +++ /dev/null @@ -1,17 +0,0 @@ -<% local form, viewlibrary, page_info = ... -require("viewfunctions") -%> - - - -

Summary

-

Last 24 Hours

-

Last 7 Days

-

Last 30 Days -<% displayformitem(form.value.query, "query") %> -<% displayformend(form) %> diff --git a/weblog-viewauditstats-html.lsp b/weblog-viewauditstats-html.lsp new file mode 100644 index 0000000..efe02f3 --- /dev/null +++ b/weblog-viewauditstats-html.lsp @@ -0,0 +1,47 @@ +<% local data, viewlibrary, page_info, session = ... %> +<% require("viewfunctions") %> + + + + + +<% displaycommandresults({"completeaudit"}, session) %> + +

Audit Parameters

+
+<% displayitem(data.value.auditstart) %> +<% displayitem(data.value.auditend) %> +
+ +

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

+
+ + + + + + + +<% for i,stat in ipairs(data.value.stats.value) do %> + + + +<% end %> +
<% if data.value.groupby.value == "clientip" then %>Client IP<% else %>User ID<% end %>BlocksMaximum Score
<%= html.link{value = "viewblocklog?"..data.value.groupby.value.."="..stat[data.value.groupby.value], label=stat[data.value.groupby.value]} %><%= html.html_escape(stat.numblock) %><%= html.html_escape(stat.maxscore) %>
+ +<% if data.errtxt then %> +

<%= html.html_escape(data.errtxt) %>

+<% end %> +<% if #data.value.stats.value == 0 then %> +

No blocks, try adjusting the audit dates

+<% end %> + +
"> +
Complete Audit
+
+
+
diff --git a/weblog-viewusagestats-html.lsp b/weblog-viewusagestats-html.lsp new file mode 100644 index 0000000..0d534e1 --- /dev/null +++ b/weblog-viewusagestats-html.lsp @@ -0,0 +1,33 @@ +<% local data, viewlibrary, page_info, session = ... %> +<% require("viewfunctions") %> + +<% local subdata, pagedata = paginate(data.value, page_info.clientdata, 100) %> + +

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

+
+<% displaypagination(pagedata, page_info) %> + + + + + + + + +<% for i,stat in ipairs(subdata) do %> + + + + + + +<% end %> +
DateSourceRequestsBlocks
<%= html.html_escape(stat.date) %><%= html.html_escape(stat.sourcename) %><%= html.html_escape(stat.numrequest) %><%= html.html_escape(stat.numblock) %>
+ +<% if data.errtxt then %> +

<%= html.html_escape(data.errtxt) %>

+<% end %> +<% if #data.value == 0 then %> +

No usage stats found

+<% end %> +
diff --git a/weblogviewfunctions.lua b/weblogviewfunctions.lua deleted file mode 100644 index b809f23..0000000 --- a/weblogviewfunctions.lua +++ /dev/null @@ -1,52 +0,0 @@ -require("html") -require("session") - --- Split a string to an array by delimiter or pattern -function split(str, pat) - if string.find(str, pat) == nil then - return str - end - local t = {} - local fpat = "(.-)" .. pat - local last_end = 1 - local s, e, cap = str:find(fpat, 1) - while s do - if s ~= 1 or cap ~= "" then - table.insert(t,cap) - end - last_end = e+1 - s, e, cap = str:find(fpat, last_end) - end - if last_end <= #str then - cap = str:sub(last_end) - table.insert(t, cap) - end - return t -end --- Insert a string into another string -function string.insert(value, insert, place) - - if place == nil then - place = string.len(value)+1 - end - - return string.sub(value, 1,place-1) .. tostring(insert) .. string.sub(value, place, string.len(value)) - -end - ---Highlight occurences of a word in a string -function string.highlight(txtvalue, searchval, fcolour, bcolour) - - if txtvalue ~=nil and searchval ~= nil then - sStart = string.find(string.lower(txtvalue),string.lower(searchval)) - if sStart ~= nil then - sEnd = sStart + string.len(searchval) - txtvalue = string.insert(txtvalue,"", sEnd) - txtvalue = string.insert(txtvalue,"", sStart) - end - end - - return txtvalue - -end - -- cgit v1.2.3