You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by kb...@apache.org on 2020/05/27 15:42:39 UTC

[atlas] 03/03: ATLAS-3805:- UI:Basic Search: System Attribute 'typeName' in classification filter, should list classification Names in drop down

This is an automated email from the ASF dual-hosted git repository.

kbhatt pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/atlas.git

commit d6d6f90fd0dd25dd76c8cfef3d0238e24364fd0e
Author: kevalbhatt <kb...@apache.org>
AuthorDate: Wed May 27 15:22:33 2020 +0530

    ATLAS-3805:- UI:Basic Search: System Attribute 'typeName' in classification filter, should list classification Names in drop down
---
 dashboardv2/public/js/views/search/QueryBuilderView.js | 5 +++--
 dashboardv3/public/js/views/search/QueryBuilderView.js | 5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/dashboardv2/public/js/views/search/QueryBuilderView.js b/dashboardv2/public/js/views/search/QueryBuilderView.js
index e250119..83b8ac9 100644
--- a/dashboardv2/public/js/views/search/QueryBuilderView.js
+++ b/dashboardv2/public/js/views/search/QueryBuilderView.js
@@ -23,9 +23,10 @@ define(['require',
     'utils/Utils',
     'utils/CommonViewFunction',
     'utils/Enums',
+    'utils/Globals',
     'query-builder',
     'daterangepicker'
-], function(require, Backbone, QueryBuilderTmpl, UserDefineTmpl, Utils, CommonViewFunction, Enums) {
+], function(require, Backbone, QueryBuilderTmpl, UserDefineTmpl, Utils, CommonViewFunction, Enums, Globals) {
 
     var QueryBuilderView = Backbone.Marionette.LayoutView.extend(
         /** @lends QueryBuilderView */
@@ -231,7 +232,7 @@ define(['require',
                 if (isSystemAttr && attrObj.name === "__typeName") {
                     var entityType = [];
                     that.typeHeaders.fullCollection.each(function(model) {
-                        if (model.get('category') == 'ENTITY') {
+                        if ((that.type == true && model.get('category') == 'ENTITY') || (that.tag == true && model.get('category') == "CLASSIFICATION")) {
                             entityType.push({
                                 "id": model.get("name"),
                                 "text": model.get("name")
diff --git a/dashboardv3/public/js/views/search/QueryBuilderView.js b/dashboardv3/public/js/views/search/QueryBuilderView.js
index e250119..83b8ac9 100644
--- a/dashboardv3/public/js/views/search/QueryBuilderView.js
+++ b/dashboardv3/public/js/views/search/QueryBuilderView.js
@@ -23,9 +23,10 @@ define(['require',
     'utils/Utils',
     'utils/CommonViewFunction',
     'utils/Enums',
+    'utils/Globals',
     'query-builder',
     'daterangepicker'
-], function(require, Backbone, QueryBuilderTmpl, UserDefineTmpl, Utils, CommonViewFunction, Enums) {
+], function(require, Backbone, QueryBuilderTmpl, UserDefineTmpl, Utils, CommonViewFunction, Enums, Globals) {
 
     var QueryBuilderView = Backbone.Marionette.LayoutView.extend(
         /** @lends QueryBuilderView */
@@ -231,7 +232,7 @@ define(['require',
                 if (isSystemAttr && attrObj.name === "__typeName") {
                     var entityType = [];
                     that.typeHeaders.fullCollection.each(function(model) {
-                        if (model.get('category') == 'ENTITY') {
+                        if ((that.type == true && model.get('category') == 'ENTITY') || (that.tag == true && model.get('category') == "CLASSIFICATION")) {
                             entityType.push({
                                 "id": model.get("name"),
                                 "text": model.get("name")