diff options
Diffstat (limited to 'weblog-viewblocklog-html.lsp')
-rw-r--r-- | weblog-viewblocklog-html.lsp | 20 |
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> |