[ARVADOS] created: 1.1.3-77-g60f89f0
Git user
git at public.curoverse.com
Fri Feb 16 23:20:18 EST 2018
at 60f89f0b235ac6b2729166e4bf4c04da3b9c1670 (commit)
commit 60f89f0b235ac6b2729166e4bf4c04da3b9c1670
Author: Tom Clegg <tclegg at veritasgenetics.com>
Date: Fri Feb 16 23:18:17 2018 -0500
12315: Add "exclude child processes" checkbox to /all_processes.
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tclegg at veritasgenetics.com>
diff --git a/apps/workbench/app/assets/javascripts/filterable.js b/apps/workbench/app/assets/javascripts/filterable.js
index 40df5c7..e571e32 100644
--- a/apps/workbench/app/assets/javascripts/filterable.js
+++ b/apps/workbench/app/assets/javascripts/filterable.js
@@ -41,6 +41,11 @@
// data-example-attr="foo" are shown, and all others are hidden. When
// the user selects the "Show all" option, all rows are shown.
//
+// <input type="checkbox" data-on-value="{}" data-off-value="{}" ... />
+//
+// Merges on- or off-value with other params in query. Only works with
+// infinite-scroll.
+//
// Notes:
//
// When multiple filterable-control widgets operate on the same
@@ -92,6 +97,21 @@ $(document).
updateFilterableQueryNow($(this));
});
}).
+ on('change', 'input[type=checkbox].filterable-control', function(e) {
+ if (this != e.target) return;
+ var $target = $($(this).attr('data-filterable-target'));
+ var currentquery = $target.data('filterable-query');
+ if (currentquery === undefined) currentquery = '';
+ if ($target.is('[data-infinite-scroller]')) {
+ var datakey = 'infiniteContentParamsFrom'+this.id;
+ var whichvalue = $(this).is(':checked') ? 'on-value' : 'off-value';
+ if (JSON.stringify($target.data(datakey)) == JSON.stringify($(this).data(whichvalue)))
+ return;
+ $target.data(datakey, $(this).data(whichvalue));
+ updateFilterableQueryNow($target);
+ $target.trigger('refresh-content');
+ }
+ }).
on('paste keyup input', 'input[type=text].filterable-control', function(e) {
var regexp;
if (this != e.target) return;
diff --git a/apps/workbench/app/views/work_units/_show_all_processes.html.erb b/apps/workbench/app/views/work_units/_show_all_processes.html.erb
index ed50e7c..99d26b6 100644
--- a/apps/workbench/app/views/work_units/_show_all_processes.html.erb
+++ b/apps/workbench/app/views/work_units/_show_all_processes.html.erb
@@ -2,16 +2,20 @@
SPDX-License-Identifier: AGPL-3.0 %>
-<div class="container" style="width: 100%">
- <div class="row">
- <div class="pull-right">
- <input type="text" class="form-control filterable-control recent-all-processes-filterable-control"
- placeholder="Search all processes"
- data-filterable-target="#all-processes-scroll"
- value="<%= params[:search] %>">
- </input>
- </div>
- </div>
+<div class="form-group pull-right">
+ <input type="text" class="form-control filterable-control recent-all-processes-filterable-control"
+ placeholder="Search all processes"
+ data-filterable-target="#all-processes-scroll"
+ value="<%= params[:search] %>" />
+ <label>
+ <input id="ExcludeChildProcs" type="checkbox" class="filterable-control"
+ data-on-value="{"filters":[["requesting_container_uuid","=",null]]}"
+ data-off-value="{}"
+ data-filterable-target="#all-processes-scroll" />
+ exclude child processes
+ </label>
+</div>
+<div>
<div>
<div>
<table class="table table-condensed table-fixedlayout arv-recent-all-processes">
@@ -47,6 +51,7 @@ SPDX-License-Identifier: AGPL-3.0 %>
</thead>
<tbody data-infinite-scroller="#all-processes-scroll" id="all-processes-scroll"
+ data-infinite-content-params-from-exclude-child-procs="{}"
data-infinite-content-href="<%= url_for partial: :all_processes_rows %>" >
</tbody>
</table>
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list