git://git.onelab.eu
/
unfold.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Improved testbed plugin to support facility_name and testbed_name filters
[unfold.git]
/
manifoldapi
/
static
/
js
/
manifold.js
diff --git
a/manifoldapi/static/js/manifold.js
b/manifoldapi/static/js/manifold.js
index
17677b9
..
74fb5d9
100644
(file)
--- a/
manifoldapi/static/js/manifold.js
+++ b/
manifoldapi/static/js/manifold.js
@@
-560,6
+560,8
@@
function QueryStore() {
this.iter_records(query_uuid, function(record_key, record) {
var is_reserved, is_pending, in_set, is_unconfigured;
this.iter_records(query_uuid, function(record_key, record) {
var is_reserved, is_pending, in_set, is_unconfigured;
+
+ /* By default, a record is visible unless a filter says the opposite */
var visible = true;
var record_state = manifold.query_store.get_record_state(query_uuid, record_key, STATE_SET);
var visible = true;
var record_state = manifold.query_store.get_record_state(query_uuid, record_key, STATE_SET);
@@
-629,13
+631,16
@@
function QueryStore() {
if (op == '=' || op == '==') {
if ( col_value != value || col_value==null || col_value=="" || col_value=="n/a")
visible = false;
if (op == '=' || op == '==') {
if ( col_value != value || col_value==null || col_value=="" || col_value=="n/a")
visible = false;
+
}else if (op == 'included') {
}else if (op == 'included') {
+ /* By default, the filter returns false unless the record
+ * field match at least one value of the included statement
+ */
+ visible = false;
$.each(value, function(i,x) {
if(x == col_value){
visible = true;
return false; // ~ break
$.each(value, function(i,x) {
if(x == col_value){
visible = true;
return false; // ~ break
- }else{
- visible = false;
}
});
}else if (op == '!=') {
}
});
}else if (op == '!=') {
@@
-666,7
+671,7
@@
function QueryStore() {
});
var end = new Date().getTime();
});
var end = new Date().getTime();
- console.log("APPLY FILTERS took", end - start, "ms");
+ console.log("APPLY FILTERS
[", filters, "]
took", end - start, "ms");
}
}