feature/21729 #2
|
@ -3,6 +3,14 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
|||
# Changelog for "accounting-manager"
|
||||
|
||||
|
||||
## [v1.14.0-SNAPSHOT] - 2021-06-28
|
||||
|
||||
### Fixes
|
||||
|
||||
- Fixed display errors generated in Root scope [#21729]
|
||||
|
||||
|
||||
|
||||
## [v1.13.0] - 2021-03-23
|
||||
|
||||
### Features
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
<ReleaseNotes>
|
||||
<Changeset component="org.gcube.portlets.admin.accounting-manager.1-14-0"
|
||||
date="2021-06-28">
|
||||
<Change>Fixed display errors generated in Root scope [#21729]</Change>
|
||||
</Changeset>
|
||||
<Changeset component="org.gcube.portlets.admin.accounting-manager.1-13-0"
|
||||
date="2021-03-23">
|
||||
<Change>Migrate accounting-manager to postgresql persistence [#21013]</Change>
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -15,7 +15,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.gcube.portlets.admin</groupId>
|
||||
<artifactId>accounting-manager</artifactId>
|
||||
<version>1.13.0</version>
|
||||
<version>1.14.0-SNAPSHOT</version>
|
||||
<packaging>war</packaging>
|
||||
|
||||
|
||||
|
|
|
@ -68,6 +68,7 @@ public class AccountingManagerController {
|
|||
private BorderLayoutContainer mainPanel;
|
||||
private AccountingMonitor accountingMonitor;
|
||||
private EnableTabs enableTabs;
|
||||
private Context availableContext;
|
||||
|
||||
public AccountingManagerController() {
|
||||
eventBus = new SimpleEventBus();
|
||||
|
@ -106,7 +107,7 @@ public class AccountingManagerController {
|
|||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
Log.info("No valid user found: " + caught.getMessage());
|
||||
Log.error("No valid user found: " + caught.getMessage());
|
||||
if (caught instanceof SessionExpiredException) {
|
||||
UtilsGXT3.alert("Error", "Expired Session");
|
||||
sessionExpiredShowDelayed();
|
||||
|
@ -131,7 +132,7 @@ public class AccountingManagerController {
|
|||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
Log.info("No valid user found: " + caught.getMessage());
|
||||
Log.error("Error in check root scope: " + caught.getMessage());
|
||||
if (caught instanceof SessionExpiredException) {
|
||||
UtilsGXT3.alert("Error", "Expired Session");
|
||||
sessionExpiredShowDelayed();
|
||||
|
@ -144,12 +145,39 @@ public class AccountingManagerController {
|
|||
public void onSuccess(Boolean result) {
|
||||
rootScope = result;
|
||||
Log.info("RootScope: " + result);
|
||||
retrieveEnableTabs();
|
||||
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();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void retrieveEnableTabs() {
|
||||
AccountingManagerServiceAsync.INSTANCE.getEnableTabs(new AsyncCallback<EnableTabs>() {
|
||||
|
@ -319,6 +347,7 @@ public class AccountingManagerController {
|
|||
this.accountingType = accountingType;
|
||||
|
||||
AccountingClientStateData accountingStateData = new AccountingClientStateData(accountingType, rootScope);
|
||||
accountingStateData.setAvailableContext(availableContext);
|
||||
accountingState.setState(accountingType, accountingStateData);
|
||||
|
||||
retrieveFilterKey();
|
||||
|
@ -348,40 +377,14 @@ public class AccountingManagerController {
|
|||
AccountingClientStateData accountingStateData = accountingState.getState(accountingType);
|
||||
accountingStateData.setAvailableFilterKeys(result);
|
||||
accountingState.setState(accountingType, accountingStateData);
|
||||
retrieveContext();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private void retrieveContext() {
|
||||
|
||||
AccountingManagerServiceAsync.INSTANCE.getContext(new AsyncCallback<Context>() {
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
accountingMonitor.hide();
|
||||
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);
|
||||
AccountingClientStateData accountingStateData = accountingState.getState(accountingType);
|
||||
accountingStateData.setAvailableContext(result);
|
||||
accountingState.setState(accountingType, accountingStateData);
|
||||
retrieveSpace();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void retrieveSpace() {
|
||||
if (rootScope) {
|
||||
|
||||
|
|
|
@ -107,7 +107,7 @@ import com.sencha.gxt.widget.core.client.toolbar.ToolBar;
|
|||
public class ActiveFiltersPanel extends SimpleContainer {
|
||||
|
||||
private static final int TOP_NUMBER_DEFAULT = 5;
|
||||
private static final int TOP_NUMBER_MAX = 10;
|
||||
private static final int TOP_NUMBER_MAX = 30;
|
||||
private static final int TOP_NUMBER_MIN = 1;
|
||||
private EventBus eventBus;
|
||||
private Grid<AccountingFilter> gridFilter;
|
||||
|
|
|
@ -77,7 +77,8 @@ public class BuildEnableTabs {
|
|||
}
|
||||
}
|
||||
|
||||
if (isRootScope) {
|
||||
//SPACE Tab Disabled
|
||||
/*if (isRootScope) {
|
||||
boolean spaceTabPresent = false;
|
||||
for (EnableTab enableTab : enableTabList) {
|
||||
if (enableTab.getAccountingType().compareTo(
|
||||
|
@ -91,7 +92,7 @@ public class BuildEnableTabs {
|
|||
AccountingType.SPACE, null);
|
||||
enableTabList.add(enableTabDataSpace);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
EnableTabs enableTabs = new EnableTabs(enableTabList);
|
||||
logger.debug("EnableTabsData: " + enableTabs);
|
||||
return enableTabs;
|
||||
|
|
Loading…
Reference in New Issue