Repository: atlas Updated Branches: refs/heads/master 9d4678e41 -> cc629d709
ATLAS-2778: UI: Enhance advanced search (DSL) by adding _CLASSIFIED and _NOT_CLASSIFIED keyword in classification search Signed-off-by: Sarath Subramanian <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/cc629d70 Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/cc629d70 Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/cc629d70 Branch: refs/heads/master Commit: cc629d7091468d1857c4ebbbf70a5b7a00d6ff36 Parents: 9d4678e Author: Abhishek Kadam <[email protected]> Authored: Thu Jul 5 10:42:41 2018 -0700 Committer: Sarath Subramanian <[email protected]> Committed: Thu Jul 5 10:42:41 2018 -0700 ---------------------------------------------------------------------- dashboardv2/public/js/utils/Enums.js | 1 + dashboardv2/public/js/views/search/SearchLayoutView.js | 9 +++++++-- dashboardv2/public/js/views/tag/AddTimezoneItemView.js | 3 +-- 3 files changed, 9 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/atlas/blob/cc629d70/dashboardv2/public/js/utils/Enums.js ---------------------------------------------------------------------- diff --git a/dashboardv2/public/js/utils/Enums.js b/dashboardv2/public/js/utils/Enums.js index b5e8a6d..8df22af 100644 --- a/dashboardv2/public/js/utils/Enums.js +++ b/dashboardv2/public/js/utils/Enums.js @@ -134,5 +134,6 @@ define(['require'], function(require) { validValues: getTermRelationAttributes(), validValuesFor: getTermRelationAttributes() } + Enums.addOnClassification = ["_CLASSIFIED", "_NOT_CLASSIFIED"] return Enums; }); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/atlas/blob/cc629d70/dashboardv2/public/js/views/search/SearchLayoutView.js ---------------------------------------------------------------------- diff --git a/dashboardv2/public/js/views/search/SearchLayoutView.js b/dashboardv2/public/js/views/search/SearchLayoutView.js index bc4cc43..4fe5407 100644 --- a/dashboardv2/public/js/views/search/SearchLayoutView.js +++ b/dashboardv2/public/js/views/search/SearchLayoutView.js @@ -22,9 +22,10 @@ define(['require', 'utils/Utils', 'utils/UrlLinks', 'utils/Globals', + 'utils/Enums', 'collection/VSearchList', 'utils/CommonViewFunction' -], function(require, Backbone, SearchLayoutViewTmpl, Utils, UrlLinks, Globals, VSearchList, CommonViewFunction) { +], function(require, Backbone, SearchLayoutViewTmpl, Utils, UrlLinks, Globals, Enums, VSearchList, CommonViewFunction) { 'use strict'; var SearchLayoutView = Backbone.Marionette.LayoutView.extend( @@ -228,7 +229,7 @@ define(['require', } } var tagCheck = function(filterObj, type) { - if (that.value.tag) { + if (that.value.tag && !_.contains(Enums.addOnClassification, that.value.tag)) { that.ui.tagAttrFilter.prop('disabled', false); if (filterObj && filterObj.length) { that.ui.tagAttrFilter.addClass('active'); @@ -450,6 +451,10 @@ define(['require', tagStr += '<option>' + (name) + '</option>'; } }); + //to insert extra classification list + _.each(Enums.addOnClassification, function(classificationName) { + tagStr += '<option>' + classificationName + '</option>'; + }); that.ui.typeLov.html(typeStr); that.ui.tagLov.html(tagStr); this.ui.typeLov.select2({ http://git-wip-us.apache.org/repos/asf/atlas/blob/cc629d70/dashboardv2/public/js/views/tag/AddTimezoneItemView.js ---------------------------------------------------------------------- diff --git a/dashboardv2/public/js/views/tag/AddTimezoneItemView.js b/dashboardv2/public/js/views/tag/AddTimezoneItemView.js index b2fc9af..00e5b3d 100644 --- a/dashboardv2/public/js/views/tag/AddTimezoneItemView.js +++ b/dashboardv2/public/js/views/tag/AddTimezoneItemView.js @@ -19,11 +19,10 @@ define(['require', 'backbone', 'hbs!tmpl/tag/AddTimezoneView_tmpl', 'moment', - 'utils/Enums', 'utils/Globals', 'moment-timezone', 'daterangepicker' -], function(require, Backbone, AddTimezoneViewTmpl, moment, Enums, Globals) { +], function(require, Backbone, AddTimezoneViewTmpl, moment, Globals) { 'use strict'; return Backbone.Marionette.ItemView.extend(
