fixed Ticket #1119 Resource Management / Monitor wrong generic resource query

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/admin/resource-management@114050 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Massimiliano Assante 2015-04-15 10:08:09 +00:00
parent 899a085643
commit 7cbd93fd8e
9 changed files with 40 additions and 20 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/resource-management-5.3.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
<classpathentry kind="src" output="target/resource-management-5.4.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
@ -29,12 +29,12 @@
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="/Applications/eclipse 4.3/plugins/com.google.gwt.eclipse.sdkbundle_2.5.1/gwt-2.5.1/validation-api-1.0.0.GA-sources.jar"/>
<classpathentry kind="lib" path="/Applications/eclipse 4.3/plugins/com.google.gwt.eclipse.sdkbundle_2.5.1/gwt-2.5.1/validation-api-1.0.0.GA.jar" sourcepath="/Applications/eclipse 4.3/plugins/com.google.gwt.eclipse.sdkbundle_2.5.1/gwt-2.5.1/validation-api-1.0.0.GA-sources.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/resource-management-5.3.0-SNAPSHOT/WEB-INF/classes"/>
<classpathentry kind="con" path="com.google.gwt.eclipse.core.GWT_CONTAINER"/>
<classpathentry combineaccessrules="false" kind="src" path="/rmp-common-library"/>
<classpathentry kind="output" path="target/resource-management-5.4.0-SNAPSHOT/WEB-INF/classes"/>
</classpath>

View File

@ -0,0 +1,3 @@
eclipse.preferences.version=1
validateFragments=false
validation.use-project-settings=true

View File

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="${module}">
<wb-module deploy-name="resource-management-portlet">
<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="/WEB-INF/classes" source-path="/src/main/java"/>
<dependent-module archiveName="rmp-common-library-2.1.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/rmp-common-library/rmp-common-library">
<dependent-module archiveName="rmp-common-library-2.2.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"/>

View File

@ -4,4 +4,5 @@
<installed facet="wst.jsdt.web" version="1.0"/>
<installed facet="jst.web" version="2.5"/>
<installed facet="java" version="1.7"/>
<installed facet="liferay.portlet" version="6.0"/>
</faceted-project>

1
.tern-project Normal file
View File

@ -0,0 +1 @@
{"ide":{"scriptPaths":[]},"plugins":{"aui":{},"liferay":{},"yui":{}},"libs":["ecma5","browser"]}

21
pom.xml
View File

