diff --git a/.classpath b/.classpath
index 930f7bc..4035493 100644
--- a/.classpath
+++ b/.classpath
@@ -34,5 +34,6 @@
+
diff --git a/.settings/org.eclipse.wst.common.component b/.settings/org.eclipse.wst.common.component
index 2852ff5..a807789 100644
--- a/.settings/org.eclipse.wst.common.component
+++ b/.settings/org.eclipse.wst.common.component
@@ -4,6 +4,9 @@
+
+ uses
+
diff --git a/.settings/org.eclipse.wst.validation.prefs b/.settings/org.eclipse.wst.validation.prefs
new file mode 100644
index 0000000..04cad8c
--- /dev/null
+++ b/.settings/org.eclipse.wst.validation.prefs
@@ -0,0 +1,2 @@
+disabled=06target
+eclipse.preferences.version=1
diff --git a/pom.xml b/pom.xml
index a9a434f..d803826 100644
--- a/pom.xml
+++ b/pom.xml
@@ -25,7 +25,7 @@
- 2.4.0
+ 2.5.1
3.0
distro
@@ -43,19 +43,18 @@
-
- xerces
- xercesImpl
- 2.9.1
- provided
-
+ without old Xerces and Xalan version of gCore complaining -->
com.google.gwt
gwt-user
${gwtVersion}
provided
+
+ xalan
+ xalan
+ 2.7.1
+
com.google.gwt
gwt-servlet
@@ -131,29 +130,29 @@
org.gcube.portlets.admin
rmp-common-library
- [1.1.0-SNAPSHOT, 2.0.0-SNAPSHOT)
+ [2.0.0-SNAPSHOT, 3.0.0-SNAPSHOT)
-
- org.gcube.portlets.admin
- ishealth-monitor-widget
- [1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)
-
-
- org.gcube.portlets.admin
- resource-sweeper-widget
- [1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)
-
-
- org.gcube.portlets.admin
- software-upload-wizard
- [1.1.0-SNAPSHOT, 2.0.0-SNAPSHOT)
-
-
- org.gcube.portlets.admin
- activation-record-widgets
- [1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
com.google.inject
@@ -242,7 +241,7 @@
gwt-log
3.1.7
provided
-
+
@@ -255,7 +254,7 @@
org.codehaus.mojo
gwt-maven-plugin
- 2.4.0
+ ${gwtVersion}
@@ -267,10 +266,11 @@
- -Xmx512M -DGLOBUS_LOCATION=${GLOBUS_LOCATION}
+ -Xmx512M -DGLOBUS_LOCATION=${GLOBUS_LOCATION}
+ -classpath $CLASSPATH:${GLOBUS_LOCATION}
ResourceManagementPortlet.html
${webappDirectory}
-
+
diff --git a/src/main/java/org/gcube/portlets/admin/resourcemanagement/client/ResourceManagementPortlet.java b/src/main/java/org/gcube/portlets/admin/resourcemanagement/client/ResourceManagementPortlet.java
index 30dcb79..92250e2 100644
--- a/src/main/java/org/gcube/portlets/admin/resourcemanagement/client/ResourceManagementPortlet.java
+++ b/src/main/java/org/gcube/portlets/admin/resourcemanagement/client/ResourceManagementPortlet.java
@@ -17,10 +17,10 @@
package org.gcube.portlets.admin.resourcemanagement.client;
-import org.gcube.portlets.admin.client.forms.ActivationRecordVMForm;
-import org.gcube.portlets.admin.client.forms.GenericResourceCMForm;
-import org.gcube.portlets.admin.client.forms.GenericResourceTreeManagerForm;
-import org.gcube.portlets.admin.ishealthmonitor.client.dialog.ISMonitor;
+//import org.gcube.portlets.admin.client.forms.ActivationRecordVMForm;
+//import org.gcube.portlets.admin.client.forms.GenericResourceCMForm;
+//import org.gcube.portlets.admin.client.forms.GenericResourceTreeManagerForm;
+//import org.gcube.portlets.admin.ishealthmonitor.client.dialog.ISMonitor;
import org.gcube.portlets.admin.resourcemanagement.client.forms.genericresources.DeployVirtualCollection;
import org.gcube.portlets.admin.resourcemanagement.client.remote.ProxyRegistry;
import org.gcube.portlets.admin.resourcemanagement.client.utils.Commands;
@@ -35,7 +35,7 @@ import org.gcube.portlets.admin.resourcemanagement.client.widgets.panels.MainPan
import org.gcube.portlets.admin.resourcemanagement.client.widgets.registry.UIIdentifiers;
import org.gcube.portlets.admin.resourcemanagement.client.widgets.registry.WidgetsRegistry;
import org.gcube.portlets.admin.resourcemanagement.client.widgets.viewport.MainContainer;
-import org.gcube.portlets.admin.resourcesweeper.client.dialog.SweeperDialog;
+//import org.gcube.portlets.admin.resourcesweeper.client.dialog.SweeperDialog;
import org.gcube.resourcemanagement.support.client.Resource_support;
import org.gcube.resourcemanagement.support.client.events.SetScopeEvent;
import org.gcube.resourcemanagement.support.client.events.SetScopeEventHandler;
@@ -139,7 +139,7 @@ public class ResourceManagementPortlet implements EntryPoint {
// the menu and statusbar can be built.
buildMenu();
buildStatusBar();
- Commands.mask("Loading scopes", UIIdentifiers.MAIN_CONTAINER_VIEWPORT_ID);
+ Commands.mask("Loading infrastructure scopes", UIIdentifiers.MAIN_CONTAINER_VIEWPORT_ID);
Commands.doGetAvailableScopes(this);
if (StatusHandler.getStatus().getCurrentScope() != null) {
@@ -165,7 +165,7 @@ public class ResourceManagementPortlet implements EntryPoint {
viewport.setLayout(bl);
WidgetsRegistry.registerWidget(UIIdentifiers.MAIN_CONTAINER_VIEWPORT_ID, viewport);
- MainPanel northPanel = new MainPanel(53, "Main App", LayoutRegion.NORTH) {
+ MainPanel northPanel = new MainPanel(60, "Main App", LayoutRegion.NORTH) {
@Override
public void init() {
ConsoleMessageBroker.log(this, "Initializing north panel");
@@ -189,11 +189,11 @@ public class ResourceManagementPortlet implements EntryPoint {
}
};
- MainPanel westPanel = new MainPanel(200, "ResourceNavigation", LayoutRegion.WEST) {
+ MainPanel westPanel = new MainPanel(200, "Resources", LayoutRegion.WEST) {
@Override
public void init() {
ConsoleMessageBroker.log(this, "Initializing west panel");
- this.setCollapsible(true);
+ this.setCollapsible(false);
this.setMargins(new Margins(5, 0, 5, 5));
Text widget = new Text();
widget.setId("res-details-widget-fake");
@@ -439,16 +439,16 @@ public class ResourceManagementPortlet implements EntryPoint {
MenuItem testIS = new MenuItem("Check IS Health") {
protected void onClick(final ComponentEvent be) {
- super.onClick(be);
- GWT.runAsync(ISMonitor.class, new RunAsyncCallback() {
- @Override
- public void onSuccess() {
- ISMonitor.pingIS();
- }
- public void onFailure(Throwable reason) {
- Window.alert("There are networks problem, please check your connection.");
- }
- });
+// super.onClick(be);
+// GWT.runAsync(ISMonitor.class, new RunAsyncCallback() {
+// @Override
+// public void onSuccess() {
+// ISMonitor.pingIS();
+// }
+// public void onFailure(Throwable reason) {
+// Window.alert("There are networks problem, please check your connection.");
+// }
+// });
};
};
testIS.setIconStyle("is-icon");
@@ -460,22 +460,22 @@ public class ResourceManagementPortlet implements EntryPoint {
MenuItem cleanGHN = new MenuItem("Resource Sweeper") {
protected void onClick(final ComponentEvent be) {
- super.onClick(be);
- if (SupportedOperations.SWEEP_GHN.isAllowed(StatusHandler.getStatus().getCredentials())) {
- GWT.runAsync(SweeperDialog.class, new RunAsyncCallback() {
- @Override
- public void onSuccess() {
- String currentScope = StatusHandler.getStatus().getCurrentScope();
- new SweeperDialog(currentScope);
- }
-
- public void onFailure(Throwable reason) {
- Window.alert("There are networks problem, please check your connection.");
- }
- });
- }
- else
- MessageBox.alert("Resource Sweeper", "You are not allowed to execute this operation", null);
+// super.onClick(be);
+// if (SupportedOperations.SWEEP_GHN.isAllowed(StatusHandler.getStatus().getCredentials())) {
+// GWT.runAsync(SweeperDialog.class, new RunAsyncCallback() {
+// @Override
+// public void onSuccess() {
+// String currentScope = StatusHandler.getStatus().getCurrentScope();
+// new SweeperDialog(currentScope);
+// }
+//
+// public void onFailure(Throwable reason) {
+// Window.alert("There are networks problem, please check your connection.");
+// }
+// });
+// }
+// else
+// MessageBox.alert("Resource Sweeper", "You are not allowed to execute this operation", null);
};
};
@@ -499,22 +499,22 @@ public class ResourceManagementPortlet implements EntryPoint {
// Create activation record from plugins
MenuItem createARTM = new MenuItem("Activation Record for Tree Manager") {
protected void onClick(final ComponentEvent be) {
- super.onClick(be);
- if (SupportedOperations.GENERIC_RESOURCE_CREATE.isAllowed(StatusHandler.getStatus().getCredentials())) {
- GWT.runAsync(GenericResourceTreeManagerForm.class, new RunAsyncCallback() {
- @Override
- public void onSuccess() {
- String currentScope = StatusHandler.getStatus().getCurrentScope();
- new GenericResourceTreeManagerForm(currentScope).show();
- }
-
- public void onFailure(Throwable reason) {
- Window.alert("There are networks problem, please check your connection.");
- }
- });
- } else {
- MessageBox.alert("Activation Record for TM", "You are not allowed to execute this operation", null);
- }
+// super.onClick(be);
+// if (SupportedOperations.GENERIC_RESOURCE_CREATE.isAllowed(StatusHandler.getStatus().getCredentials())) {
+// GWT.runAsync(GenericResourceTreeManagerForm.class, new RunAsyncCallback() {
+// @Override
+// public void onSuccess() {
+// String currentScope = StatusHandler.getStatus().getCurrentScope();
+// new GenericResourceTreeManagerForm(currentScope).show();
+// }
+//
+// public void onFailure(Throwable reason) {
+// Window.alert("There are networks problem, please check your connection.");
+// }
+// });
+// } else {
+// MessageBox.alert("Activation Record for TM", "You are not allowed to execute this operation", null);
+// }
};
};
createARTM.setIconStyle("pluginTM-icon");
@@ -523,23 +523,23 @@ public class ResourceManagementPortlet implements EntryPoint {
// Create activation record from plugins
MenuItem createACM = new MenuItem("Activation Record for Content Manager") {
protected void onClick(final ComponentEvent be) {
- super.onClick(be);
- if (SupportedOperations.GENERIC_RESOURCE_CREATE.isAllowed(StatusHandler.getStatus().getCredentials())) {
- GWT.runAsync(GenericResourceCMForm.class, new RunAsyncCallback() {
- @Override
- public void onSuccess() {
- String currentScope = StatusHandler.getStatus().getCurrentScope();
- new GenericResourceCMForm(currentScope).show();
- }
-
- public void onFailure(Throwable reason) {
- Window.alert("There are networks problem, please check your connection.");
- }
- });
-
- } else {
- MessageBox.alert("Activation Record for CM", "You are not allowed to execute this operation", null);
- }
+// super.onClick(be);
+// if (SupportedOperations.GENERIC_RESOURCE_CREATE.isAllowed(StatusHandler.getStatus().getCredentials())) {
+// GWT.runAsync(GenericResourceCMForm.class, new RunAsyncCallback() {
+// @Override
+// public void onSuccess() {
+// String currentScope = StatusHandler.getStatus().getCurrentScope();
+// new GenericResourceCMForm(currentScope).show();
+// }
+//
+// public void onFailure(Throwable reason) {
+// Window.alert("There are networks problem, please check your connection.");
+// }
+// });
+//
+// } else {
+// MessageBox.alert("Activation Record for CM", "You are not allowed to execute this operation", null);
+// }
};
};
createACM.setIconStyle("pluginCM-icon");
@@ -548,24 +548,24 @@ public class ResourceManagementPortlet implements EntryPoint {
// Create activation record from VM
MenuItem createVM = new MenuItem("Activation Record for View Manager") {
protected void onClick(final ComponentEvent be) {
- super.onClick(be);
- if (SupportedOperations.GENERIC_RESOURCE_CREATE.isAllowed(StatusHandler.getStatus().getCredentials())) {
- //MessageBox.alert("Activation Record for VM", "Operation not implemented yet.", null);
-
- GWT.runAsync(ActivationRecordVMForm.class, new RunAsyncCallback() {
- @Override
- public void onSuccess() {
- String currentScope = StatusHandler.getStatus().getCurrentScope();
- new ActivationRecordVMForm(currentScope).show();
- }
-
- public void onFailure(Throwable reason) {
- Window.alert("There are networks problem, please check your connection.");
- }
- });
- } else {
- MessageBox.alert("Activation Record for VM", "You are not allowed to execute this operation", null);
- }
+// super.onClick(be);
+// if (SupportedOperations.GENERIC_RESOURCE_CREATE.isAllowed(StatusHandler.getStatus().getCredentials())) {
+// //MessageBox.alert("Activation Record for VM", "Operation not implemented yet.", null);
+//
+// GWT.runAsync(ActivationRecordVMForm.class, new RunAsyncCallback() {
+// @Override
+// public void onSuccess() {
+// String currentScope = StatusHandler.getStatus().getCurrentScope();
+// new ActivationRecordVMForm(currentScope).show();
+// }
+//
+// public void onFailure(Throwable reason) {
+// Window.alert("There are networks problem, please check your connection.");
+// }
+// });
+// } else {
+// MessageBox.alert("Activation Record for VM", "You are not allowed to execute this operation", null);
+// }
};
};
createVM.setIconStyle("pluginVM-icon");
diff --git a/src/main/java/org/gcube/portlets/admin/resourcemanagement/client/utils/Commands.java b/src/main/java/org/gcube/portlets/admin/resourcemanagement/client/utils/Commands.java
index d2b263c..b94c684 100644
--- a/src/main/java/org/gcube/portlets/admin/resourcemanagement/client/utils/Commands.java
+++ b/src/main/java/org/gcube/portlets/admin/resourcemanagement/client/utils/Commands.java
@@ -207,7 +207,7 @@ public class Commands {
StatusHandler.getStatus().setCurrentScope(scope);
StatusHandler.getStatus().setCurrentResourceType(resourceType);
Commands.mask(
- "Getting Profile Details for " + resourceType + ": " + resourceID,
+ "Getting Profile Details for " + FWSTranslate.getFWSNameFromLabel(resourceType) + ": " + resourceID,
WidgetsRegistry.getPanel(UIIdentifiers.RESOURCE_DETAIL_GRID_PANEL).getContainer()
);
ProxyRegistry.getProxyInstance().getResourceByID(
diff --git a/src/main/java/org/gcube/portlets/admin/resourcemanagement/client/utils/FWSTranslate.java b/src/main/java/org/gcube/portlets/admin/resourcemanagement/client/utils/FWSTranslate.java
new file mode 100644
index 0000000..7ae6bb6
--- /dev/null
+++ b/src/main/java/org/gcube/portlets/admin/resourcemanagement/client/utils/FWSTranslate.java
@@ -0,0 +1,23 @@
+package org.gcube.portlets.admin.resourcemanagement.client.utils;
+
+import org.gcube.resourcemanagement.support.client.views.ResourceTypeDecorator;
+/**
+ * Simply return the correspondant Feather Weight Stack label to the gCore Label
+ * @author Massimiliano Assante (ISTI-CNR)
+ *
+ */
+public class FWSTranslate {
+ /**
+ *
+ * @param gCoreLabel
+ * @return the Feather Weight Stack label if present, the same label otherwise
+ */
+ public static String getFWSNameFromLabel(String gCoreLabel) {
+ ResourceTypeDecorator[] toCheck = ResourceTypeDecorator.values();
+ for (int i = 0; i < toCheck.length; i++) {
+ if (gCoreLabel.compareTo(toCheck[i].name()) == 0)
+ return toCheck[i].getFWSName();
+ }
+ return gCoreLabel;
+ }
+}
diff --git a/src/main/java/org/gcube/portlets/admin/resourcemanagement/client/views/resourcedetails/ResourceDetailsPanel.java b/src/main/java/org/gcube/portlets/admin/resourcemanagement/client/views/resourcedetails/ResourceDetailsPanel.java
index b15d258..f75bc39 100644
--- a/src/main/java/org/gcube/portlets/admin/resourcemanagement/client/views/resourcedetails/ResourceDetailsPanel.java
+++ b/src/main/java/org/gcube/portlets/admin/resourcemanagement/client/views/resourcedetails/ResourceDetailsPanel.java
@@ -25,7 +25,7 @@ import org.gcube.portlets.admin.resourcemanagement.client.utils.OpCommands;
import org.gcube.portlets.admin.resourcemanagement.client.widgets.console.ConsoleMessageBroker;
import org.gcube.portlets.admin.resourcemanagement.client.widgets.registry.UIIdentifiers;
import org.gcube.portlets.admin.resourcemanagement.client.widgets.registry.WidgetsRegistry;
-import org.gcube.portlets.admin.software_upload_wizard.client.AppController;
+//import org.gcube.portlets.admin.software_upload_wizard.client.AppController;
import org.gcube.resourcemanagement.support.client.utils.StatusHandler;
import org.gcube.resourcemanagement.support.client.views.ResourceTypeDecorator;
import org.gcube.resourcemanagement.support.shared.operations.SupportedOperations;
@@ -108,7 +108,8 @@ public class ResourceDetailsPanel {
*/
public final void init() {
this.rootPanel = new ContentPanel(new FitLayout());
- this.rootPanel.setHeading("Resource Details");
+ // this.rootPanel.setHeading("Resource Details");
+ this.rootPanel.setHeaderVisible(false);
this.widget.setId("res-details-widget-fake");
this.widget.setStyleName("x-panel-cube-background");
@@ -322,24 +323,24 @@ public class ResourceDetailsPanel {
this.getToolBar().add(new SeparatorToolItem());
ToolButton doAddSoftware = new ToolButton("add-software-icon") {
protected void onClick(final ComponentEvent be) {
- super.onClick(be);
-
-
- GWT.runAsync(AppController.class, new RunAsyncCallback() {
- @Override
- public void onSuccess() {
- String currentScope = StatusHandler.getStatus().getCurrentScope();
- HandlerManager eventBus = new HandlerManager(null);
- AppController appViewer = new AppController(eventBus, currentScope);
- //AppController appViewer = new AppController(eventBus);
- appViewer.go();
- }
-
- public void onFailure(Throwable reason) {
- Window.alert("There are networks problem, please check your connection.");
- }
-
- });
+// super.onClick(be);
+//
+//
+// GWT.runAsync(AppController.class, new RunAsyncCallback() {
+// @Override
+// public void onSuccess() {
+// String currentScope = StatusHandler.getStatus().getCurrentScope();
+// HandlerManager eventBus = new HandlerManager(null);
+// AppController appViewer = new AppController(eventBus, currentScope);
+// //AppController appViewer = new AppController(eventBus);
+// appViewer.go();
+// }
+//
+// public void onFailure(Throwable reason) {
+// Window.alert("There are networks problem, please check your connection.");
+// }
+//
+// });
};
};
@@ -352,7 +353,7 @@ public class ResourceDetailsPanel {
public final void setGrid(final Grid grid, final boolean groupingEnabled) {
// Sets the grid container title
- this.rootPanel.setHeading("Resource Details (" + StatusHandler.getStatus().getCurrentResourceType() + ")");
+ //this.rootPanel.setHeading("Resource Details (" + StatusHandler.getStatus().getCurrentResourceType() + ")");
this.initToolbar();
diff --git a/src/main/java/org/gcube/portlets/admin/resourcemanagement/client/views/resourcetree/ResourcesTreePanel.java b/src/main/java/org/gcube/portlets/admin/resourcemanagement/client/views/resourcetree/ResourcesTreePanel.java
index bcf9bc5..c7a4741 100644
--- a/src/main/java/org/gcube/portlets/admin/resourcemanagement/client/views/resourcetree/ResourcesTreePanel.java
+++ b/src/main/java/org/gcube/portlets/admin/resourcemanagement/client/views/resourcetree/ResourcesTreePanel.java
@@ -115,7 +115,8 @@ public class ResourcesTreePanel {
try {
icon = ResourceTypeDecorator.valueOf(type).getIcon();
- label = ResourceTypeDecorator.valueOf(type).getLabel();
+ label = ResourceTypeDecorator.valueOf(type).getFWSName();
+ //label = ResourceTypeDecorator.valueOf(type).getLabel();
} catch (java.lang.IllegalArgumentException e) {
label = type;
icon = null;
diff --git a/src/main/java/org/gcube/portlets/admin/resourcemanagement/client/widgets/panels/MainPanel.java b/src/main/java/org/gcube/portlets/admin/resourcemanagement/client/widgets/panels/MainPanel.java
index 42ee844..b391099 100644
--- a/src/main/java/org/gcube/portlets/admin/resourcemanagement/client/widgets/panels/MainPanel.java
+++ b/src/main/java/org/gcube/portlets/admin/resourcemanagement/client/widgets/panels/MainPanel.java
@@ -37,6 +37,7 @@ public abstract class MainPanel {
};
};
this.setSplit(true);
+ container.setHeaderVisible(false);
}
public MainPanel(final int size, final LayoutRegion position) {
@@ -78,6 +79,7 @@ public abstract class MainPanel {
public final void setSplit(final boolean split) {
this.layout.setSplit(split);
}
+
public final void add(final Widget w, final boolean removeOthers) {
if (removeOthers) {
diff --git a/src/main/java/org/gcube/portlets/admin/resourcemanagement/client/widgets/taskbar/TaskbarButton.java b/src/main/java/org/gcube/portlets/admin/resourcemanagement/client/widgets/taskbar/TaskbarButton.java
index 9c4206c..5dcbc78 100644
--- a/src/main/java/org/gcube/portlets/admin/resourcemanagement/client/widgets/taskbar/TaskbarButton.java
+++ b/src/main/java/org/gcube/portlets/admin/resourcemanagement/client/widgets/taskbar/TaskbarButton.java
@@ -16,6 +16,8 @@
package org.gcube.portlets.admin.resourcemanagement.client.widgets.taskbar;
+import org.gcube.portlets.admin.resourcemanagement.client.utils.FWSTranslate;
+
import com.extjs.gxt.ui.client.core.El;
import com.extjs.gxt.ui.client.event.ComponentEvent;
import com.extjs.gxt.ui.client.event.Events;
@@ -150,7 +152,7 @@ public class TaskbarButton extends Component implements IconSupport {
String fontStyle = "font-family:'Reenie Beanie',arial,sans-serif; font-size:20px; padding: 5px; overflow-x: hidden; overflow-y: hidden;";
setElement(DOM.createElement("dt"), target, index);
El a = el().createChild("");
- iconEl = a.createChild(""+type+"
");
+ iconEl = a.createChild(""+FWSTranslate.getFWSNameFromLabel(type)+"
");
El txt = a.createChild("");
String toShow = "";
if (text.length() / splitTextTo > 0) {
diff --git a/src/main/java/org/gcube/portlets/admin/resourcemanagement/client/widgets/taskbar/TaskbarItem.java b/src/main/java/org/gcube/portlets/admin/resourcemanagement/client/widgets/taskbar/TaskbarItem.java
index e76701a..b4b6f2e 100644
--- a/src/main/java/org/gcube/portlets/admin/resourcemanagement/client/widgets/taskbar/TaskbarItem.java
+++ b/src/main/java/org/gcube/portlets/admin/resourcemanagement/client/widgets/taskbar/TaskbarItem.java
@@ -62,9 +62,8 @@ public class TaskbarItem {
return this.scope;
}
- private void initUI(final String title,
- final String id,
- final String buttonIcon) {
+ private void initUI(final String title, final String id,final String buttonIcon) {
+
this.detachButton = new TaskbarButton("btn" + id, ""+type, title) {
protected void onClick(final com.extjs.gxt.ui.client.event.ComponentEvent ce) {
relatedWidget.doMinimize();
diff --git a/src/main/java/org/gcube/portlets/admin/resourcemanagement/server/ResourceCommands.java b/src/main/java/org/gcube/portlets/admin/resourcemanagement/server/ResourceCommands.java
index 5504115..9e1f32c 100644
--- a/src/main/java/org/gcube/portlets/admin/resourcemanagement/server/ResourceCommands.java
+++ b/src/main/java/org/gcube/portlets/admin/resourcemanagement/server/ResourceCommands.java
@@ -19,15 +19,13 @@ package org.gcube.portlets.admin.resourcemanagement.server;
import java.util.List;
import org.gcube.common.core.scope.GCUBEScope;
-
-
+import org.gcube.common.scope.impl.ScopeBean;
import org.gcube.resourcemanagement.support.client.utils.CurrentStatus;
import org.gcube.resourcemanagement.support.shared.util.Assertion;
import org.gcube.resourcemanagement.support.server.managers.resources.CollectionManager;
import org.gcube.resourcemanagement.support.server.managers.resources.GHNManager;
import org.gcube.resourcemanagement.support.server.managers.resources.GenericResourceManager;
import org.gcube.resourcemanagement.support.server.managers.resources.RuntimeResourceManager;
-import org.gcube.resourcemanagement.support.server.managers.resources.ViewManager;
import org.gcube.resourcemanagement.support.server.managers.scope.ScopeManager;
import org.gcube.resourcemanagement.support.server.types.AllowedResourceTypes;
import org.gcube.resourcemanagement.support.server.utils.ServerConsole;
@@ -61,7 +59,7 @@ public class ResourceCommands {
checker.validate(opCode.isAllowed(status.getCredentials()),
new InvalidParameterException("The current user is not allowed to execute the operation."));
- GCUBEScope gscope = ScopeManager.getScope(scope);
+ ScopeBean gscope = new ScopeBean(scope);
/**********************************************************
* GHN
@@ -182,24 +180,24 @@ public class ResourceCommands {
/**********************************************************
* VIEW
*********************************************************/
- // DELETE
- if (opCode.equals(SupportedOperations.VIEW_DELETE)) {
- for (ResourceDescriptor resource : resources) {
- checker.validate(
- resource.getType().equals(AllowedResourceTypes.VIEW.name()),
- new InvalidParameterException("Invalid type. " + AllowedResourceTypes.VIEW.name() + " required"));
- new ViewManager(resource.getID()).delete(gscope);
- }
- }
- // DELETE
- if (opCode.equals(SupportedOperations.VIEW_FORCE_DELETE)) {
- for (ResourceDescriptor resource : resources) {
- checker.validate(
- resource.getType().equals(AllowedResourceTypes.VIEW.name()),
- new InvalidParameterException("Invalid type. " + AllowedResourceTypes.VIEW.name() + " required"));
- new ViewManager(resource.getID()).forceDelete(gscope);
- }
- }
+// // DELETE
+// if (opCode.equals(SupportedOperations.VIEW_DELETE)) {
+// for (ResourceDescriptor resource : resources) {
+// checker.validate(
+// resource.getType().equals(AllowedResourceTypes.VIEW.name()),
+// new InvalidParameterException("Invalid type. " + AllowedResourceTypes.VIEW.name() + " required"));
+// new ViewManager(resource.getID()).delete(gscope);
+// }
+// }
+// // DELETE
+// if (opCode.equals(SupportedOperations.VIEW_FORCE_DELETE)) {
+// for (ResourceDescriptor resource : resources) {
+// checker.validate(
+// resource.getType().equals(AllowedResourceTypes.VIEW.name()),
+// new InvalidParameterException("Invalid type. " + AllowedResourceTypes.VIEW.name() + " required"));
+// new ViewManager(resource.getID()).forceDelete(gscope);
+// }
+// }
/**********************************************************
* RUNNING INSTANCE
diff --git a/src/main/java/org/gcube/portlets/admin/resourcemanagement/server/ServiceProxyImpl.java b/src/main/java/org/gcube/portlets/admin/resourcemanagement/server/ServiceProxyImpl.java
index 3b1e1ad..aa82529 100644
--- a/src/main/java/org/gcube/portlets/admin/resourcemanagement/server/ServiceProxyImpl.java
+++ b/src/main/java/org/gcube/portlets/admin/resourcemanagement/server/ServiceProxyImpl.java
@@ -32,6 +32,7 @@ import org.gcube.common.core.informationsystem.client.QueryParameter;
import org.gcube.common.core.informationsystem.client.XMLResult;
import org.gcube.common.core.informationsystem.client.queries.GCUBEGenericQuery;
import org.gcube.common.core.scope.GCUBEScope;
+import org.gcube.common.scope.impl.ScopeBean;
import org.gcube.portlets.admin.resourcemanagement.client.remote.ServiceProxy;
import org.gcube.portlets.admin.resourcemanagement.server.gcube.services.StatusHandler;
import org.gcube.portlets.admin.resourcemanagement.server.gcube.services.configuration.ConfigurationLoader;
@@ -55,6 +56,7 @@ import org.gcube.resourcemanagement.support.shared.types.UserGroup;
import org.gcube.resourcemanagement.support.shared.types.datamodel.CompleteResourceProfile;
import org.gcube.resourcemanagement.support.shared.types.datamodel.ResourceDescriptor;
import org.gcube.resourcemanagement.support.shared.util.Assertion;
+import org.gcube.vremanagement.resourcemanager.client.RMReportingLibrary;
import org.gcube.vremanagement.resourcemanager.stubs.reporting.ReportingPortType;
import com.google.gwt.core.client.GWT;
@@ -158,16 +160,16 @@ public class ServiceProxyImpl extends RemoteServiceServlet implements ServicePro
checker.validate(scope != null && scope.trim().length() > 0, new Exception("Invalid parameter type"));
AllowedResourceTypes type = AllowedResourceTypes.valueOf(resType);
- GCUBEScope targetScope = ScopeManager.getScope(scope);
- GCUBEScope sourceScope = ScopeManager.getScope(status.getCurrentScope());
+ ScopeBean targetScope = new ScopeBean(scope);
+ ScopeBean sourceScope = new ScopeBean(status.getCurrentScope());
String reportID = ManagementUtils.addToExistingScope(type,
resourceIDs.toArray(new String[]{}),
sourceScope,
targetScope);
- ReportingPortType manager =
- ResourceFactory.createResourceManager(type).getReportResourceManager(targetScope);
+ RMReportingLibrary manager =
+ ResourceFactory.createResourceManager(type).getReportResourceManager(targetScope.toString());
String xmlReport = manager.getReport(reportID);
String mappingPath = this.getXML2HTMLMapping();
@@ -197,8 +199,8 @@ public class ServiceProxyImpl extends RemoteServiceServlet implements ServicePro
checker.validate(scope != null && scope.trim().length() > 0, new Exception("Invalid parameter type"));
AllowedResourceTypes type = AllowedResourceTypes.valueOf(resType);
- GCUBEScope targetScope = ScopeManager.getScope(scope);
- GCUBEScope sourceScope = ScopeManager.getScope(status.getCurrentScope());
+ ScopeBean targetScope = new ScopeBean(scope);
+ ScopeBean sourceScope = new ScopeBean(status.getCurrentScope());
return new Tuple(ManagementUtils.removeFromExistingScope(type,
resourceIDs.toArray(new String[]{}),
@@ -208,7 +210,7 @@ public class ServiceProxyImpl extends RemoteServiceServlet implements ServicePro
public final String deploy(final List ghnsID, final List servicesID) throws Exception {
try {
- GCUBEScope sourceScope = ScopeManager.getScope(this.getCurrentStatus().getCurrentScope());
+ ScopeBean sourceScope = new ScopeBean(this.getCurrentStatus().getCurrentScope());
String[] param1 = ghnsID.toArray(new String[0]);
String[] param2 = servicesID.toArray(new String[0]);
return ManagementUtils.deploy(sourceScope, param1, param2);
@@ -221,8 +223,8 @@ public class ServiceProxyImpl extends RemoteServiceServlet implements ServicePro
public final Tuple checkDeployStatus(final String scope, final String deployID) throws Exception {
if (SupportedOperations.SERVICE_GET_REPORT.isAllowed(this.getCurrentStatus().getCredentials())) {
GCUBEScope sourceScope = ScopeManager.getScope(scope);
- ReportingPortType manager =
- ResourceFactory.createResourceManager(AllowedResourceTypes.Service).getReportResourceManager(sourceScope);
+ RMReportingLibrary manager =
+ ResourceFactory.createResourceManager(AllowedResourceTypes.Service).getReportResourceManager(sourceScope.toString());
String xmlReport = manager.getReport(deployID);
String mappingPath = this.getXML2HTMLMapping();
String htmlReport = ISClientRequester.XML2HTML(xmlReport, mappingPath);
@@ -273,7 +275,7 @@ public class ServiceProxyImpl extends RemoteServiceServlet implements ServicePro
public final HashMap> getResourceTypeTree(final String scope) throws Exception {
try {
- GCUBEScope gscope = ScopeManager.getScope(scope);
+ ScopeBean gscope = new ScopeBean(scope);
HashMap> results = ISClientRequester.getResourcesTree(getCacheManager(this.getCurrentStatus()), gscope);
return results;
} catch (Exception e) {
@@ -289,7 +291,7 @@ public class ServiceProxyImpl extends RemoteServiceServlet implements ServicePro
getCacheManager(this.getCurrentStatus()),
type,
id,
- ScopeManager.getScope(scope)
+ new ScopeBean(scope)
);
} catch (Exception e) {
ServerConsole.error(LOG_PREFIX, e);
@@ -302,7 +304,7 @@ public class ServiceProxyImpl extends RemoteServiceServlet implements ServicePro
try {
return ISClientRequester.getResourcesByType(
getCacheManager(this.getCurrentStatus()),
- ScopeManager.getScope(scope), type, null);
+ new ScopeBean(scope), type, null);
} catch (Exception e) {
ServerConsole.error(LOG_PREFIX, e);
return null;
@@ -380,13 +382,13 @@ public class ServiceProxyImpl extends RemoteServiceServlet implements ServicePro
if (scope == null || type == null) {
return null;
}
- return ISClientRequester.getResourceModels(ScopeManager.getScope(scope), type, subType, additionalMaps);
+ return ISClientRequester.getResourceModels(new ScopeBean(scope), type, subType, additionalMaps);
}
public final List getWSResources(final String scope) {
try {
- return ISClientRequester.getWSResources(ScopeManager.getScope(scope));
+ return ISClientRequester.getWSResources(new ScopeBean(scope));
} catch (Exception e) {
ServerConsole.error(LOG_PREFIX, e);
return null;
@@ -397,7 +399,7 @@ public class ServiceProxyImpl extends RemoteServiceServlet implements ServicePro
try {
return ISClientRequester.getResourcesByType(
getCacheManager(this.getCurrentStatus()),
- ScopeManager.getScope(scope), type, subtype);
+ new ScopeBean(scope), type, subtype);
} catch (Exception e) {
ServerConsole.error(LOG_PREFIX, e);
return null;
@@ -406,16 +408,14 @@ public class ServiceProxyImpl extends RemoteServiceServlet implements ServicePro
public final CompleteResourceProfile getResourceByID(final String scope, final String type, final String resID) {
try {
- CompleteResourceProfile profile = ISClientRequester.getResourceByID(
- this.getXML2HTMLMapping(),
- ScopeManager.getScope(scope),
- type,
- resID);
+ CompleteResourceProfile profile = ISClientRequester.getResourceByID(this.getXML2HTMLMapping(), new ScopeBean(scope), type, resID);
+ System.out.println("CompleteResourceProfile getResourceByID(final String scope, final String type, final String resID)");
return profile;
} catch (Exception e) {
ServerConsole.error(LOG_PREFIX, e);
return null;
}
+
}
public final String createGenericResource(
@@ -433,7 +433,7 @@ public class ServiceProxyImpl extends RemoteServiceServlet implements ServicePro
return GenericResourceManager.create(
ID,
- ScopeManager.getScope(this.getCurrentStatus().getCurrentScope()),
+ new ScopeBean(this.getCurrentStatus().getCurrentScope()),
name,
description,
body,
@@ -453,7 +453,7 @@ public class ServiceProxyImpl extends RemoteServiceServlet implements ServicePro
SupportedOperations.GENERIC_RESOURCE_EDIT.isAllowed(this.getCurrentStatus().getCredentials()),
new InvalidPermissionsException("The user is not allowed to execute the following operation"));
- GCUBEScope sourceScope = ScopeManager.getScope(this.getCurrentStatus().getCurrentScope());
+ ScopeBean sourceScope = new ScopeBean(this.getCurrentStatus().getCurrentScope());
GenericResourceManager resource = new GenericResourceManager(ID);
resource.update(name, description, body, subType, sourceScope);
}
diff --git a/src/main/resources/org/gcube/portlets/admin/resourcemanagement/ResourceManagementPortlet.gwt.xml b/src/main/resources/org/gcube/portlets/admin/resourcemanagement/ResourceManagementPortlet.gwt.xml
index d6d4126..5bff73d 100644
--- a/src/main/resources/org/gcube/portlets/admin/resourcemanagement/ResourceManagementPortlet.gwt.xml
+++ b/src/main/resources/org/gcube/portlets/admin/resourcemanagement/ResourceManagementPortlet.gwt.xml
@@ -8,15 +8,13 @@
-
+
-
+
-
+
-
+
-
- sweeperServlet
- org.gcube.portlets.admin.resourcesweeper.server.SweeperServiceImpl
-
+
+
+
+
-
- sweeperServlet
- /resourcemanagementportlet/sweeper
-
+
+
+
+
-
- guiceFilter
- com.google.inject.servlet.GuiceFilter
-
-
- guiceFilter
- /*
-
-
- org.gcube.portlets.admin.software_upload_wizard.server.BootstrapListener
-
+
+
+
+
+
+
+
+
+
+
+
-
- isHealthServlet
- org.gcube.portlets.admin.ishealthmonitor.server.ISMonitorServiceImpl
-
+
+
+
+
-
- isHealthServlet
- /resourcemanagementportlet/ishealth
-
+
+
+
+
-
- arServlet
- org.gcube.portlets.admin.server.ARServiceImpl
-
+
+
+
+
-
- arServlet
- /resourcemanagementportlet/activeservice
-
+
+
+
+
diff --git a/src/main/webapp/conf/resourcemanagement.properties b/src/main/webapp/conf/resourcemanagement.properties
index 9fb8d3d..6e268cd 100644
--- a/src/main/webapp/conf/resourcemanagement.properties
+++ b/src/main/webapp/conf/resourcemanagement.properties
@@ -6,12 +6,12 @@ USER_CREDENTIALS = DEBUG
# Defines the modality in which the portlet is running
# possible values [STANDALONE,PORTAL,NOTDEFINED]
-RUNNING_MODE = PORTAL
+RUNNING_MODE = STANDALONE
DEFAULT_USER = massimiliano.assante
# The scope that will be used as default
-DEFAULT_SCOPE =/d4science.research-infrastructures.eu
+DEFAULT_SCOPE =/d4science.research-infrastructures.eu/gCubeApps
# the target of update notification (if in singleton mode)
# mails MUST be separated by ;
USERMAIL_TO = m.assante@gmail.com
diff --git a/src/main/webapp/d4scienceOrg.css b/src/main/webapp/d4scienceOrg.css
index d58ab98..1157c3d 100644
--- a/src/main/webapp/d4scienceOrg.css
+++ b/src/main/webapp/d4scienceOrg.css
@@ -1,10 +1,58 @@
#wrapper {
- font: 11px/1.5 "Lucida Grande", "Lucida Sans Unicode", Arial, Verdana, sans-serif;
+ font: 11px/1.5 "Lucida Grande", "Lucida Sans Unicode", Arial, Verdana,
+ sans-serif;
margin: 0 auto;
- width: 90% !important;
+ width: 92% !important;
}
-#bottombar {
- margin: 0 auto;
- width: 100% !important;
+.x-menubar {
+ background: #FFF url(images/bg-pattern.png) repeat;
}
+
+.x-panel-body-noheader {
+ border-radius: 5px;
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+}
+
+.x-border-layout-ct {
+ background-color: transparent;
+ border-color: transparent;
+}
+
+.x-toolbar {
+ border-color: #226599;
+ background: #FFF url(images/bg-pattern.png) repeat;
+}
+
+.x-panel-header {
+ background: #FFF url(images/bg-pattern.png) repeat;
+}
+
+.x-toolbar .xtb-sep {
+ background-image: none !important;
+ background-color: transparent;
+}
+
+.x-accordion-hd {
+ background-position: 0 0px;
+}
+
+.x-status-text {
+ color: #226599;
+ font-weight: bold !important;
+}
+
+.x-status-text-panel {
+ border-color: transparent;
+}
+
+.x-component {
+ color: #226599;
+}
+
+.x-btn button {
+ color: #226599;
+ font-weight: bold !important;
+
+}
\ No newline at end of file
diff --git a/src/main/webapp/images/D4infraFWS.png b/src/main/webapp/images/D4infraFWS.png
new file mode 100644
index 0000000..7162c8b
Binary files /dev/null and b/src/main/webapp/images/D4infraFWS.png differ
diff --git a/src/main/webapp/images/bg-pattern.png b/src/main/webapp/images/bg-pattern.png
new file mode 100644
index 0000000..d9ca94b
Binary files /dev/null and b/src/main/webapp/images/bg-pattern.png differ
diff --git a/src/main/webapp/images/icons/GenericResource.png b/src/main/webapp/images/icons/GenericResource.png
new file mode 100644
index 0000000..c9348a2
Binary files /dev/null and b/src/main/webapp/images/icons/GenericResource.png differ
diff --git a/src/main/webapp/images/icons/collection2.png b/src/main/webapp/images/icons/collection2.png
new file mode 100644
index 0000000..9866da1
Binary files /dev/null and b/src/main/webapp/images/icons/collection2.png differ
diff --git a/src/main/webapp/images/icons/gcoreEndpoint.png b/src/main/webapp/images/icons/gcoreEndpoint.png
new file mode 100644
index 0000000..7f348ab
Binary files /dev/null and b/src/main/webapp/images/icons/gcoreEndpoint.png differ
diff --git a/src/main/webapp/images/icons/hostingNode.png b/src/main/webapp/images/icons/hostingNode.png
new file mode 100644
index 0000000..71059ba
Binary files /dev/null and b/src/main/webapp/images/icons/hostingNode.png differ
diff --git a/src/main/webapp/images/icons/server.png b/src/main/webapp/images/icons/server.png
deleted file mode 100644
index 720a237..0000000
Binary files a/src/main/webapp/images/icons/server.png and /dev/null differ
diff --git a/src/main/webapp/images/icons/serviceEndpoint.png b/src/main/webapp/images/icons/serviceEndpoint.png
new file mode 100644
index 0000000..bc360a4
Binary files /dev/null and b/src/main/webapp/images/icons/serviceEndpoint.png differ
diff --git a/src/main/webapp/images/icons/software.png b/src/main/webapp/images/icons/software.png
new file mode 100644
index 0000000..16fd082
Binary files /dev/null and b/src/main/webapp/images/icons/software.png differ
diff --git a/src/test/java/org/gcube/portlets/admin/resourcemanagement/client/GwtTestResourceManagementPortlet.java b/src/test/java/org/gcube/portlets/admin/resourcemanagement/client/GwtTestResourceManagementPortlet.java
index 4a25839..9587b39 100644
--- a/src/test/java/org/gcube/portlets/admin/resourcemanagement/client/GwtTestResourceManagementPortlet.java
+++ b/src/test/java/org/gcube/portlets/admin/resourcemanagement/client/GwtTestResourceManagementPortlet.java
@@ -1,6 +1,5 @@
package org.gcube.portlets.admin.resourcemanagement.client;
-import com.google.gwt.junit.client.GWTTestCase;
/**
* GWT JUnit integration tests must extend GWTTestCase.
@@ -12,7 +11,7 @@ import com.google.gwt.junit.client.GWTTestCase;
* See http://mojo.codehaus.org/gwt-maven-plugin/user-guide/testing.html
* for details.
*/
-public class GwtTestResourceManagementPortlet extends GWTTestCase {
+public class GwtTestResourceManagementPortlet {
/**
* Must refer to a valid module that sources this class.