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/07/08 11:15:40 UTC
[atlas] branch branch-2.0 updated: ATLAS-3882:- Classic UI: Loader
not disappearing while assigning category to term
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
The following commit(s) were added to refs/heads/branch-2.0 by this push:
new a43b49c ATLAS-3882:- Classic UI: Loader not disappearing while assigning category to term
a43b49c is described below
commit a43b49c33f93ef2819b747caed7a9baae91d09a4
Author: kevalbhatt <kb...@apache.org>
AuthorDate: Wed Jul 8 14:35:38 2020 +0530
ATLAS-3882:- Classic UI: Loader not disappearing while assigning category to term
---
.../public/js/views/detail_page/DetailPageLayoutView.js | 9 +++------
.../public/js/views/entity/CreateEntityLayoutView.js | 6 ++++--
.../public/js/views/glossary/GlossaryDetailLayoutView.js | 14 ++++++++------
dashboardv2/public/js/views/glossary/GlossaryLayoutView.js | 6 ++----
dashboardv2/public/js/views/search/SearchLayoutView.js | 3 +++
.../public/js/views/search/SearchResultLayoutView.js | 10 ++++++++--
dashboardv2/public/js/views/tag/TagDetailLayoutView.js | 3 ++-
.../public/js/views/glossary/GlossaryDetailLayoutView.js | 5 +----
8 files changed, 31 insertions(+), 25 deletions(-)
diff --git a/dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js b/dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js
index e23f57a..fe823fa 100644
--- a/dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js
+++ b/dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js
@@ -354,6 +354,9 @@ define(['require',
},
fetchCollection: function() {
this.collection.fetch({ reset: true });
+ if (this.searchVent) {
+ this.searchVent.trigger('entityList:refresh');
+ }
},
getEntityDef: function(entityObj) {
if (this.activeEntityDef) {
@@ -382,9 +385,6 @@ define(['require',
hideLoader: that.hideLoader.bind(that),
tagName: tagName,
callback: function() {
- if (that.searchVent) {
- that.searchVent.trigger("Classification:Count:Update");
- }
that.fetchCollection();
}
}));
@@ -466,9 +466,6 @@ define(['require',
guid: that.id,
tagList: tagList,
callback: function() {
- if (that.searchVent) {
- that.searchVent.trigger("Classification:Count:Update");
- }
that.fetchCollection();
},
showLoader: that.showLoader.bind(that),
diff --git a/dashboardv2/public/js/views/entity/CreateEntityLayoutView.js b/dashboardv2/public/js/views/entity/CreateEntityLayoutView.js
index b348a0f..8239ab8 100644
--- a/dashboardv2/public/js/views/entity/CreateEntityLayoutView.js
+++ b/dashboardv2/public/js/views/entity/CreateEntityLayoutView.js
@@ -74,7 +74,7 @@ define(['require',
* @constructs
*/
initialize: function(options) {
- _.extend(this, _.pick(options, 'guid', 'callback', 'showLoader', 'entityDefCollection', 'typeHeaders'));
+ _.extend(this, _.pick(options, 'guid', 'callback', 'showLoader', 'entityDefCollection', 'typeHeaders', 'searchVent'));
var that = this,
entityTitle, okLabel;
this.selectStoreCollection = new Backbone.Collection();
@@ -791,6 +791,9 @@ define(['require',
trigger: true
});
}
+ if (that.searchVent) {
+ that.searchVent.trigger('entityList:refresh');
+ }
}
}
},
@@ -801,7 +804,6 @@ define(['require',
that.modal.$el.find('button.ok').hideButtonLoader();
}
});
-
} catch (e) {
Utils.notifyError({
content: e.message
diff --git a/dashboardv2/public/js/views/glossary/GlossaryDetailLayoutView.js b/dashboardv2/public/js/views/glossary/GlossaryDetailLayoutView.js
index 63c58e0..465c4ab 100644
--- a/dashboardv2/public/js/views/glossary/GlossaryDetailLayoutView.js
+++ b/dashboardv2/public/js/views/glossary/GlossaryDetailLayoutView.js
@@ -174,7 +174,7 @@ define(['require',
* @constructs
*/
initialize: function(options) {
- _.extend(this, _.pick(options, 'guid', 'glossaryCollection', 'glossary', 'collection', 'typeHeaders', 'value', 'entityDefCollection', 'enumDefCollection', 'classificationDefCollection'));
+ _.extend(this, _.pick(options, 'guid', 'glossaryCollection', 'glossary', 'collection', 'typeHeaders', 'value', 'entityDefCollection', 'enumDefCollection', 'classificationDefCollection', 'searchVent'));
if (this.value && this.value.gType) {
if (this.value.gType == "category") {
this.isCategoryView = true;
@@ -241,6 +241,7 @@ define(['require',
"enumDefCollection": that.enumDefCollection,
"classificationDefCollection": that.classificationDefCollection,
"glossaryCollection": that.glossaryCollection,
+ "searchVent": that.searchVent,
"getSelectedTermAttribute": function() {
return that.selectedTermAttribute;
},
@@ -376,6 +377,9 @@ define(['require',
tagList: tagList,
callback: function() {
that.getData();
+ if (that.searchVent) {
+ that.searchVent.trigger('entityList:refresh');
+ }
},
showLoader: that.showLoader.bind(that),
hideLoader: that.hideLoader.bind(that),
@@ -398,6 +402,9 @@ define(['require',
guid: that.guid,
callback: function() {
that.getData();
+ if (that.searchVent) {
+ that.searchVent.trigger('entityList:refresh');
+ }
}
}));
},
@@ -442,12 +449,7 @@ define(['require',
},
renderSearchResultLayoutView: function(options) {
var that = this;
-
require(['views/search/SearchResultLayoutView'], function(SearchResultLayoutView) {
- var value = {
- 'tag': "PII",
- 'searchType': 'basic'
- };
if (that.RSearchResultLayoutView) {
that.RSearchResultLayoutView.show(new SearchResultLayoutView(_.extend({}, options, {
"value": { "searchType": "basic", "term": that.data.qualifiedName },
diff --git a/dashboardv2/public/js/views/glossary/GlossaryLayoutView.js b/dashboardv2/public/js/views/glossary/GlossaryLayoutView.js
index d0fcb31..1ed8d76 100644
--- a/dashboardv2/public/js/views/glossary/GlossaryLayoutView.js
+++ b/dashboardv2/public/js/views/glossary/GlossaryLayoutView.js
@@ -480,8 +480,8 @@ define(['require',
if (id) {
options.$el.jstree('activate_node', id);
}
- that.changeLoaderState(false);
}
+ that.changeLoaderState(false);
},
createAction = function(options) {
var $el = options.el,
@@ -540,9 +540,7 @@ define(['require',
}).on("clear_search.jstree", function(e, data) {
createAction(_.extend({}, options, data));
}).bind('loaded.jstree', function(e, data) {
- if (that.query[type].isNodeNotFoundAtLoad == true) {
- treeLoaded({ "$el": $el, "type": type });
- }
+ treeLoaded({ "$el": $el, "type": type });
});
},
initializeTermTree = function() {
diff --git a/dashboardv2/public/js/views/search/SearchLayoutView.js b/dashboardv2/public/js/views/search/SearchLayoutView.js
index c9eae6b..b828d29 100644
--- a/dashboardv2/public/js/views/search/SearchLayoutView.js
+++ b/dashboardv2/public/js/views/search/SearchLayoutView.js
@@ -210,6 +210,9 @@ define(['require',
this.listenTo(this.typeHeaders, "reset", function(value) {
this.initializeValues();
}, this);
+ this.listenTo(this.searchVent, "entityList:refresh", function(model, response) {
+ this.onRefreshButton();
+ }, this);
},
initializeValues: function() {
this.renderTypeTagList();
diff --git a/dashboardv2/public/js/views/search/SearchResultLayoutView.js b/dashboardv2/public/js/views/search/SearchResultLayoutView.js
index 86de0d6..a51bbdb 100644
--- a/dashboardv2/public/js/views/search/SearchResultLayoutView.js
+++ b/dashboardv2/public/js/views/search/SearchResultLayoutView.js
@@ -640,7 +640,7 @@ define(['require',
nameCheck = 0,
columnToShow = null,
col = {};
- this.value = Utils.getUrlState.getQueryParams() || this.value;
+ this.value = this.fromView === "glossary" ? this.value : Utils.getUrlState.getQueryParams() || this.value;
if (this.value && this.value.searchType === "basic" && this.searchTableColumns && (this.searchTableColumns[this.value.type] !== undefined)) {
columnToShow = this.searchTableColumns[this.value.type] == null ? [] : this.searchTableColumns[this.value.type];
}
@@ -1047,6 +1047,9 @@ define(['require',
that.multiSelectEntity = [];
that.$('.multiSelectTag,.multiSelectTerm').hide();
that.fetchCollection();
+ if (that.searchVent) {
+ that.searchVent.trigger('entityList:refresh');
+ }
},
tagList: that.getTagList(guid, multiple),
showLoader: that.showLoader.bind(that),
@@ -1120,7 +1123,6 @@ define(['require',
that.multiSelectEntity = [];
that.$('.multiSelectTag,.multiSelectTerm').hide();
that.fetchCollection();
-
},
glossaryCollection: that.glossaryCollection,
});
@@ -1143,6 +1145,9 @@ define(['require',
hideLoader: that.hideLoader.bind(that),
callback: function() {
that.fetchCollection();
+ if (that.searchVent) {
+ that.searchVent.trigger('entityList:refresh');
+ }
}
});
@@ -1210,6 +1215,7 @@ define(['require',
var view = new CreateEntityLayoutView({
entityDefCollection: that.entityDefCollection,
typeHeaders: that.typeHeaders,
+ searchVent: that.searchVent,
callback: function() {
that.fetchCollection();
}
diff --git a/dashboardv2/public/js/views/tag/TagDetailLayoutView.js b/dashboardv2/public/js/views/tag/TagDetailLayoutView.js
index b4ce59b..e5a62a0 100644
--- a/dashboardv2/public/js/views/tag/TagDetailLayoutView.js
+++ b/dashboardv2/public/js/views/tag/TagDetailLayoutView.js
@@ -44,7 +44,7 @@ define(['require',
* @constructs
*/
initialize: function(options) {
- _.extend(this, _.pick(options, 'tag', 'value', 'glossaryCollection', 'classificationDefCollection', 'entityDefCollection', 'typeHeaders', 'enumDefCollection'));
+ _.extend(this, _.pick(options, 'tag', 'value', 'glossaryCollection', 'classificationDefCollection', 'entityDefCollection', 'typeHeaders', 'enumDefCollection', 'searchVent'));
this.collection = this.classificationDefCollection;
},
bindEvents: function() {},
@@ -68,6 +68,7 @@ define(['require',
enumDefCollection: that.enumDefCollection,
classificationDefCollection: that.classificationDefCollection,
glossaryCollection: that.glossaryCollection,
+ searchVent: that.searchVent,
fromView: "classification"
}));
}
diff --git a/dashboardv3/public/js/views/glossary/GlossaryDetailLayoutView.js b/dashboardv3/public/js/views/glossary/GlossaryDetailLayoutView.js
index 65af810..a807dd3 100644
--- a/dashboardv3/public/js/views/glossary/GlossaryDetailLayoutView.js
+++ b/dashboardv3/public/js/views/glossary/GlossaryDetailLayoutView.js
@@ -256,6 +256,7 @@ define(['require',
"enumDefCollection": that.enumDefCollection,
"classificationDefCollection": that.classificationDefCollection,
"glossaryCollection": that.glossaryCollection,
+ "searchVent": that.searchVent,
"getSelectedTermAttribute": function() {
return that.selectedTermAttribute;
},
@@ -465,10 +466,6 @@ define(['require',
var that = this;
require(['views/search/SearchResultLayoutView'], function(SearchResultLayoutView) {
- var value = {
- 'tag': "PII",
- 'searchType': 'basic'
- };
if (that.RSearchResultLayoutView) {
that.RSearchResultLayoutView.show(new SearchResultLayoutView(_.extend({}, options, {
"value": { "searchType": "basic", "term": that.data.qualifiedName },