[ARVADOS] updated: 8dcb4daaa7e740f5957043321ccf2c1a7bd2ccb6
git at public.curoverse.com
git at public.curoverse.com
Sun Aug 24 23:45:55 EDT 2014
Summary of changes:
apps/workbench/app/assets/javascripts/select_modal.js | 10 +++++-----
apps/workbench/app/views/application/_choose.html.erb | 1 +
apps/workbench/test/integration/pipeline_instances_test.rb | 8 +++++---
3 files changed, 11 insertions(+), 8 deletions(-)
via 8dcb4daaa7e740f5957043321ccf2c1a7bd2ccb6 (commit)
from 1a1abfc1b6c1fbb97539cb503a81dfd678adcdf1 (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 8dcb4daaa7e740f5957043321ccf2c1a7bd2ccb6
Author: Tom Clegg <tom at curoverse.com>
Date: Sun Aug 24 23:43:53 2014 -0400
3149: Propagate filters from remote->dialog->infinite. Fix tests.
diff --git a/apps/workbench/app/assets/javascripts/select_modal.js b/apps/workbench/app/assets/javascripts/select_modal.js
index 1fec3dc..dda230f 100644
--- a/apps/workbench/app/assets/javascripts/select_modal.js
+++ b/apps/workbench/app/assets/javascripts/select_modal.js
@@ -75,10 +75,10 @@ $(document).on('click', '.selectable', function() {
var project_uuid = $(this).attr('data-project-uuid');
$(this).attr('href', '#'); // Skip normal click handler
if (project_uuid) {
- params = {'filters[]': JSON.stringify(['owner_uuid',
- '=',
- project_uuid]),
- project_uuid: project_uuid
+ params = {'filters': [['owner_uuid',
+ '=',
+ project_uuid]],
+ 'project_uuid': project_uuid
};
}
// Use current selection as dropdown button label
@@ -88,7 +88,7 @@ $(document).on('click', '.selectable', function() {
html($(this).text() + ' <span class="caret"></span>');
// Set (or unset) filter params and refresh filterable rows
$($(this).closest('[data-filterable-target]').attr('data-filterable-target')).
- data('infinite-content-params', params).
+ data('infinite-content-params-from-project-dropdown', params).
trigger('refresh-content');
}).on('ready', function() {
$('form[data-search-modal] a').on('click', function() {
diff --git a/apps/workbench/app/views/application/_choose.html.erb b/apps/workbench/app/views/application/_choose.html.erb
index aea27f4..27ea600 100644
--- a/apps/workbench/app/views/application/_choose.html.erb
+++ b/apps/workbench/app/views/application/_choose.html.erb
@@ -54,6 +54,7 @@
style="height: 100%; overflow-y: scroll"
data-infinite-scroller="#choose-scroll"
id="choose-scroll"
+ data-infinite-content-params-from-chooser="<%= {filters: params[:filters] || []}.to_json %>"
data-infinite-content-href="<%= url_for partial: true %>">
</div>
<% if preview_pane %>
diff --git a/apps/workbench/test/integration/pipeline_instances_test.rb b/apps/workbench/test/integration/pipeline_instances_test.rb
index 9c0eb88..fa2c309 100644
--- a/apps/workbench/test/integration/pipeline_instances_test.rb
+++ b/apps/workbench/test/integration/pipeline_instances_test.rb
@@ -41,6 +41,9 @@ class PipelineInstancesTest < ActionDispatch::IntegrationTest
find('.arv-project-list a,button', text: 'A Project').click
find('.btn', text: 'Add data').click
within('.modal-dialog') do
+ find('.dropdown-toggle').click
+ find('a', text: 'Home').click
+ wait_for_ajax
first('span', text: 'foo_tag').click
find('.btn', text: 'Add').click
end
@@ -62,10 +65,10 @@ class PipelineInstancesTest < ActionDispatch::IntegrationTest
within('.modal-dialog') do
assert(has_text?("Foo/bar pair"),
"pipeline input picker missing name of input")
+ wait_for_ajax
first('span', text: 'foo_tag').click
find('button', text: 'OK').click
end
-
wait_for_ajax
# "Run" button is now enabled
@@ -107,7 +110,6 @@ class PipelineInstancesTest < ActionDispatch::IntegrationTest
# create a pipeline instance
find('.btn', text: 'Run a pipeline').click
within('.modal-dialog') do
- assert page.has_text? 'Two Part Pipeline Template'
find('.selectable', text: 'Two Part Pipeline Template').click
find('.btn', text: 'Next: choose inputs').click
end
@@ -120,10 +122,10 @@ class PipelineInstancesTest < ActionDispatch::IntegrationTest
within('.modal-dialog') do
assert_selector 'button.dropdown-toggle', text: 'A Project'
+ wait_for_ajax
first('span', text: 'foo_tag').click
find('button', text: 'OK').click
end
-
wait_for_ajax
# "Run" button present and enabled
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list