[ARVADOS] updated: d82f1a45af0702c68b6bf93b887a8c94c078ce4d

git at public.curoverse.com git at public.curoverse.com
Tue Jul 29 19:22:29 EDT 2014


Summary of changes:
 .../app/assets/javascripts/select_modal.js         |  33 ++---
 .../app/controllers/actions_controller.rb          |   6 +-
 apps/workbench/app/views/application/404.html.erb  |   2 +-
 .../app/views/application/_choose.html.erb         |   2 +-
 apps/workbench/app/views/layouts/body.html.erb     |   6 +-
 sdk/python/arvados/commands/put.py                 |  21 ++--
 sdk/python/arvados/keep.py                         | 139 +++++++++++++--------
 sdk/python/bin/arv-ls                              |   2 +-
 .../controllers/arvados/v1/groups_controller.rb    |   6 +
 services/api/app/models/user.rb                    |   2 +-
 services/api/test/fixtures/groups.yml              |   2 +-
 .../arvados/v1/groups_controller_test.rb           |   7 ++
 services/fuse/arvados_fuse/__init__.py             |   3 +-
 13 files changed, 142 insertions(+), 89 deletions(-)

       via  d82f1a45af0702c68b6bf93b887a8c94c078ce4d (commit)
       via  08c991e7ce24f6424b0916dec3d6077e56ffcdba (commit)
       via  19c20b239f9d88f6fd4dab542524143f24cc8536 (commit)
       via  7a54fd6a073e03f98f68d0b6c816a9f394f625dd (commit)
       via  d525bce65134ab333f27978bf8a44555e4590577 (commit)
       via  aa35b924e64697ba41d07017f92ae1bd7bafceb1 (commit)
       via  fd372f1484ad0b7a1eb3ac430c3345dbc0f61bc5 (commit)
       via  dde8b8b6e7b3beab98d93aeacc945b6f4cef9436 (commit)
       via  2db098fbaa7d8599ccdd208033c37209b033a5db (commit)
       via  259fb182a339231b16c8eee1dd0bffe45b5483ea (commit)
       via  6c7373c9d66ab358ea48ea7c1d0e59551364e064 (commit)
       via  673a10d2aabd1d9ed73fb6aeabb632f08f39a415 (commit)
       via  63ea4e55dcffca4e4cbcc7fc2070451dfc718dae (commit)
       via  5e1c7a2841d2c02f2dd0259a32011bc563957a4d (commit)
       via  537b461c3668c788b17f2d6eb72743056cdad3b1 (commit)
       via  4f3642a6629bcdd8c8be30f3181fae1c57e3a1db (commit)
       via  b53f78b45e416b710fd273aee52469e6ff5db7be (commit)
       via  0d1a48e90dfbbdf1f8bb6e08d634e70e38223ff6 (commit)
       via  575ecb6cb09d65a18492c8ecbc6af0eec01991f6 (commit)
      from  72ea413fc98371c50196f337f104807ab7472288 (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 d82f1a45af0702c68b6bf93b887a8c94c078ce4d
Author: Tom Clegg <tom at curoverse.com>
Date:   Tue Jul 29 19:19:02 2014 -0400

    3235: Don't blow up when calling 404 from ActionsController.
    
    Before:
    
      At .../app/views/application/404.html.erb:17
      #<ActionController::UrlGenerationError: No route matches {:action=>"index", :controller=>"actions"}>
    
    After:
    
      Use the class_name deduced from the uuid to determine the most
      likely controller, instead of assuming the current controller is the
      right one.

diff --git a/apps/workbench/app/views/application/404.html.erb b/apps/workbench/app/views/application/404.html.erb
index 40d73b9..86e04ce 100644
--- a/apps/workbench/app/views/application/404.html.erb
+++ b/apps/workbench/app/views/application/404.html.erb
@@ -14,7 +14,7 @@
 
 <% if class_name %>
 Perhaps you'd like to
-<%= link_to("browse all #{class_name.pluralize}", action: :index) %>?
+<%= link_to("browse all #{class_name.pluralize}", action: :index, controller: class_name.tableize) %>?
 <% end %>
 
 </p>

commit 08c991e7ce24f6424b0916dec3d6077e56ffcdba
Author: Tom Clegg <tom at curoverse.com>
Date:   Tue Jul 29 19:13:42 2014 -0400

    3235: Do not bring up search dialog until enter/click in top nav
    widget. Add special case "feeling lucky" behavior when the search
    string is an Arvados UUID.

diff --git a/apps/workbench/app/assets/javascripts/select_modal.js b/apps/workbench/app/assets/javascripts/select_modal.js
index 0a6aad3..ee33b54 100644
--- a/apps/workbench/app/assets/javascripts/select_modal.js
+++ b/apps/workbench/app/assets/javascripts/select_modal.js
@@ -88,29 +88,34 @@ $(document).on('click', '.selectable', function() {
         data('infinite-content-params', params).
         trigger('refresh-content');
 }).on('ready', function() {
-    $('form[data-search-modal] *').on('click keyup paste', function() {
-        // When user types, pastes, or clicks the top nav Search
-        // input, ask the server for a Search modal. When it arrives,
-        // copy the search string from the top nav input into the
-        // modal's search query field.
-        var $form = $(this).closest('form');
-        var $a;
+    $('form[data-search-modal] a').on('click', function() {
+        $(this).closest('form').submit();
+        return false;
+    });
+    $('form[data-search-modal]').on('submit', function() {
+        // Ask the server for a Search modal. When it arrives, copy
+        // the search string from the top nav input into the modal's
+        // search query field.
+        var $form = $(this);
+        var searchq = $form.find('input').val();
+        var is_a_uuid = /^([0-9a-f]{32}(\+\S+)?|[0-9a-z]{5}-[0-9a-z]{5}-[0-9a-z]{15})$/;
+        if (searchq.trim().match(is_a_uuid)) {
+            window.location = '/actions?uuid=' + encodeURIComponent(searchq.trim());
+            // Show the "loading" indicator. TODO: better page transition hook
+            $(document).trigger('ajax:send');
+            return false;
+        }
         if ($form.find('a[data-remote]').length > 0) {
             // A search dialog is already loading.
-            return;
+            return false;
         }
-        $a = $('<a />').
+        $('<a />').
             attr('href', $form.attr('data-search-modal')).
             attr('data-remote', 'true').
             attr('data-method', 'GET').
             hide().
             appendTo($form).
             on('ajax:success', function(data, status, xhr) {
-                // Move the dialog to the top of the window to prevent
-                // a well timed click on the top nav search box from
-                // closing the dialog as soon as it opens.
-                $('body > .modal-container .modal-dialog').
-                    css('margin-top', '0');
                 $('body > .modal-container input[type=text]').
                     val($form.find('input').val()).
                     focus();
diff --git a/apps/workbench/app/controllers/actions_controller.rb b/apps/workbench/app/controllers/actions_controller.rb
index 9f2cfb0..d1dc0fc 100644
--- a/apps/workbench/app/controllers/actions_controller.rb
+++ b/apps/workbench/app/controllers/actions_controller.rb
@@ -11,13 +11,15 @@ class ActionsController < ApplicationController
   end
 
   def show
-    @object = model_class.find(params[:uuid])
+    @object = model_class.andand.find(params[:uuid])
     if @object.is_a? Link and
         @object.link_class == 'name' and
         ArvadosBase::resource_class_for_uuid(@object.head_uuid) == Collection
       redirect_to collection_path(id: @object.uuid)
-    else
+    elsif @object
       redirect_to @object
+    else
+      raise ActiveRecord::RecordNotFound
     end
   end
 
diff --git a/apps/workbench/app/views/layouts/body.html.erb b/apps/workbench/app/views/layouts/body.html.erb
index 07cbb29..4a51265 100644
--- a/apps/workbench/app/views/layouts/body.html.erb
+++ b/apps/workbench/app/views/layouts/body.html.erb
@@ -32,7 +32,7 @@
                        %>">
               <div class="input-group" style="width: 220px">
                 <input type="text" class="form-control" placeholder="search">
-                <span class="input-group-addon"><span class="glyphicon glyphicon-search"></span></span>
+                <a class="input-group-addon"><span class="glyphicon glyphicon-search"></span></a>
               </div>
             </form>
           </li>

commit 19c20b239f9d88f6fd4dab542524143f24cc8536
Merge: 72ea413 7a54fd6
Author: Tom Clegg <tom at curoverse.com>
Date:   Tue Jul 29 14:44:10 2014 -0400

    3235: Merge branch 'master' into 3235-top-nav-site-search


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


hooks/post-receive
-- 




More information about the arvados-commits mailing list