[ARVADOS] updated: 2cda4fc683d0549fc80b15155f36cf2637180240
git at public.curoverse.com
git at public.curoverse.com
Fri Dec 4 10:57:20 EST 2015
Summary of changes:
.../views/pipeline_instances/_running_component.html.erb | 15 ++++++++++++---
apps/workbench/test/integration/anonymous_access_test.rb | 7 ++++---
2 files changed, 16 insertions(+), 6 deletions(-)
via 2cda4fc683d0549fc80b15155f36cf2637180240 (commit)
from 5214049d26fa69c1e9e4428f177d25f4ed534b60 (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 2cda4fc683d0549fc80b15155f36cf2637180240
Author: radhika <radhika at curoverse.com>
Date: Fri Dec 4 10:56:19 2015 -0500
7753: when a job is in "Running" state, the Log link still should be shown in the Component display panel header.
diff --git a/apps/workbench/app/views/pipeline_instances/_running_component.html.erb b/apps/workbench/app/views/pipeline_instances/_running_component.html.erb
index 6cfb017..6a24f1f 100644
--- a/apps/workbench/app/views/pipeline_instances/_running_component.html.erb
+++ b/apps/workbench/app/views/pipeline_instances/_running_component.html.erb
@@ -19,8 +19,8 @@
<% if current_job %>
<%# column offset 4 %>
- <% if current_job[:state].in? ["Running", "Complete", "Failed", "Cancelled"] %>
- <div class="col-md-1">
+ <% if current_job[:state].in? ["Complete", "Failed", "Cancelled"] %>
+ <div class="col-md-1">
<% if current_job[:log] %>
<% logCollection = Collection.find? current_job[:log] %>
<% if logCollection %>
@@ -29,7 +29,16 @@
Log unavailable
<% end %>
<% end %>
- </div>
+ </div>
+ <% elsif current_job[:state] == "Running" %>
+ <div class="col-md-1">
+ <% job = Job.find? current_job[:uuid] %>
+ <% if job %>
+ <%= link_to "Log", job_path(current_job[:uuid], anchor: "Log") %>
+ <% else %>
+ Log unavailable
+ <% end %>
+ </div>
<% end %>
<%# column offset 5 %>
diff --git a/apps/workbench/test/integration/anonymous_access_test.rb b/apps/workbench/test/integration/anonymous_access_test.rb
index 14dda0c..f962821 100644
--- a/apps/workbench/test/integration/anonymous_access_test.rb
+++ b/apps/workbench/test/integration/anonymous_access_test.rb
@@ -211,6 +211,7 @@ class AnonymousAccessTest < ActionDispatch::IntegrationTest
['pipeline_in_publicly_accessible_project_but_other_objects_elsewhere', true, 'admin'],
['completed_job_in_publicly_accessible_project', true],
+ ['running_job_in_publicly_accessible_project', true],
['job_in_publicly_accessible_project_but_other_objects_elsewhere', false],
].each do |fixture, objects_readable, user=nil|
test "access #{fixture} in public project with objects readable=#{objects_readable} with user #{user}" do
@@ -243,15 +244,15 @@ class AnonymousAccessTest < ActionDispatch::IntegrationTest
assert_text 'This pipeline was created from'
job_id = object['components']['foo']['job']['uuid']
assert_selector 'a', text: job_id
- if object['components']['foo']['job']['log']
- assert_selector "a[href=\"/jobs/#{job_id}#Log\"]", text: 'Log'
- end
+ assert_selector "a[href=\"/jobs/#{job_id}#Log\"]", text: 'Log'
# We'd like to test the Log tab on job pages too, but we can't right
# now because Poltergeist 1.x doesn't support JavaScript's
# Function.prototype.bind, which is used by job_log_graph.js.
find(:xpath, "//a[@href='#Log']").click
assert_text expect_log_text
+ else
+ assert_selector "a[href=\"/jobs/#{object['uuid']}#Log\"]", text: 'Log'
end
else
assert_selector 'a[data-toggle="disabled"]', text: 'Log'
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list