This is an automated email from the ASF dual-hosted git repository.
pinal pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/atlas.git
The following commit(s) were added to refs/heads/master by this push:
new 12438ff2a ATLAS-4583 : (UI)When there is no data, error is encountered
on switching UI at a specific page
12438ff2a is described below
commit 12438ff2a20c382307cc375478740e7108cd6a74
Author: Farhan Khan <[email protected]>
AuthorDate: Mon May 23 16:28:52 2022 +0530
ATLAS-4583 : (UI)When there is no data, error is encountered on switching
UI at a specific page
Signed-off-by: Pinal Shah <[email protected]>
---
dashboardv2/public/js/views/tag/TagLayoutView.js | 3 +++
dashboardv3/public/js/router/Router.js | 7 ++++++-
.../public/js/views/search/tree/ClassificationTreeLayoutView.js | 2 +-
3 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/dashboardv2/public/js/views/tag/TagLayoutView.js
b/dashboardv2/public/js/views/tag/TagLayoutView.js
index 38df18792..f7af026b7 100644
--- a/dashboardv2/public/js/views/tag/TagLayoutView.js
+++ b/dashboardv2/public/js/views/tag/TagLayoutView.js
@@ -651,6 +651,9 @@ define(['require',
},
cust_error: function() {},
complete: function() {
+ if(that.collection.fullCollection.length === 0){
+ that.setUrl('#!/tag', true);
+ }
that.notificationModal.hideButtonLoader();
that.notificationModal.remove();
}
diff --git a/dashboardv3/public/js/router/Router.js
b/dashboardv3/public/js/router/Router.js
index 701b65104..8e8cf1557 100644
--- a/dashboardv3/public/js/router/Router.js
+++ b/dashboardv3/public/js/router/Router.js
@@ -212,6 +212,11 @@ define([
var that = this;
require(["views/site/Header", "views/tag/TagContainerLayoutView",
"views/site/SideNavLayoutView"], function(Header, TagContainerLayoutView,
SideNavLayoutView) {
var paramObj = Utils.getUrlState.getQueryParams();
+ //Below if condition is added to handle "when Classification
tab does not have any classification and selected in Old UI and switched to New
UI is show continous loading
+ if (paramObj === undefined || tagName === "viewType=tree" ||
tagName === "viewType=flat") {
+ that.defaultAction();
+ return;
+ }
that.renderViewIfNotExists(that.getHeaderOptions(Header));
var options = _.extend({
tag: tagName,
@@ -238,7 +243,7 @@ define([
require(["views/site/Header",
"views/glossary/GlossaryContainerLayoutView",
"views/search/SearchDefaultLayoutView", "views/site/SideNavLayoutView"],
function(Header, GlossaryContainerLayoutView, SearchDefaultLayoutView,
SideNavLayoutView) {
var paramObj = Utils.getUrlState.getQueryParams();
//Below if condition is added to handle "when Glossary tab
does not have any glossary and selected in Old UI and switched to New UI is
show continous loading
- if (paramObj === undefined) {
+ if (paramObj === undefined || id === "viewType=category" || id
=== "viewType=term") {
that.defaultAction();
return;
}
diff --git
a/dashboardv3/public/js/views/search/tree/ClassificationTreeLayoutView.js
b/dashboardv3/public/js/views/search/tree/ClassificationTreeLayoutView.js
index ef53c9533..e31260d40 100644
--- a/dashboardv3/public/js/views/search/tree/ClassificationTreeLayoutView.js
+++ b/dashboardv3/public/js/views/search/tree/ClassificationTreeLayoutView.js
@@ -889,7 +889,7 @@ define([
}
// if deleted tag is prviously searched then
remove that tag url from save state of tab.
var searchUrl =
Globals.saveApplicationState.tabState.searchUrl,
- urlObj =
Utils.getUrlState.getQueryParams(searchUrl);
+ urlObj =
Utils.getUrlState.getQueryParams(searchUrl) ?
Utils.getUrlState.getQueryParams(searchUrl) :
Utils.getUrlState.getQueryParams();
that.classificationDefCollection.fullCollection.remove(deleteTagData);
// to update tag list of search tab fetch
typeHeaders.
//that.typeHeaders.fetch({ reset: true });