Skip to content

Commit

Permalink
allow failed jobs that are very long to display on the qless ui prope…
Browse files Browse the repository at this point in the history
…rly.

I removed the ellipses and instead allow the column to expand to the longest errored job
  • Loading branch information
brenfrow committed Dec 6, 2012
1 parent 6f0a6a0 commit 6f6d510
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 12 deletions.
17 changes: 17 additions & 0 deletions lib/qless/server/static/css/docs.css
Expand Up @@ -817,3 +817,20 @@ form.well {
}

}

/* For proper failed job display*/
.l-sidebyside {
overflow:auto;
}
.l-sidebyside > * {
display:inline-block;
*display: inline;
*zoom: 1;
}
.failed-job > .min-col-size {
min-width: 395px;
}
.failed-job .row {
margin-left:0;
margin-right:10px;
}
30 changes: 18 additions & 12 deletions lib/qless/server/views/overview.erb
Expand Up @@ -18,7 +18,7 @@
<%= queue['waiting'] %> /
<%= queue['scheduled'] %> /
<%= queue['stalled'] %> /
<%= queue['depends'] %> /
<%= queue['depends'] %> /
<%= queue['recurring'] %> <small>(running / waiting / scheduled / stalled / depends / recurring)</small>
</h3>
</div>
Expand All @@ -34,18 +34,24 @@
<div class="page-header">
<h1>Failed Jobs <small>D'oh!</small></h1>
</div>
<% failed.sort_by { |t, count| -count }.each do |t, count| %>
<div class="row">
<div class="span4">
<h3 style="text-overflow: ellipsis; white-space: nowrap; overflow: hidden"><a href="<%= u "/failed/#{t}" %>"><%= t %></a></h3>
</div>
<div class="span8">
<h3>| <%= count %> <small>Jobs</small></h3>
</div>
<div>
<div class="l-sidebyside failed-job">
<div class="min-col-size">
<% failed.sort_by { |t, count| -count }.each do |t, count| %>
<div class="row">
<h3><a href="<%= u "/failed/#{t}" %>"><%= t %></a></h3>
</div>
<% end %>
</div>
<div>
<% failed.sort_by { |t, count| -count }.each do |t, count| %>
<div class="row">
<h3>| <%= count %> <small>Jobs</small></h3>
</div>
<% end %>
</div>
<% end %>
</div>
<% end %>
<% end %>
<% if tracked['jobs'].empty? %>
<div class="page-header">
<h1>No Tracked Jobs <small>These aren't the droids you're looking for</small></h1>
Expand Down

0 comments on commit 6f6d510

Please sign in to comment.