@ -12,7 +12,7 @@
<groupId>org.gcube.portlets.admin</groupId>
<artifactId>resource-management</artifactId>
<version>5.3.0-SNAPSHOT</version>
<version>5.4.0-SNAPSHOT</version>
<packaging>war</packaging>
<name>gCube Resource Management Portlet</name>
<description>
@ -25,7 +25,7 @@
</scm>
<properties>
<!-- Convenience property to set the GWT version -->
<gwtVersion>2.5.1</gwtVersion>
<gwtVersion>2.7.0</gwtVersion>
<guice.version>3.0</guice.version>
<distroDirectory>distro</distroDirectory>
<!-- GWT needs at least java 1.6 -->
@ -54,11 +54,13 @@
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<version>${gwtVersion}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-servlet</artifactId>
<version>${gwtVersion}</version>
<scope>provided</scope>
</dependency>
<dependency>
@ -73,8 +75,9 @@
</dependency>
<dependency>
<groupId>com.sencha.gxt</groupId>
<artifactId>gxt</artifactId>
<version>2.2.5</version>
<artifactId>gxt2.2.5-gwt2.X</artifactId>
<version>2.7.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.googlecode.gwtquery</groupId>
@ -90,6 +93,12 @@
<groupId>org.gcube.common</groupId>
<artifactId>home-library</artifactId>
<scope>provided</scope>
<exclusions>
<exclusion>
<artifactId>asm-all</artifactId>
<groupId>asm</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.gcube.common</groupId>
@ -151,12 +160,12 @@
<dependency>
<groupId>org.gcube.portlets.admin</groupId>
<artifactId>ishealth-monitor-widget</artifactId>
<version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
<version>[1.2.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
</dependency>
<dependency>
<groupId>org.gcube.portlets.admin</groupId>
<artifactId>resource-sweeper-widget</artifactId>
<version>[2.0.0-SNAPSHOT, 3.0.0-SNAPSHOT)</version>
<version>[2.2.0-SNAPSHOT, 3.0.0-SNAPSHOT)</version>
</dependency>
<dependency>
<groupId>org.gcube.portlets.admin</groupId>

View File

@ -31,7 +31,6 @@ import org.gcube.portlets.admin.resourcemanagement.client.widgets.taskbar.Taskba
import org.gcube.portlets.admin.resourcemanagement.client.widgets.taskbar.TaskbarRegister;
import org.gcube.portlets.admin.resourcemanagement.client.widgets.viewport.MainContainer;
import org.gcube.portlets.admin.resourcemanagement.shared.exceptions.WidgetNotRegistered;
import org.gcube.resourcemanagement.support.client.utils.StatusHandler;
import org.gcube.resourcemanagement.support.client.views.ResourceTypeDecorator;
import org.gcube.resourcemanagement.support.shared.types.Tuple;
@ -52,6 +51,7 @@ import com.extjs.gxt.ui.client.widget.Text;
import com.extjs.gxt.ui.client.widget.grid.Grid;
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.rpc.AsyncCallback;
/**
@ -193,8 +193,7 @@ public class Commands {
Callbacks.handleFilterResourceDetailsGrid);
}
public static final void doGetResourceProfileByID(
final Object caller, final String scope, final String resourceID) {
public static final void doGetResourceProfileByID(final Object caller, final String scope, final String resourceID) {
ProxyRegistry.getProxyInstance().getResourceByID(
scope,
null, // no type specified
@ -202,12 +201,18 @@ public class Commands {
Callbacks.handleGetResourceProfile);
}
public static final void doGetResourceProfile(
final Object caller, final String scope, final String resourceType, final String resourceID) {
public static final void doGetResourceProfile(final Object caller, final String scope, String resourceType, final String resourceID) {
/**
* Patch (i know do not tell me about it)
*/
if (resourceType.compareTo("GenericResourceGenericResource") == 0) {
resourceType = "GenericResource";
GWT.log("resType changed to =" + resourceType);
}
StatusHandler.getStatus().setCurrentScope(scope);
StatusHandler.getStatus().setCurrentResourceType(resourceType);
Commands.mask(
"Getting Profile Details for " + FWSTranslate.getFWSNameFromLabel(resourceType) + ": " + resourceID,
"Getting Profile details for " + FWSTranslate.getFWSNameFromLabel(resourceType) + ": " + resourceID,
WidgetsRegistry.getPanel(UIIdentifiers.RESOURCE_DETAIL_GRID_PANEL).getContainer()
);
ProxyRegistry.getProxyInstance().getResourceByID(

View File

@ -413,7 +413,8 @@ 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(), new ScopeBean(scope), type, resID);
System.out.println("CompleteResourceProfile getResourceByID(final String scope, final String type, final String resID)");
System.out.println("****\n\n\n CompleteResourceProfile getResourceByID(final String scope, final String type, final String resID) *****");
System.out.println("****CompleteResourceProfile getResourceByID("+scope+","+type+","+resID+") *****\n\n");
return profile;
} catch (Exception e) {
ServerConsole.error(LOG_PREFIX, e);

View File

@ -11,7 +11,7 @@ RUNNING_MODE = STANDALONE
DEFAULT_USER = massimiliano.assante
# The scope that will be used as default
DEFAULT_SCOPE =/d4science.research-infrastructures.eu
DEFAULT_SCOPE =/gcube
# the target of update notification (if in singleton mode)
# mails MUST be separated by ;
USERMAIL_TO = m.assante@gmail.com