[ARVADOS] updated: 8db021c5f87e21c18debc8093d83823f62131750
Git user
git at public.curoverse.com
Thu Sep 22 11:32:10 EDT 2016
Summary of changes:
.../app/views/projects/_show_dashboard.html.erb | 18 +++++---
.../test/controllers/projects_controller_test.rb | 53 ++++++++++++++++++----
2 files changed, 56 insertions(+), 15 deletions(-)
via 8db021c5f87e21c18debc8093d83823f62131750 (commit)
via 8b4a1d1138ace590583601621f5cebedb8868c03 (commit)
from 2e319c5e3ebd1bf61f74b01646b755fffccb984c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 8db021c5f87e21c18debc8093d83823f62131750
Author: Lucas Di Pentima <lucas at curoverse.com>
Date: Thu Sep 22 12:31:23 2016 -0300
10037: Test enhancement to check for other statuses on the dashboard, also adding pipeline instances on those checks.
diff --git a/apps/workbench/test/controllers/projects_controller_test.rb b/apps/workbench/test/controllers/projects_controller_test.rb
index 7848444..741fa7a 100644
--- a/apps/workbench/test/controllers/projects_controller_test.rb
+++ b/apps/workbench/test/controllers/projects_controller_test.rb
@@ -410,18 +410,55 @@ class ProjectsControllerTest < ActionController::TestCase
end
end
- test "in dashboard the progress bar should only show on running containers" do
+ test "dashboard should show the correct status for containers and processes" do
get :index, {}, session_for(:active)
assert_select 'div.panel-body.recent-processes' do
[
- ['completed', false],
- ['uncommitted', false],
- ['queued', false],
- ['running', true],
- ].each do |cr_state, should_show|
- uuid = api_fixture('container_requests')[cr_state]['uuid']
+ {
+ fixture: 'container_requests',
+ state: 'completed',
+ selectors: [['div.progress', false],
+ ['span.label.label-success', true, 'Complete']]
+ },
+ {
+ fixture: 'container_requests',
+ state: 'uncommitted',
+ selectors: [['div.progress', false],
+ ['span.label.label-default', true, 'Uncommitted']]
+ },
+ {
+ fixture: 'container_requests',
+ state: 'queued',
+ selectors: [['div.progress', false],
+ ['span.label.label-default', true, 'Queued']]
+ },
+ {
+ fixture: 'container_requests',
+ state: 'running',
+ selectors: [['div.progress', true]]
+ },
+ {
+ fixture: 'pipeline_instances',
+ state: 'new_pipeline',
+ selectors: [['div.progress', false],
+ ['span.label.label-default', true, 'Not started']]
+ },
+ {
+ fixture: 'pipeline_instances',
+ state: 'pipeline_in_running_state',
+ selectors: [['div.progress', true]]
+ },
+ ].each do |c|
+ uuid = api_fixture(c[:fixture])[c[:state]]['uuid']
assert_select "div.dashboard-panel-info-row.row-#{uuid}" do
- assert_select 'div.progress', should_show
+ if c.include? :selectors
+ c[:selectors].each do |selector, should_show, label|
+ assert_select selector, should_show, "UUID #{uuid} should #{should_show ? '' : 'not'} show '#{selector}'"
+ if should_show and not label.nil?
+ assert_select selector, label, "UUID #{uuid} state label should show #{label}"
+ end
+ end
+ end
end
end
end
commit 8b4a1d1138ace590583601621f5cebedb8868c03
Author: Lucas Di Pentima <lucas at curoverse.com>
Date: Thu Sep 22 10:20:32 2016 -0300
10037: Fixed alignment issues on the dashboard
diff --git a/apps/workbench/app/views/projects/_show_dashboard.html.erb b/apps/workbench/app/views/projects/_show_dashboard.html.erb
index f0044e1..c02577f 100644
--- a/apps/workbench/app/views/projects/_show_dashboard.html.erb
+++ b/apps/workbench/app/views/projects/_show_dashboard.html.erb
@@ -60,17 +60,21 @@
</div>
<% else %>
<div class="dashboard-panel-info-row row-<%=wu.uuid%>">
- <div class="clearfix">
- <%= link_to_if_arvados_object p, {friendly_name: true} %>
- <div class="pull-right" style="width: 40%">
- <% if wu.is_running? %>
+ <div class="row">
+ <div class="col-md-6">
+ <%= link_to_if_arvados_object p, {friendly_name: true} %>
+ </div>
+ <% if wu.is_running? %>
+ <div class="col-md-6">
<div class="progress" style="margin-bottom: 0px">
<% wu.progress %>
</div>
- <% else %>
- <span class="label label-<%=wu.state_bootstrap_class%>"><%=wu.state_label%></span>
- <% end %>
</div>
+ <% else %>
+ <div class="col-md-2">
+ <span class="label label-<%=wu.state_bootstrap_class%>"><%=wu.state_label%></span>
+ </div>
+ <% end %>
</div>
<%
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list