ref 18291: Modify the Accounting Dashboard portlet to support the Core

Services Category per gateway

https://support.d4science.org/issues/18291

Fixed infra nodes scope
This commit is contained in:
Giancarlo Panichi 2020-01-21 12:09:14 +01:00
parent e140afebe4
commit b8f99d099e
1 changed files with 8 additions and 7 deletions

View File

@ -110,8 +110,8 @@ public class PortalContextTreeProvider implements ContextTreeProvider {
currUser); currUser);
if (infraNode != null) { if (infraNode != null) {
String currScope = portalContext.getCurrentScope(gCubeGroup.getGroupId() + ""); String gatewayScope = String.valueOf(gCubeGroup.getGroupId());
ScopeDescriptor infraNodeScopeDescriptor = createRelativeInfraNode(infraNode, currScope); ScopeDescriptor infraNodeScopeDescriptor = createRelativeInfraNode(infraNode, gatewayScope);
if (gatewayChildren != null) { if (gatewayChildren != null) {
gatewayChildren.addFirst(infraNodeScopeDescriptor); gatewayChildren.addFirst(infraNodeScopeDescriptor);
} else { } else {
@ -156,15 +156,16 @@ public class PortalContextTreeProvider implements ContextTreeProvider {
PortalContext pContext = PortalContext.getConfiguration(); PortalContext pContext = PortalContext.getConfiguration();
GCubeUser currUser = pContext.getCurrentUser(request); GCubeUser currUser = pContext.getCurrentUser(request);
String currScope = pContext.getCurrentScope(currentSiteGroupId + ""); String portalScope = pContext.getCurrentScope(currentSiteGroupId + "");
String gatewayScope = String.valueOf(currentSiteGroupId);
InfraNode infraNode = BuildInfraNode.build(currScope); InfraNode infraNode = BuildInfraNode.build(portalScope);
LinkedList<ScopeDescriptor> rootChildren = null; LinkedList<ScopeDescriptor> rootChildren = null;
rootChildren = retrieveGatewayChildren(request, currentSiteGroupId, currUser); rootChildren = retrieveGatewayChildren(request, currentSiteGroupId, currUser);
if (infraNode != null) { if (infraNode != null) {
ScopeDescriptor infraNodeScopeDescriptor = createRelativeInfraNode(infraNode, currScope); ScopeDescriptor infraNodeScopeDescriptor = createRelativeInfraNode(infraNode, gatewayScope);
if (rootChildren != null) { if (rootChildren != null) {
rootChildren.addFirst(infraNodeScopeDescriptor); rootChildren.addFirst(infraNodeScopeDescriptor);
} else { } else {