Commit fe05e157 by kevalbhatt Committed by Madhan Neethiraj

ATLAS-2185: UI to handle is_null, not_null operators for attribute search

parent 52848ab6
...@@ -70,6 +70,9 @@ define(['require', ...@@ -70,6 +70,9 @@ define(['require',
if (type === "enum" || type === "boolean") { if (type === "enum" || type === "boolean") {
obj.operators = ['=', '!=']; obj.operators = ['=', '!='];
} }
if (obj.operators) {
obj.operators = obj.operators.concat(['is_null', 'not_null']);
}
return obj; return obj;
}, },
isPrimitive: function(type) { isPrimitive: function(type) {
...@@ -161,11 +164,16 @@ define(['require', ...@@ -161,11 +164,16 @@ define(['require',
{ type: '<=', nb_inputs: 1, multiple: false, apply_to: ['number', 'string', 'boolean'] }, { type: '<=', nb_inputs: 1, multiple: false, apply_to: ['number', 'string', 'boolean'] },
{ type: 'contains', nb_inputs: 1, multiple: false, apply_to: ['string'] }, { type: 'contains', nb_inputs: 1, multiple: false, apply_to: ['string'] },
{ type: 'begins_with', nb_inputs: 1, multiple: false, apply_to: ['string'] }, { type: 'begins_with', nb_inputs: 1, multiple: false, apply_to: ['string'] },
{ type: 'ends_with', nb_inputs: 1, multiple: false, apply_to: ['string'] } { type: 'ends_with', nb_inputs: 1, multiple: false, apply_to: ['string'] },
{ type: 'is_null', nb_inputs: false, multiple: false, apply_to: ['number', 'string', 'boolean', 'enum'] },
{ type: 'not_null', nb_inputs: false, multiple: false, apply_to: ['number', 'string', 'boolean', 'enum'] }
], ],
lang: { lang: {
add_rule: 'Add filter', add_rule: 'Add filter',
add_group: 'Add filter group' add_group: 'Add filter group',
operators: {
not_null: 'is not null'
}
}, },
rules: rules_widgets rules: rules_widgets
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment