From 8044a8225aa46c9cb7cbc39920fabf5edd782b59 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Fri, 4 Sep 2009 14:55:05 +0000 Subject: Added code to display short reason from DG log and shorten URI and fixed bug with empty reason. Bumped to 0.4.0 Required new shortreason field in several tables which breaks backward compatibility. Full reason and full URI available by hovering. --- weblog-viewblocklog-html.lsp | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'weblog-viewblocklog-html.lsp') diff --git a/weblog-viewblocklog-html.lsp b/weblog-viewblocklog-html.lsp index 29197f4..f7eb9b6 100644 --- a/weblog-viewblocklog-html.lsp +++ b/weblog-viewblocklog-html.lsp @@ -54,7 +54,8 @@ end

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

- + + @@ -79,10 +80,19 @@ end - - <% if watch.reason and watch.reason ~= "" then %> - - <% end %> + + + <% end %>
TimestampTimestamp Client IP User ID Size<%= html.html_escape(watch.clientuserid) %> <%= html.html_escape(watch.bytes) %>
colspan=4><%= html.link{value = watch.uri, label=watch.uri} %>
<%= html.html_escape(watch.reason) %>
+ style="background:#f33; color:#fff" title="<%= html.html_escape(watch.reason) %>"<% end %> colspan=3> + <% if watch.score and watch.score ~= "0" then %><%= html.html_escape(watch.score) %> - <% end %> + <% if (watch.shortreason and watch.shortreason ~= "") then %> + <%= html.html_escape(watch.shortreason) %> + <% elseif (watch.reason and watch.reason ~= "") then %> + <%= html.html_escape(string.gsub(watch.reason, "%(.*", "")) %> + <% end %> + + title="<%= html.html_escape(watch.uri) %>" > + <%= html.link{value = watch.uri, label=string.gsub(watch.uri, "[;?].*", "...")} %>
-- cgit v1.2.3