You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by ni...@apache.org on 2019/11/14 09:06:33 UTC
[atlas] 02/02: ATLAS-3513 : Classic UI: Sidebar not rendered on
refresh if url has 'from=classification' queryParam
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 a9672da056cfda5bda29fb9589498d652aad46d9
Author: kevalbhatt <kb...@apache.org>
AuthorDate: Tue Nov 12 18:02:48 2019 +0530
ATLAS-3513 : Classic UI: Sidebar not rendered on refresh if url has 'from=classification' queryParam
Signed-off-by: nixonrodrigues <ni...@apache.org>
---
dashboardv2/public/js/router/Router.js | 5 +++--
dashboardv2/public/js/utils/CommonViewFunction.js | 2 +-
dashboardv2/public/js/utils/Enums.js | 4 +---
dashboardv2/public/js/views/site/SideNavLayoutView.js | 2 +-
dashboardv3/public/js/router/Router.js | 9 +++++----
5 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/dashboardv2/public/js/router/Router.js b/dashboardv2/public/js/router/Router.js
index 8a0bee0..963d63e 100644
--- a/dashboardv2/public/js/router/Router.js
+++ b/dashboardv2/public/js/router/Router.js
@@ -295,8 +295,9 @@ define([
}, that.preFetchedCollectionLists, that.sharedObj)
));
} else {
- App.rNContent.$el.html("");
- App.rNContent.destroy();
+ if (App.rNContent.currentView) {
+ App.rNContent.currentView.destroy();
+ }
}
});
},
diff --git a/dashboardv2/public/js/utils/CommonViewFunction.js b/dashboardv2/public/js/utils/CommonViewFunction.js
index 6877dfe..6ff40bb 100644
--- a/dashboardv2/public/js/utils/CommonViewFunction.js
+++ b/dashboardv2/public/js/utils/CommonViewFunction.js
@@ -37,7 +37,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
skipDefaultError: true,
success: function(data) {
Utils.notifySuccess({
- content: "Classification " + options.tagName + Messages.getAbbreviationMsg(abbrev, 'removeSuccessMessage')
+ content: "Classification " + options.tagName + Messages.getAbbreviationMsg(false, 'removeSuccessMessage')
});
if (options.callback) {
options.callback();
diff --git a/dashboardv2/public/js/utils/Enums.js b/dashboardv2/public/js/utils/Enums.js
index 74a08d9..c7316d5 100644
--- a/dashboardv2/public/js/utils/Enums.js
+++ b/dashboardv2/public/js/utils/Enums.js
@@ -35,9 +35,7 @@ define(['require'], function(require) {
ENTITY_IMPORT_UPDATE: "Entity Updated by import",
ENTITY_IMPORT_DELETE: "Entity Deleted by import",
TERM_ADD: "Term Added",
- TERM_DELETE: "Term Deleted",
- LABEL_ADD: "Label Added",
- LABEL_DELETE: "Label Deleted"
+ TERM_DELETE: "Term Deleted"
}
Enums.entityStateReadOnly = {
diff --git a/dashboardv2/public/js/views/site/SideNavLayoutView.js b/dashboardv2/public/js/views/site/SideNavLayoutView.js
index 87cf4e8..e5552a5 100644
--- a/dashboardv2/public/js/views/site/SideNavLayoutView.js
+++ b/dashboardv2/public/js/views/site/SideNavLayoutView.js
@@ -127,7 +127,7 @@ define(['require',
view = "search";
if (queryParams && queryParams.from) {
if (queryParams.from == "classification") {
- view = "tag";
+ view = "classification";
} else if (queryParams.from == "glossary") {
view = "glossary";
}
diff --git a/dashboardv3/public/js/router/Router.js b/dashboardv3/public/js/router/Router.js
index d069b96..dc09d29 100644
--- a/dashboardv3/public/js/router/Router.js
+++ b/dashboardv3/public/js/router/Router.js
@@ -268,7 +268,7 @@ define([
var that = this;
require(["views/site/Header", "views/search/SearchDefaultLayoutView", "views/site/SideNavLayoutView"], function(Header, SearchDefaultLayoutView, SideNavLayoutView) {
var paramObj = Utils.getUrlState.getQueryParams();
- if (paramObj && (paramObj.type || paramObj.tag || paramObj.term || paramObj.query) === undefined) {
+ if (paramObj && (paramObj.type || paramObj.tag || paramObj.term || paramObj.query || paramObj.udKeys || paramObj.udLabels) === undefined) {
Utils.setUrl({
url: "#!/search",
mergeBrowserUrl: false,
@@ -581,8 +581,9 @@ define([
)
);
} else {
- App.rContent.$el.html("");
- App.rContent.destroy();
+ if (App.rNContent.currentView) {
+ App.rNContent.currentView.destroy();
+ }
}
});
},
@@ -599,4 +600,4 @@ define([
}
});
return AppRouter;
-});
+});
\ No newline at end of file