Merge branch 'master' into 3198-writable-fuse
[arvados.git] / apps / workbench / app / helpers / pipeline_instances_helper.rb
index 07fda05c32ac4c9e07902722df45ee24436812f9..ba05f9e88cd7cd2f0345c993d5e60a7603e2bb8c 100644 (file)
@@ -89,8 +89,8 @@ module PipelineInstancesHelper
       c[:job][:uuid] if c.is_a?(Hash) and c[:job].is_a?(Hash)
     }.compact
     job = {}
-    jobuuids.each do |jobuuid|
-      job[jobuuid] = Job.find?(jobuuid)
+    Job.where(uuid: jobuuids).each do |j|
+      job[j[:uuid]] = j
     end
 
     object.components.each do |cname, c|
@@ -306,4 +306,11 @@ module PipelineInstancesHelper
     raw(s)
   end
 
+  def render_unreadable_inputs_present
+    if current_user and controller.class.name.eql?('PipelineInstancesController') and unreadable_inputs_present?
+      raw('<div class="alert alert-danger unreadable-inputs-present">' +
+            '<p>One or more inputs provided are not readable by you. ' +
+              'Please correct these before you can run the pipeline.</p></div>')
+    end
+  end
 end