[ARVADOS] updated: 976f560ab04bf570ed58664d97b8b6069b314941

git at public.curoverse.com git at public.curoverse.com
Tue Apr 14 15:34:36 EDT 2015


Summary of changes:
 apps/workbench/Gemfile                             |   2 +-
 apps/workbench/Gemfile.lock                        |   4 +-
 apps/workbench/app/assets/images/mouse-move.gif    | Bin 0 -> 26082 bytes
 .../app/assets/images/pipeline-running.gif         | Bin 0 -> 114564 bytes
 .../app/assets/javascripts/modal_pager.js          |  44 +++
 .../app/assets/javascripts/pipeline_instances.js   |  15 +-
 .../app/assets/stylesheets/application.css.scss    |   4 +
 .../app/controllers/actions_controller.rb          | 202 ++++++------
 .../controllers/pipeline_instances_controller.rb   |  54 ++++
 apps/workbench/app/helpers/application_helper.rb   |  29 +-
 .../views/application/_title_and_buttons.html.erb  |  24 +-
 .../_getting_started_popup.html.erb                | 179 +++++++++++
 apps/workbench/app/views/layouts/body.html.erb     |  34 +-
 .../pipeline_instances/_show_components.html.erb   |   6 +
 .../_show_components_editable.html.erb             |  20 --
 .../views/pipeline_instances/_show_inputs.html.erb |   6 +
 apps/workbench/app/views/users/profile.html.erb    |  13 +-
 apps/workbench/config/application.default.yml      |   1 +
 .../test/controllers/actions_controller_test.rb    |  69 ++--
 .../test/integration/application_layout_test.rb    |  60 +++-
 .../test/integration/report_issue_test.rb          |   3 +-
 .../test/integration/user_profile_test.rb          |  24 +-
 doc/_config.yml                                    |  20 +-
 doc/_includes/_navbar_top.liquid                   |   6 +-
 doc/_layouts/default.html.liquid                   |   2 +-
 doc/index.html.liquid                              |  32 +-
 doc/user/index.html.textile.liquid                 |   4 +-
 docker/mkimage-debootstrap.sh                      |   2 +-
 sdk/cli/bin/crunch-job                             |   5 +-
 sdk/go/keepclient/keepclient.go                    | 347 ++++++++++-----------
 sdk/go/keepclient/keepclient_test.go               | 269 ++++++++++++----
 sdk/go/keepclient/root_sorter.go                   |  12 +-
 sdk/go/keepclient/root_sorter_test.go              |   9 +-
 sdk/go/keepclient/support.go                       |  46 +--
 sdk/python/arvados/arvfile.py                      |  23 +-
 sdk/python/arvados/collection.py                   |  77 ++++-
 sdk/python/arvados/keep.py                         | 103 ++++--
 sdk/python/tests/arvados_testutil.py               |   5 +-
 sdk/python/tests/test_arvfile.py                   |  54 +++-
 sdk/python/tests/test_collections.py               |  59 ++--
 sdk/python/tests/test_keep_client.py               |  67 +++-
 sdk/ruby/lib/arvados/collection.rb                 |  55 +++-
 sdk/ruby/test/test_collection.rb                   |  87 +++++-
 .../{zz_load_config.rb => load_config.rb}          |  10 +
 ...preload_all_models.rb => preload_all_models.rb} |   7 +-
 .../test/fixtures/api_client_authorizations.yml    |  10 +-
 services/api/test/fixtures/users.yml               |  27 +-
 .../functional/arvados/v1/users_controller_test.rb |   6 +-
 services/keepproxy/keepproxy.go                    | 220 ++++++-------
 services/keepproxy/keepproxy_test.go               |  10 +-
 services/keepstore/keepstore.go                    |   2 +-
 services/keepstore/pull_worker.go                  |   8 +-
 services/keepstore/pull_worker_integration_test.go |  10 +-
 services/keepstore/pull_worker_test.go             |   2 +-
 54 files changed, 1638 insertions(+), 751 deletions(-)
 create mode 100644 apps/workbench/app/assets/images/mouse-move.gif
 create mode 100644 apps/workbench/app/assets/images/pipeline-running.gif
 create mode 100644 apps/workbench/app/assets/javascripts/modal_pager.js
 create mode 100644 apps/workbench/app/views/getting_started/_getting_started_popup.html.erb
 rename services/api/config/initializers/{zz_load_config.rb => load_config.rb} (80%)
 rename services/api/config/initializers/{zz_preload_all_models.rb => preload_all_models.rb} (55%)

       via  976f560ab04bf570ed58664d97b8b6069b314941 (commit)
       via  912464ad82bad38f1ce7984b6d4b19734a9816a9 (commit)
       via  c50acf62d8bc4a25f3fb432479fabad9b060f878 (commit)
       via  1f6a187a7011becd08bb3cef8bc5c4e253900590 (commit)
       via  08c4f5f03fd9afd86c4d9c43c7b8620ef9a0fade (commit)
       via  33d54abd1574c16685e2d631d367a1be4e969018 (commit)
       via  cdecff5125a3bc09720be4d210536a183e43ce7e (commit)
       via  18ac672a5c9b5416e21a3d45ed268f2edb509786 (commit)
       via  cd8db86a9178dd43f9582f55d9a14bde3f2e348a (commit)
       via  0bff4d895d0ce312524c9d689923c9590f81f36f (commit)
       via  be238c74d0d3835b0a384b712d7591dc95da8c07 (commit)
       via  a756a90a381473adcfe8cce6a022f1733395610a (commit)
       via  8e2150eb5dd257f0715c9ac050a8260279bb5d5c (commit)
       via  d743a56addcde9d92876d19201b9f46db42ea582 (commit)
       via  aafef3d22a7b225e82da5f146cb05472747a7b6e (commit)
       via  6261cf9003ec37622d38a3c40d94a75eff397922 (commit)
       via  1b2afc5aa599eb452a1f30e706e19b964e26cae0 (commit)
       via  0f119f7707d93e90842fce3890deffc59c5e7081 (commit)
       via  0d1d51b93a9009b6d4e423871886f0cbc65584c7 (commit)
       via  3bc94fb2d1e5c1e351f822ca5ec8f83260e039bb (commit)
       via  58e91ef73e6802978dfea0f93072d75be8ee221c (commit)
       via  e5b35f15d99b6371ef477408552375a762a12b38 (commit)
       via  986e124a61c64ae1a31fdbc33d2da6ac061ada17 (commit)
       via  3280e2dc5fd16dca63c389b931658d4420faabaf (commit)
       via  3f59bec0b3be2cb8718ee310df490c7f41aa8194 (commit)
       via  a632845c40c3a3421914efa1617e0a886d8b1d63 (commit)
       via  84f85c502498a863ea6bdc0fb6d2a7d0d4175936 (commit)
       via  dbdd94518d916b89f8e3a3fa0901da21a2493962 (commit)
       via  3e271eb8bc19f67465a33a69dc66a27021301fae (commit)
       via  fe9235552e6998eb86bc2ad80716bafe7a7ffd16 (commit)
       via  01dae203dd620f02b5bfa4aebf4fb217aa2817dc (commit)
       via  6c4d59cb70206b1770bd64b8db204d669cb2c55a (commit)
       via  93f6a595b7e69f955f2adee12ec512aa078cfdc9 (commit)
       via  92b3f3edf77492c6667d785e2d7214231dd9e78a (commit)
       via  9fb28073a1c7a140e44a20e0555028e9a9dbcf51 (commit)
       via  3f016eae9d2431abfb8e8cc1cabdb1a494e49bf2 (commit)
       via  d72f3039300613487af606ce69e5b7b8b2c67027 (commit)
       via  cc133acd3b94cfdf6b0770f12c0a4ed6b458ef18 (commit)
       via  a8ef8be836b1805b4e35922ea787caad7b81f689 (commit)
       via  320c333f2b49acd698b49b73ed01d32da4d15c8c (commit)
       via  43aa02f5af636f874bac5ffe96cff0061bcd6a44 (commit)
       via  ee60fe9a20238dfac97dd988380c0149a84c372a (commit)
       via  ef2572886ea8693f16316cbfe537053f106a2bb5 (commit)
       via  95298001afb4cb471d16bd181a8487ebe58bb0d4 (commit)
       via  0acda438a00257099b07141f21ad18cf92f03355 (commit)
       via  8893e8cf0dfd542508e9e45d715ee0165b249bd8 (commit)
       via  c17712a6fd8264e3b9fecfedc5124a9b6df00a14 (commit)
       via  ec8879aa56810dfc6475ad8cdc56770ff91f84f2 (commit)
       via  ee0411ef10f4e1c9aa207b8aa9c92bc36cb629e6 (commit)
       via  bd4fd5000f4f55035a0c31abb134d743888de72e (commit)
       via  873226313cdc0d05a39a79a60a4fccdbf8b8c0fc (commit)
       via  77b9859abb4c17355ca9db75817792733204745d (commit)
       via  93ba131c85e89a3e4a2d8fc6f7dcf5d8de3818eb (commit)
       via  679eef491b59a4c38a0b2914ff85e0a8c5059b2c (commit)
       via  c162a42573cdce83a35c54e630622544404012f7 (commit)
       via  88f57312fe5e2226f113dc5ecb0a5edce018701d (commit)
       via  de7c71aac6a8e93f84d515e42859cce674eab009 (commit)
       via  645b161de03001fee5663397f033a2efb17bda98 (commit)
       via  6dffa00d8e284e3e5266b9d318cd6c732ae905f4 (commit)
       via  dcd96ef83d878c48e588a815d7793e6004c4f08c (commit)
       via  37b57a092568ba92a41ee94a74bb0c73e569a18c (commit)
       via  58bd86e6912e25fcee566abd130997dd7bfc8b3c (commit)
       via  6b00d3b8212e8775bb59c5f4deec4797ce44e576 (commit)
       via  9e60acc645d8ee8e223398830e1ccfed3ea18e80 (commit)
       via  9ae180ec18f1f397889a4531a12999942edd003a (commit)
       via  8e4ed0edeadc4dfcc85666ef5c36619815dca8e2 (commit)
       via  50843fcf14d836e82af855fa6775d409054b708d (commit)
       via  a89c721eeb4115b5c6fc38071ef6192e604c4e12 (commit)
       via  e3c562dff0f84634c12e14c232a5ab677892ed6e (commit)
       via  17379ed7eb6e143667e53097f5ada570f051efd1 (commit)
       via  1f5a673014724c3444404658e65e32a6f9c562f3 (commit)
       via  4108d902330bb04a70885f316700cf1da9e7d920 (commit)
       via  15303f9cf99f00ccdef948e5ce593d9a3a88d21a (commit)
       via  7a54e370484b9adb7479fde69665d4adcbb7331f (commit)
       via  b0a3771f2110b691882226c559eab736ab9aa34d (commit)
       via  1f225f2c8479adcaaa918df25455b69464263b2c (commit)
       via  dd532a66ecc0d7ac4a90786d3a4de0c5c00c414e (commit)
       via  e59bc286dd018450cce0b662eeff8effe393d8ae (commit)
       via  7ec30c76580397ca6b06bf1bbdb1ca9dc9f7af2f (commit)
       via  663d024598ea7b6384b9e24e5ea760ecb710ecda (commit)
       via  b10a9487702db5d776c09bfa11f8abcb62f7419a (commit)
       via  53fac68b8025db64c50c0370a16c7afaf4be7bd3 (commit)
       via  5380c722ce344d712cab307d41e0f7a654a4070c (commit)
      from  6564944612790934531a3c30e6ab2cab6f329461 (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 976f560ab04bf570ed58664d97b8b6069b314941
Author: Radhika Chippada <radhika at curoverse.com>
Date:   Tue Apr 14 15:33:32 2015 -0400

    5417: add "unreadable inputs provided" visual cue for an editable pipeline instance.

diff --git a/apps/workbench/app/assets/javascripts/pipeline_instances.js b/apps/workbench/app/assets/javascripts/pipeline_instances.js
index e820ba9..a928d44 100644
--- a/apps/workbench/app/assets/javascripts/pipeline_instances.js
+++ b/apps/workbench/app/assets/javascripts/pipeline_instances.js
@@ -1,6 +1,6 @@
 function run_pipeline_button_state() {
     var a = $('a.editable.required.editable-empty,input.form-control.required[value=""]');
-    if (a.length > 0) {
+    if ((a.length > 0) || ($('.unreadable-inputs-present').length)) {
         $(".run-pipeline-button").addClass("disabled");
     }
     else {
@@ -35,7 +35,7 @@ $(document).on('editable:success', function(event, tag, response, newValue) {
 $(document).on('ready ajax:complete', function() {
     $('a.editable.required').each(function() {
         var $tag = $(this);
-        if ($tag.hasClass("editable-empty")) {
+        if ($tag.hasClass("unreadable-input")) {
             $tag.parent().css("background-color", "#ffdddd");
             $tag.parent().prev().css("background-color", "#ffdddd");
         }
@@ -44,6 +44,17 @@ $(document).on('ready ajax:complete', function() {
             $tag.parent().prev().css("background-color", "");
         }
     });
+    $('input.required').each(function() {
+        var $tag = $(this);
+        if ($tag.hasClass("editable-empty") || $tag.hasClass("unreadable-input")) {
+            $tag.parent().parent().css("background-color", "#ffdddd");
+            $tag.parent().parent().prev().css("background-color", "#ffdddd");
+        }
+        else {
+            $tag.parent().css("background-color", "");
+            $tag.parent().prev().css("background-color", "");
+        }
+    });
     run_pipeline_button_state();
 });
 
diff --git a/apps/workbench/app/controllers/pipeline_instances_controller.rb b/apps/workbench/app/controllers/pipeline_instances_controller.rb
index b4cce9b..e84d990 100644
--- a/apps/workbench/app/controllers/pipeline_instances_controller.rb
+++ b/apps/workbench/app/controllers/pipeline_instances_controller.rb
@@ -284,6 +284,60 @@ class PipelineInstancesController < ApplicationController
     %w(Compare Graph)
   end
 
+  helper_method :unreadable_inputs_present?
+  def unreadable_inputs_present?
+    unless @unreadable_inputs_present.nil?
+      @unreadable_inputs_present
+    end
+
+    input_uuids = []
+    input_pdhs = []
+    @object.components.each do |k, component|
+      next if !component
+      component[:script_parameters].andand.each do |p, tv|
+        if (tv.is_a? Hash) and (tv[:dataclass] == "Collection")
+          if tv[:value]
+            value = tv[:value]
+          elsif tv[:default]
+            value = tv[:default]
+          end
+          if value
+            split = value.split '/'
+            if CollectionsHelper.match(split[0])
+              input_pdhs << split[0]
+            else
+              input_uuids << split[0]
+            end
+          end
+        end
+      end
+    end
+
+    input_pdhs = input_pdhs.uniq
+    input_uuids = input_uuids.uniq
+
+    preload_collections_for_objects input_uuids if input_uuids.any?
+    preload_for_pdhs input_pdhs if input_pdhs.any?
+
+    @unreadable_inputs_present = false
+    input_uuids.each do |uuid|
+      if !collections_for_object(uuid).any?
+        @unreadable_inputs_present = true
+        break
+      end
+    end
+    if !@unreadable_inputs_present
+      input_pdhs.each do |pdh|
+        if !collection_for_pdh(pdh).any?
+          @unreadable_inputs_present = true
+          break
+        end
+      end
+    end
+
+    @unreadable_inputs_present
+  end
+
   protected
   def for_comparison v
     if v.is_a? Hash or v.is_a? Array
diff --git a/apps/workbench/app/helpers/application_helper.rb b/apps/workbench/app/helpers/application_helper.rb
index 72f961f..8d92b47 100644
--- a/apps/workbench/app/helpers/application_helper.rb
+++ b/apps/workbench/app/helpers/application_helper.rb
@@ -183,20 +183,26 @@ module ApplicationHelper
       return link_to_if_arvados_object attrvalue, opts
     end
 
+    readable = object_readable attrvalue, resource_class
+    if readable
+      link_to_if_arvados_object attrvalue, opts
+    else
+      link_text_if_not_readable
+    end
+  end
+
+  def object_readable attrvalue, resource_class=nil
+    resource_class = resource_class_for_uuid(attrvalue)
+    return if resource_class.nil?
+
     if resource_class.to_s == 'Collection'
       if CollectionsHelper.match(attrvalue)
-        readable = collection_for_pdh(attrvalue).any?
+        collection_for_pdh(attrvalue).any?
       else
-        readable = collections_for_object(attrvalue).any?
+        collections_for_object(attrvalue).any?
       end
     else
-      readable = object_for_dataclass(resource_class, attrvalue)
-    end
-
-    if readable
-      link_to_if_arvados_object attrvalue, opts
-    else
-      link_text_if_not_readable
+      object_for_dataclass(resource_class, attrvalue)
     end
   end
 
@@ -346,10 +352,11 @@ module ApplicationHelper
            success: 'page-refresh'
          }.to_json,
         })
+      is_readable_input = object_readable attrvalue.split('/')[0] unless attrvalue.andand.empty?
       return content_tag('div', :class => 'input-group') do
         html = text_field_tag(dn, display_value,
                               :class =>
-                              "form-control #{'required' if required}")
+                              "form-control #{'required' if required} #{'unreadable-input' if !attrvalue.andand.empty? and !is_readable_input}")
         html + content_tag('span', :class => 'input-group-btn') do
           link_to('Choose',
                   modal_path,
diff --git a/apps/workbench/app/views/pipeline_instances/_show_components.html.erb b/apps/workbench/app/views/pipeline_instances/_show_components.html.erb
index 7735997..a2dbada 100644
--- a/apps/workbench/app/views/pipeline_instances/_show_components.html.erb
+++ b/apps/workbench/app/views/pipeline_instances/_show_components.html.erb
@@ -13,6 +13,12 @@
 
 <% else %>
   <%# state is either New or Ready %>
+  <% if controller.class.name.eql?('PipelineInstancesController') and unreadable_inputs_present? %>
+    <div class="unreadable-inputs-present">
+      <p style="color:#ff6666"> One or more inputs provided are not readable by you. Please correct these before you can run the pipeline.</p>
+    </div>
+  <% end %>
+
   <p><i>Here are all of the pipeline's components (jobs that will need to run in order to complete the pipeline). If you know what you're doing (or you're experimenting) you can modify these parameters before starting the pipeline. Usually, you only need to edit the settings presented on the "Inputs" tab above.</i></p>
 
   <%= render_pipeline_components("editable", :json, editable: true) %>
diff --git a/apps/workbench/app/views/pipeline_instances/_show_components_editable.html.erb b/apps/workbench/app/views/pipeline_instances/_show_components_editable.html.erb
index 51fe8d4..f6c9e85 100644
--- a/apps/workbench/app/views/pipeline_instances/_show_components_editable.html.erb
+++ b/apps/workbench/app/views/pipeline_instances/_show_components_editable.html.erb
@@ -1,23 +1,3 @@
-<%
-  input_uuids = []
-  input_pdhs = []
-  @object.components.each do |k, component|
-    next if !component
-    component[:script_parameters].andand.each do |p, tv|
-      if tv.is_a? Hash and !tv[:value].nil? and (tv[:dataclass] == "Collection")
-        if CollectionsHelper.match(tv[:value])
-          input_pdhs << tv[:value]
-        else
-          input_uuids << tv[:value]
-        end
-      end
-    end
-  end
-
-  preload_collections_for_objects input_uuids if input_uuids.any?
-  preload_for_pdhs input_pdhs if input_pdhs.any?
-%>
-
 <table class="table pipeline-components-table" style="margin-top: -.1em">
   <colgroup>
     <col style="width: 20%" />
diff --git a/apps/workbench/app/views/pipeline_instances/_show_inputs.html.erb b/apps/workbench/app/views/pipeline_instances/_show_inputs.html.erb
index e6b7ef2..67afba1 100644
--- a/apps/workbench/app/views/pipeline_instances/_show_inputs.html.erb
+++ b/apps/workbench/app/views/pipeline_instances/_show_inputs.html.erb
@@ -32,6 +32,12 @@
 <% if n_inputs == 0 %>
   <p>This pipeline does not need any further inputs specified. You can start it by clicking the "Run" button whenever you're ready. (It's not too late to change existing settings, though.)</p>
 <% else %>
+  <% if controller.class.name.eql?('PipelineInstancesController') and unreadable_inputs_present? %>
+    <div class="unreadable-inputs-present">
+      <p style="color:#ff6666"> One or more inputs provided are not readable by you. Please correct these before you can run the pipeline.</p>
+    </div>
+  <% end %>
+
   <p><i>Provide <%= n_inputs > 1 ? 'values' : 'a value' %> for the following <%= n_inputs > 1 ? 'parameters' : 'parameter' %>, then click the "Run" button to start the pipeline.</i></p>
   <% if @object.editable? %>
     <%= content_for :pi_input_form %>

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list