[ARVADOS] updated: c10b68e95cd648caade631ca9bdeceba8e707384

git at public.curoverse.com git at public.curoverse.com
Wed Oct 29 11:40:04 EDT 2014


Summary of changes:
 .../app/assets/javascripts/application.js          |   4 +
 .../app/assets/javascripts/infinite_scroll.js      |  52 +-
 .../app/controllers/collections_controller.rb      |   4 +-
 .../controllers/pipeline_instances_controller.rb   |  12 +-
 apps/workbench/app/helpers/application_helper.rb   |   2 +
 .../app/views/projects/_show_tab_contents.html.erb |   4 +-
 apps/workbench/config/application.yml.example      |   9 +
 .../test/functional/collections_controller_test.rb |   8 +
 .../test/integration/pipeline_instances_test.rb    |  28 +-
 sdk/cli/bin/arv                                    |   2 +-
 sdk/cli/bin/arv-copy                               |   1 +
 sdk/python/arvados/commands/arv_copy.py            | 665 +++++++++++++++++++++
 sdk/python/arvados/commands/keepdocker.py          |  31 +-
 sdk/python/arvados/config.py                       |  27 +-
 sdk/python/arvados/keep.py                         |   5 +-
 sdk/python/bin/arv-copy                            |   4 +
 sdk/python/setup.py                                |   1 +
 sdk/python/tests/test_keep_client.py               |   7 +
 services/api/config/application.yml.example        |   1 +
 services/api/lib/eventbus.rb                       | 147 +++--
 services/api/script/crunch-dispatch.rb             | 144 +++--
 services/api/test/fixtures/pipeline_templates.yml  |   1 +
 services/api/test/integration/websocket_test.rb    |  43 ++
 services/fuse/tests/test_mount.py                  |   1 +
 services/nodemanager/arvnodeman/jobqueue.py        |   2 +-
 services/nodemanager/tests/test_jobqueue.py        |   5 +
 26 files changed, 1054 insertions(+), 156 deletions(-)
 create mode 120000 sdk/cli/bin/arv-copy
 create mode 100755 sdk/python/arvados/commands/arv_copy.py
 create mode 100755 sdk/python/bin/arv-copy

       via  c10b68e95cd648caade631ca9bdeceba8e707384 (commit)
       via  9f37a732c9bfb3892231765f37e213af4e037e68 (commit)
       via  89ba1124c9fd6d3167c50059dc8adea64e6147b5 (commit)
       via  2d244defaaa4f5f663a5ac11cf507d7203f704e3 (commit)
       via  846ac5d419862e2b0051ec0843e71c601b35da44 (commit)
       via  f923effe2e0ae0b704b9236b4165866b171b6e81 (commit)
       via  fff7228b347fd12c15a18d6de47e37c2f72ae795 (commit)
       via  e68bf42e440545bd2b760635039a232c4ef35fae (commit)
       via  8c492b3940f398dddea54792f67a7a0e9d2383a6 (commit)
       via  af2ca91daa4cb9550226be5fad80da24ee426fb7 (commit)
       via  2776ad1bd8f05cf58a2bab436db932289d80549a (commit)
       via  a3db87c5a23f3a1e72ea82304d24db8c1757c095 (commit)
       via  6ed159925434818e3da1f7ff9f6a777815f2a5a4 (commit)
       via  f1eb092c311510b60b8c9b00b64407780e2a0302 (commit)
       via  ef56ac56a0bac0710a486c0e5e9cdd3199eddc61 (commit)
       via  fb01e30424d20a3430f45826e57410b8e2e5440d (commit)
       via  35ade8a042094a27e2ca5cfd5e9754aa3513410c (commit)
       via  0862d7206c66e8cc435de1d379c1a3ed389c1c87 (commit)
       via  cf1097ef1225c05eb4431093a4971739a3ee5a37 (commit)
       via  563b588da606aa38cdfd8a35fbc70c7414678747 (commit)
       via  e3fe23ff86e3f5f19c0a76779f957adf1310b949 (commit)
       via  87b2e5da50efa25671f1368e6cb162a5584fe030 (commit)
       via  7086db26dce2ed43098daf1198a37412a5e42e48 (commit)
       via  140012f16cc5945a8c469db3e11f13cc4493cc22 (commit)
       via  4a774fdb7a95a241d4b95649ea57b505784f3362 (commit)
       via  de3bb6cb95b9699ff6eea6ac836c4598cec331a5 (commit)
       via  fdaaff3165642f03d46a628050d6dfb04cd37565 (commit)
       via  789e479916a89e57cdf1d65c49923449c4fb1bcf (commit)
       via  21ccdae70baaca0c7aeca8542f2a0a431f06c313 (commit)
       via  74e7f636d3ec2f3a20640b721a3fd76fd23cd788 (commit)
       via  21d6720325e567f78329662c286fa693a8688ff4 (commit)
       via  e8451457c28477a5c3716e878d09d0be147186d6 (commit)
       via  d3dbc2c0557801f0e269a035e257beb09fd53618 (commit)
       via  81c3241d08ced11ea118c7f68db62032ad5bc469 (commit)
       via  8bd432b7fe67766d6f92902e20b5e63c9f18146d (commit)
       via  cdaf5c71016d2cad54d54e9b4b87bafe4554d376 (commit)
       via  b81c434401a503746ec54e53bf7058cf42beaa2f (commit)
       via  36bf949652cf8544f6176f77e07273cd3bf9df77 (commit)
       via  41c5cc5a3731417a31c8db685e78cb795bbbe91b (commit)
       via  b7f67c80916c2efa0c234ab5f4e92c24d47223c5 (commit)
       via  d0b0a2baec96a678284e3004b13dce85f36ba190 (commit)
       via  edf8405b6a3bbce4a7e11118bb9c706d36856460 (commit)
       via  d8bfa56903897394775f39b612f8dd84372c5433 (commit)
       via  91a44b10f8c7eb1bee8fcd23a577a1969bcdb2e4 (commit)
       via  f4008e9c662be5b576f5e785a4c90cc1e2cfb5fa (commit)
       via  153020da61fa3ca2341aaf5d279e56d8c489aaaa (commit)
       via  a7f12322bab34a27863d90de9ddb95f69697bf29 (commit)
       via  72d24b26cac507988ba6583064451b81d1854d78 (commit)
       via  12d990a6590e5f23a5998d29a2d8efdb0f733688 (commit)
       via  ab7c97818a088e7205d4d01db1e8a0c0709b9aa0 (commit)
       via  8c5f7a869e1d7a7c8f6338d1836987567c32f626 (commit)
       via  9cff4a0bf758ebb2e1a63df6a25c83f11752f8d8 (commit)
       via  fdbf1d6a692ae5991346e352916e8b37bd62cf19 (commit)
       via  518e0fab098eb8e025e72b67d7b2ccd75f3deec9 (commit)
       via  ac22ee15271c0d0c144d9ec42e17da965168e213 (commit)
       via  677eebc84a20221287c22b196dd81cf6ddb22fe1 (commit)
       via  04a4fa5843c3511260a750065cf79203ae1663ee (commit)
       via  963c9e8f87f09ff798e23e0c9ddca6eb7bbec796 (commit)
       via  f2170ad3c6c0f390d427c6b885527b1d1b09ffa3 (commit)
       via  e09e57378e5f98235e472a35c18a3e3a2bac97fb (commit)
       via  1ecc9b7b0b0f88a4e1a96b9bcb77aa580f68cc89 (commit)
       via  044d3d29476a8e59821ca4ebb7144f6c6b0b24ce (commit)
       via  b23bcfdc041fa9459d2beb423eea35e3ad34e64a (commit)
       via  bc59a822ddb8e55739fdbdb04e6fbd78d5116450 (commit)
       via  6d84b6c8ebeaf59a40cd9e4db1a7e897bf76511c (commit)
       via  a0e2de21d7c0cb7d38a3fbfa279e2f8278c5280d (commit)
       via  565198b9c115b5f9b5b190d76ca7a7a0901c9cc6 (commit)
       via  4dac4271e852a29ea23f0fd8efb7db417b444f29 (commit)
       via  c18a47461c7515e46967b9621af01a6699d036cb (commit)
       via  9fe1eb15e54fb07ba90f74043ecb044ce3c198f7 (commit)
       via  b056c28bcb5090bed22d78b84ac9a688dee27577 (commit)
       via  ee52a6f8505cc86e01a5488f8bbb954a676fb5fa (commit)
       via  34aac296f4a0d2df0e369a9169924ef7849d6e85 (commit)
       via  4b34d2584324664897467bb902599938710c9650 (commit)
       via  3bbfa6d0fc44e8f9baf67ca9179bef84f92d35be (commit)
       via  155c3adfcde63fcc40d6a1474cb14c73285703f6 (commit)
       via  379f500eb5304c7a5a0550de567c04f047cc54eb (commit)
       via  651dc72cbcadcbeba7012f835c945f15acb3606c (commit)
       via  ccc1d433b03a5b2d78bccfda15361abc0bdc88ed (commit)
       via  be5ce81414f6849ce50880bdc629600415d0f604 (commit)
       via  6f793d4da23db743b1833c43ccdc006b9bfe7468 (commit)
       via  d613d109dd067be0161380b0c911204e6b47312b (commit)
       via  d7e750680bbf5e655d7c986ce0cff550c8022ca4 (commit)
       via  1fbefb983066a6237664c883e8aa3d45e9f735f9 (commit)
       via  6bb1e16453ba2464a8739d754b61bf69a6c5c581 (commit)
       via  e1ce0f420a72a205a81ee0b52ea04eaf2fb047d8 (commit)
       via  5fcf5ebe7b89517edcb610bf1f1df8abf99df9ae (commit)
       via  1f3035cfe645741753e45ff8d3cf43a3fc5b2385 (commit)
       via  143bbe8d10d826b05357a531de6aa2a14f4cffb9 (commit)
      from  9ad6d61c1576b604b936eb981683941078d79d8e (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 c10b68e95cd648caade631ca9bdeceba8e707384
Author: Phil Hodgson <bitbucket at philhodgson.net>
Date:   Wed Oct 29 16:39:56 2014 +0100

    3618: Make tests pass: bugs were revealed in "Other objects" tab related to there not being any sorting going on there, etc.; add checks for HTML5 history and for nulls and undefineds

diff --git a/apps/workbench/app/assets/javascripts/application.js b/apps/workbench/app/assets/javascripts/application.js
index a23a6d4..1990b8b 100644
--- a/apps/workbench/app/assets/javascripts/application.js
+++ b/apps/workbench/app/assets/javascripts/application.js
@@ -236,3 +236,7 @@ function showLoadingModal() {
 function hideLoadingModal() {
     $('#loading-modal').modal('hide');
 }
+
+function hasHTML5History() {
+    return !!(window.history && window.history.pushState);
+}
diff --git a/apps/workbench/app/assets/javascripts/infinite_scroll.js b/apps/workbench/app/assets/javascripts/infinite_scroll.js
index b5255fb..f07cd09 100644
--- a/apps/workbench/app/assets/javascripts/infinite_scroll.js
+++ b/apps/workbench/app/assets/javascripts/infinite_scroll.js
@@ -162,8 +162,8 @@ function setColumnSort( $container, $header, direction ) {
     var params = $container.data(paramsAttr) || {};
     params.order = $header.data('sort-order').split(",").join( ' ' + direction + ', ' ) + ' ' + direction;
     $container.data(paramsAttr, params);
-    // show the right icon next to the column header
-    $container.trigger('sortIcons');
+    // show the correct icon next to the column header
+    $container.trigger('sort-icons');
 
     return params.order;
 }
@@ -195,18 +195,20 @@ $(document).
                 return;
             $(this).addClass('infinite-scroller-ready');
 
-            // deal with sorting if was set on this page for this tab already
-            var tabId = $(this).closest('div.tab-pane').attr('id');
-            if( typeof(history.state.order) !== 'undefined' && typeof(history.state.order[tabId]) !== 'undefined' ) {
-                // we will use the list of one or more table columns associated with this header to find the right element
-                // see sortable_columns as it is passed to render_pane in the various tab .erbs (e.g. _show_jobs_and_pipelines.html.erb)
-                var strippedColumns = history.state.order[tabId].replace(/\s|asc|desc/g,'');
-                var sortDirection = history.state.order[tabId].split(" ")[1].replace(/,/,'');
-                $columnHeader = $(this).closest('table').find('[data-sort-order="'+ strippedColumns +'"]');
-                setColumnSort( $(this), $columnHeader, sortDirection );
-            } else {
-                // otherwise just reset the sort icons
-                $(this).trigger('sortIcons');
+            // deal with sorting if there is any, and if it was set on this page for this tab already
+            if( $('th[data-sort-order]').length ) {
+                var tabId = $(this).closest('div.tab-pane').attr('id');
+                if( hasHTML5History() && history.state !== undefined && history.state !== null && history.state.order !== undefined && history.state.order[tabId] !== undefined ) {
+                    // we will use the list of one or more table columns associated with this header to find the right element
+                    // see sortable_columns as it is passed to render_pane in the various tab .erbs (e.g. _show_jobs_and_pipelines.html.erb)
+                    var strippedColumns = history.state.order[tabId].replace(/\s|asc|desc/g,'');
+                    var sortDirection = history.state.order[tabId].split(" ")[1].replace(/,/,'');
+                    $columnHeader = $(this).closest('table').find('[data-sort-order="'+ strippedColumns +'"]');
+                    setColumnSort( $(this), $columnHeader, sortDirection );
+                } else {
+                    // otherwise just reset the sort icons
+                    $(this).trigger('sort-icons');
+                }
             }
 
             // $scroller is the DOM element that hears "scroll"
@@ -227,7 +229,7 @@ $(document).
     on('click', 'th[data-sort-order]', function() {
         var direction = $(this).data('sort-order-direction');
         // reverse the current direction, or do ascending if none
-        if( typeof(direction) === 'undefined' || direction === 'desc' ) {
+        if( direction === undefined || direction === 'desc' ) {
             direction = 'asc';
         } else {
             direction = 'desc';
@@ -237,23 +239,25 @@ $(document).
 
         var order = setColumnSort( $container, $(this), direction );
 
-        // put it in the browser history state
-        var tabId = $(this).closest('div.tab-pane').attr('id');
-        var state =  history.state;
-        if( typeof(state.order) === 'undefined') {
-            state.order = {};
+        // put it in the browser history state if browser allows it
+        if( hasHTML5History() ) {
+            var tabId = $(this).closest('div.tab-pane').attr('id');
+            var state =  history.state;
+            if( state.order === undefined) {
+                state.order = {};
+            }
+            state.order[tabId] = order;
+            history.replaceState( state, null, null );
         }
-        state.order[tabId] = order;
-        history.replaceState( state, null, null );
 
         $container.trigger('refresh-content');
     }).
-    on('sortIcons', function() {
+    on('sort-icons', function() {
         // set or reset the icon next to each sortable column header according to the current direction attribute
         $('th[data-sort-order]').each(function() {
             $(this).find('i').remove();
             var direction = $(this).data('sort-order-direction');
-            if( typeof(direction) !== 'undefined' ) {
+            if( direction !== undefined ) {
                 $(this).append('<i class="fa fa-sort-' + direction + '"/>');
             } else {
                 $(this).append('<i class="fa fa-sort"/>');
diff --git a/apps/workbench/app/views/projects/_show_tab_contents.html.erb b/apps/workbench/app/views/projects/_show_tab_contents.html.erb
index a3ca3d1..622b7c1 100644
--- a/apps/workbench/app/views/projects/_show_tab_contents.html.erb
+++ b/apps/workbench/app/views/projects/_show_tab_contents.html.erb
@@ -84,13 +84,13 @@
         <th></th>
         <th></th>
         <th></th>
-        <% sort_order = sortable_columns['name'].gsub(/\s/,'') %>
+        <% sort_order = sortable_columns['name'].gsub(/\s/,'') if sortable_columns['name'] %>
         <th <% if !sort_order.nil? %>
               data-sort-order='<%= sort_order %>'
             <% end %> >
           name
         </th>
-        <% sort_order = sortable_columns['description'].gsub(/\s/,'') %>
+        <% sort_order = sortable_columns['description'].gsub(/\s/,'') if sortable_columns['description'] %>
         <th <% if !sort_order.nil? %>
               data-sort-order='<%= sort_order %>'
             <% end %> >

commit 9f37a732c9bfb3892231765f37e213af4e037e68
Merge: 9ad6d61 89ba112
Author: Phil Hodgson <bitbucket at philhodgson.net>
Date:   Wed Oct 29 12:21:14 2014 +0100

    Merge branch 'master' into 3618-column-ordering


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


hooks/post-receive
-- 




More information about the arvados-commits mailing list