[atlas] 03/03: ATLAS-3598 : Beta UI: Issues with single click functionality in left hand panel.

2020-03-13 Thread nixon
This is an automated email from the ASF dual-hosted git repository.

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

commit 453094cbd68a45ea45f332237486348927a20f9e
Author: kevalbhatt 
AuthorDate: Thu Mar 12 21:50:36 2020 +0530

ATLAS-3598 : Beta UI: Issues with single click functionality in left hand 
panel.

Signed-off-by: nixonrodrigues 
(cherry picked from commit 1ccb7c715cb0ff0f60f27d21c77a810e6640e01c)
---
 .../js/views/search/SearchDefaultLayoutView.js |  6 +--
 .../search/tree/ClassificationTreeLayoutView.js| 46 --
 .../js/views/search/tree/EntityTreeLayoutView.js   | 38 ++
 3 files changed, 49 insertions(+), 41 deletions(-)

diff --git a/dashboardv3/public/js/views/search/SearchDefaultLayoutView.js 
b/dashboardv3/public/js/views/search/SearchDefaultLayoutView.js
index 3c0d813..d0946c4 100644
--- a/dashboardv3/public/js/views/search/SearchDefaultLayoutView.js
+++ b/dashboardv3/public/js/views/search/SearchDefaultLayoutView.js
@@ -214,7 +214,8 @@ define(["require", "backbone", "utils/Globals", 
"hbs!tmpl/search/SearchDefaultLa
 renderGlobalSearch: function() {
 var that = this;
 require(["views/search/GlobalSearchLayoutView"], 
function(GlobalSearchLayoutView) {
-that.RGlobalSearchLayoutView.show(new 
GlobalSearchLayoutView(_.extend({ closeOnSubmit: true }, that.options)));
+
+that.RGlobalSearchLayoutView.show(new 
GlobalSearchLayoutView(_.extend({ closeOnSubmit: true }, _.omit(that.options, 
"value";
 });
 },
 renderSearchResult: function() {
@@ -303,8 +304,7 @@ define(["require", "backbone", "utils/Globals", 
"hbs!tmpl/search/SearchDefaultLa
 this.renderQueryBuilder(_.extend({}, obj, {
 tag: false,
 type: true,
-attrObj: attrTypeObj,
-applicableType: that.options.value ? 
that.options.value.type : null
+attrObj: attrTypeObj
 }), this.RQueryBuilderEntity);
 
 this.ui.entityName.html(that.options.value.type);
diff --git 
a/dashboardv3/public/js/views/search/tree/ClassificationTreeLayoutView.js 
b/dashboardv3/public/js/views/search/tree/ClassificationTreeLayoutView.js
index dd8161e..87f0b9a 100644
--- a/dashboardv3/public/js/views/search/tree/ClassificationTreeLayoutView.js
+++ b/dashboardv3/public/js/views/search/tree/ClassificationTreeLayoutView.js
@@ -258,28 +258,32 @@ define([
 this.ui.classificationSearchTree.jstree(true).deselect_all();
 this.tagId = null;
 } else {
-if ((that.options.value.tag.indexOf('*') != -1)) {
-
that.ui.classificationSearchTree.jstree(true).deselect_all();
-that.ui.wildCardValue.val(that.options.value.tag);
-}
-var dataFound = 
this.classificationDefCollection.fullCollection.find(function(obj) {
-return obj.get("name") === that.options.value.tag
-});
-if (dataFound) {
-if ((this.tagId && this.tagId !== dataFound.get("guid")) 
|| this.tagId === null) {
-if (this.tagId) {
-
this.ui.classificationSearchTree.jstree(true).deselect_node(this.tagId);
+if (that.options.value.tag === "_ALL_CLASSIFICATION_TYPES" && 
this.tagId !== "_ALL_CLASSIFICATION_TYPES") {
+this.fromManualRender = true;
+if (this.tagId) {
+
this.ui.classificationSearchTree.jstree(true).deselect_node(this.tagId);
+}
+this.tagId = Globals[that.options.value.tag].guid;
+
this.ui.classificationSearchTree.jstree(true).select_node(this.tagId);
+} else if (this.tagId !== "_ALL_CLASSIFICATION_TYPES" && 
that.options.value.tag !== this.tagId) {
+if ((that.options.value.tag.indexOf('*') != -1)) {
+
that.ui.classificationSearchTree.jstree(true).deselect_all();
+that.ui.wildCardValue.val(that.options.value.tag);
+}
+var dataFound = 
this.classificationDefCollection.fullCollection.find(function(obj) {
+return obj.get("name") === that.options.value.tag
+});
+if (dataFound) {
+if ((this.tagId && this.tagId !== 
dataFound.get("guid")) || this.tagId === null) {
+if (this.tagId) {
+
this.ui.classificationSearchTree.jstree(true).deselect_node(this.tagId);
+}
+

[atlas] 03/03: ATLAS-3598 : Beta UI: Issues with single click functionality in left hand panel.

2020-03-13 Thread nixon
This is an automated email from the ASF dual-hosted git repository.

nixon pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/atlas.git

commit 1ccb7c715cb0ff0f60f27d21c77a810e6640e01c
Author: kevalbhatt 
AuthorDate: Thu Mar 12 21:50:36 2020 +0530

ATLAS-3598 : Beta UI: Issues with single click functionality in left hand 
panel.

Signed-off-by: nixonrodrigues 
---
 .../js/views/search/SearchDefaultLayoutView.js |  6 +--
 .../search/tree/ClassificationTreeLayoutView.js| 46 --
 .../js/views/search/tree/EntityTreeLayoutView.js   | 38 ++
 3 files changed, 49 insertions(+), 41 deletions(-)

diff --git a/dashboardv3/public/js/views/search/SearchDefaultLayoutView.js 
b/dashboardv3/public/js/views/search/SearchDefaultLayoutView.js
index 3c0d813..d0946c4 100644
--- a/dashboardv3/public/js/views/search/SearchDefaultLayoutView.js
+++ b/dashboardv3/public/js/views/search/SearchDefaultLayoutView.js
@@ -214,7 +214,8 @@ define(["require", "backbone", "utils/Globals", 
"hbs!tmpl/search/SearchDefaultLa
 renderGlobalSearch: function() {
 var that = this;
 require(["views/search/GlobalSearchLayoutView"], 
function(GlobalSearchLayoutView) {
-that.RGlobalSearchLayoutView.show(new 
GlobalSearchLayoutView(_.extend({ closeOnSubmit: true }, that.options)));
+
+that.RGlobalSearchLayoutView.show(new 
GlobalSearchLayoutView(_.extend({ closeOnSubmit: true }, _.omit(that.options, 
"value";
 });
 },
 renderSearchResult: function() {
@@ -303,8 +304,7 @@ define(["require", "backbone", "utils/Globals", 
"hbs!tmpl/search/SearchDefaultLa
 this.renderQueryBuilder(_.extend({}, obj, {
 tag: false,
 type: true,
-attrObj: attrTypeObj,
-applicableType: that.options.value ? 
that.options.value.type : null
+attrObj: attrTypeObj
 }), this.RQueryBuilderEntity);
 
 this.ui.entityName.html(that.options.value.type);
diff --git 
a/dashboardv3/public/js/views/search/tree/ClassificationTreeLayoutView.js 
b/dashboardv3/public/js/views/search/tree/ClassificationTreeLayoutView.js
index dd8161e..87f0b9a 100644
--- a/dashboardv3/public/js/views/search/tree/ClassificationTreeLayoutView.js
+++ b/dashboardv3/public/js/views/search/tree/ClassificationTreeLayoutView.js
@@ -258,28 +258,32 @@ define([
 this.ui.classificationSearchTree.jstree(true).deselect_all();
 this.tagId = null;
 } else {
-if ((that.options.value.tag.indexOf('*') != -1)) {
-
that.ui.classificationSearchTree.jstree(true).deselect_all();
-that.ui.wildCardValue.val(that.options.value.tag);
-}
-var dataFound = 
this.classificationDefCollection.fullCollection.find(function(obj) {
-return obj.get("name") === that.options.value.tag
-});
-if (dataFound) {
-if ((this.tagId && this.tagId !== dataFound.get("guid")) 
|| this.tagId === null) {
-if (this.tagId) {
-
this.ui.classificationSearchTree.jstree(true).deselect_node(this.tagId);
+if (that.options.value.tag === "_ALL_CLASSIFICATION_TYPES" && 
this.tagId !== "_ALL_CLASSIFICATION_TYPES") {
+this.fromManualRender = true;
+if (this.tagId) {
+
this.ui.classificationSearchTree.jstree(true).deselect_node(this.tagId);
+}
+this.tagId = Globals[that.options.value.tag].guid;
+
this.ui.classificationSearchTree.jstree(true).select_node(this.tagId);
+} else if (this.tagId !== "_ALL_CLASSIFICATION_TYPES" && 
that.options.value.tag !== this.tagId) {
+if ((that.options.value.tag.indexOf('*') != -1)) {
+
that.ui.classificationSearchTree.jstree(true).deselect_all();
+that.ui.wildCardValue.val(that.options.value.tag);
+}
+var dataFound = 
this.classificationDefCollection.fullCollection.find(function(obj) {
+return obj.get("name") === that.options.value.tag
+});
+if (dataFound) {
+if ((this.tagId && this.tagId !== 
dataFound.get("guid")) || this.tagId === null) {
+if (this.tagId) {
+
this.ui.classificationSearchTree.jstree(true).deselect_node(this.tagId);
+}
+this.fromManualRender = true;
+this.tagId =