Refs #21729: Investigate errors generated in the Root scope
Disabled Spaces in root
This commit is contained in:
parent
0c8a85ee73
commit
36f917f6b5
|
@ -107,7 +107,7 @@ public class AccountingManagerController {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Throwable caught) {
|
public void onFailure(Throwable caught) {
|
||||||
Log.error("No valid user found: " + caught.getMessage());
|
Log.error("No valid user found: " + caught.getLocalizedMessage(), caught);
|
||||||
if (caught instanceof SessionExpiredException) {
|
if (caught instanceof SessionExpiredException) {
|
||||||
UtilsGXT3.alert("Error", "Expired Session");
|
UtilsGXT3.alert("Error", "Expired Session");
|
||||||
sessionExpiredShowDelayed();
|
sessionExpiredShowDelayed();
|
||||||
|
@ -132,7 +132,7 @@ public class AccountingManagerController {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Throwable caught) {
|
public void onFailure(Throwable caught) {
|
||||||
Log.error("Error in check root scope: " + caught.getMessage());
|
Log.error("Error in check root scope: " + caught.getLocalizedMessage(), caught);
|
||||||
if (caught instanceof SessionExpiredException) {
|
if (caught instanceof SessionExpiredException) {
|
||||||
UtilsGXT3.alert("Error", "Expired Session");
|
UtilsGXT3.alert("Error", "Expired Session");
|
||||||
sessionExpiredShowDelayed();
|
sessionExpiredShowDelayed();
|
||||||
|
@ -145,46 +145,19 @@ public class AccountingManagerController {
|
||||||
public void onSuccess(Boolean result) {
|
public void onSuccess(Boolean result) {
|
||||||
rootScope = result;
|
rootScope = result;
|
||||||
Log.info("RootScope: " + result);
|
Log.info("RootScope: " + result);
|
||||||
retrieveContext();
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private void retrieveContext() {
|
|
||||||
|
|
||||||
AccountingManagerServiceAsync.INSTANCE.getContext(new AsyncCallback<Context>() {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onFailure(Throwable caught) {
|
|
||||||
Log.error("Error in retrieve context: " + caught.getMessage());
|
|
||||||
if (caught instanceof SessionExpiredException) {
|
|
||||||
eventBus.fireEvent(new SessionExpiredEvent(SessionExpiredType.EXPIREDONSERVER));
|
|
||||||
} else {
|
|
||||||
Log.error("Error retrieving contexts for " + accountingType + ":" + caught.getLocalizedMessage());
|
|
||||||
UtilsGXT3.alert("Error retrieving contexts ", caught.getLocalizedMessage());
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onSuccess(Context result) {
|
|
||||||
Log.debug("Available Context: " + result);
|
|
||||||
availableContext=result;
|
|
||||||
retrieveEnableTabs();
|
retrieveEnableTabs();
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void retrieveEnableTabs() {
|
private void retrieveEnableTabs() {
|
||||||
AccountingManagerServiceAsync.INSTANCE.getEnableTabs(new AsyncCallback<EnableTabs>() {
|
AccountingManagerServiceAsync.INSTANCE.getEnableTabs(new AsyncCallback<EnableTabs>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Throwable caught) {
|
public void onFailure(Throwable caught) {
|
||||||
Log.error("Error retrieving enable tabs: " + caught.getLocalizedMessage());
|
Log.error("Error retrieving enable tabs: " + caught.getLocalizedMessage(), caught);
|
||||||
if (caught instanceof SessionExpiredException) {
|
if (caught instanceof SessionExpiredException) {
|
||||||
UtilsGXT3.alert("Error", "Expired Session");
|
UtilsGXT3.alert("Error", "Expired Session");
|
||||||
sessionExpiredShowDelayed();
|
sessionExpiredShowDelayed();
|
||||||
|
@ -321,7 +294,7 @@ public class AccountingManagerController {
|
||||||
Log.debug("AccountingType: " + event.getAccountingType());
|
Log.debug("AccountingType: " + event.getAccountingType());
|
||||||
accountingStateData = accountingState.getState(event.getAccountingType());
|
accountingStateData = accountingState.getState(event.getAccountingType());
|
||||||
if (accountingStateData == null) {
|
if (accountingStateData == null) {
|
||||||
createDefaultChart(event.getAccountingType());
|
configureDefaultChart(event.getAccountingType());
|
||||||
} else {
|
} else {
|
||||||
accountingType = event.getAccountingType();
|
accountingType = event.getAccountingType();
|
||||||
StateChangeEvent stateChangeEvent = new StateChangeEvent(StateChangeType.Restore, accountingStateData);
|
StateChangeEvent stateChangeEvent = new StateChangeEvent(StateChangeType.Restore, accountingStateData);
|
||||||
|
@ -338,19 +311,51 @@ public class AccountingManagerController {
|
||||||
if (enableTabs != null && enableTabs.getTabs() != null && enableTabs.getTabs().size() > 0
|
if (enableTabs != null && enableTabs.getTabs() != null && enableTabs.getTabs().size() > 0
|
||||||
&& enableTabs.getTabs().get(0) != null) {
|
&& enableTabs.getTabs().get(0) != null) {
|
||||||
Log.debug("Create DefaultChart");
|
Log.debug("Create DefaultChart");
|
||||||
createDefaultChart(enableTabs.getTabs().get(0).getAccountingType());
|
configureDefaultChart(enableTabs.getTabs().get(0).getAccountingType());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void createDefaultChart(AccountingType accountingType) {
|
private void configureDefaultChart(AccountingType accountingType) {
|
||||||
accountingMonitor = new AccountingMonitor();
|
accountingMonitor = new AccountingMonitor();
|
||||||
this.accountingType = accountingType;
|
this.accountingType = accountingType;
|
||||||
|
if (availableContext == null) {
|
||||||
|
retrieveContext();
|
||||||
|
} else {
|
||||||
|
createDefaultChart();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void createDefaultChart() {
|
||||||
AccountingClientStateData accountingStateData = new AccountingClientStateData(accountingType, rootScope);
|
AccountingClientStateData accountingStateData = new AccountingClientStateData(accountingType, rootScope);
|
||||||
accountingStateData.setAvailableContext(availableContext);
|
accountingStateData.setAvailableContext(availableContext);
|
||||||
accountingState.setState(accountingType, accountingStateData);
|
accountingState.setState(accountingType, accountingStateData);
|
||||||
|
|
||||||
retrieveFilterKey();
|
retrieveFilterKey();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void retrieveContext() {
|
||||||
|
|
||||||
|
AccountingManagerServiceAsync.INSTANCE.getContext(new AsyncCallback<Context>() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Throwable caught) {
|
||||||
|
accountingMonitor.hide();
|
||||||
|
Log.error("Error retrieving contexts: " + caught.getLocalizedMessage(), caught);
|
||||||
|
if (caught instanceof SessionExpiredException) {
|
||||||
|
eventBus.fireEvent(new SessionExpiredEvent(SessionExpiredType.EXPIREDONSERVER));
|
||||||
|
} else {
|
||||||
|
UtilsGXT3.alert("Error retrieving contexts ", caught.getLocalizedMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSuccess(Context result) {
|
||||||
|
Log.debug("Available Context: " + result);
|
||||||
|
availableContext = result;
|
||||||
|
createDefaultChart();
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -361,6 +366,7 @@ public class AccountingManagerController {
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Throwable caught) {
|
public void onFailure(Throwable caught) {
|
||||||
accountingMonitor.hide();
|
accountingMonitor.hide();
|
||||||
|
Log.error("Error retrieving filter keys: " + caught.getLocalizedMessage(), caught);
|
||||||
if (caught instanceof SessionExpiredException) {
|
if (caught instanceof SessionExpiredException) {
|
||||||
eventBus.fireEvent(new SessionExpiredEvent(SessionExpiredType.EXPIREDONSERVER));
|
eventBus.fireEvent(new SessionExpiredEvent(SessionExpiredType.EXPIREDONSERVER));
|
||||||
} else {
|
} else {
|
||||||
|
@ -383,8 +389,6 @@ public class AccountingManagerController {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void retrieveSpace() {
|
private void retrieveSpace() {
|
||||||
if (rootScope) {
|
if (rootScope) {
|
||||||
|
|
||||||
|
@ -841,8 +845,6 @@ public class AccountingManagerController {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void doExportRequest(ExportRequestEvent event) {
|
private void doExportRequest(ExportRequestEvent event) {
|
||||||
StringBuilder actionUrl = new StringBuilder();
|
StringBuilder actionUrl = new StringBuilder();
|
||||||
actionUrl.append(GWT.getModuleBaseURL());
|
actionUrl.append(GWT.getModuleBaseURL());
|
||||||
|
|
Loading…
Reference in New Issue