Commit 9628e68d authored by Antonio Terceiro's avatar Antonio Terceiro

HTML UI: add page listing Platform-specific issues

parent d46eca4e
[_] multi-architecture support
[X] multi-architecture support
[X] debci-collector: display architecture and suite in "results received" log messages
[X] debci batch: display architecture and suite in "requested/skip" log messages
[_] add status page for architecture-specific failures
[X] add status page for architecture-specific failures
: i.e. a package fails in some architectures and passes on others
[_] UI improvements
[_] reduce size of JSON data download for search in home page
......
......@@ -12,6 +12,7 @@ writer.index('index.html')
writer.status('status/index.html')
writer.status_alerts('status/alerts/index.html')
writer.blacklist('status/blacklist/index.html')
writer.platform_specific_issues('status/platform-specific-issues/index.html')
repository = Debci::Repository.new
......
......@@ -8,6 +8,9 @@ debci (1.1.3) UNRELEASED; urgency=medium
(>= 3.20).
* bin/debci-collector, bin/debci-worker, lib/functions.sh#report_status:
display suite and architecture together with package names
* HTML UI:
* add page listing Platform-specific issues, i.e. packages that passes on
one suite/arch but fails on another suite/arch.
[ Jakub Wilk ]
* public/style.css: Set correct font for alert, chart, rss, and tracker
......
......@@ -33,6 +33,12 @@ module Debci
expand_template(:status_alerts, filename)
end
def platform_specific_issues(filename)
@status_nav = load_template(:status_nav)
@issues = @repository.platform_specific_issues
expand_template(:platform_specific_issues, filename)
end
def blacklist(filename)
@status_nav = load_template(:status_nav)
expand_template(:blacklist, filename)
......
<div class="container">
<div class="row">
<div class="col-md-12">
<h1 class='page-header'>Status <small>/ Platform-Specific issues</small></h1>
<%= @status_nav %>
<table class='table table-striped'>
<tr>
<th>Package</th>
<th>Status</th>
</tr>
<% @issues.each do |package, statuses| %>
<tr>
<td><%= package %></td>
<td>
<% statuses.each do |status| %>
<a class='<%= status.status %>' href="/packages/<%= Debci::Package.new(package).prefix %>/<%= package %>/<%= status.suite %>/<%= status.architecture %>/"><%= status.suite %>/<%= status.architecture%> <%= status.status %></a>
&nbsp;
<% end %>
</td>
</tr>
<% end %>
</table>
</div>
</div>
</div>
......@@ -2,4 +2,5 @@
<li><a id='icon-chart' href='/status'>Status charts</a></li>
<li><a id='icon-alert' href='/status/alerts'>Status alerts</a></li>
<li><a class='fa fa-hand-paper-o' href='/status/blacklist/'>Blacklist</a></li>
<li><a class='fa fa-eye' href='/status/platform-specific-issues/'>Platform-specific issues</a></li>
</ol>
......@@ -135,6 +135,17 @@ module Debci
end
end
def platform_specific_issues
result = {}
packages.each do |package|
statuses = status_for(package).flatten
if statuses.map(&:status).reject { |s| s == :no_test_data }.uniq.size > 1
result[package] = statuses
end
end
result
end
# Backend implementation for Debci::Package#history
def history_for(package, suite, architecture)
return unless File.exists?(file = File.join(data_dir(suite, architecture, package), 'history.json'))
......
......@@ -114,6 +114,10 @@ module Debci
status
end
def inspect
"<#{suite}/#{architecture} #{status}>"
end
end
end
......@@ -44,6 +44,15 @@ describe Debci::Repository do
mkdir_p 'packages/unstable/i386/r/rubygems-integration'
mkdir_p 'packages/testing/amd64/r/rubygems-integration'
mkdir_p 'packages/testing/i386/r/rubygems-integration'
latest_status 'packages/unstable/amd64/r/rubygems-integration', {
'status' => 'pass',
'previous_status' => 'pass',
}
latest_status 'packages/unstable/i386/r/rubygems-integration', {
'status' => 'fail',
'previous_status' => 'fail',
}
end
attr_reader :now
......@@ -201,4 +210,10 @@ describe Debci::Repository do
end
end
end
it 'knows about platform-specific issues' do
issues = repository.platform_specific_issues
expect(issues).to have_key('rubygems-integration')
expect(issues['rubygems-integration'].map(&:class).uniq).to eq([Debci::Status])
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment