You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ranger.apache.org by ve...@apache.org on 2016/06/02 05:01:23 UTC

incubator-ranger git commit: RANGER-690 : Ranger Admin doesn't show error if Audit Solr is down

Repository: incubator-ranger
Updated Branches:
  refs/heads/master c366a0ae5 -> a3089d1f0


RANGER-690 : Ranger Admin doesn't show error if Audit Solr is down

Signed-off-by: Velmurugan Periasamy <ve...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/incubator-ranger/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ranger/commit/a3089d1f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ranger/tree/a3089d1f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ranger/diff/a3089d1f

Branch: refs/heads/master
Commit: a3089d1f0bab90692cc7027ca5d7323ea7bca610
Parents: c366a0a
Author: Gautam Borad <ga...@apache.org>
Authored: Fri May 27 10:51:54 2016 +0530
Committer: Velmurugan Periasamy <ve...@apache.org>
Committed: Thu Jun 2 01:01:08 2016 -0400

----------------------------------------------------------------------
 .../src/main/webapp/scripts/controllers/Controller.js        | 8 ++------
 .../src/main/webapp/scripts/modules/globalize/message/en.js  | 1 +
 security-admin/src/main/webapp/scripts/utils/XAUtils.js      | 7 +++++--
 .../src/main/webapp/scripts/views/reports/AuditLayout.js     | 5 -----
 4 files changed, 8 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/a3089d1f/security-admin/src/main/webapp/scripts/controllers/Controller.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/controllers/Controller.js b/security-admin/src/main/webapp/scripts/controllers/Controller.js
index b6dee8d..fc56496 100755
--- a/security-admin/src/main/webapp/scripts/controllers/Controller.js
+++ b/security-admin/src/main/webapp/scripts/controllers/Controller.js
@@ -75,17 +75,13 @@ define(function(require) {
 		   var view					= require('views/reports/AuditLayout');
 		   var VXAccessAuditList 	= require('collections/VXAccessAuditList');
 		   var accessAuditList 		= new VXAccessAuditList();
+		   var XAUtil				= require('utils/XAUtils');
+		   var localization			= require('utils/XALangSupport');
 		   _.extend(accessAuditList.queryParams,{ 'sortBy'  :  'eventTime' });
 		   App.rContent.show(new view({
 			   accessAuditList : accessAuditList,
 			   tab :tab
 		   }));
-		   if(tab == 'bigData'){
-			  accessAuditList.fetch({
-				 cache : false,
-				 async:true
-			   });
-		   }
 	   },
 	   loginSessionDetail : function(type, id){
 		   MAppState.set({ 'currentTab' : XAGlobals.AppTabs.Audit.value });

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/a3089d1f/security-admin/src/main/webapp/scripts/modules/globalize/message/en.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/modules/globalize/message/en.js b/security-admin/src/main/webapp/scripts/modules/globalize/message/en.js
index 070b3ea..2f69ad2 100644
--- a/security-admin/src/main/webapp/scripts/modules/globalize/message/en.js
+++ b/security-admin/src/main/webapp/scripts/modules/globalize/message/en.js
@@ -337,6 +337,7 @@ define(function(require) {
 				userUpdatedSucc           :     'User updated successfully',
 				grpUpdatedSucc            : 'Group updated successfully',
 				grpCreatedSucc            : 'Group created successfully',
+				errorLoadingAuditLogs	  : 'Unable to connect to Audit store !!'
 				
 				
 				

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/a3089d1f/security-admin/src/main/webapp/scripts/utils/XAUtils.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/utils/XAUtils.js b/security-admin/src/main/webapp/scripts/utils/XAUtils.js
index 8ca8a01..a0b282e 100644
--- a/security-admin/src/main/webapp/scripts/utils/XAUtils.js
+++ b/security-admin/src/main/webapp/scripts/utils/XAUtils.js
@@ -699,7 +699,7 @@ define(function(require) {
 	};
 	XAUtils.addVisualSearch = function(searchOpt, serverAttrName, collection,
 			pluginAttr) {
-		var visualSearch;
+		var visualSearch, that = this;
 		var search = function(searchCollection, serverAttrName, searchOpt,
 				collection) {
 			var params = {};
@@ -726,7 +726,10 @@ define(function(require) {
 			collection.state.currentPage = collection.state.firstPage;
 			collection.fetch({
 				reset : true,
-				cache : false
+				cache : false,
+				error : function(coll, response, options) {
+					that.notifyError('Error', localization.tt('msg.errorLoadingAuditLogs'));
+				}
 			// data : params,
 			});
 		};

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/a3089d1f/security-admin/src/main/webapp/scripts/views/reports/AuditLayout.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/views/reports/AuditLayout.js b/security-admin/src/main/webapp/scripts/views/reports/AuditLayout.js
index 23e8b54..59514b6 100644
--- a/security-admin/src/main/webapp/scripts/views/reports/AuditLayout.js
+++ b/security-admin/src/main/webapp/scripts/views/reports/AuditLayout.js
@@ -206,11 +206,6 @@ define(function(require) {
 					this.ui.visualSearch.parents('.well').show();
 					this.renderBigDataTable();
 					this.modifyTableForSubcolumns();
-					if(this.accessAuditList.length <= 0){
-						this.accessAuditList.fetch({
-							cache : false
-						});
-					}
 					this.addSearchForBigDataTab();
 					this.listenTo(this.accessAuditList, "request", that.updateLastRefresh)
 					break;