visual tweaks on log entries index
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<tr>
|
||||
<td class='hle-mini-status-code'><%= entry.status_code %></td>
|
||||
<td class='hle-mini-id-link'><%= link_to entry.id, log_entry_path(entry.id) %></td>
|
||||
<td class='hle-mini-uri'><%= entry.uri_str %></td>
|
||||
<td class='hle-mini-uri'><span title="<%= entry.uri_str %>"><%= entry.uri_str.truncate(120) %></span></td>
|
||||
</tr>
|
||||
|
||||
@@ -3,9 +3,6 @@
|
||||
.hle-table {
|
||||
width: 100%;
|
||||
}
|
||||
.hle-table .time {
|
||||
text-align: right;
|
||||
}
|
||||
.hle-table {
|
||||
font-family: monospace;
|
||||
border-collapse: collapse
|
||||
@@ -23,7 +20,7 @@
|
||||
color: black;
|
||||
text-decoration: underline;
|
||||
}
|
||||
.hle-table .id a {
|
||||
.hle-table .col-id a {
|
||||
font-weight: bold;
|
||||
}
|
||||
.hle-table .leftb {
|
||||
@@ -32,10 +29,10 @@
|
||||
.hle-table .rightb {
|
||||
border-right: 1px solid black;
|
||||
}
|
||||
.hle-table .code.good {
|
||||
.hle-table .col-code.good {
|
||||
color: blue;
|
||||
}
|
||||
.hle-table .code.bad {
|
||||
.hle-table .col-code.bad {
|
||||
color: red;
|
||||
}
|
||||
.hle-table .part {
|
||||
@@ -50,6 +47,21 @@
|
||||
.floatr {
|
||||
float: right;
|
||||
}
|
||||
.col-size {
|
||||
width: 140px;
|
||||
}
|
||||
.col-time {
|
||||
text-align: right;
|
||||
width: 100px;
|
||||
}
|
||||
.col-id {
|
||||
width: 70px;
|
||||
text-align: center;
|
||||
}
|
||||
.col-code {
|
||||
width: 25px;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
<% end %>
|
||||
<h1>
|
||||
@@ -58,24 +70,26 @@
|
||||
(<%= link_to "Index", log_entries_path %>)
|
||||
<% end %>
|
||||
</h1>
|
||||
<%= link_to_previous_page @log_entries, "Previous Page" %> <%= link_to_next_page @log_entries, "Next Page" %>
|
||||
<nav>
|
||||
<%= link_to_previous_page @log_entries, "Previous Page" %> <%= link_to_next_page @log_entries, "Next Page" %>
|
||||
</nav>
|
||||
<table class='hle-table'>
|
||||
<% @log_entries.each do |hle| %>
|
||||
<tr>
|
||||
<td class="leftb">
|
||||
<td class="col-size leftb">
|
||||
<%= HexUtil.humansize(hle.response.size) %> <br>
|
||||
(<%= (hle.response.bytes_stored.to_f / hle.response.size).round(2) %>, <%= hle.performed_by %>)
|
||||
</td>
|
||||
<td class="time leftb">
|
||||
<%= time_ago_in_words(hle.created_at) %>
|
||||
<td class="col-time leftb">
|
||||
<%= time_ago_in_words(hle.created_at, include_seconds: true) %> ago
|
||||
</td>
|
||||
<td class="id leftb rightb">
|
||||
<td class="col-id leftb rightb">
|
||||
<%= link_to hle.id, log_entry_path(hle.id) %>
|
||||
</td>
|
||||
<% status_code_class = hle.status_code == 200 ? "good" : "bad" %>
|
||||
<td class="code leftb <%= status_code_class %>"><%= hle.status_code %></td>
|
||||
<td class="col-code leftb <%= status_code_class %>"><%= hle.status_code %></td>
|
||||
<td class="path leftb uri-td">
|
||||
<% path_parts = hle.uri_str_without_host.split("/")
|
||||
<% path_parts = hle.uri_path.split("/")
|
||||
iterative_parts = (1...path_parts.length).map do |i|
|
||||
[path_parts[i], path_parts[0..i].join("/") + (i == path_parts.length - 1 ? "" : "/")]
|
||||
end %>
|
||||
@@ -86,7 +100,9 @@
|
||||
--><a class='part path' href="/log_entries/filter/<%= hle.uri_host %><%= up_to %>"><!--
|
||||
-->/<%= part %><!--
|
||||
--></a><% end %><!--
|
||||
--><%= "?#{hle.uri_query}" if hle.uri_query %>
|
||||
--><% if hle.uri_query %><!--
|
||||
--><span title="<%= hle.uri_query %>"><%= "?#{hle.uri_query.truncate(120 - hle.uri.to_s.length)}" %></span>
|
||||
<% end %>
|
||||
<a class="floatr" rel="noreferrer" target="_blank" href="<%= hle.uri_str %>">(link)</a>
|
||||
</td>
|
||||
<td class="type leftb"><%= hle.content_type %></td>
|
||||
|
||||
@@ -57,7 +57,10 @@
|
||||
</style>
|
||||
<% end %>
|
||||
<%= link_to "← Log Entries".html_safe, log_entries_path %>
|
||||
<h3><%= @log_entry.uri.to_s %> - <%= @log_entry.status_code %></h3>
|
||||
<h3>
|
||||
<span title="<%= @log_entry.uri.to_s %>"><%= @log_entry.uri.to_s.truncate(120) %></span> -
|
||||
<%= @log_entry.status_code %>
|
||||
</h3>
|
||||
<table class='log-entry-details'>
|
||||
<tr>
|
||||
<% rtms = @log_entry.response_time_ms %>
|
||||
|
||||
Reference in New Issue
Block a user