diff options
author | 2015-03-22 21:44:24 +0000 | |
---|---|---|
committer | 2015-03-22 21:44:24 +0000 | |
commit | 1a16003a9d6bd2656a53a226c817bf00d17a11e7 (patch) | |
tree | 0df9ce048cfea39a13f71b8cbcd72fdf17cf3528 | |
parent | Ensure package.* are files not directories; Sync portage after setting the co... (diff) | |
download | ruby-tinderbox-1a16003a9d6bd2656a53a226c817bf00d17a11e7.tar.gz ruby-tinderbox-1a16003a9d6bd2656a53a226c817bf00d17a11e7.tar.bz2 ruby-tinderbox-1a16003a9d6bd2656a53a226c817bf00d17a11e7.zip |
Add new_targets page
-rw-r--r-- | web/app.rb | 20 | ||||
-rw-r--r-- | web/views/bumps/new_targets.erb | 48 | ||||
-rw-r--r-- | web/views/layout.erb | 8 |
3 files changed, 74 insertions, 2 deletions
@@ -79,6 +79,26 @@ class RubyTinderbox < Sinatra::Base erb :'repoman/repoman_history', locals: { repomans: repomans } end + get '/new_targets' do + update_timestamp = Package.first[:update_timestamp] + portage_timestamp = Package.first[:portage_timestamp] + packages = [] + Package.each do |package| + build_current = package.build_dataset.where(target: 'current').reverse_order(:timestamp).first + repoman_current = package.repoman_dataset.where(target: 'current').reverse_order(:timestamp).first + repoman_next = package.repoman_dataset.where(target: 'next').reverse_order(:timestamp).first + + next if build_current.nil? + next if repoman_current.nil? + next if repoman_next.nil? + + if repoman_current[:result] == 'passed' and repoman_next[:result] == 'passed' + packages << [package, build_current, nil, repoman_current, repoman_next] + end + end + erb :'bumps/new_targets', locals: { packages: packages, update_timestamp: update_timestamp, portage_timestamp: portage_timestamp } + end + get '/visualizations' do # Timestamps update_timestamp = Package.first[:update_timestamp] diff --git a/web/views/bumps/new_targets.erb b/web/views/bumps/new_targets.erb new file mode 100644 index 0000000..4ecc565 --- /dev/null +++ b/web/views/bumps/new_targets.erb @@ -0,0 +1,48 @@ +<div id="ruby_targets"> + <h1>New Targets</h1> + <small> + Last updated on + <%=Time.at(update_timestamp.to_i).strftime('%Y-%m-%d')%> + using a portage snapshot dated + <%=Time.at(portage_timestamp.to_i).strftime('%Y-%m-%d')%> + </small> +</div> + +<form class="pull-right"> + <input type="checkbox" onclick="$('td:contains(\'+amd64\')').parent().toggle();" checked> amd64 + <input type="checkbox" onclick="$('td:contains(\'+~amd64\')').parent().toggle();" checked> ~amd64 +</form> + +<table id="sortable" class="table table-bordered table-condensed"> + <thead> + <tr> + <th class="width-52">Package</th> + <th class="width-12">CI Current</th> + <th class="width-12">CI Next</th> + <th class="width-12">QA Current</th> + <th class="width-12">QA Next</th> + </tr> + </thead> + <%packages.each do |package|%> + <tr> + <td class="width-52"> + <%=package[0][:identifier]%> + </td> + <td class="width-12 <%=package[1][:result]%>"> + <%=package[1][:result].camelcase%> + </td> + <td class="width-12"> + ToDo + </td> + <td class="width-12 <%=package[3][:result]%>"> + <%=package[3][:result].camelcase%> + </td> + <td class="width-12 <%=package[4][:result]%>"> + <%=package[4][:result].camelcase%> + </td> + <td style="display:none;"> + +<%=package[0][:amd64_keyword]%> + </td> + </tr> + <%end%> +</table> diff --git a/web/views/layout.erb b/web/views/layout.erb index 98d60ec..9d564b3 100644 --- a/web/views/layout.erb +++ b/web/views/layout.erb @@ -67,9 +67,13 @@ <li><a href="/outdated_gems">Outdated Gems</a></li> <li><a href="/build_status">Build Status (CI)</a></li> <li><a href="/repoman_checks">Repoman Checks (QA)</a></li> - <li><a href="/visualizations">Visualizations</a></li> + <li class="dropdown"> + <a href="#" class="dropdown-toggle" data-toggle="dropdown">Package Bumps <span class="caret"></span></a> + <ul class="dropdown-menu" role="menu"> + <li><a href="new_targets">New Targets</a></li> + </ul> </li> - + <li><a href="/visualizations">Visualizations</a></li> </ul> </div> </div> |