in the way to the FWS, 50 percent ported so far
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/admin/resource-management@81277 82a268e6-3cf1-43bd-a215-b396298e98cf
|
@ -34,5 +34,6 @@
|
||||||
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
|
<classpathentry kind="con" path="com.google.gwt.eclipse.core.GWT_CONTAINER"/>
|
||||||
<classpathentry kind="output" path="target/resource-management-4.1.0-SNAPSHOT/WEB-INF/classes"/>
|
<classpathentry kind="output" path="target/resource-management-4.1.0-SNAPSHOT/WEB-INF/classes"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
|
|
@ -4,6 +4,9 @@
|
||||||
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
|
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
|
||||||
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
||||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||||
|
<dependent-module archiveName="rmp-common-library-2.0.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/rmp-common-library/rmp-common-library">
|
||||||
|
<dependency-type>uses</dependency-type>
|
||||||
|
</dependent-module>
|
||||||
<property name="java-output-path" value="/${module}/target/www/WEB-INF/classes"/>
|
<property name="java-output-path" value="/${module}/target/www/WEB-INF/classes"/>
|
||||||
<property name="context-root" value="resource-management"/>
|
<property name="context-root" value="resource-management"/>
|
||||||
</wb-module>
|
</wb-module>
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
disabled=06target
|
||||||
|
eclipse.preferences.version=1
|
64
pom.xml
|
@ -25,7 +25,7 @@
|
||||||
</scm>
|
</scm>
|
||||||
<properties>
|
<properties>
|
||||||
<!-- Convenience property to set the GWT version -->
|
<!-- Convenience property to set the GWT version -->
|
||||||
<gwtVersion>2.4.0</gwtVersion>
|
<gwtVersion>2.5.1</gwtVersion>
|
||||||
<guice.version>3.0</guice.version>
|
<guice.version>3.0</guice.version>
|
||||||
<distroDirectory>distro</distroDirectory>
|
<distroDirectory>distro</distroDirectory>
|
||||||
<!-- GWT needs at least java 1.6 -->
|
<!-- GWT needs at least java 1.6 -->
|
||||||
|
@ -43,19 +43,18 @@
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
||||||
<!-- This dependency is needed and is need on TOP to use GWT UI BInder
|
<!-- This dependency is needed and is need on TOP to use GWT UI BInder
|
||||||
without old Xerces version of gCore complaining -->
|
without old Xerces and Xalan version of gCore complaining -->
|
||||||
<dependency>
|
|
||||||
<groupId>xerces</groupId>
|
|
||||||
<artifactId>xercesImpl</artifactId>
|
|
||||||
<version>2.9.1</version>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.gwt</groupId>
|
<groupId>com.google.gwt</groupId>
|
||||||
<artifactId>gwt-user</artifactId>
|
<artifactId>gwt-user</artifactId>
|
||||||
<version>${gwtVersion}</version>
|
<version>${gwtVersion}</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>xalan</groupId>
|
||||||
|
<artifactId>xalan</artifactId>
|
||||||
|
<version>2.7.1</version>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.gwt</groupId>
|
<groupId>com.google.gwt</groupId>
|
||||||
<artifactId>gwt-servlet</artifactId>
|
<artifactId>gwt-servlet</artifactId>
|
||||||
|
@ -131,29 +130,29 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.portlets.admin</groupId>
|
<groupId>org.gcube.portlets.admin</groupId>
|
||||||
<artifactId>rmp-common-library</artifactId>
|
<artifactId>rmp-common-library</artifactId>
|
||||||
<version>[1.1.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
|
<version>[2.0.0-SNAPSHOT, 3.0.0-SNAPSHOT)</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- External Modules -->
|
<!-- External Modules -->
|
||||||
<dependency>
|
<!-- <dependency> -->
|
||||||
<groupId>org.gcube.portlets.admin</groupId>
|
<!-- <groupId>org.gcube.portlets.admin</groupId> -->
|
||||||
<artifactId>ishealth-monitor-widget</artifactId>
|
<!-- <artifactId>ishealth-monitor-widget</artifactId> -->
|
||||||
<version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
|
<!-- <version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version> -->
|
||||||
</dependency>
|
<!-- </dependency> -->
|
||||||
<dependency>
|
<!-- <dependency> -->
|
||||||
<groupId>org.gcube.portlets.admin</groupId>
|
<!-- <groupId>org.gcube.portlets.admin</groupId> -->
|
||||||
<artifactId>resource-sweeper-widget</artifactId>
|
<!-- <artifactId>resource-sweeper-widget</artifactId> -->
|
||||||
<version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
|
<!-- <version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version> -->
|
||||||
</dependency>
|
<!-- </dependency> -->
|
||||||
<dependency>
|
<!-- <dependency> -->
|
||||||
<groupId>org.gcube.portlets.admin</groupId>
|
<!-- <groupId>org.gcube.portlets.admin</groupId> -->
|
||||||
<artifactId>software-upload-wizard</artifactId>
|
<!-- <artifactId>software-upload-wizard</artifactId> -->
|
||||||
<version>[1.1.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
|
<!-- <version>[1.1.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version> -->
|
||||||
</dependency>
|
<!-- </dependency> -->
|
||||||
<dependency>
|
<!-- <dependency> -->
|
||||||
<groupId>org.gcube.portlets.admin</groupId>
|
<!-- <groupId>org.gcube.portlets.admin</groupId> -->
|
||||||
<artifactId>activation-record-widgets</artifactId>
|
<!-- <artifactId>activation-record-widgets</artifactId> -->
|
||||||
<version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
|
<!-- <version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version> -->
|
||||||
</dependency>
|
<!-- </dependency> -->
|
||||||
<!-- guice -->
|
<!-- guice -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.inject</groupId>
|
<groupId>com.google.inject</groupId>
|
||||||
|
@ -255,7 +254,7 @@
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
<artifactId>gwt-maven-plugin</artifactId>
|
<artifactId>gwt-maven-plugin</artifactId>
|
||||||
<version>2.4.0</version>
|
<version>${gwtVersion}</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<goals>
|
<goals>
|
||||||
|
@ -267,10 +266,11 @@
|
||||||
<!-- Plugin configuration. There are many available options, see gwt-maven-plugin
|
<!-- Plugin configuration. There are many available options, see gwt-maven-plugin
|
||||||
documentation at codehaus.org -->
|
documentation at codehaus.org -->
|
||||||
<configuration>
|
<configuration>
|
||||||
<extraJvmArgs>-Xmx512M -DGLOBUS_LOCATION=${GLOBUS_LOCATION}</extraJvmArgs>
|
<extraJvmArgs>-Xmx512M -DGLOBUS_LOCATION=${GLOBUS_LOCATION}
|
||||||
|
-classpath $CLASSPATH:${GLOBUS_LOCATION}</extraJvmArgs>
|
||||||
<runTarget>ResourceManagementPortlet.html</runTarget>
|
<runTarget>ResourceManagementPortlet.html</runTarget>
|
||||||
<hostedWebapp>${webappDirectory}</hostedWebapp>
|
<hostedWebapp>${webappDirectory}</hostedWebapp>
|
||||||
<!-- <logLevel>DEBUG</logLevel> -->
|
<!-- <logLevel>DEBUG</logLevel> -->
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
|
|
|
@ -17,10 +17,10 @@
|
||||||
package org.gcube.portlets.admin.resourcemanagement.client;
|
package org.gcube.portlets.admin.resourcemanagement.client;
|
||||||
|
|
||||||
|
|
||||||
import org.gcube.portlets.admin.client.forms.ActivationRecordVMForm;
|
//import org.gcube.portlets.admin.client.forms.ActivationRecordVMForm;
|
||||||
import org.gcube.portlets.admin.client.forms.GenericResourceCMForm;
|
//import org.gcube.portlets.admin.client.forms.GenericResourceCMForm;
|
||||||
import org.gcube.portlets.admin.client.forms.GenericResourceTreeManagerForm;
|
//import org.gcube.portlets.admin.client.forms.GenericResourceTreeManagerForm;
|
||||||
import org.gcube.portlets.admin.ishealthmonitor.client.dialog.ISMonitor;
|
//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.forms.genericresources.DeployVirtualCollection;
|
||||||
import org.gcube.portlets.admin.resourcemanagement.client.remote.ProxyRegistry;
|
import org.gcube.portlets.admin.resourcemanagement.client.remote.ProxyRegistry;
|
||||||
import org.gcube.portlets.admin.resourcemanagement.client.utils.Commands;
|
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.UIIdentifiers;
|
||||||
import org.gcube.portlets.admin.resourcemanagement.client.widgets.registry.WidgetsRegistry;
|
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.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.Resource_support;
|
||||||
import org.gcube.resourcemanagement.support.client.events.SetScopeEvent;
|
import org.gcube.resourcemanagement.support.client.events.SetScopeEvent;
|
||||||
import org.gcube.resourcemanagement.support.client.events.SetScopeEventHandler;
|
import org.gcube.resourcemanagement.support.client.events.SetScopeEventHandler;
|
||||||
|
@ -139,7 +139,7 @@ public class ResourceManagementPortlet implements EntryPoint {
|
||||||
// the menu and statusbar can be built.
|
// the menu and statusbar can be built.
|
||||||
buildMenu();
|
buildMenu();
|
||||||
buildStatusBar();
|
buildStatusBar();
|
||||||
Commands.mask("Loading scopes", UIIdentifiers.MAIN_CONTAINER_VIEWPORT_ID);
|
Commands.mask("Loading infrastructure scopes", UIIdentifiers.MAIN_CONTAINER_VIEWPORT_ID);
|
||||||
Commands.doGetAvailableScopes(this);
|
Commands.doGetAvailableScopes(this);
|
||||||
|
|
||||||
if (StatusHandler.getStatus().getCurrentScope() != null) {
|
if (StatusHandler.getStatus().getCurrentScope() != null) {
|
||||||
|
@ -165,7 +165,7 @@ public class ResourceManagementPortlet implements EntryPoint {
|
||||||
viewport.setLayout(bl);
|
viewport.setLayout(bl);
|
||||||
WidgetsRegistry.registerWidget(UIIdentifiers.MAIN_CONTAINER_VIEWPORT_ID, viewport);
|
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
|
@Override
|
||||||
public void init() {
|
public void init() {
|
||||||
ConsoleMessageBroker.log(this, "Initializing north panel");
|
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
|
@Override
|
||||||
public void init() {
|
public void init() {
|
||||||
ConsoleMessageBroker.log(this, "Initializing west panel");
|
ConsoleMessageBroker.log(this, "Initializing west panel");
|
||||||
this.setCollapsible(true);
|
this.setCollapsible(false);
|
||||||
this.setMargins(new Margins(5, 0, 5, 5));
|
this.setMargins(new Margins(5, 0, 5, 5));
|
||||||
Text widget = new Text();
|
Text widget = new Text();
|
||||||
widget.setId("res-details-widget-fake");
|
widget.setId("res-details-widget-fake");
|
||||||
|
@ -439,16 +439,16 @@ public class ResourceManagementPortlet implements EntryPoint {
|
||||||
|
|
||||||
MenuItem testIS = new MenuItem("Check IS Health") {
|
MenuItem testIS = new MenuItem("Check IS Health") {
|
||||||
protected void onClick(final ComponentEvent be) {
|
protected void onClick(final ComponentEvent be) {
|
||||||
super.onClick(be);
|
// super.onClick(be);
|
||||||
GWT.runAsync(ISMonitor.class, new RunAsyncCallback() {
|
// GWT.runAsync(ISMonitor.class, new RunAsyncCallback() {
|
||||||
@Override
|
// @Override
|
||||||
public void onSuccess() {
|
// public void onSuccess() {
|
||||||
ISMonitor.pingIS();
|
// ISMonitor.pingIS();
|
||||||
}
|
// }
|
||||||
public void onFailure(Throwable reason) {
|
// public void onFailure(Throwable reason) {
|
||||||
Window.alert("There are networks problem, please check your connection.");
|
// Window.alert("There are networks problem, please check your connection.");
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
testIS.setIconStyle("is-icon");
|
testIS.setIconStyle("is-icon");
|
||||||
|
@ -460,22 +460,22 @@ public class ResourceManagementPortlet implements EntryPoint {
|
||||||
|
|
||||||
MenuItem cleanGHN = new MenuItem("Resource Sweeper") {
|
MenuItem cleanGHN = new MenuItem("Resource Sweeper") {
|
||||||
protected void onClick(final ComponentEvent be) {
|
protected void onClick(final ComponentEvent be) {
|
||||||
super.onClick(be);
|
// super.onClick(be);
|
||||||
if (SupportedOperations.SWEEP_GHN.isAllowed(StatusHandler.getStatus().getCredentials())) {
|
// if (SupportedOperations.SWEEP_GHN.isAllowed(StatusHandler.getStatus().getCredentials())) {
|
||||||
GWT.runAsync(SweeperDialog.class, new RunAsyncCallback() {
|
// GWT.runAsync(SweeperDialog.class, new RunAsyncCallback() {
|
||||||
@Override
|
// @Override
|
||||||
public void onSuccess() {
|
// public void onSuccess() {
|
||||||
String currentScope = StatusHandler.getStatus().getCurrentScope();
|
// String currentScope = StatusHandler.getStatus().getCurrentScope();
|
||||||
new SweeperDialog(currentScope);
|
// new SweeperDialog(currentScope);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
public void onFailure(Throwable reason) {
|
// public void onFailure(Throwable reason) {
|
||||||
Window.alert("There are networks problem, please check your connection.");
|
// Window.alert("There are networks problem, please check your connection.");
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
MessageBox.alert("Resource Sweeper", "You are not allowed to execute this operation", null);
|
// 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
|
// Create activation record from plugins
|
||||||
MenuItem createARTM = new MenuItem("Activation Record for Tree Manager") {
|
MenuItem createARTM = new MenuItem("Activation Record for Tree Manager") {
|
||||||
protected void onClick(final ComponentEvent be) {
|
protected void onClick(final ComponentEvent be) {
|
||||||
super.onClick(be);
|
// super.onClick(be);
|
||||||
if (SupportedOperations.GENERIC_RESOURCE_CREATE.isAllowed(StatusHandler.getStatus().getCredentials())) {
|
// if (SupportedOperations.GENERIC_RESOURCE_CREATE.isAllowed(StatusHandler.getStatus().getCredentials())) {
|
||||||
GWT.runAsync(GenericResourceTreeManagerForm.class, new RunAsyncCallback() {
|
// GWT.runAsync(GenericResourceTreeManagerForm.class, new RunAsyncCallback() {
|
||||||
@Override
|
// @Override
|
||||||
public void onSuccess() {
|
// public void onSuccess() {
|
||||||
String currentScope = StatusHandler.getStatus().getCurrentScope();
|
// String currentScope = StatusHandler.getStatus().getCurrentScope();
|
||||||
new GenericResourceTreeManagerForm(currentScope).show();
|
// new GenericResourceTreeManagerForm(currentScope).show();
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
public void onFailure(Throwable reason) {
|
// public void onFailure(Throwable reason) {
|
||||||
Window.alert("There are networks problem, please check your connection.");
|
// Window.alert("There are networks problem, please check your connection.");
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
} else {
|
// } else {
|
||||||
MessageBox.alert("Activation Record for TM", "You are not allowed to execute this operation", null);
|
// MessageBox.alert("Activation Record for TM", "You are not allowed to execute this operation", null);
|
||||||
}
|
// }
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
createARTM.setIconStyle("pluginTM-icon");
|
createARTM.setIconStyle("pluginTM-icon");
|
||||||
|
@ -523,23 +523,23 @@ public class ResourceManagementPortlet implements EntryPoint {
|
||||||
// Create activation record from plugins
|
// Create activation record from plugins
|
||||||
MenuItem createACM = new MenuItem("Activation Record for Content Manager") {
|
MenuItem createACM = new MenuItem("Activation Record for Content Manager") {
|
||||||
protected void onClick(final ComponentEvent be) {
|
protected void onClick(final ComponentEvent be) {
|
||||||
super.onClick(be);
|
// super.onClick(be);
|
||||||
if (SupportedOperations.GENERIC_RESOURCE_CREATE.isAllowed(StatusHandler.getStatus().getCredentials())) {
|
// if (SupportedOperations.GENERIC_RESOURCE_CREATE.isAllowed(StatusHandler.getStatus().getCredentials())) {
|
||||||
GWT.runAsync(GenericResourceCMForm.class, new RunAsyncCallback() {
|
// GWT.runAsync(GenericResourceCMForm.class, new RunAsyncCallback() {
|
||||||
@Override
|
// @Override
|
||||||
public void onSuccess() {
|
// public void onSuccess() {
|
||||||
String currentScope = StatusHandler.getStatus().getCurrentScope();
|
// String currentScope = StatusHandler.getStatus().getCurrentScope();
|
||||||
new GenericResourceCMForm(currentScope).show();
|
// new GenericResourceCMForm(currentScope).show();
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
public void onFailure(Throwable reason) {
|
// public void onFailure(Throwable reason) {
|
||||||
Window.alert("There are networks problem, please check your connection.");
|
// Window.alert("There are networks problem, please check your connection.");
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
|
//
|
||||||
} else {
|
// } else {
|
||||||
MessageBox.alert("Activation Record for CM", "You are not allowed to execute this operation", null);
|
// MessageBox.alert("Activation Record for CM", "You are not allowed to execute this operation", null);
|
||||||
}
|
// }
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
createACM.setIconStyle("pluginCM-icon");
|
createACM.setIconStyle("pluginCM-icon");
|
||||||
|
@ -548,24 +548,24 @@ public class ResourceManagementPortlet implements EntryPoint {
|
||||||
// Create activation record from VM
|
// Create activation record from VM
|
||||||
MenuItem createVM = new MenuItem("Activation Record for View Manager") {
|
MenuItem createVM = new MenuItem("Activation Record for View Manager") {
|
||||||
protected void onClick(final ComponentEvent be) {
|
protected void onClick(final ComponentEvent be) {
|
||||||
super.onClick(be);
|
// super.onClick(be);
|
||||||
if (SupportedOperations.GENERIC_RESOURCE_CREATE.isAllowed(StatusHandler.getStatus().getCredentials())) {
|
// if (SupportedOperations.GENERIC_RESOURCE_CREATE.isAllowed(StatusHandler.getStatus().getCredentials())) {
|
||||||
//MessageBox.alert("Activation Record for VM", "Operation not implemented yet.", null);
|
// //MessageBox.alert("Activation Record for VM", "Operation not implemented yet.", null);
|
||||||
|
//
|
||||||
GWT.runAsync(ActivationRecordVMForm.class, new RunAsyncCallback() {
|
// GWT.runAsync(ActivationRecordVMForm.class, new RunAsyncCallback() {
|
||||||
@Override
|
// @Override
|
||||||
public void onSuccess() {
|
// public void onSuccess() {
|
||||||
String currentScope = StatusHandler.getStatus().getCurrentScope();
|
// String currentScope = StatusHandler.getStatus().getCurrentScope();
|
||||||
new ActivationRecordVMForm(currentScope).show();
|
// new ActivationRecordVMForm(currentScope).show();
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
public void onFailure(Throwable reason) {
|
// public void onFailure(Throwable reason) {
|
||||||
Window.alert("There are networks problem, please check your connection.");
|
// Window.alert("There are networks problem, please check your connection.");
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
} else {
|
// } else {
|
||||||
MessageBox.alert("Activation Record for VM", "You are not allowed to execute this operation", null);
|
// MessageBox.alert("Activation Record for VM", "You are not allowed to execute this operation", null);
|
||||||
}
|
// }
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
createVM.setIconStyle("pluginVM-icon");
|
createVM.setIconStyle("pluginVM-icon");
|
||||||
|
|
|
@ -207,7 +207,7 @@ public class Commands {
|
||||||
StatusHandler.getStatus().setCurrentScope(scope);
|
StatusHandler.getStatus().setCurrentScope(scope);
|
||||||
StatusHandler.getStatus().setCurrentResourceType(resourceType);
|
StatusHandler.getStatus().setCurrentResourceType(resourceType);
|
||||||
Commands.mask(
|
Commands.mask(
|
||||||
"Getting Profile Details for " + resourceType + ": " + resourceID,
|
"Getting Profile Details for " + FWSTranslate.getFWSNameFromLabel(resourceType) + ": " + resourceID,
|
||||||
WidgetsRegistry.getPanel(UIIdentifiers.RESOURCE_DETAIL_GRID_PANEL).getContainer()
|
WidgetsRegistry.getPanel(UIIdentifiers.RESOURCE_DETAIL_GRID_PANEL).getContainer()
|
||||||
);
|
);
|
||||||
ProxyRegistry.getProxyInstance().getResourceByID(
|
ProxyRegistry.getProxyInstance().getResourceByID(
|
||||||
|
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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.console.ConsoleMessageBroker;
|
||||||
import org.gcube.portlets.admin.resourcemanagement.client.widgets.registry.UIIdentifiers;
|
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.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.utils.StatusHandler;
|
||||||
import org.gcube.resourcemanagement.support.client.views.ResourceTypeDecorator;
|
import org.gcube.resourcemanagement.support.client.views.ResourceTypeDecorator;
|
||||||
import org.gcube.resourcemanagement.support.shared.operations.SupportedOperations;
|
import org.gcube.resourcemanagement.support.shared.operations.SupportedOperations;
|
||||||
|
@ -108,7 +108,8 @@ public class ResourceDetailsPanel {
|
||||||
*/
|
*/
|
||||||
public final void init() {
|
public final void init() {
|
||||||
this.rootPanel = new ContentPanel(new FitLayout());
|
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.setId("res-details-widget-fake");
|
||||||
this.widget.setStyleName("x-panel-cube-background");
|
this.widget.setStyleName("x-panel-cube-background");
|
||||||
|
|
||||||
|
@ -322,24 +323,24 @@ public class ResourceDetailsPanel {
|
||||||
this.getToolBar().add(new SeparatorToolItem());
|
this.getToolBar().add(new SeparatorToolItem());
|
||||||
ToolButton doAddSoftware = new ToolButton("add-software-icon") {
|
ToolButton doAddSoftware = new ToolButton("add-software-icon") {
|
||||||
protected void onClick(final ComponentEvent be) {
|
protected void onClick(final ComponentEvent be) {
|
||||||
super.onClick(be);
|
// super.onClick(be);
|
||||||
|
//
|
||||||
|
//
|
||||||
GWT.runAsync(AppController.class, new RunAsyncCallback() {
|
// GWT.runAsync(AppController.class, new RunAsyncCallback() {
|
||||||
@Override
|
// @Override
|
||||||
public void onSuccess() {
|
// public void onSuccess() {
|
||||||
String currentScope = StatusHandler.getStatus().getCurrentScope();
|
// String currentScope = StatusHandler.getStatus().getCurrentScope();
|
||||||
HandlerManager eventBus = new HandlerManager(null);
|
// HandlerManager eventBus = new HandlerManager(null);
|
||||||
AppController appViewer = new AppController(eventBus, currentScope);
|
// AppController appViewer = new AppController(eventBus, currentScope);
|
||||||
//AppController appViewer = new AppController(eventBus);
|
// //AppController appViewer = new AppController(eventBus);
|
||||||
appViewer.go();
|
// appViewer.go();
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
public void onFailure(Throwable reason) {
|
// public void onFailure(Throwable reason) {
|
||||||
Window.alert("There are networks problem, please check your connection.");
|
// Window.alert("There are networks problem, please check your connection.");
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
});
|
// });
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -352,7 +353,7 @@ public class ResourceDetailsPanel {
|
||||||
|
|
||||||
public final void setGrid(final Grid<ModelData> grid, final boolean groupingEnabled) {
|
public final void setGrid(final Grid<ModelData> grid, final boolean groupingEnabled) {
|
||||||
// Sets the grid container title
|
// Sets the grid container title
|
||||||
this.rootPanel.setHeading("Resource Details (" + StatusHandler.getStatus().getCurrentResourceType() + ")");
|
//this.rootPanel.setHeading("Resource Details (" + StatusHandler.getStatus().getCurrentResourceType() + ")");
|
||||||
|
|
||||||
this.initToolbar();
|
this.initToolbar();
|
||||||
|
|
||||||
|
|
|
@ -115,7 +115,8 @@ public class ResourcesTreePanel {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
icon = ResourceTypeDecorator.valueOf(type).getIcon();
|
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) {
|
} catch (java.lang.IllegalArgumentException e) {
|
||||||
label = type;
|
label = type;
|
||||||
icon = null;
|
icon = null;
|
||||||
|
|
|
@ -37,6 +37,7 @@ public abstract class MainPanel {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
this.setSplit(true);
|
this.setSplit(true);
|
||||||
|
container.setHeaderVisible(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public MainPanel(final int size, final LayoutRegion position) {
|
public MainPanel(final int size, final LayoutRegion position) {
|
||||||
|
@ -79,6 +80,7 @@ public abstract class MainPanel {
|
||||||
this.layout.setSplit(split);
|
this.layout.setSplit(split);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public final void add(final Widget w, final boolean removeOthers) {
|
public final void add(final Widget w, final boolean removeOthers) {
|
||||||
if (removeOthers) {
|
if (removeOthers) {
|
||||||
this.container.removeAll();
|
this.container.removeAll();
|
||||||
|
|
|
@ -16,6 +16,8 @@
|
||||||
|
|
||||||
package org.gcube.portlets.admin.resourcemanagement.client.widgets.taskbar;
|
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.core.El;
|
||||||
import com.extjs.gxt.ui.client.event.ComponentEvent;
|
import com.extjs.gxt.ui.client.event.ComponentEvent;
|
||||||
import com.extjs.gxt.ui.client.event.Events;
|
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;";
|
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);
|
setElement(DOM.createElement("dt"), target, index);
|
||||||
El a = el().createChild("<div style=\""+ style +"\"><a href='#'></a></div>");
|
El a = el().createChild("<div style=\""+ style +"\"><a href='#'></a></div>");
|
||||||
iconEl = a.createChild("<h2>"+type+"</h2>");
|
iconEl = a.createChild("<h2>"+FWSTranslate.getFWSNameFromLabel(type)+"</h2>");
|
||||||
El txt = a.createChild("<div style=\""+fontStyle+"\" align=\"center\"></div>");
|
El txt = a.createChild("<div style=\""+fontStyle+"\" align=\"center\"></div>");
|
||||||
String toShow = "";
|
String toShow = "";
|
||||||
if (text.length() / splitTextTo > 0) {
|
if (text.length() / splitTextTo > 0) {
|
||||||
|
|
|
@ -62,9 +62,8 @@ public class TaskbarItem {
|
||||||
return this.scope;
|
return this.scope;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initUI(final String title,
|
private void initUI(final String title, final String id,final String buttonIcon) {
|
||||||
final String id,
|
|
||||||
final String buttonIcon) {
|
|
||||||
this.detachButton = new TaskbarButton("btn" + id, ""+type, title) {
|
this.detachButton = new TaskbarButton("btn" + id, ""+type, title) {
|
||||||
protected void onClick(final com.extjs.gxt.ui.client.event.ComponentEvent ce) {
|
protected void onClick(final com.extjs.gxt.ui.client.event.ComponentEvent ce) {
|
||||||
relatedWidget.doMinimize();
|
relatedWidget.doMinimize();
|
||||||
|
|
|
@ -19,15 +19,13 @@ package org.gcube.portlets.admin.resourcemanagement.server;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.gcube.common.core.scope.GCUBEScope;
|
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.client.utils.CurrentStatus;
|
||||||
import org.gcube.resourcemanagement.support.shared.util.Assertion;
|
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.CollectionManager;
|
||||||
import org.gcube.resourcemanagement.support.server.managers.resources.GHNManager;
|
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.GenericResourceManager;
|
||||||
import org.gcube.resourcemanagement.support.server.managers.resources.RuntimeResourceManager;
|
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.managers.scope.ScopeManager;
|
||||||
import org.gcube.resourcemanagement.support.server.types.AllowedResourceTypes;
|
import org.gcube.resourcemanagement.support.server.types.AllowedResourceTypes;
|
||||||
import org.gcube.resourcemanagement.support.server.utils.ServerConsole;
|
import org.gcube.resourcemanagement.support.server.utils.ServerConsole;
|
||||||
|
@ -61,7 +59,7 @@ public class ResourceCommands {
|
||||||
checker.validate(opCode.isAllowed(status.getCredentials()),
|
checker.validate(opCode.isAllowed(status.getCredentials()),
|
||||||
new InvalidParameterException("The current user is not allowed to execute the operation."));
|
new InvalidParameterException("The current user is not allowed to execute the operation."));
|
||||||
|
|
||||||
GCUBEScope gscope = ScopeManager.getScope(scope);
|
ScopeBean gscope = new ScopeBean(scope);
|
||||||
|
|
||||||
/**********************************************************
|
/**********************************************************
|
||||||
* GHN
|
* GHN
|
||||||
|
@ -182,24 +180,24 @@ public class ResourceCommands {
|
||||||
/**********************************************************
|
/**********************************************************
|
||||||
* VIEW
|
* VIEW
|
||||||
*********************************************************/
|
*********************************************************/
|
||||||
// DELETE
|
// // DELETE
|
||||||
if (opCode.equals(SupportedOperations.VIEW_DELETE)) {
|
// if (opCode.equals(SupportedOperations.VIEW_DELETE)) {
|
||||||
for (ResourceDescriptor resource : resources) {
|
// for (ResourceDescriptor resource : resources) {
|
||||||
checker.validate(
|
// checker.validate(
|
||||||
resource.getType().equals(AllowedResourceTypes.VIEW.name()),
|
// resource.getType().equals(AllowedResourceTypes.VIEW.name()),
|
||||||
new InvalidParameterException("Invalid type. " + AllowedResourceTypes.VIEW.name() + " required"));
|
// new InvalidParameterException("Invalid type. " + AllowedResourceTypes.VIEW.name() + " required"));
|
||||||
new ViewManager(resource.getID()).delete(gscope);
|
// new ViewManager(resource.getID()).delete(gscope);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
// DELETE
|
// // DELETE
|
||||||
if (opCode.equals(SupportedOperations.VIEW_FORCE_DELETE)) {
|
// if (opCode.equals(SupportedOperations.VIEW_FORCE_DELETE)) {
|
||||||
for (ResourceDescriptor resource : resources) {
|
// for (ResourceDescriptor resource : resources) {
|
||||||
checker.validate(
|
// checker.validate(
|
||||||
resource.getType().equals(AllowedResourceTypes.VIEW.name()),
|
// resource.getType().equals(AllowedResourceTypes.VIEW.name()),
|
||||||
new InvalidParameterException("Invalid type. " + AllowedResourceTypes.VIEW.name() + " required"));
|
// new InvalidParameterException("Invalid type. " + AllowedResourceTypes.VIEW.name() + " required"));
|
||||||
new ViewManager(resource.getID()).forceDelete(gscope);
|
// new ViewManager(resource.getID()).forceDelete(gscope);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
/**********************************************************
|
/**********************************************************
|
||||||
* RUNNING INSTANCE
|
* RUNNING INSTANCE
|
||||||
|
|
|
@ -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.XMLResult;
|
||||||
import org.gcube.common.core.informationsystem.client.queries.GCUBEGenericQuery;
|
import org.gcube.common.core.informationsystem.client.queries.GCUBEGenericQuery;
|
||||||
import org.gcube.common.core.scope.GCUBEScope;
|
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.client.remote.ServiceProxy;
|
||||||
import org.gcube.portlets.admin.resourcemanagement.server.gcube.services.StatusHandler;
|
import org.gcube.portlets.admin.resourcemanagement.server.gcube.services.StatusHandler;
|
||||||
import org.gcube.portlets.admin.resourcemanagement.server.gcube.services.configuration.ConfigurationLoader;
|
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.CompleteResourceProfile;
|
||||||
import org.gcube.resourcemanagement.support.shared.types.datamodel.ResourceDescriptor;
|
import org.gcube.resourcemanagement.support.shared.types.datamodel.ResourceDescriptor;
|
||||||
import org.gcube.resourcemanagement.support.shared.util.Assertion;
|
import org.gcube.resourcemanagement.support.shared.util.Assertion;
|
||||||
|
import org.gcube.vremanagement.resourcemanager.client.RMReportingLibrary;
|
||||||
import org.gcube.vremanagement.resourcemanager.stubs.reporting.ReportingPortType;
|
import org.gcube.vremanagement.resourcemanager.stubs.reporting.ReportingPortType;
|
||||||
|
|
||||||
import com.google.gwt.core.client.GWT;
|
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"));
|
checker.validate(scope != null && scope.trim().length() > 0, new Exception("Invalid parameter type"));
|
||||||
|
|
||||||
AllowedResourceTypes type = AllowedResourceTypes.valueOf(resType);
|
AllowedResourceTypes type = AllowedResourceTypes.valueOf(resType);
|
||||||
GCUBEScope targetScope = ScopeManager.getScope(scope);
|
ScopeBean targetScope = new ScopeBean(scope);
|
||||||
GCUBEScope sourceScope = ScopeManager.getScope(status.getCurrentScope());
|
ScopeBean sourceScope = new ScopeBean(status.getCurrentScope());
|
||||||
|
|
||||||
String reportID = ManagementUtils.addToExistingScope(type,
|
String reportID = ManagementUtils.addToExistingScope(type,
|
||||||
resourceIDs.toArray(new String[]{}),
|
resourceIDs.toArray(new String[]{}),
|
||||||
sourceScope,
|
sourceScope,
|
||||||
targetScope);
|
targetScope);
|
||||||
|
|
||||||
ReportingPortType manager =
|
RMReportingLibrary manager =
|
||||||
ResourceFactory.createResourceManager(type).getReportResourceManager(targetScope);
|
ResourceFactory.createResourceManager(type).getReportResourceManager(targetScope.toString());
|
||||||
|
|
||||||
String xmlReport = manager.getReport(reportID);
|
String xmlReport = manager.getReport(reportID);
|
||||||
String mappingPath = this.getXML2HTMLMapping();
|
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"));
|
checker.validate(scope != null && scope.trim().length() > 0, new Exception("Invalid parameter type"));
|
||||||
|
|
||||||
AllowedResourceTypes type = AllowedResourceTypes.valueOf(resType);
|
AllowedResourceTypes type = AllowedResourceTypes.valueOf(resType);
|
||||||
GCUBEScope targetScope = ScopeManager.getScope(scope);
|
ScopeBean targetScope = new ScopeBean(scope);
|
||||||
GCUBEScope sourceScope = ScopeManager.getScope(status.getCurrentScope());
|
ScopeBean sourceScope = new ScopeBean(status.getCurrentScope());
|
||||||
|
|
||||||
return new Tuple<String>(ManagementUtils.removeFromExistingScope(type,
|
return new Tuple<String>(ManagementUtils.removeFromExistingScope(type,
|
||||||
resourceIDs.toArray(new String[]{}),
|
resourceIDs.toArray(new String[]{}),
|
||||||
|
@ -208,7 +210,7 @@ public class ServiceProxyImpl extends RemoteServiceServlet implements ServicePro
|
||||||
|
|
||||||
public final String deploy(final List<String> ghnsID, final List<String> servicesID) throws Exception {
|
public final String deploy(final List<String> ghnsID, final List<String> servicesID) throws Exception {
|
||||||
try {
|
try {
|
||||||
GCUBEScope sourceScope = ScopeManager.getScope(this.getCurrentStatus().getCurrentScope());
|
ScopeBean sourceScope = new ScopeBean(this.getCurrentStatus().getCurrentScope());
|
||||||
String[] param1 = ghnsID.toArray(new String[0]);
|
String[] param1 = ghnsID.toArray(new String[0]);
|
||||||
String[] param2 = servicesID.toArray(new String[0]);
|
String[] param2 = servicesID.toArray(new String[0]);
|
||||||
return ManagementUtils.deploy(sourceScope, param1, param2);
|
return ManagementUtils.deploy(sourceScope, param1, param2);
|
||||||
|
@ -221,8 +223,8 @@ public class ServiceProxyImpl extends RemoteServiceServlet implements ServicePro
|
||||||
public final Tuple<String> checkDeployStatus(final String scope, final String deployID) throws Exception {
|
public final Tuple<String> checkDeployStatus(final String scope, final String deployID) throws Exception {
|
||||||
if (SupportedOperations.SERVICE_GET_REPORT.isAllowed(this.getCurrentStatus().getCredentials())) {
|
if (SupportedOperations.SERVICE_GET_REPORT.isAllowed(this.getCurrentStatus().getCredentials())) {
|
||||||
GCUBEScope sourceScope = ScopeManager.getScope(scope);
|
GCUBEScope sourceScope = ScopeManager.getScope(scope);
|
||||||
ReportingPortType manager =
|
RMReportingLibrary manager =
|
||||||
ResourceFactory.createResourceManager(AllowedResourceTypes.Service).getReportResourceManager(sourceScope);
|
ResourceFactory.createResourceManager(AllowedResourceTypes.Service).getReportResourceManager(sourceScope.toString());
|
||||||
String xmlReport = manager.getReport(deployID);
|
String xmlReport = manager.getReport(deployID);
|
||||||
String mappingPath = this.getXML2HTMLMapping();
|
String mappingPath = this.getXML2HTMLMapping();
|
||||||
String htmlReport = ISClientRequester.XML2HTML(xmlReport, mappingPath);
|
String htmlReport = ISClientRequester.XML2HTML(xmlReport, mappingPath);
|
||||||
|
@ -273,7 +275,7 @@ public class ServiceProxyImpl extends RemoteServiceServlet implements ServicePro
|
||||||
|
|
||||||
public final HashMap<String, ArrayList<String>> getResourceTypeTree(final String scope) throws Exception {
|
public final HashMap<String, ArrayList<String>> getResourceTypeTree(final String scope) throws Exception {
|
||||||
try {
|
try {
|
||||||
GCUBEScope gscope = ScopeManager.getScope(scope);
|
ScopeBean gscope = new ScopeBean(scope);
|
||||||
HashMap<String, ArrayList<String>> results = ISClientRequester.getResourcesTree(getCacheManager(this.getCurrentStatus()), gscope);
|
HashMap<String, ArrayList<String>> results = ISClientRequester.getResourcesTree(getCacheManager(this.getCurrentStatus()), gscope);
|
||||||
return results;
|
return results;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -289,7 +291,7 @@ public class ServiceProxyImpl extends RemoteServiceServlet implements ServicePro
|
||||||
getCacheManager(this.getCurrentStatus()),
|
getCacheManager(this.getCurrentStatus()),
|
||||||
type,
|
type,
|
||||||
id,
|
id,
|
||||||
ScopeManager.getScope(scope)
|
new ScopeBean(scope)
|
||||||
);
|
);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
ServerConsole.error(LOG_PREFIX, e);
|
ServerConsole.error(LOG_PREFIX, e);
|
||||||
|
@ -302,7 +304,7 @@ public class ServiceProxyImpl extends RemoteServiceServlet implements ServicePro
|
||||||
try {
|
try {
|
||||||
return ISClientRequester.getResourcesByType(
|
return ISClientRequester.getResourcesByType(
|
||||||
getCacheManager(this.getCurrentStatus()),
|
getCacheManager(this.getCurrentStatus()),
|
||||||
ScopeManager.getScope(scope), type, null);
|
new ScopeBean(scope), type, null);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
ServerConsole.error(LOG_PREFIX, e);
|
ServerConsole.error(LOG_PREFIX, e);
|
||||||
return null;
|
return null;
|
||||||
|
@ -380,13 +382,13 @@ public class ServiceProxyImpl extends RemoteServiceServlet implements ServicePro
|
||||||
if (scope == null || type == null) {
|
if (scope == null || type == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return ISClientRequester.getResourceModels(ScopeManager.getScope(scope), type, subType, additionalMaps);
|
return ISClientRequester.getResourceModels(new ScopeBean(scope), type, subType, additionalMaps);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public final List<String> getWSResources(final String scope) {
|
public final List<String> getWSResources(final String scope) {
|
||||||
try {
|
try {
|
||||||
return ISClientRequester.getWSResources(ScopeManager.getScope(scope));
|
return ISClientRequester.getWSResources(new ScopeBean(scope));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
ServerConsole.error(LOG_PREFIX, e);
|
ServerConsole.error(LOG_PREFIX, e);
|
||||||
return null;
|
return null;
|
||||||
|
@ -397,7 +399,7 @@ public class ServiceProxyImpl extends RemoteServiceServlet implements ServicePro
|
||||||
try {
|
try {
|
||||||
return ISClientRequester.getResourcesByType(
|
return ISClientRequester.getResourcesByType(
|
||||||
getCacheManager(this.getCurrentStatus()),
|
getCacheManager(this.getCurrentStatus()),
|
||||||
ScopeManager.getScope(scope), type, subtype);
|
new ScopeBean(scope), type, subtype);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
ServerConsole.error(LOG_PREFIX, e);
|
ServerConsole.error(LOG_PREFIX, e);
|
||||||
return null;
|
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) {
|
public final CompleteResourceProfile getResourceByID(final String scope, final String type, final String resID) {
|
||||||
try {
|
try {
|
||||||
CompleteResourceProfile profile = ISClientRequester.getResourceByID(
|
CompleteResourceProfile profile = ISClientRequester.getResourceByID(this.getXML2HTMLMapping(), new ScopeBean(scope), type, resID);
|
||||||
this.getXML2HTMLMapping(),
|
System.out.println("CompleteResourceProfile getResourceByID(final String scope, final String type, final String resID)");
|
||||||
ScopeManager.getScope(scope),
|
|
||||||
type,
|
|
||||||
resID);
|
|
||||||
return profile;
|
return profile;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
ServerConsole.error(LOG_PREFIX, e);
|
ServerConsole.error(LOG_PREFIX, e);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public final String createGenericResource(
|
public final String createGenericResource(
|
||||||
|
@ -433,7 +433,7 @@ public class ServiceProxyImpl extends RemoteServiceServlet implements ServicePro
|
||||||
|
|
||||||
return GenericResourceManager.create(
|
return GenericResourceManager.create(
|
||||||
ID,
|
ID,
|
||||||
ScopeManager.getScope(this.getCurrentStatus().getCurrentScope()),
|
new ScopeBean(this.getCurrentStatus().getCurrentScope()),
|
||||||
name,
|
name,
|
||||||
description,
|
description,
|
||||||
body,
|
body,
|
||||||
|
@ -453,7 +453,7 @@ public class ServiceProxyImpl extends RemoteServiceServlet implements ServicePro
|
||||||
SupportedOperations.GENERIC_RESOURCE_EDIT.isAllowed(this.getCurrentStatus().getCredentials()),
|
SupportedOperations.GENERIC_RESOURCE_EDIT.isAllowed(this.getCurrentStatus().getCredentials()),
|
||||||
new InvalidPermissionsException("The user is not allowed to execute the following operation"));
|
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);
|
GenericResourceManager resource = new GenericResourceManager(ID);
|
||||||
resource.update(name, description, body, subType, sourceScope);
|
resource.update(name, description, body, subType, sourceScope);
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,15 +8,13 @@
|
||||||
<inherits name='com.extjs.gxt.ui.GXT' />
|
<inherits name='com.extjs.gxt.ui.GXT' />
|
||||||
|
|
||||||
<!-- inherits Software Uplad Widget -->
|
<!-- inherits Software Uplad Widget -->
|
||||||
<inherits
|
<!-- <inherits name='org.gcube.portlets.admin.software_upload_wizard.SoftwareUploadWizard' /> -->
|
||||||
name='org.gcube.portlets.admin.software_upload_wizard.SoftwareUploadWizard' />
|
|
||||||
<!-- inherits Resource Sweeper Widget -->
|
<!-- inherits Resource Sweeper Widget -->
|
||||||
<inherits name='org.gcube.portlets.admin.resourcesweeper.Resource_sweeper' />
|
<!-- <inherits name='org.gcube.portlets.admin.resourcesweeper.Resource_sweeper' /> -->
|
||||||
|
|
||||||
<inherits name='org.gcube.portlets.admin.Activation_record_widgets' />
|
<!-- <inherits name='org.gcube.portlets.admin.Activation_record_widgets' /> -->
|
||||||
<!-- inherits IS Health Monitor Widget -->
|
<!-- inherits IS Health Monitor Widget -->
|
||||||
<inherits
|
<!-- <inherits name='org.gcube.portlets.admin.ishealthmonitor.Resource_ishealth_monitor' /> -->
|
||||||
name='org.gcube.portlets.admin.ishealthmonitor.Resource_ishealth_monitor' />
|
|
||||||
|
|
||||||
<inherits name='org.gcube.resourcemanagement.support.Resource_support' />
|
<inherits name='org.gcube.resourcemanagement.support.Resource_support' />
|
||||||
<entry-point
|
<entry-point
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* Comment import to style regular, uncomment if deploying on openbio or d4science.org */
|
/* Comment import to style regular, uncomment if deploying on openbio or d4science.org */
|
||||||
/*@import url(openbio.css);*/
|
/*@import url(openbio.css);*/
|
||||||
/*@import url(d4scienceOrg.css);*/
|
@import url(d4scienceOrg.css);
|
||||||
|
|
||||||
/* Fix the scrollbar background style*/
|
/* Fix the scrollbar background style*/
|
||||||
.x-progress-text div {
|
.x-progress-text div {
|
||||||
|
@ -52,6 +52,10 @@
|
||||||
.taskbar-pattern {
|
.taskbar-pattern {
|
||||||
background-image: url(images/pattern.gif);
|
background-image: url(images/pattern.gif);
|
||||||
background-repeat: repeat;
|
background-repeat: repeat;
|
||||||
|
border: 2px solid #A9BFD3;
|
||||||
|
border-radius: 5px;
|
||||||
|
-moz-border-radius: 5px;
|
||||||
|
-webkit-border-radius: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.taskbar-button {
|
.taskbar-button {
|
||||||
|
@ -228,7 +232,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.ghn-icon {
|
.ghn-icon {
|
||||||
background-image: url(images/icons/server.png) !important;
|
background-image: url(images/icons/hostingNode.png) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.defaultleaf-icon {
|
.defaultleaf-icon {
|
||||||
|
@ -236,15 +240,15 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.collection-icon {
|
.collection-icon {
|
||||||
background-image: url(images/icons/folder_database.png) !important;
|
background-image: url(images/icons/collection2.png) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.genericresource-icon {
|
.genericresource-icon {
|
||||||
background-image: url(images/icons/plugin.png) !important;
|
background-image: url(images/icons/GenericResource.png) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.runtimeresource-icon {
|
.runtimeresource-icon {
|
||||||
background-image: url(images/icons/application_cascade.png) !important;
|
background-image: url(images/icons/serviceEndpoint.png) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pluginCM-icon {
|
.pluginCM-icon {
|
||||||
|
@ -264,11 +268,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.runninginstance-icon {
|
.runninginstance-icon {
|
||||||
background-image: url(images/icons/cog_go.png) !important;
|
background-image: url(images/icons/gcoreEndpoint.png) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.service-icon {
|
.service-icon {
|
||||||
background-image: url(images/icons/cog.png) !important;
|
background-image: url(images/icons/software.png) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.empty-icon {
|
.empty-icon {
|
||||||
|
|
|
@ -16,51 +16,51 @@
|
||||||
</servlet-mapping>
|
</servlet-mapping>
|
||||||
|
|
||||||
<!-- Sweeper -->
|
<!-- Sweeper -->
|
||||||
<servlet>
|
<!-- <servlet> -->
|
||||||
<servlet-name>sweeperServlet</servlet-name>
|
<!-- <servlet-name>sweeperServlet</servlet-name> -->
|
||||||
<servlet-class>org.gcube.portlets.admin.resourcesweeper.server.SweeperServiceImpl</servlet-class>
|
<!-- <servlet-class>org.gcube.portlets.admin.resourcesweeper.server.SweeperServiceImpl</servlet-class> -->
|
||||||
</servlet>
|
<!-- </servlet> -->
|
||||||
|
|
||||||
<servlet-mapping>
|
<!-- <servlet-mapping> -->
|
||||||
<servlet-name>sweeperServlet</servlet-name>
|
<!-- <servlet-name>sweeperServlet</servlet-name> -->
|
||||||
<url-pattern>/resourcemanagementportlet/sweeper</url-pattern>
|
<!-- <url-pattern>/resourcemanagementportlet/sweeper</url-pattern> -->
|
||||||
</servlet-mapping>
|
<!-- </servlet-mapping> -->
|
||||||
|
|
||||||
|
|
||||||
<!-- SUW -->
|
<!-- SUW -->
|
||||||
<filter>
|
<!-- <filter> -->
|
||||||
<filter-name>guiceFilter</filter-name>
|
<!-- <filter-name>guiceFilter</filter-name> -->
|
||||||
<filter-class>com.google.inject.servlet.GuiceFilter</filter-class>
|
<!-- <filter-class>com.google.inject.servlet.GuiceFilter</filter-class> -->
|
||||||
</filter>
|
<!-- </filter> -->
|
||||||
<filter-mapping>
|
<!-- <filter-mapping> -->
|
||||||
<filter-name>guiceFilter</filter-name>
|
<!-- <filter-name>guiceFilter</filter-name> -->
|
||||||
<url-pattern>/*</url-pattern>
|
<!-- <url-pattern>/*</url-pattern> -->
|
||||||
</filter-mapping>
|
<!-- </filter-mapping> -->
|
||||||
<listener>
|
<!-- <listener> -->
|
||||||
<listener-class>org.gcube.portlets.admin.software_upload_wizard.server.BootstrapListener</listener-class>
|
<!-- <listener-class>org.gcube.portlets.admin.software_upload_wizard.server.BootstrapListener</listener-class> -->
|
||||||
</listener>
|
<!-- </listener> -->
|
||||||
|
|
||||||
<!-- IS Health -->
|
<!-- IS Health -->
|
||||||
<servlet>
|
<!-- <servlet> -->
|
||||||
<servlet-name>isHealthServlet</servlet-name>
|
<!-- <servlet-name>isHealthServlet</servlet-name> -->
|
||||||
<servlet-class>org.gcube.portlets.admin.ishealthmonitor.server.ISMonitorServiceImpl</servlet-class>
|
<!-- <servlet-class>org.gcube.portlets.admin.ishealthmonitor.server.ISMonitorServiceImpl</servlet-class> -->
|
||||||
</servlet>
|
<!-- </servlet> -->
|
||||||
|
|
||||||
<servlet-mapping>
|
<!-- <servlet-mapping> -->
|
||||||
<servlet-name>isHealthServlet</servlet-name>
|
<!-- <servlet-name>isHealthServlet</servlet-name> -->
|
||||||
<url-pattern>/resourcemanagementportlet/ishealth</url-pattern>
|
<!-- <url-pattern>/resourcemanagementportlet/ishealth</url-pattern> -->
|
||||||
</servlet-mapping>
|
<!-- </servlet-mapping> -->
|
||||||
|
|
||||||
<!-- Activation Record Widgets -->
|
<!-- Activation Record Widgets -->
|
||||||
<servlet>
|
<!-- <servlet> -->
|
||||||
<servlet-name>arServlet</servlet-name>
|
<!-- <servlet-name>arServlet</servlet-name> -->
|
||||||
<servlet-class>org.gcube.portlets.admin.server.ARServiceImpl</servlet-class>
|
<!-- <servlet-class>org.gcube.portlets.admin.server.ARServiceImpl</servlet-class> -->
|
||||||
</servlet>
|
<!-- </servlet> -->
|
||||||
|
|
||||||
<servlet-mapping>
|
<!-- <servlet-mapping> -->
|
||||||
<servlet-name>arServlet</servlet-name>
|
<!-- <servlet-name>arServlet</servlet-name> -->
|
||||||
<url-pattern>/resourcemanagementportlet/activeservice</url-pattern>
|
<!-- <url-pattern>/resourcemanagementportlet/activeservice</url-pattern> -->
|
||||||
</servlet-mapping>
|
<!-- </servlet-mapping> -->
|
||||||
|
|
||||||
|
|
||||||
<servlet>
|
<servlet>
|
||||||
|
|
|
@ -6,12 +6,12 @@ USER_CREDENTIALS = DEBUG
|
||||||
|
|
||||||
# Defines the modality in which the portlet is running
|
# Defines the modality in which the portlet is running
|
||||||
# possible values [STANDALONE,PORTAL,NOTDEFINED]
|
# possible values [STANDALONE,PORTAL,NOTDEFINED]
|
||||||
RUNNING_MODE = PORTAL
|
RUNNING_MODE = STANDALONE
|
||||||
|
|
||||||
DEFAULT_USER = massimiliano.assante
|
DEFAULT_USER = massimiliano.assante
|
||||||
|
|
||||||
# The scope that will be used as default
|
# 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)
|
# the target of update notification (if in singleton mode)
|
||||||
# mails MUST be separated by ;
|
# mails MUST be separated by ;
|
||||||
USERMAIL_TO = m.assante@gmail.com
|
USERMAIL_TO = m.assante@gmail.com
|
||||||
|
|
|
@ -1,10 +1,58 @@
|
||||||
#wrapper {
|
#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;
|
margin: 0 auto;
|
||||||
width: 90% !important;
|
width: 92% !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
#bottombar {
|
.x-menubar {
|
||||||
margin: 0 auto;
|
background: #FFF url(images/bg-pattern.png) repeat;
|
||||||
width: 100% !important;
|
}
|
||||||
|
|
||||||
|
.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;
|
||||||
|
|
||||||
}
|
}
|
After Width: | Height: | Size: 38 KiB |
After Width: | Height: | Size: 945 B |
After Width: | Height: | Size: 622 B |
After Width: | Height: | Size: 854 B |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 636 B |
Before Width: | Height: | Size: 530 B |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 1.8 KiB |
|
@ -1,6 +1,5 @@
|
||||||
package org.gcube.portlets.admin.resourcemanagement.client;
|
package org.gcube.portlets.admin.resourcemanagement.client;
|
||||||
|
|
||||||
import com.google.gwt.junit.client.GWTTestCase;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GWT JUnit <b>integration</b> tests must extend GWTTestCase.
|
* GWT JUnit <b>integration</b> 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
|
* See http://mojo.codehaus.org/gwt-maven-plugin/user-guide/testing.html
|
||||||
* for details.
|
* for details.
|
||||||
*/
|
*/
|
||||||
public class GwtTestResourceManagementPortlet extends GWTTestCase {
|
public class GwtTestResourceManagementPortlet {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Must refer to a valid module that sources this class.
|
* Must refer to a valid module that sources this class.
|
||||||
|
|