summaryrefslogtreecommitdiffstats
path: root/weblog-viewblocklog-html.lsp
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2009-09-04 14:55:05 +0000
committerTed Trask <ttrask01@yahoo.com>2009-09-04 14:55:05 +0000
commit8044a8225aa46c9cb7cbc39920fabf5edd782b59 (patch)
treecad598daf9b6b25f23e22dade5890ed488a24504 /weblog-viewblocklog-html.lsp
parent138ae855953c6ba7dadd62a092d53feb46777579 (diff)
downloadacf-weblog-8044a8225aa46c9cb7cbc39920fabf5edd782b59.tar.bz2
acf-weblog-8044a8225aa46c9cb7cbc39920fabf5edd782b59.tar.xz
Added code to display short reason from DG log and shorten URI and fixed bug with empty reason. Bumped to 0.4.0v0.4.0
Required new shortreason field in several tables which breaks backward compatibility. Full reason and full URI available by hovering.
Diffstat (limited to 'weblog-viewblocklog-html.lsp')
-rw-r--r--weblog-viewblocklog-html.lsp20
1 files changed, 15 insertions, 5 deletions
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
<H1><%= html.html_escape(data.label) %></H1>
<TABLE>
<TR style="background:#eee;font-weight:bold;">
- <TD style="padding-right:20px;white-space:nowrap;" class="header" colspan=2>Timestamp</TD>
+ <TD style="padding-right:20px;white-space:nowrap;" class="header">Timestamp</TD>
+ <TD style="padding-right:20px;white-space:nowrap;" class="header"></TD>
<TD style="padding-right:20px;white-space:nowrap;" class="header">Client IP</TD>
<TD style="padding-right:20px;white-space:nowrap;" class="header">User ID</TD>
<TD style="white-space:nowrap;" WIDTH="90%" class="header">Size</TD>
@@ -79,10 +80,19 @@ end
<TD><%= html.html_escape(watch.clientuserid) %></TD>
<TD><%= html.html_escape(watch.bytes) %></TD>
</TR>
- <TR><TD></TD><TD <% if string.find(watch.uri, "GBYPASS=") then %> style="background:#ee1" <% end %> colspan=4><%= html.link{value = watch.uri, label=watch.uri} %></TD></TR>
- <% if watch.reason and watch.reason ~= "" then %>
- <TR><TD></TD><TD style="background:#f33; color:#fff" colspan=4><%= html.html_escape(watch.reason) %></TD></TR>
- <% end %>
+ <TR><TD></TD>
+ <TD <% if (watch.shortreason and watch.shortreason ~= "") or (watch.reason and watch.reason ~= "") then %>
+ 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 %>
+ </TD>
+ <TD <% if string.find(watch.uri, "GBYPASS=") then %> style="background:#ee1" <% end %>
+ title="<%= html.html_escape(watch.uri) %>" >
+ <%= html.link{value = watch.uri, label=string.gsub(watch.uri, "[;?].*", "...")} %></TD></TR>
<% end %>
</TABLE>