new icons for resources, integrated (hybrid) the Service Endpoint Editor, still need test
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/admin/resource-management@82060 82a268e6-3cf1-43bd-a215-b396298e98cf
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<classpath>
|
<classpath>
|
||||||
<classpathentry kind="src" output="target/resource-management-5.0.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
|
<classpathentry kind="src" output="target/resource-management-5.0.1-SNAPSHOT/WEB-INF/classes" path="src/main/java">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="optional" value="true"/>
|
<attribute name="optional" value="true"/>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
@ -36,5 +36,5 @@
|
||||||
</classpathentry>
|
</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-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="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="output" path="target/resource-management-5.0.0-SNAPSHOT/WEB-INF/classes"/>
|
<classpathentry kind="output" path="target/resource-management-5.0.1-SNAPSHOT/WEB-INF/classes"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
jarsExcludedFromWebInfLib=
|
jarsExcludedFromWebInfLib=
|
||||||
lastWarOutDir=/Users/massi/Documents/workspace/resource-management/target/resource-management-5.0.0-SNAPSHOT
|
lastWarOutDir=/Users/massi/Documents/workspace/resource-management/target/resource-management-5.0.1-SNAPSHOT
|
||||||
warSrcDir=src/main/webapp
|
warSrcDir=src/main/webapp
|
||||||
warSrcDirIsOutput=false
|
warSrcDirIsOutput=false
|
||||||
|
|
68
pom.xml
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
<groupId>org.gcube.portlets.admin</groupId>
|
<groupId>org.gcube.portlets.admin</groupId>
|
||||||
<artifactId>resource-management</artifactId>
|
<artifactId>resource-management</artifactId>
|
||||||
<version>5.0.0-SNAPSHOT</version>
|
<version>5.0.1-SNAPSHOT</version>
|
||||||
<packaging>war</packaging>
|
<packaging>war</packaging>
|
||||||
<name>gCube Resource Management Portlet</name>
|
<name>gCube Resource Management Portlet</name>
|
||||||
<description>
|
<description>
|
||||||
|
@ -39,7 +39,17 @@
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
</properties>
|
</properties>
|
||||||
|
<dependencyManagement>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.gcube.distribution</groupId>
|
||||||
|
<artifactId>maven-portal-bom</artifactId>
|
||||||
|
<version>LATEST</version>
|
||||||
|
<type>pom</type>
|
||||||
|
<scope>import</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</dependencyManagement>
|
||||||
<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
|
||||||
|
@ -47,19 +57,17 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.gwt</groupId>
|
<groupId>com.google.gwt</groupId>
|
||||||
<artifactId>gwt-user</artifactId>
|
<artifactId>gwt-user</artifactId>
|
||||||
<version>${gwtVersion}</version>
|
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.gwt</groupId>
|
<groupId>com.google.gwt</groupId>
|
||||||
<artifactId>gwt-servlet</artifactId>
|
<artifactId>gwt-servlet</artifactId>
|
||||||
<version>${gwtVersion}</version>
|
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>xalan</groupId>
|
<groupId>xalan</groupId>
|
||||||
<artifactId>xalan</artifactId>
|
<artifactId>xalan</artifactId>
|
||||||
<version>2.7.1</version>
|
<!-- <version>2.7.1</version> -->
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.sencha.gxt</groupId>
|
<groupId>com.sencha.gxt</groupId>
|
||||||
|
@ -77,34 +85,63 @@
|
||||||
<artifactId>rmp-common-library</artifactId>
|
<artifactId>rmp-common-library</artifactId>
|
||||||
<version>[2.0.0-SNAPSHOT, 3.0.0-SNAPSHOT)</version>
|
<version>[2.0.0-SNAPSHOT, 3.0.0-SNAPSHOT)</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<!-- FWS DEPS -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.gcube.resources.discovery</groupId>
|
||||||
|
<artifactId>ic-client</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.gcube.core</groupId>
|
||||||
|
<artifactId>common-scope-maps</artifactId>
|
||||||
|
<version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.gcube.resourcemanagement</groupId>
|
||||||
|
<artifactId>resourcemanager-client</artifactId>
|
||||||
|
<version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.gcube.resources</groupId>
|
||||||
|
<artifactId>registry-publisher</artifactId>
|
||||||
|
<version>[1.1.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.gcube.resourcemanagement</groupId>
|
||||||
|
<artifactId>ghn-manager-client</artifactId>
|
||||||
|
<version>[1.1.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.gcube.resourcemanagement</groupId>
|
||||||
|
<artifactId>ghnmanager-stubs</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.applicationsupportlayer</groupId>
|
<groupId>org.gcube.applicationsupportlayer</groupId>
|
||||||
<artifactId>aslcore</artifactId>
|
<artifactId>aslcore</artifactId>
|
||||||
<version>[3.2.0-SNAPSHOT, 4.0.0-SNAPSHOT)</version>
|
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.portlets.user</groupId>
|
<groupId>org.gcube.portlets.user</groupId>
|
||||||
<artifactId>home-library</artifactId>
|
<artifactId>home-library</artifactId>
|
||||||
<version>[4.3.0-SNAPSHOT, 5.0.0-SNAPSHOT)</version>
|
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.portlets.user</groupId>
|
<groupId>org.gcube.portlets.user</groupId>
|
||||||
<artifactId>home-library-jcr</artifactId>
|
<artifactId>home-library-jcr</artifactId>
|
||||||
<version>[1.3.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
|
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.applicationsupportlayer</groupId>
|
<groupId>org.gcube.applicationsupportlayer</groupId>
|
||||||
<artifactId>accesslogger</artifactId>
|
<artifactId>accesslogger</artifactId>
|
||||||
<version>[1.2.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
|
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.portlets.user</groupId>
|
<groupId>org.gcube.portlets.user</groupId>
|
||||||
<artifactId>gcube-widgets</artifactId>
|
<artifactId>gcube-widgets</artifactId>
|
||||||
<version>[1.4.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
|
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -116,7 +153,6 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.portal</groupId>
|
<groupId>org.gcube.portal</groupId>
|
||||||
<artifactId>custom-portal-handler</artifactId>
|
<artifactId>custom-portal-handler</artifactId>
|
||||||
<version>[1.2.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
|
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- External Modules -->
|
<!-- External Modules -->
|
||||||
|
@ -157,7 +193,6 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.customware.gwt.dispatch</groupId>
|
<groupId>net.customware.gwt.dispatch</groupId>
|
||||||
<artifactId>gwt-dispatch</artifactId>
|
<artifactId>gwt-dispatch</artifactId>
|
||||||
<version>1.2.0</version>
|
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- Liferay, Servlets Etc -->
|
<!-- Liferay, Servlets Etc -->
|
||||||
|
@ -176,57 +211,48 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>javax.portlet</groupId>
|
<groupId>javax.portlet</groupId>
|
||||||
<artifactId>portlet-api</artifactId>
|
<artifactId>portlet-api</artifactId>
|
||||||
<version>2.0</version>
|
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- Apache commons -->
|
<!-- Apache commons -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-lang</groupId>
|
<groupId>commons-lang</groupId>
|
||||||
<artifactId>commons-lang</artifactId>
|
<artifactId>commons-lang</artifactId>
|
||||||
<version>2.6</version>
|
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.commons</groupId>
|
<groupId>org.apache.commons</groupId>
|
||||||
<artifactId>commons-compress</artifactId>
|
<artifactId>commons-compress</artifactId>
|
||||||
<version>1.4.1</version>
|
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-fileupload</groupId>
|
<groupId>commons-fileupload</groupId>
|
||||||
<artifactId>commons-fileupload</artifactId>
|
<artifactId>commons-fileupload</artifactId>
|
||||||
<version>1.2.1</version>
|
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-io</groupId>
|
<groupId>commons-io</groupId>
|
||||||
<artifactId>commons-io</artifactId>
|
<artifactId>commons-io</artifactId>
|
||||||
<version>2.4</version>
|
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- Logging -->
|
<!-- Logging -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>log4j</groupId>
|
<groupId>log4j</groupId>
|
||||||
<artifactId>log4j</artifactId>
|
<artifactId>log4j</artifactId>
|
||||||
<version>1.2.16</version>
|
|
||||||
<scope>runtime</scope>
|
<scope>runtime</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.slf4j</groupId>
|
<groupId>org.slf4j</groupId>
|
||||||
<artifactId>slf4j-log4j12</artifactId>
|
<artifactId>slf4j-log4j12</artifactId>
|
||||||
<version>1.6.4</version>
|
|
||||||
<scope>runtime</scope>
|
<scope>runtime</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.slf4j</groupId>
|
<groupId>org.slf4j</groupId>
|
||||||
<artifactId>slf4j-api</artifactId>
|
<artifactId>slf4j-api</artifactId>
|
||||||
<version>1.6.4</version>
|
|
||||||
<scope>runtime</scope>
|
<scope>runtime</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.allen-sauer.gwt.log</groupId>
|
<groupId>com.allen-sauer.gwt.log</groupId>
|
||||||
<artifactId>gwt-log</artifactId>
|
<artifactId>gwt-log</artifactId>
|
||||||
<version>3.1.7</version>
|
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
|
@ -495,9 +495,20 @@ public class ResourceManagementPortlet implements EntryPoint {
|
||||||
OpCommands.doOpenGenericResourceForm();
|
OpCommands.doOpenGenericResourceForm();
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
createGR.setIconStyle("genericresource-icon");
|
createGR.setIconStyle("genericresource-icon");
|
||||||
createMnu.add(createGR);
|
createMnu.add(createGR);
|
||||||
|
|
||||||
|
// Create Service Endpoint (former Runtime Resource)
|
||||||
|
MenuItem createSE = new MenuItem("Service Endpoint") {
|
||||||
|
protected void onClick(final ComponentEvent be) {
|
||||||
|
super.onClick(be);
|
||||||
|
OpCommands.doOpenServiceEndpointForm();
|
||||||
|
};
|
||||||
|
};
|
||||||
|
createSE.setIconStyle("runtimeresource-icon");
|
||||||
|
createMnu.add(createSE);
|
||||||
|
|
||||||
// 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) {
|
||||||
|
|
|
@ -34,6 +34,7 @@ import com.extjs.gxt.ui.client.data.ModelData;
|
||||||
import com.extjs.gxt.ui.client.event.Listener;
|
import com.extjs.gxt.ui.client.event.Listener;
|
||||||
import com.extjs.gxt.ui.client.event.MessageBoxEvent;
|
import com.extjs.gxt.ui.client.event.MessageBoxEvent;
|
||||||
import com.extjs.gxt.ui.client.widget.MessageBox;
|
import com.extjs.gxt.ui.client.widget.MessageBox;
|
||||||
|
import com.google.gwt.user.client.Window;
|
||||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||||
|
|
||||||
|
|
||||||
|
@ -163,6 +164,17 @@ public class OpCommands {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*************************************************************
|
||||||
|
* SERVICE ENDPOINT
|
||||||
|
************************************************************/
|
||||||
|
public static final void doOpenServiceEndpointForm() {
|
||||||
|
if (SupportedOperations.GENERIC_RESOURCE_CREATE.isAllowed(StatusHandler.getStatus().getCredentials())) {
|
||||||
|
loadServiceEndopointEditor(null);
|
||||||
|
} else {
|
||||||
|
MessageBox.alert("Service Endpoint Creation", "You are not allowed to execute this operation", null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************
|
/*************************************************************
|
||||||
* GENERIC RESOURCE
|
* GENERIC RESOURCE
|
||||||
|
@ -175,6 +187,8 @@ public class OpCommands {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static final void doCreateGenericResource(
|
public static final void doCreateGenericResource(
|
||||||
final String id,
|
final String id,
|
||||||
final String name,
|
final String name,
|
||||||
|
@ -287,4 +301,32 @@ public class OpCommands {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Redirect to Service Endpoint Editor
|
||||||
|
* @param idToEdit
|
||||||
|
*/
|
||||||
|
public static void loadServiceEndopointEditor(String idToEdit) {
|
||||||
|
|
||||||
|
String location = Window.Location.getHref();
|
||||||
|
String res2EditParam = "";
|
||||||
|
if (idToEdit != null) {
|
||||||
|
res2EditParam = "&rid=" + idToEdit;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (location.endsWith("/") || location.endsWith("#")) { //standalone
|
||||||
|
location = com.google.gwt.user.client.Window.Location.getProtocol() +"//"+ com.google.gwt.user.client.Window.Location.getHost() +
|
||||||
|
"/runtime-resource?pid=126&lifecycle=0&state=maximized&modes=view&doAsId=10136&refererPlid=10139&authzToken=101334249"
|
||||||
|
+ "&curscope="+StatusHandler.getStatus().getCurrentScope()+res2EditParam;
|
||||||
|
}
|
||||||
|
else { //portal
|
||||||
|
location += "/../runtime-resource?pid=126&lifecycle=0&state=maximized&modes=view&doAsId=10136&refererPlid=10139&authzToken=101334249"
|
||||||
|
+ "&curscope="+StatusHandler.getStatus().getCurrentScope()+res2EditParam;
|
||||||
|
}
|
||||||
|
Window.open(location, "_blank", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,10 +23,8 @@ import org.gcube.portlets.admin.resourcemanagement.client.forms.genericresources
|
||||||
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;
|
||||||
import org.gcube.portlets.admin.resourcemanagement.client.utils.OpCommands;
|
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.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;
|
||||||
|
@ -637,7 +635,7 @@ public class ContextMenuFactory {
|
||||||
for (ModelData e : container.getSelection()) {
|
for (ModelData e : container.getSelection()) {
|
||||||
idToEdit = e.get("ID");
|
idToEdit = e.get("ID");
|
||||||
}
|
}
|
||||||
loadRuntimeResourcePortlet(idToEdit);
|
OpCommands.loadServiceEndopointEditor(idToEdit);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
// Checks the permissions on the operation
|
// Checks the permissions on the operation
|
||||||
|
@ -687,37 +685,6 @@ public class ContextMenuFactory {
|
||||||
return delete;
|
return delete;
|
||||||
}
|
}
|
||||||
|
|
||||||
String location;
|
|
||||||
/**
|
|
||||||
* Redirect to Runtime Resource Portlet
|
|
||||||
* @param idToEdit
|
|
||||||
*/
|
|
||||||
public void loadRuntimeResourcePortlet(String idToEdit){
|
|
||||||
|
|
||||||
getUrl();
|
|
||||||
// Window.alert(location);
|
|
||||||
|
|
||||||
if (location.endsWith("/") || location.endsWith("#")) { //standalone
|
|
||||||
location = com.google.gwt.user.client.Window.Location.getProtocol() +"//"+ com.google.gwt.user.client.Window.Location.getHost() + "/runtime-resource?pid=126&lifecycle=0&state=maximized&modes=view&doAsId=10136&refererPlid=10139&rid="+idToEdit+"&authzToken=101334249&curscope="+StatusHandler.getStatus().getCurrentScope();
|
|
||||||
//GWT.log("OPEN " + location);
|
|
||||||
getURL(location);
|
|
||||||
}
|
|
||||||
else { //portal
|
|
||||||
getUrl();
|
|
||||||
location += "/../runtime-resource?pid=126&lifecycle=0&state=maximized&modes=view&doAsId=10136&refererPlid=10139&rid="+idToEdit+"&authzToken=101334249&curscope="+StatusHandler.getStatus().getCurrentScope();
|
|
||||||
Window.open(location, "_self", "");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public static native void getURL(String url)/*-{
|
|
||||||
$wnd.open(url,'target=_blank')
|
|
||||||
}-*/;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get URL from browser
|
|
||||||
*/
|
|
||||||
public native void getUrl()/*-{
|
|
||||||
this.@org.gcube.portlets.admin.resourcemanagement.client.views.resourcedetails.ContextMenuFactory::location = $wnd.location.href;
|
|
||||||
}-*/;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,7 @@ import static com.google.gwt.query.client.GQuery.$;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
import org.gcube.portlets.admin.resourcemanagement.client.utils.FWSTranslate;
|
import org.gcube.portlets.admin.resourcemanagement.client.utils.FWSTranslate;
|
||||||
|
import org.gcube.resourcemanagement.support.client.views.ResourceTypeDecorator;
|
||||||
|
|
||||||
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;
|
||||||
|
@ -41,13 +42,11 @@ import com.google.gwt.user.client.ui.AbstractImagePrototype;
|
||||||
* A selectable icon (post-it styled) and text added to the pinned resources (TaskbarWindow).
|
* A selectable icon (post-it styled) and text added to the pinned resources (TaskbarWindow).
|
||||||
*/
|
*/
|
||||||
public class TaskbarButton extends Component implements IconSupport {
|
public class TaskbarButton extends Component implements IconSupport {
|
||||||
private String type;
|
private ResourceTypeDecorator type;
|
||||||
private String text;
|
private String text;
|
||||||
private AbstractImagePrototype icon;
|
private AbstractImagePrototype icon;
|
||||||
private El iconEl;
|
private El iconEl;
|
||||||
|
|
||||||
private ArrayList<Integer> extractedColors = new ArrayList<Integer>();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new shortcut.
|
* Creates a new shortcut.
|
||||||
*/
|
*/
|
||||||
|
@ -61,17 +60,28 @@ public class TaskbarButton extends Component implements IconSupport {
|
||||||
* @param id the shortcut id
|
* @param id the shortcut id
|
||||||
* @param text the shortcut text
|
* @param text the shortcut text
|
||||||
*/
|
*/
|
||||||
public TaskbarButton(final String id, final String type, final String text) {
|
public TaskbarButton(final String id, final ResourceTypeDecorator type, final String text) {
|
||||||
setId(id);
|
setId(id);
|
||||||
setText(text);
|
setText(text);
|
||||||
this.type = type;
|
this.type = type;
|
||||||
|
|
||||||
|
//for IE
|
||||||
|
final Timer t2 = new Timer() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
getElement().getFirstChildElement().getStyle().setOpacity(0.8);
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
//need to make sure the element is attached to the DOM
|
//need to make sure the element is attached to the DOM
|
||||||
Timer t = new Timer() {
|
Timer t = new Timer() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
$(getElement().getFirstChildElement()).animate("opacity:'0.9'", 500);
|
$(getElement().getFirstChildElement()).animate("opacity:'0.8'", 500);
|
||||||
|
t2.schedule(500);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
t.schedule(100);
|
t.schedule(100);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -154,8 +164,8 @@ public class TaskbarButton extends Component implements IconSupport {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final El a = el().createChild("<div class=\"iosItem\" style=\"background-color: "+ getExaBackgroundColor() + "; opacity: 0;\"><a href='#'></a></div>");
|
final El a = el().createChild("<div class=\"iosItem\" style=\"background-color: "+ getExaBackgroundColor(type) + "; opacity: 0;\"><a href='#'></a></div>");
|
||||||
iconEl = a.createChild(FWSTranslate.getFWSNameFromLabel(type));
|
iconEl = a.createChild(FWSTranslate.getFWSNameFromLabel(type.toString()));
|
||||||
El txt = a.createChild("<div style=\""+fontStyle+"\" align=\"center\"></div>");
|
El txt = a.createChild("<div style=\""+fontStyle+"\" align=\"center\"></div>");
|
||||||
|
|
||||||
if (txt != null) {
|
if (txt != null) {
|
||||||
|
@ -169,35 +179,24 @@ public class TaskbarButton extends Component implements IconSupport {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getExaBackgroundColor() {
|
private String getExaBackgroundColor(ResourceTypeDecorator type) {
|
||||||
//pick a random color
|
switch (type) {
|
||||||
int no = Random.nextInt(7);
|
case Collection:
|
||||||
while (extractedColors.contains(no)) {
|
return "#aa84c1"; //violet
|
||||||
no = Random.nextInt(7);
|
case RunningInstance:
|
||||||
}
|
return "#8aacd2"; //blue
|
||||||
extractedColors.add(no);
|
case GenericResource:
|
||||||
if (extractedColors.size() > 6)
|
return "#79bd84"; //green
|
||||||
extractedColors = new ArrayList<Integer>();
|
case GHN:
|
||||||
|
return "#a4d03b"; //ramarro
|
||||||
switch (no) {
|
case RuntimeResource:
|
||||||
case 0:
|
return "#e4df00"; //yellow
|
||||||
return "#bebee4";
|
case Service:
|
||||||
case 1:
|
return "#fea500"; //orange
|
||||||
return "#CAEBFA";
|
case WSResource:
|
||||||
case 2:
|
return "#f6634f"; //red
|
||||||
return "#a8f2b5";
|
|
||||||
case 3:
|
|
||||||
return "#fe99ad";
|
|
||||||
case 4:
|
|
||||||
return "#ffd395";
|
|
||||||
case 5:
|
|
||||||
return "#ffea97";
|
|
||||||
case 6:
|
|
||||||
return "#d4d4d4";
|
|
||||||
default:
|
default:
|
||||||
return "#a8f2b5";
|
return "#CAEBFA"; //azur
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,8 +16,6 @@
|
||||||
|
|
||||||
package org.gcube.portlets.admin.resourcemanagement.client.widgets.taskbar;
|
package org.gcube.portlets.admin.resourcemanagement.client.widgets.taskbar;
|
||||||
|
|
||||||
import static com.google.gwt.query.client.GQuery.$;
|
|
||||||
|
|
||||||
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.Callbacks;
|
import org.gcube.portlets.admin.resourcemanagement.client.utils.Callbacks;
|
||||||
import org.gcube.portlets.admin.resourcemanagement.client.utils.Commands;
|
import org.gcube.portlets.admin.resourcemanagement.client.utils.Commands;
|
||||||
|
@ -28,7 +26,6 @@ import org.gcube.resourcemanagement.support.shared.util.Configuration;
|
||||||
import com.extjs.gxt.ui.client.event.ComponentEvent;
|
import com.extjs.gxt.ui.client.event.ComponentEvent;
|
||||||
import com.extjs.gxt.ui.client.widget.menu.Menu;
|
import com.extjs.gxt.ui.client.widget.menu.Menu;
|
||||||
import com.extjs.gxt.ui.client.widget.menu.MenuItem;
|
import com.extjs.gxt.ui.client.widget.menu.MenuItem;
|
||||||
import com.google.gwt.core.client.GWT;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Massimiliano Assante (ISTI-CNR)
|
* @author Massimiliano Assante (ISTI-CNR)
|
||||||
|
@ -66,7 +63,7 @@ public class TaskbarItem {
|
||||||
|
|
||||||
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) {
|
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();
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,6 +16,8 @@
|
||||||
|
|
||||||
package org.gcube.portlets.admin.resourcemanagement.client.widgets.taskbar;
|
package org.gcube.portlets.admin.resourcemanagement.client.widgets.taskbar;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
import org.gcube.portlets.admin.resourcemanagement.client.widgets.console.ConsoleMessageBroker;
|
import org.gcube.portlets.admin.resourcemanagement.client.widgets.console.ConsoleMessageBroker;
|
||||||
import org.gcube.resourcemanagement.support.shared.util.Configuration;
|
import org.gcube.resourcemanagement.support.shared.util.Configuration;
|
||||||
|
|
||||||
|
@ -34,6 +36,8 @@ public class TaskbarWindow extends Window {
|
||||||
private TaskbarItem relatedItem = null;
|
private TaskbarItem relatedItem = null;
|
||||||
private boolean isMinimized = false;
|
private boolean isMinimized = false;
|
||||||
|
|
||||||
|
public static ArrayList<Integer> extractedColors = new ArrayList<Integer>();
|
||||||
|
|
||||||
protected TaskbarWindow(final TaskbarItem relatedItem) {
|
protected TaskbarWindow(final TaskbarItem relatedItem) {
|
||||||
super();
|
super();
|
||||||
this.setModal(false);
|
this.setModal(false);
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.iosItem {
|
.iosItem {
|
||||||
color: #4c68a6;
|
color: #FDFDF6;
|
||||||
font-family: "HelveticaNeue-Light", "Helvetica Neue Light",
|
font-family: "HelveticaNeue-Light", "Helvetica Neue Light",
|
||||||
"Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
|
"Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
|
||||||
font-weight: 300;
|
font-weight: 300;
|
||||||
|
@ -20,6 +20,7 @@
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
width: 120px;
|
width: 120px;
|
||||||
|
height: 100px;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
-moz-border-radius: 10px;
|
-moz-border-radius: 10px;
|
||||||
-webkit-border-radius: 10px;
|
-webkit-border-radius: 10px;
|
||||||
|
@ -239,33 +240,42 @@
|
||||||
background-image: url(images/icons/about.png) !important;
|
background-image: url(images/icons/about.png) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.resources-icon {
|
|
||||||
background-image: url(images/icons/world.png) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wsresources-icon {
|
|
||||||
background-image: url(images/icons/ws-resource.png) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ghn-icon {
|
|
||||||
background-image: url(images/icons/hostingNode.png) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.defaultleaf-icon {
|
.defaultleaf-icon {
|
||||||
background-image: url(images/icons/grid.png) !important;
|
background-image: url(images/icons/grid.png) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.resources-icon {
|
||||||
|
background-image: url(images/icons/world.png) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* RESOURCES */
|
||||||
|
|
||||||
.collection-icon {
|
.collection-icon {
|
||||||
background-image: url(images/icons/collection2.png) !important;
|
background-image: url(images/resource-icons/violet.png) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.runninginstance-icon {
|
||||||
|
background-image: url(images/resource-icons/blue.png) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.genericresource-icon {
|
.genericresource-icon {
|
||||||
background-image: url(images/icons/GenericResource.png) !important;
|
background-image: url(images/resource-icons/green.png) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.runtimeresource-icon {
|
.ghn-icon {
|
||||||
background-image: url(images/icons/serviceEndpoint.png) !important;
|
background-image: url(images/resource-icons/ramarro.png) !important;
|
||||||
}
|
}
|
||||||
|
.runtimeresource-icon {
|
||||||
|
background-image: url(images/resource-icons/yellow.png) !important;
|
||||||
|
}
|
||||||
|
.service-icon {
|
||||||
|
background-image: url(images/resource-icons/orange.png) !important;
|
||||||
|
}
|
||||||
|
.wsresources-icon {
|
||||||
|
background-image: url(images/resource-icons/red.png) !important;
|
||||||
|
}
|
||||||
|
/* END RESOURCES */
|
||||||
|
|
||||||
.pluginCM-icon {
|
.pluginCM-icon {
|
||||||
background-image: url(images/icons/pluginCM.png) !important;
|
background-image: url(images/icons/pluginCM.png) !important;
|
||||||
|
@ -283,13 +293,7 @@
|
||||||
background-image: url(images/icons/table_multiple.png) !important;
|
background-image: url(images/icons/table_multiple.png) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.runninginstance-icon {
|
|
||||||
background-image: url(images/icons/gcoreEndpoint.png) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.service-icon {
|
|
||||||
background-image: url(images/icons/software.png) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.empty-icon {
|
.empty-icon {
|
||||||
background-image: url(images/icons/error.png) !important;
|
background-image: url(images/icons/error.png) !important;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
# The user and its credentials
|
# The user and its credentials
|
||||||
# Possible values for credentials:
|
# Possible values for credentials:
|
||||||
# [USER,ADMIN,DEBUG]
|
# [USER,ADMIN,DEBUG]
|
||||||
USER_CREDENTIALS = ADMIN
|
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]
|
||||||
|
@ -11,7 +11,7 @@ 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 =/gcube/devsec
|
DEFAULT_SCOPE =/gcube
|
||||||
# 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
|
||||||
|
|
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.1 KiB |