Skip to content

Commit

Permalink
[webui] Show outdated results for package in a different manner
Browse files Browse the repository at this point in the history
  • Loading branch information
Moises Deniz Aleman committed Mar 6, 2017
1 parent 539a26e commit 75ced3f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 9 deletions.
8 changes: 8 additions & 0 deletions src/api/app/assets/stylesheets/webui/application/package.scss
Expand Up @@ -44,3 +44,11 @@ table.repostatus td {
text-decoration-color: #690;
}
}

.no_border_bottom {
border-bottom: none;
}

.no_border_top {
border-top: none;
}
21 changes: 12 additions & 9 deletions src/api/app/views/webui/package/_buildstatus.html.erb
Expand Up @@ -5,17 +5,20 @@
<% previous_repo = nil %>
<% results.each do |result| %>
<% repository = @project.repositories.find_by_name(result.repository) %>
<% next unless repository %>
<% next unless repository.architectures.pluck(:name).include?(result.architecture) %>
<tr>
<td title="<%= result.repository %>" class="no_border_bottom <%= (result.repository == previous_repo) ? " no_border_top" : " "%>">
<% if result.repository != previous_repo %>
<td title="<%= result.repository %>" rowspan="<%= repository.architectures.length %>">
<%= link_to(word_break(result.repository, 22), { action: :binaries, controller: :package, project: @project, package: package, repository: result.repository }, { title: "Binaries for #{result.repository}" }) %>
</td>
<% end %>
</td>
<td class="arch">
<div class="nowrap" style="margin: 0 0.5ex">
<%= repo_status_icon(result.state, result.details) %> <%= result.architecture %>
<% if !(repository && repository.architectures.pluck(:name).include?(result.architecture)) %>
<%= sprite_tag "time_error", alt: "Outdated result", title: "This result is outdated"%>
<% else %>
<%= repo_status_icon(result.state, result.details) %>
<% end %>
<%= result.architecture %>
</div>
</td>
<%= arch_repo_table_cell(result.repository, result.architecture, package, { "code" => result.code, "details" => result.details }) %>
Expand All @@ -26,8 +29,8 @@
</div>
<% end %>
<%= javascript_tag do %>
$('.unresolvable, .blocked').click(function() {
var title = $(this).attr('title');
alert(title);
});
$('.unresolvable, .blocked').click(function() {
var title = $(this).attr('title');
alert(title);
});
<% end %>

0 comments on commit 75ced3f

Please sign in to comment.