[atlas] branch branch-2.0 updated: ATLAS-4250 : Support HA for admin/tasks API.

2021-04-21 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


The following commit(s) were added to refs/heads/branch-2.0 by this push:
 new 0e8f0e5  ATLAS-4250 : Support HA for admin/tasks API.
0e8f0e5 is described below

commit 0e8f0e556b5811ea30f78c21740717651f892ade
Author: nixonrodrigues 
AuthorDate: Wed Apr 21 15:39:26 2021 +0530

ATLAS-4250 : Support HA for admin/tasks API.

(cherry picked from commit 2e0caefdd3b37df8ff9322dc4c14306d2df9dac6)
---
 .../src/main/java/org/apache/atlas/web/filters/ActiveServerFilter.java  | 2 +-
 .../test/java/org/apache/atlas/web/filters/ActiveServerFilterTest.java  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/webapp/src/main/java/org/apache/atlas/web/filters/ActiveServerFilter.java 
b/webapp/src/main/java/org/apache/atlas/web/filters/ActiveServerFilter.java
index 98eb3d3..a1d30ba 100644
--- a/webapp/src/main/java/org/apache/atlas/web/filters/ActiveServerFilter.java
+++ b/webapp/src/main/java/org/apache/atlas/web/filters/ActiveServerFilter.java
@@ -110,7 +110,7 @@ public class ActiveServerFilter implements Filter {
 }
 
 final String adminUriNotFiltered[] = { "/admin/export", "/admin/import", 
"/admin/importfile", "/admin/audits",
-"/admin/purge", "/admin/expimp/audit", "/admin/metrics", 
"/admin/server", "/admin/audit/" };
+"/admin/purge", "/admin/expimp/audit", "/admin/metrics", 
"/admin/server", "/admin/audit/", "admin/tasks"};
 private boolean isFilteredURI(ServletRequest servletRequest) {
 HttpServletRequest httpServletRequest = (HttpServletRequest) 
servletRequest;
 String requestURI = httpServletRequest.getRequestURI();
diff --git 
a/webapp/src/test/java/org/apache/atlas/web/filters/ActiveServerFilterTest.java 
b/webapp/src/test/java/org/apache/atlas/web/filters/ActiveServerFilterTest.java
index defa5bb..04b4e4a 100644
--- 
a/webapp/src/test/java/org/apache/atlas/web/filters/ActiveServerFilterTest.java
+++ 
b/webapp/src/test/java/org/apache/atlas/web/filters/ActiveServerFilterTest.java
@@ -107,7 +107,7 @@ public class ActiveServerFilterTest {
 public void 
adminImportRequestsToPassiveServerShouldToActiveServerAddress() throws 
IOException, ServletException {
 String importExportUrls[] = {"api/admin/export", "api/admin/import", 
"api/admin/importfile", "api/admin/audits",
 "api/admin/purge", "api/admin/expimp/audit", 
"api/admin/metrics",
-"api/admin/server/dummy_name", 
"api/admin/audit/dummy_guid/details"};
+"api/admin/server/dummy_name", 
"api/admin/audit/dummy_guid/details", "api/admin/tasks"};
 
 for (String partialUrl : importExportUrls) {
 
when(serviceState.getState()).thenReturn(ServiceState.ServiceStateValue.PASSIVE);


[atlas] branch master updated: ATLAS-4250 : Support HA for admin/tasks API.

2021-04-21 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


The following commit(s) were added to refs/heads/master by this push:
 new 2e0caef  ATLAS-4250 : Support HA for admin/tasks API.
2e0caef is described below

commit 2e0caefdd3b37df8ff9322dc4c14306d2df9dac6
Author: nixonrodrigues 
AuthorDate: Wed Apr 21 15:39:26 2021 +0530

ATLAS-4250 : Support HA for admin/tasks API.
---
 .../src/main/java/org/apache/atlas/web/filters/ActiveServerFilter.java  | 2 +-
 .../test/java/org/apache/atlas/web/filters/ActiveServerFilterTest.java  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/webapp/src/main/java/org/apache/atlas/web/filters/ActiveServerFilter.java 
b/webapp/src/main/java/org/apache/atlas/web/filters/ActiveServerFilter.java
index 98eb3d3..a1d30ba 100644
--- a/webapp/src/main/java/org/apache/atlas/web/filters/ActiveServerFilter.java
+++ b/webapp/src/main/java/org/apache/atlas/web/filters/ActiveServerFilter.java
@@ -110,7 +110,7 @@ public class ActiveServerFilter implements Filter {
 }
 
 final String adminUriNotFiltered[] = { "/admin/export", "/admin/import", 
"/admin/importfile", "/admin/audits",
-"/admin/purge", "/admin/expimp/audit", "/admin/metrics", 
"/admin/server", "/admin/audit/" };
+"/admin/purge", "/admin/expimp/audit", "/admin/metrics", 
"/admin/server", "/admin/audit/", "admin/tasks"};
 private boolean isFilteredURI(ServletRequest servletRequest) {
 HttpServletRequest httpServletRequest = (HttpServletRequest) 
servletRequest;
 String requestURI = httpServletRequest.getRequestURI();
diff --git 
a/webapp/src/test/java/org/apache/atlas/web/filters/ActiveServerFilterTest.java 
b/webapp/src/test/java/org/apache/atlas/web/filters/ActiveServerFilterTest.java
index defa5bb..04b4e4a 100644
--- 
a/webapp/src/test/java/org/apache/atlas/web/filters/ActiveServerFilterTest.java
+++ 
b/webapp/src/test/java/org/apache/atlas/web/filters/ActiveServerFilterTest.java
@@ -107,7 +107,7 @@ public class ActiveServerFilterTest {
 public void 
adminImportRequestsToPassiveServerShouldToActiveServerAddress() throws 
IOException, ServletException {
 String importExportUrls[] = {"api/admin/export", "api/admin/import", 
"api/admin/importfile", "api/admin/audits",
 "api/admin/purge", "api/admin/expimp/audit", 
"api/admin/metrics",
-"api/admin/server/dummy_name", 
"api/admin/audit/dummy_guid/details"};
+"api/admin/server/dummy_name", 
"api/admin/audit/dummy_guid/details", "api/admin/tasks"};
 
 for (String partialUrl : importExportUrls) {
 
when(serviceState.getState()).thenReturn(ServiceState.ServiceStateValue.PASSIVE);


[atlas] branch branch-2.0 updated: ATLAS-3887 ATLAS-4242: UI : Fixed Consistency and highlighting issues while switching between old and new UI.

2021-04-21 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


The following commit(s) were added to refs/heads/branch-2.0 by this push:
 new 9f9864d  ATLAS-3887 ATLAS-4242: UI : Fixed Consistency and 
highlighting issues while switching between old and new UI.
9f9864d is described below

commit 9f9864d3b84ca6b31dc45117a2830b2114f195e0
Author: prasad pawar 
AuthorDate: Wed Apr 14 14:43:12 2021 +0530

ATLAS-3887 ATLAS-4242: UI : Fixed Consistency and highlighting issues while 
switching between old and new UI.

Signed-off-by: nixonrodrigues 
(cherry picked from commit 4d027b4bf1a0c6b4329422a75518f010c579133a)
---
 .../public/js/views/glossary/GlossaryLayoutView.js | 11 +++-
 .../public/js/views/search/SearchLayoutView.js | 20 ++-
 dashboardv2/public/js/views/tag/TagLayoutView.js   |  5 +-
 dashboardv3/public/js/router/Router.js | 35 
 .../js/views/search/tree/GlossaryTreeLayoutView.js | 62 --
 5 files changed, 110 insertions(+), 23 deletions(-)

diff --git a/dashboardv2/public/js/views/glossary/GlossaryLayoutView.js 
b/dashboardv2/public/js/views/glossary/GlossaryLayoutView.js
index 0de5c35..a13ad4a 100644
--- a/dashboardv2/public/js/views/glossary/GlossaryLayoutView.js
+++ b/dashboardv2/public/js/views/glossary/GlossaryLayoutView.js
@@ -216,7 +216,8 @@ define(['require',
 }
 if (Utils.getUrlState.isGlossaryTab()) {
 var obj = this.query[this.viewType],
-$tree = this.ui[(this.viewType == "term" ? "termTree" 
: "categoryTree")]
+$tree = this.ui[(this.viewType == "term" ? "termTree" 
: "categoryTree")];
+obj["gId"] = that.value.gId; //this Property added, 
Because when we toggle the GlossaryViewButton it does not adds the gId which is 
required for selection.  
 if (obj.guid) {
 var node = $tree.jstree(true).get_node(obj.guid);
 if (node) {
@@ -826,11 +827,17 @@ define(['require',
 obj["gId"] = selectedItem.guid;
 }
 this.query[this.viewType] = _.extend(obj, 
_.omit(this.value, 'gId'), _.pick(this.glossary.selectedItem, 'model', 'type', 
'gType', 'guid'), { "viewType": this.viewType, "isNodeNotFoundAtLoad": 
this.query[this.viewType].isNodeNotFoundAtLoad });
+//Below condition if for adding term Param to the URL for 
selection Purpose while switching from Old UI to New UI on term selection.
+if (selectedItem.type === "GlossaryTerm") {
+obj['term'] = selectedItem.text + '@' + 
selectedItem.glossaryName;
+} else {
+delete obj.term;
+}
 Utils.setUrl({
 url: '#!/glossary/' + obj.guid,
 mergeBrowserUrl: false,
 trigger: true,
-urlParams: _.omit(obj, 'model', 'guid', 'type', 
'isNodeNotFoundAtLoad'),
+urlParams: _.omit(obj, 'model', 'type', 
'isNodeNotFoundAtLoad'), //Guid has been removed from here because we need in 
the URL for Highlighting issue.
 updateTabState: true
 });
 }
diff --git a/dashboardv2/public/js/views/search/SearchLayoutView.js 
b/dashboardv2/public/js/views/search/SearchLayoutView.js
index 1dbda7f..be46d7e 100644
--- a/dashboardv2/public/js/views/search/SearchLayoutView.js
+++ b/dashboardv2/public/js/views/search/SearchLayoutView.js
@@ -625,6 +625,8 @@ define(['require',
 }
 },
 renderTermList: function() {
+this.glossaryTermArray = null; //This Value is created to 
store the result of search Term while basic search through term.
+var that = this;
 var getTypeAheadData = function(data, params) {
 var dataList = data.entities,
 foundOptions = [];
@@ -637,7 +639,7 @@ define(['require',
 }
 });
 return foundOptions;
-}
+};
 this.ui.termLov.select2({
 placeholder: "Search Term",
 allowClear: true,
@@ -654,6 +656,7 @@ define(['require',
 };
 },
 processResults: function(data, params) {
+that.glossaryTermArray = getTypeAheadData(data, 
params); //storing the search Results obj
 return {
 results: getTypeAheadData(data, params)
 };
@@ -734,6 +737,18 @@ define(['require',
 fin

[atlas] branch master updated: ATLAS-3887 ATLAS-4242: UI : Fixed Consistency and highlighting issues while switching between old and new UI.

2021-04-21 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


The following commit(s) were added to refs/heads/master by this push:
 new 4d027b4  ATLAS-3887 ATLAS-4242: UI : Fixed Consistency and 
highlighting issues while switching between old and new UI.
4d027b4 is described below

commit 4d027b4bf1a0c6b4329422a75518f010c579133a
Author: prasad pawar 
AuthorDate: Wed Apr 14 14:43:12 2021 +0530

ATLAS-3887 ATLAS-4242: UI : Fixed Consistency and highlighting issues while 
switching between old and new UI.

Signed-off-by: nixonrodrigues 
---
 .../public/js/views/glossary/GlossaryLayoutView.js | 11 +++-
 .../public/js/views/search/SearchLayoutView.js | 20 ++-
 dashboardv2/public/js/views/tag/TagLayoutView.js   |  5 +-
 dashboardv3/public/js/router/Router.js | 35 
 .../js/views/search/tree/GlossaryTreeLayoutView.js | 62 --
 5 files changed, 110 insertions(+), 23 deletions(-)

diff --git a/dashboardv2/public/js/views/glossary/GlossaryLayoutView.js 
b/dashboardv2/public/js/views/glossary/GlossaryLayoutView.js
index 0de5c35..a13ad4a 100644
--- a/dashboardv2/public/js/views/glossary/GlossaryLayoutView.js
+++ b/dashboardv2/public/js/views/glossary/GlossaryLayoutView.js
@@ -216,7 +216,8 @@ define(['require',
 }
 if (Utils.getUrlState.isGlossaryTab()) {
 var obj = this.query[this.viewType],
-$tree = this.ui[(this.viewType == "term" ? "termTree" 
: "categoryTree")]
+$tree = this.ui[(this.viewType == "term" ? "termTree" 
: "categoryTree")];
+obj["gId"] = that.value.gId; //this Property added, 
Because when we toggle the GlossaryViewButton it does not adds the gId which is 
required for selection.  
 if (obj.guid) {
 var node = $tree.jstree(true).get_node(obj.guid);
 if (node) {
@@ -826,11 +827,17 @@ define(['require',
 obj["gId"] = selectedItem.guid;
 }
 this.query[this.viewType] = _.extend(obj, 
_.omit(this.value, 'gId'), _.pick(this.glossary.selectedItem, 'model', 'type', 
'gType', 'guid'), { "viewType": this.viewType, "isNodeNotFoundAtLoad": 
this.query[this.viewType].isNodeNotFoundAtLoad });
+//Below condition if for adding term Param to the URL for 
selection Purpose while switching from Old UI to New UI on term selection.
+if (selectedItem.type === "GlossaryTerm") {
+obj['term'] = selectedItem.text + '@' + 
selectedItem.glossaryName;
+} else {
+delete obj.term;
+}
 Utils.setUrl({
 url: '#!/glossary/' + obj.guid,
 mergeBrowserUrl: false,
 trigger: true,
-urlParams: _.omit(obj, 'model', 'guid', 'type', 
'isNodeNotFoundAtLoad'),
+urlParams: _.omit(obj, 'model', 'type', 
'isNodeNotFoundAtLoad'), //Guid has been removed from here because we need in 
the URL for Highlighting issue.
 updateTabState: true
 });
 }
diff --git a/dashboardv2/public/js/views/search/SearchLayoutView.js 
b/dashboardv2/public/js/views/search/SearchLayoutView.js
index 1dbda7f..be46d7e 100644
--- a/dashboardv2/public/js/views/search/SearchLayoutView.js
+++ b/dashboardv2/public/js/views/search/SearchLayoutView.js
@@ -625,6 +625,8 @@ define(['require',
 }
 },
 renderTermList: function() {
+this.glossaryTermArray = null; //This Value is created to 
store the result of search Term while basic search through term.
+var that = this;
 var getTypeAheadData = function(data, params) {
 var dataList = data.entities,
 foundOptions = [];
@@ -637,7 +639,7 @@ define(['require',
 }
 });
 return foundOptions;
-}
+};
 this.ui.termLov.select2({
 placeholder: "Search Term",
 allowClear: true,
@@ -654,6 +656,7 @@ define(['require',
 };
 },
 processResults: function(data, params) {
+that.glossaryTermArray = getTypeAheadData(data, 
params); //storing the search Results obj
 return {
 results: getTypeAheadData(data, params)
 };
@@ -734,6 +737,18 @@ define(['require',
 findSearchResult: function() {
 this.triggerSearch(this.ui.searchInp