Repository: atlas Updated Branches: refs/heads/branch-0.8 501ea9207 -> 8dd80459e
ATLAS-2185: UI to handle is_null, not_null operators for attribute search Signed-off-by: Madhan Neethiraj <[email protected]> (cherry picked from commit fe05e15751dca5dc4b84bccfdb0b1a236f1d65a4) Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/8dd80459 Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/8dd80459 Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/8dd80459 Branch: refs/heads/branch-0.8 Commit: 8dd80459e0c36ae7575a15410f3d8a1dd3b91910 Parents: dae36e3 Author: kevalbhatt <[email protected]> Authored: Tue Oct 3 16:20:24 2017 +0530 Committer: Madhan Neethiraj <[email protected]> Committed: Tue Oct 3 08:45:42 2017 -0700 ---------------------------------------------------------------------- dashboardv2/public/js/views/search/QueryBuilderView.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/atlas/blob/8dd80459/dashboardv2/public/js/views/search/QueryBuilderView.js ---------------------------------------------------------------------- diff --git a/dashboardv2/public/js/views/search/QueryBuilderView.js b/dashboardv2/public/js/views/search/QueryBuilderView.js index a6a1e3a..1b9181b 100644 --- a/dashboardv2/public/js/views/search/QueryBuilderView.js +++ b/dashboardv2/public/js/views/search/QueryBuilderView.js @@ -70,6 +70,9 @@ define(['require', if (type === "enum" || type === "boolean") { obj.operators = ['=', '!=']; } + if (obj.operators) { + obj.operators = obj.operators.concat(['is_null', 'not_null']); + } return obj; }, isPrimitive: function(type) { @@ -161,11 +164,16 @@ define(['require', { type: '<=', nb_inputs: 1, multiple: false, apply_to: ['number', 'string', 'boolean'] }, { type: 'contains', 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: { add_rule: 'Add filter', - add_group: 'Add filter group' + add_group: 'Add filter group', + operators: { + not_null: 'is not null' + } }, rules: rules_widgets });
