Initial import.

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/admin/vre-deploy@82482 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Massimiliano Assante 2013-10-04 15:15:49 +00:00
parent 50905d31ff
commit 3848b0d9bf
832 changed files with 18468 additions and 0 deletions

36
.classpath Normal file
View File

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/vre-deploy-3.0.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="target/generated-sources/gwt"/>
<classpathentry including="**/*.java" kind="src" output="src/main/webapp/WEB-INF/classes" path="src/main/resources"/>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry including="**/*.java" kind="src" output="target/test-classes" path="src/test/resources"/>
<classpathentry kind="con" path="com.google.gwt.eclipse.core.GWT_CONTAINER"/>
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/vre-deploy-3.0.0-SNAPSHOT/WEB-INF/classes"/>
</classpath>

59
.project Normal file
View File

@ -0,0 +1,59 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>vre-deploy</name>
<comment>vre-deploy project</comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.maven.ide.eclipse.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.google.gdt.eclipse.core.webAppProjectValidator</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.google.gwt.eclipse.core.gwtProjectValidator</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.maven.ide.eclipse.maven2Nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
<nature>com.google.gwt.eclipse.core.gwtNature</nature>
</natures>
</projectDescription>

15
.settings/.jsdtscope Normal file
View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src/main/webapp" />
<classpathentry kind="con"
path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER" />
<classpathentry kind="con"
path="org.eclipse.wst.jsdt.launching.WebProject">
<attributes>
<attribute name="hide" value="true" />
</attributes>
</classpathentry>
<classpathentry kind="con"
path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary" />
<classpathentry kind="output" path="" />
</classpath>

View File

@ -0,0 +1,3 @@
#Thu Jun 16 10:18:26 CEST 2011
eclipse.preferences.version=1
filesCopiedToWebInfLib=

View File

@ -0,0 +1,5 @@
eclipse.preferences.version=1
jarsExcludedFromWebInfLib=
lastWarOutDir=/Users/massi/Documents/workspace/vre-deploy/target/vre-deploy-3.0.0-SNAPSHOT
warSrcDir=src/main/webapp
warSrcDirIsOutput=false

View File

@ -0,0 +1,5 @@
#Thu Jun 16 11:14:17 CEST 2011
eclipse.preferences.version=1
entryPointModules=
filesCopiedToWebInfLib=gwt-servlet.jar
gwtCompileSettings=PGd3dC1jb21waWxlLXNldHRpbmdzPjxsb2ctbGV2ZWw+SU5GTzwvbG9nLWxldmVsPjxvdXRwdXQtc3R5bGU+T0JGVVNDQVRFRDwvb3V0cHV0LXN0eWxlPjxleHRyYS1hcmdzPjwhW0NEQVRBWy13YXIgc3JjL21haW4vd2ViYXBwXV0+PC9leHRyYS1hcmdzPjx2bS1hcmdzPjwhW0NEQVRBWy1YbXg1MTJtXV0+PC92bS1hcmdzPjxlbnRyeS1wb2ludC1tb2R1bGU+Y29tLmNvbXBhbnkuU29tZU1vZHVsZTwvZW50cnktcG9pbnQtbW9kdWxlPjwvZ3d0LWNvbXBpbGUtc2V0dGluZ3M+

View File

@ -0,0 +1,7 @@
#Tue Jun 25 15:13:42 CEST 2013
eclipse.preferences.version=1
encoding//src/main/java=UTF-8
encoding//src/main/resources=UTF-8
encoding//src/test/java=UTF-8
encoding//src/test/resources=UTF-8
encoding/<project>=UTF-8

View File

@ -0,0 +1,9 @@
#Tue Jun 25 15:18:53 CEST 2013
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.6

View File

@ -0,0 +1,5 @@
#Tue Jun 25 15:13:41 CEST 2013
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="${module}">
<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"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/target/generated-sources/gwt"/>
<property name="java-output-path" value="/${module}/target/www/WEB-INF/classes"/>
<property name="context-root" value="vre-deploy"/>
</wb-module>
</project-modules>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<fixed facet="wst.jsdt.web"/>
<installed facet="jst.web" version="2.3"/>
<installed facet="wst.jsdt.web" version="1.0"/>
<installed facet="java" version="1.6"/>
</faceted-project>

View File

@ -0,0 +1 @@
org.eclipse.wst.jsdt.launching.baseBrowserLibrary

View File

@ -0,0 +1,2 @@
disabled=06target
eclipse.preferences.version=1

View File

@ -0,0 +1,9 @@
#Thu Sep 02 10:42:12 CEST 2010
activeProfiles=
eclipse.preferences.version=1
fullBuildGoals=process-test-resources
includeModules=false
resolveWorkspaceProjects=true
resourceFilterGoals=process-resources resources\:testResources
skipCompilerPlugin=true
version=1

View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="com.google.gwt.eclipse.core.launch.gwtJUnit">
<stringAttribute key="com.google.gwt.eclipse.core.LOG_LEVEL" value="INFO"/>
<booleanAttribute key="com.google.gwt.eclipse.core.NOT_HEADLESS" value="false"/>
<stringAttribute key="com.google.gwt.eclipse.core.OUT_DIR" value="www-test"/>
<booleanAttribute key="com.google.gwt.eclipse.core.STANDARDS_MODE" value="false"/>
<stringAttribute key="com.google.gwt.eclipse.core.STYLE" value="OBFUSCATED"/>
<stringAttribute key="com.google.gwt.eclipse.core.WEB_MODE" value="false"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/vre-deploy/src/test/java/org/gcube/portlets/admin/vredeployer/client/GwtTestVredeployer.java"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="1"/>
</listAttribute>
<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="com.google.gdt.eclipse.maven.mavenClasspathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.gcube.portlets.admin.vredeployer.client.GwtTestVredeployer"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="vre-deploy"/>
</launchConfiguration>

View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="com.google.gwt.eclipse.core.launch.gwtJUnit">
<stringAttribute key="com.google.gwt.eclipse.core.LOG_LEVEL" value="INFO"/>
<booleanAttribute key="com.google.gwt.eclipse.core.NOT_HEADLESS" value="false"/>
<stringAttribute key="com.google.gwt.eclipse.core.OUT_DIR" value="www-test"/>
<booleanAttribute key="com.google.gwt.eclipse.core.STANDARDS_MODE" value="false"/>
<stringAttribute key="com.google.gwt.eclipse.core.STYLE" value="OBFUSCATED"/>
<stringAttribute key="com.google.gwt.eclipse.core.WEB_MODE" value="true"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/vre-deploy/src/test/java/org/gcube/portlets/admin/vredeployer/client/GwtTestVredeployer.java"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="1"/>
</listAttribute>
<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="com.google.gdt.eclipse.maven.mavenClasspathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.gcube.portlets.admin.vredeployer.client.GwtTestVredeployer"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="vre-deploy"/>
</launchConfiguration>

231
pom.xml Normal file
View File

@ -0,0 +1,231 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>maven-parent</artifactId>
<groupId>org.gcube.tools</groupId>
<version>1.0.0</version>
<relativePath />
</parent>
<groupId>org.gcube.portlets.admin</groupId>
<artifactId>vre-deploy</artifactId>
<packaging>war</packaging>
<version>3.0.0-SNAPSHOT</version>
<name>gCube VRE Deploy Wizard Portlet</name>
<description>
gCube VRE Deploy Wizard Portlet.
</description>
<scm>
<connection>scm:svn:http://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/admin/${project.artifactId}</connection>
<developerConnection>scm:https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/admin/${project.artifactId}</developerConnection>
<url>http://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/admin/${project.artifactId}</url>
</scm>
<properties>
<!-- Convenience property to set the GWT version -->
<gwtVersion>2.5.1</gwtVersion>
<distroDirectory>distro</distroDirectory>
<!-- GWT needs at least java 1.6 -->
<maven.compiler.source>1.6</maven.compiler.source>
<maven.compiler.target>1.6</maven.compiler.target>
<webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</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>
<!-- This dependency is needed to use GWT UI BInder without old Xerces
version of gCore complaining -->
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>2.9.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.gcube.applicationsupportlayer</groupId>
<artifactId>aslcore</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.gcube.applicationsupportlayer</groupId>
<artifactId>aslvre</artifactId>
<version>[5.0.0-SNAPSHOT, 6.0.0-SNAPSHOT)</version>
</dependency>
<dependency>
<groupId>org.gcube.portlets.user</groupId>
<artifactId>gcube-widgets</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.gcube.portal</groupId>
<artifactId>custom-portal-handler</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.gcube.core</groupId>
<artifactId>common-scope-maps</artifactId>
<version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
</dependency>
<dependency>
<groupId>org.gcube.vremanagement</groupId>
<artifactId>vremodeler-client-library</artifactId>
<version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.sencha.gxt</groupId>
<artifactId>gxt</artifactId>
<version>2.2.5</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.gcube.dvos</groupId>
<artifactId>usermanagement-core</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.liferay.portal</groupId>
<artifactId>portal-service</artifactId>
<version>6.0.6</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.portlet</groupId>
<artifactId>portlet-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
</dependencies>
<build>
<!-- Generate compiled stuff in the folder used for developing mode -->
<outputDirectory>${webappDirectory}/WEB-INF/classes</outputDirectory>
<plugins>
<!-- GWT Maven Plugin -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>${gwtVersion}</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
<!-- <goal>test</goal> -->
</goals>
</execution>
</executions>
<!-- Plugin configuration. There are many available options, see gwt-maven-plugin
documentation at codehaus.org -->
<configuration>
<runTarget>VREDefinition.html</runTarget>
<hostedWebapp>${webappDirectory}</hostedWebapp>
</configuration>
</plugin>
<!-- Copy static web files before executing gwt:run -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>exploded</goal>
</goals>
</execution>
</executions>
<configuration>
<webappDirectory>${webappDirectory}</webappDirectory>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<!-- SA Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2</version>
<configuration>
<descriptors>
<descriptor>${distroDirectory}/descriptor.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<id>servicearchive</id>
<phase>install</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
<executions>
<execution>
<id>copy-profile</id>
<phase>install</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>target</outputDirectory>
<resources>
<resource>
<directory>${distroDirectory}</directory>
<filtering>true</filtering>
<includes>
<include>profile.xml</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,12 @@
package org.gcube.portlets.admin.vredeployer.client;
import org.gcube.portlets.admin.vredeployer.client.icons.VreIcons;
import com.google.gwt.core.client.GWT;
public class VREDeployerConstants {
public static final VreIcons ICONS = GWT.create(VreIcons.class);
public static final String LOADING_TEXT = "Loading data, please wait..";
}

View File

@ -0,0 +1,84 @@
package org.gcube.portlets.admin.vredeployer.client;
import org.gcube.portlets.admin.vredeployer.client.control.Controller;
import org.gcube.portlets.admin.vredeployer.client.model.Model;
import org.gcube.portlets.admin.vredeployer.client.view.panels.MainContainer;
import org.gcube.portlets.user.gcubewidgets.client.GCubePanel;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.event.logical.shared.ResizeEvent;
import com.google.gwt.event.logical.shared.ResizeHandler;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.RootPanel;
/**
* Entry point classes define <code>onModuleLoad()</code>.
*/
public class Vredeployer implements EntryPoint {
/**
*
*/
public static final String CONTAINER_DIV = "DeployerDIV";
private MainContainer mainContainer;
private Controller controller;
private Model model;
/**
* This is the entry point method.
*/
public void onModuleLoad() {
GCubePanel gcubePanel = new GCubePanel("VRE Deployer","https://gcube.wiki.gcube-system.org/gcube/index.php/VRE_Administration#VRE_Approval");
controller = new Controller(this);
mainContainer = new MainContainer(controller);
mainContainer.getWestPanel().setDefaultSelected();
model = new Model(mainContainer);
gcubePanel.add(mainContainer);
RootPanel.get(CONTAINER_DIV).add(gcubePanel);
//enable the portlet if there isa VRE to approve
model.checkApproveModeEnabled();
Window.addResizeHandler(new ResizeHandler() {
public void onResize(ResizeEvent event) {
updateSize();
}
});
updateSize();
}
/**
* updateSize
*/
public void updateSize() {
RootPanel workspace = RootPanel.get(CONTAINER_DIV);
int topBorder = workspace.getAbsoluteTop();
int leftBorder = workspace.getAbsoluteLeft();
int rightScrollBar = 17;
int rootHeight = Window.getClientHeight() - topBorder - 4;
int rootWidth = Window.getClientWidth() - 2* leftBorder - rightScrollBar;
mainContainer.setHeight(rootHeight-30);
mainContainer.setWidth(rootWidth);
}
/**
*
* @return the main container
*/
public MainContainer getMainContainer() {
return mainContainer;
}
/**
*
* @return
*/
public Model getModel() {
return model;
}
}

View File

@ -0,0 +1,45 @@
package org.gcube.portlets.admin.vredeployer.client;
import java.util.List;
import org.gcube.portlets.admin.vredeployer.client.model.VREFunctionalityModel;
import org.gcube.portlets.admin.vredeployer.shared.GHNProfile;
import org.gcube.portlets.admin.vredeployer.shared.VREDeployerStatusType;
import org.gcube.portlets.admin.vredeployer.shared.VREDescrBean;
import org.gcube.portlets.admin.vredeployer.shared.deployreport.ClientDeployReport;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
/**
*
* @author massi
*
*/
@RemoteServiceRelativePath("VREDeployerServiceImpl")
public interface VredeployerService extends RemoteService {
VREDescrBean getVRE() throws NullPointerException;
VREDeployerStatusType isApprovingModeEnabled();
int isCloudSelected();
VREFunctionalityModel getFunctionality();
List<GHNProfile> getAvailableGHNs();
boolean setGHNsSelected(String[] selectedGHNIds);
boolean setCloudDeploy(int virtualMachines);
int getCloudVMSelected();
boolean deployVRE();
ClientDeployReport checkCreateVRE();
String getHTMLReport();
void getGHNPerFunctionality(String funcId);
}

View File

@ -0,0 +1,42 @@
package org.gcube.portlets.admin.vredeployer.client;
import java.util.List;
import org.gcube.portlets.admin.vredeployer.client.model.VREFunctionalityModel;
import org.gcube.portlets.admin.vredeployer.shared.GHNProfile;
import org.gcube.portlets.admin.vredeployer.shared.VREDeployerStatusType;
import org.gcube.portlets.admin.vredeployer.shared.VREDescrBean;
import org.gcube.portlets.admin.vredeployer.shared.deployreport.ClientDeployReport;
import com.google.gwt.user.client.rpc.AsyncCallback;
/*
*
*/
public interface VredeployerServiceAsync {
void getVRE(AsyncCallback<VREDescrBean> callback);
void isApprovingModeEnabled(AsyncCallback<VREDeployerStatusType> callback);
void getAvailableGHNs(AsyncCallback<List<GHNProfile>> callback);
void setGHNsSelected(String[] selectedGHNIds, AsyncCallback<Boolean> callback);
void isCloudSelected(AsyncCallback<Integer> callback);
void setCloudDeploy(int virtualMachines, AsyncCallback<Boolean> callback);
void getCloudVMSelected(AsyncCallback<Integer> callback);
void checkCreateVRE(AsyncCallback<ClientDeployReport> callback);
void deployVRE(AsyncCallback<Boolean> callback);
void getHTMLReport(AsyncCallback<String> callback);
void getFunctionality(AsyncCallback<VREFunctionalityModel> callback);
void getGHNPerFunctionality(String funcId, AsyncCallback<Void> callback);
}

View File

@ -0,0 +1,129 @@
package org.gcube.portlets.admin.vredeployer.client.charts;
import java.util.List;
import org.gcube.portlets.admin.vredeployer.shared.deployreport.DeployStatus;
import com.extjs.gxt.charts.client.Chart;
import com.extjs.gxt.charts.client.model.ChartModel;
import com.extjs.gxt.charts.client.model.axis.XAxis;
import com.extjs.gxt.charts.client.model.axis.YAxis;
import com.extjs.gxt.charts.client.model.charts.BarChart;
import com.extjs.gxt.charts.client.model.charts.FilledBarChart;
import com.extjs.gxt.charts.client.model.charts.BarChart.Bar;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.Random;
public class CloudChart implements SimpleChartModel {
private Chart chart;
public CloudChart() {
super();
String url = GWT.getModuleBaseURL() + "../";
url += "gxt/chart/open-flash-chart.swf";
chart = new Chart(url);
chart.setBorders(true);
}
/**
*
* @return
*/
public Chart getChart() {
return chart;
}
/**
*
*/
public ChartModel getChartModel(DeployStatus cloudStatus, List<DeployStatus> singleMachines) {
ChartModel cm = new ChartModel("current status: " + cloudStatus, "font-size: 14px; font-family: Verdana; text-align: center;");
cm.setBackgroundColour("#FFFFFF");
cm.setDecimalSeparatorComma(true);
int n = singleMachines.size();
XAxis xa = new XAxis();
xa.setLabels(getAscisseValues(singleMachines));
xa.getLabels().setColour("#009900");
xa.setGridColour("#eeffee");
xa.setColour("#009900");
cm.setXAxis(xa);
YAxis ya = new YAxis();
ya.setRange(0, 100);
ya.setSteps(10);
ya.setGridColour("#eeffee");
ya.setColour("#009900");
ya.setOffset(true);
cm.setYAxisLabelStyle(10, "#009900");
cm.setYAxis(ya);
BarChart bchart = new BarChart();
for (DeployStatus deployStatus : singleMachines) {
//bchart.addValues(Random.nextInt(5000) + 10000);
switch (deployStatus) {
case FAIL:
Bar fail = new Bar(30, "#D91717");
fail.setTooltip("failure");
bchart.addBars(fail);
break;
case FINISH:
Bar finish = new Bar(100, "#63AC1C");
finish.setTooltip("completed");
bchart.addBars(finish);
break;
case PENDING:
Bar pending = new Bar(10, "#FE8537");
pending.setTooltip("pending");
bchart.addBars(pending);
break;
case RUN:
Bar running = new Bar(50, "#63AC1C");
running.setTooltip("running");
bchart.addBars(running);
;
break;
case SKIP:
Bar skip = new Bar(10, "#CCCCCC");
skip.setTooltip("skip");
bchart.addBars(skip);
break;
case WAIT:
Bar waiting = new Bar(25, "#FE8537");
waiting.setTooltip("waiting");
bchart.addBars(waiting);
//bchart.setTooltip("waiting");
break;
default:
break;
}
//bchart.setTooltip("#val#%");
}
cm.addChartConfig(bchart);
return cm;
}
/**
*
* @param n
* @return
*/
public static String[] getAscisseValues(List<DeployStatus> singleMachines) {
int n = singleMachines.size();
String[] machines = new String[n];
for (int c = 0; c < n; c++)
machines[c] = "node" + (c+1);
return machines;
}
}

View File

@ -0,0 +1,281 @@
package org.gcube.portlets.admin.vredeployer.client.charts;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import org.gcube.portlets.admin.vredeployer.shared.deployreport.ClientFunctionalityDeployReport;
import org.gcube.portlets.admin.vredeployer.shared.deployreport.ClientFunctionalityReport;
import org.gcube.portlets.admin.vredeployer.shared.deployreport.ClientServiceReport;
import org.gcube.portlets.admin.vredeployer.shared.deployreport.DeployStatus;
import com.extjs.gxt.charts.client.Chart;
import com.extjs.gxt.charts.client.model.ChartModel;
import com.extjs.gxt.charts.client.model.axis.XAxis;
import com.extjs.gxt.charts.client.model.axis.YAxis;
import com.extjs.gxt.charts.client.model.charts.BarChart;
import com.extjs.gxt.charts.client.model.charts.BarChart.Bar;
import com.google.gwt.core.client.GWT;
public class FunctionalityChart {
private Chart chart;
public FunctionalityChart() {
super();
String url = GWT.getModuleBaseURL() + "../";
url += "gxt/chart/open-flash-chart.swf";
chart = new Chart(url);
chart.setBorders(true);
}
/**
*
* @return
*/
public Chart getChart() {
return chart;
}
/**
*
*/
public ChartModel getChartModel(ClientFunctionalityDeployReport report) {
ChartModel cm = new ChartModel("current status: " + report.getStatus(), "font-size: 14px; font-family: Verdana; text-align: center;");
cm.setBackgroundColour("#FFFFFF");
cm.setDecimalSeparatorComma(true);
HashMap<ClientFunctionalityReport, List<ClientServiceReport>> funTable;
if (report.getFunTable() != null)
funTable = report.getFunTable();
else
funTable = new HashMap<ClientFunctionalityReport, List<ClientServiceReport>>();
int n = report.getFunTable().size();
XAxis xa = new XAxis();
xa.setLabels(getAscisseValues(funTable));
xa.getLabels().setColour("#009900");
xa.setGridColour("#eeffee");
xa.setColour("#009900");
cm.setXAxis(xa);
YAxis ya = new YAxis();
ya.setRange(0, 100);
ya.setSteps(10);
ya.setGridColour("#eeffee");
ya.setColour("#009900");
ya.setOffset(true);
cm.setYAxisLabelStyle(10, "#009900");
cm.setYAxis(ya);
BarChart bchart = new BarChart();
for (ClientFunctionalityReport func : funTable.keySet()) {
DeployStatus deployStatus = func.getStatus();
//bchart.addValues(Random.nextInt(5000) + 10000);
switch (deployStatus) {
case FAIL:
Bar fail = new Bar(30, "#D91717");
fail.setTooltip("failure");
bchart.addBars(fail);
break;
case FINISH:
Bar finish = new Bar(100, "#63AC1C");
finish.setTooltip("completed " + func.getName());
bchart.addBars(finish);
break;
case PENDING:
Bar pending = new Bar(10, "#FE8537");
pending.setTooltip("pending");
bchart.addBars(pending);
break;
case RUN:
Bar running = new Bar(50, "#63AC1C");
running.setTooltip("running " + func.getName());
bchart.addBars(running);
;
break;
case SKIP:
Bar skip = new Bar(10, "#CCCCCC");
skip.setTooltip("skip");
bchart.addBars(skip);
break;
case WAIT:
Bar waiting = new Bar(25, "#FE8537");
waiting.setTooltip("waiting " + func.getName());
bchart.addBars(waiting);
//bchart.setTooltip("waiting");
break;
default:
break;
}
//bchart.setTooltip("#val#%");
}
cm.addChartConfig(bchart);
return cm;
}
/**
*
* @param n
* @return
*/
public static List<String> getAscisseValues(HashMap<ClientFunctionalityReport, List<ClientServiceReport>> funTable) {
funTable.keySet();
List<String> func = new LinkedList<String>();
int i = 0;
for (ClientFunctionalityReport fun : funTable.keySet()) {
func.add("f"+i);
i++;
}
return func;
}
}
//
// HashMap<ClientFunctionalityReport, List<ClientServiceReport>> funTable;
// if (report.getFunTable() != null)
// funTable = report.getFunTable();
// else
// funTable = new HashMap<ClientFunctionalityReport, List<ClientServiceReport>>();
//
// int n = report.getFunTable().size();
// GWT.log("SIZE TABLE" + n);
//
// ChartModel cm = new ChartModel("current status: " + report.getStatus(), "font-size: 14px; font-family: Verdana; text-align: center;");
// cm.setBackgroundColour("#FFFFFF");
//
// XAxis xa = new XAxis();
// xa.setRange(0, getMaxServicesNumber(funTable)*10 + 30);
// xa.getLabels().setColour("#009900");
// xa.addLabels("");
// xa.setColour("#009900");
// xa.setSteps(10);
//
// // xa.setRange(0, 100);
// cm.setXAxis(xa);
// xa.setGridColour("#eeffee");
//
// YAxis ya = new YAxis();
// ya.setColour("#009900");
// //ya.addLabels(getAscisseValues(funTable));
// ya.setGridColour("#eeffee");
// ya.setOffset(true);
// cm.setYAxis(ya);
//
//
// HorizontalBarChart bchart = new HorizontalBarChart();
// /**
// *
// */
// for (MyBarData data: getBars(funTable)) {
// bchart.addBars(new HorizontalBarChart.Bar(data.value, data.color));
// }
// cm.addChartConfig(bchart);
// return cm;
// }
//
// /**
// *
// * @param table
// * @return
// */
// private int getMaxServicesNumber(HashMap<ClientFunctionalityReport, List<ClientServiceReport>> table) {
// //calculate the max of services for each functionality
// int max = 0;
// for (ClientFunctionalityReport func : table.keySet()) {
// int toCompare = table.get(func).size();
// if (toCompare > max)
// max = toCompare;
// }
// return max;
// }
//
// /**
// *
// * @return
// */
// private List<MyBarData> getBars(HashMap<ClientFunctionalityReport, List<ClientServiceReport>> table) {
//
// List<MyBarData> toReturn = new LinkedList<MyBarData>();
//
// //a bar for each functionality
// for (ClientFunctionalityReport func : table.keySet()) {
// toReturn.add(new MyBarData( table.get(func).size()*10, getColor(func.getStatus()) ) );
// }
// return toReturn;
// }
//
// /**
// *
// * @author massi
// *
// */
// private class MyBarData {
// public double value;
// public String color;
// /**
// *
// * @param value
// * @param color
// */
// public MyBarData(double value, String color) {
// super();
// this.value = value;
// this.color = color;
// }
//
// }
// /**
// *
// * @param status
// * @return
// */
// private String getColor(DeployStatus status) {
// switch (status) {
// case FAIL:
// return "#D91717";
// case FINISH:
// return "#63AC1C";
// case PENDING:
// return "#FE8537";
// case RUN:
// return "#63AC1C";
// case SKIP:
// return "#CCCCCC";
// case WAIT:
// return "#FE8537";
// default:
// return "#000000";
// }
// }
//
// /**
// *
// * @param n
// * @return
// */
// public static List<String> getAscisseValues(HashMap<ClientFunctionalityReport, List<ClientServiceReport>> funTable) {
// funTable.keySet();
// List<String> machines = new LinkedList<String>();
// int i = 0;
// for (ClientFunctionalityReport fun : funTable.keySet()) {
// machines.add(fun.getName());
// i++;
// }
// GWT.log("size func" + machines.size());
// return machines;
// }

View File

@ -0,0 +1,46 @@
package org.gcube.portlets.admin.vredeployer.client.charts;
import com.extjs.gxt.ui.client.data.BaseModelData;
public class GeneralChartModel extends BaseModelData {
/**
*
*/
private static final long serialVersionUID = 1L;
protected GeneralChartModel() {
}
public GeneralChartModel(String name, String path,SimpleChartModel example) {
setName(name);
setPath(path);
setExample(example);
}
public void setName(String name) {
set("name", name);
}
public void setPath(String path) {
set("path", path);
}
public void setExample(SimpleChartModel example) {
set("example", example);
}
public String getName() {
return get("name");
}
public String getPath() {
return get("path");
}
public SimpleChartModel getExample() {
return get("example");
}
}

View File

@ -0,0 +1,13 @@
package org.gcube.portlets.admin.vredeployer.client.charts;
import java.util.List;
import org.gcube.portlets.admin.vredeployer.shared.deployreport.DeployStatus;
import com.extjs.gxt.charts.client.model.ChartModel;
public interface SimpleChartModel {
public ChartModel getChartModel(DeployStatus cloudStatus, List<DeployStatus> singleMachines);
}

View File

@ -0,0 +1,19 @@
package org.gcube.portlets.admin.vredeployer.client.constants;
import com.google.gwt.core.client.GWT;
public class ImagesConstants {
public static final String INFO_IMAGE = GWT.getModuleBaseURL() + "../images/information.png";
public static final String CONTENT_IMAGE = GWT.getModuleBaseURL() + "../images/content.png";
public static final String COLLECTIONS_IMAGE = GWT.getModuleBaseURL() + "../images/collections.png";
public static final String METADATA_IMAGE = GWT.getModuleBaseURL() + "../images/metadata.gif";
public static final String FUNC_IMAGE = GWT.getModuleBaseURL() + "../images/functionality.png";
public static final String ARCH_IMAGE = GWT.getModuleBaseURL() + "../images/architecture.png";
public static final String CLOUD_ICON = GWT.getModuleBaseURL() + "../images/cloud.png";
public static final String CLOUD_IMAGE = GWT.getModuleBaseURL() + "../images/cloud-gcube.png";
}

View File

@ -0,0 +1,122 @@
package org.gcube.portlets.admin.vredeployer.client.control;
import org.gcube.portlets.admin.vredeployer.client.VREDeployerConstants;
import org.gcube.portlets.admin.vredeployer.client.Vredeployer;
import org.gcube.portlets.admin.vredeployer.client.model.AtomicTreeNode;
import org.gcube.portlets.admin.vredeployer.client.view.panels.CenterPanel;
import org.gcube.portlets.admin.vredeployer.shared.GHNBean;
import com.extjs.gxt.ui.client.widget.ContentPanel;
import com.google.gwt.core.client.GWT;
public class Controller {
private Vredeployer vreDeployer;
public Controller(final Vredeployer vreDeployer) {
this.vreDeployer = vreDeployer;
}
public void treeItemClicked(AtomicTreeNode selectedModel) {
CenterPanel cp = vreDeployer.getMainContainer().getCenterPanel();
switch (selectedModel.getType()) {
case INFO:
cp.setHeading("VRE Overall Information");
cp.setIconStyle("images/icons/information.png");
cp.emptyPanel();
showLoading();
vreDeployer.getModel().getVREInitialInfo();
vreDeployer.getMainContainer().getEastPanel().collapse();
vreDeployer.getMainContainer().showEastPanel(false);
break;
case FUNCTIONALITY:
cp.setHeading("VRE Selected Functionality");
cp.setIconStyle("images/icons/functionality.png");
cp.emptyPanel();
showLoading();
vreDeployer.getModel().getFunctionality();
vreDeployer.getMainContainer().showEastPanel(true);
break;
case ARCHITECTURE:
cp.setHeading("Select nodes to deploy VRE Services");
cp.setIconStyle("images/icons/architecture.png");
cp.emptyPanel();
showLoading();
showEastPanelLoading();
vreDeployer.getModel().getAvailableGhnList();
vreDeployer.getModel().checkCloudSelected();
vreDeployer.getMainContainer().showEastPanel(true);
break;
case REPORT:
cp.setHeading("Finalize");
cp.setIconStyle("images/icons/play.png");
cp.emptyPanel();
vreDeployer.getMainContainer().getCenterPanel().mask("Step Architecture Missing, define nodes first", "");
vreDeployer.getMainContainer().getEastPanel().hide();
vreDeployer.getModel().getSummary();
break;
default:
break;
}
}
/**
*
*/
private void showLoading() {
vreDeployer.getMainContainer().getCenterPanel().mask(VREDeployerConstants.LOADING_TEXT, "loading-indicator");
}
/**
*
*/
private void showEastPanelLoading() {
vreDeployer.getMainContainer().getEastPanel().setIconStyle("images/icons/cloud.png");
vreDeployer.getMainContainer().getEastPanel().mask("Checking cloud availability please wait...", "loading-indicator");
}
/**
*
*/
public void setDefaultTreeItemSelected() {
CenterPanel cp = vreDeployer.getMainContainer().getCenterPanel();
cp.setHeading("VRE Overall Information");
cp.setIconStyle("images/icons/information.png");
}
/**
*
* @param toShow
*/
public void setEastPanelContent(ContentPanel toShow) {
vreDeployer.getMainContainer().getEastPanel().removeAll();
vreDeployer.getMainContainer().getEastPanel().add(toShow);
vreDeployer.getMainContainer().getEastPanel().layout();
}
/**
*
* @param selectedGHNIds
* @param idCandidateGHN
*/
public void setGHNsSelected(GHNBean[] selectedGHNIds) {
vreDeployer.getModel().setGHNsSelected(selectedGHNIds);
}
public void maskCenterPanel(boolean mask) {
if (mask)
vreDeployer.getMainContainer().getCenterPanel().mask();
else
vreDeployer.getMainContainer().getCenterPanel().unmask();
}
public void setCloudSelected(boolean selected, int vMachines) {
vreDeployer.getModel().setCloudSelected(selected, vMachines);
}
public void createVreButtonClicked() {
vreDeployer.getModel().startVREDeploymentStatus();
}
}

View File

@ -0,0 +1,18 @@
package org.gcube.portlets.admin.vredeployer.client.icons;
import com.google.gwt.user.client.ui.AbstractImagePrototype;
import com.google.gwt.user.client.ui.ImageBundle;
@SuppressWarnings("deprecation")
public interface VreIcons extends ImageBundle {
@Resource("runninginstance.png")
AbstractImagePrototype runninginstance();
@Resource("serverinfo.png")
AbstractImagePrototype serverinfo();
@Resource("infopanel.png")
AbstractImagePrototype inforpanel();
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 778 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 859 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 706 B

View File

@ -0,0 +1,99 @@
package org.gcube.portlets.admin.vredeployer.client.model;
import com.extjs.gxt.ui.client.data.BaseTreeModel;
/**
* @author Massimiliano Assante (ISTI-CNR)
*
*/
public class AtomicTreeNode extends BaseTreeModel {
private static final long serialVersionUID = 5094327834701967591L;
private static int ID = 0;
private NodeType type;
/**
* @deprecated fr serialization only
*/
public AtomicTreeNode() {
set("id", ID++);
}
public AtomicTreeNode(final String node) {
this(node, null);
}
/**
* The node is used as original node of the element useful to retrieve it from the IS.
* The name is instead used for pretty printing (aliasing).
* @param node the corresponding IS node
* @param name if null the node will be used instead
*/
public AtomicTreeNode(final String node, final String name) {
set("id", ID++);
set("node", node);
if (name == null) {
set("name", node);
} else {
set("name", name);
}
}
public AtomicTreeNode(final String node, final String name, final String icon, NodeType type) {
this(node, name);
set("icon", icon);
this.type = type;
}
public AtomicTreeNode(final String node, final String name, final AtomicTreeNode[] children) {
this(node, name);
for (int i = 0; i < children.length; i++) {
add(children[i]);
}
}
public AtomicTreeNode(final String node, final String name, final String icon, final AtomicTreeNode[] children) {
this(node, name, children);
set("icon", icon);
}
public AtomicTreeNode(final String node, final String name, final String icon, final int sortIdx, final AtomicTreeNode[] children) {
this(node, name, icon, children);
set("sortIdx", sortIdx);
}
public final Integer getId() {
return (Integer) get("id");
}
public final String getName() {
return (String) get("name");
}
public final String getNode() {
return (String) get("node");
}
public final String getLabel() {
return (String) get("label");
}
public final String toString() {
return getName();
}
public final String getSubType() {
if (this.isLeaf() && this.getParent() != null) {
return this.getNode();
}
return null;
}
/**
*
* @return
*/
public NodeType getType() {
return type;
}
}

View File

@ -0,0 +1,277 @@
package org.gcube.portlets.admin.vredeployer.client.model;
import java.util.List;
import org.gcube.portlets.admin.vredeployer.client.VredeployerService;
import org.gcube.portlets.admin.vredeployer.client.VredeployerServiceAsync;
import org.gcube.portlets.admin.vredeployer.client.view.panels.MainContainer;
import org.gcube.portlets.admin.vredeployer.shared.GHNBean;
import org.gcube.portlets.admin.vredeployer.shared.GHNProfile;
import org.gcube.portlets.admin.vredeployer.shared.VREDeployerStatusType;
import org.gcube.portlets.admin.vredeployer.shared.VREDescrBean;
import com.extjs.gxt.ui.client.widget.Info;
import com.extjs.gxt.ui.client.widget.MessageBox;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.AsyncCallback;
public class Model {
private VREDescrBean vreDesc;
private GHNBean[] selectedGHNs;
private boolean isCloudSelected = false;
private boolean isCloudAvailable = true;
/**
* Create a remote service proxy to talk to the server-side Greeting service.
*/
private final VredeployerServiceAsync deployerService = GWT.create(VredeployerService.class);
;
private MainContainer mainContainer;
public Model(MainContainer mainContainer) {
super();
this.mainContainer = mainContainer;
}
/**
*
*/
public void checkApproveModeEnabled() {
deployerService.isApprovingModeEnabled(new AsyncCallback<VREDeployerStatusType>() {
public void onSuccess(VREDeployerStatusType result) {
if (result == VREDeployerStatusType.APPROVE) {
getVREInitialInfo();
}
else if (result == VREDeployerStatusType.NON_APPROVE) {
mainContainer.getWestPanel().disable();
mainContainer.getCenterPanel().unmask();
mainContainer.getCenterPanel().addText("Approve mode was not enabled");
mainContainer.getCenterPanel().layout();
}
else if (result == VREDeployerStatusType.DEPLOYING) {
mainContainer.getWestPanel().disable();
mainContainer.getCenterPanel().unmask();
mainContainer.getCenterPanel().showReport();
}
}
public void onFailure(Throwable caught) {
mainContainer.getWestPanel().disable();
mainContainer.getCenterPanel().unmask();
mainContainer.getCenterPanel().addText("There was an error on server: " + caught.getMessage());
mainContainer.getCenterPanel().layout();
}
});
}
/**
* load the initial info for the VRE
*/
public void getVREInitialInfo() {
deployerService.getVRE(new AsyncCallback<VREDescrBean>() {
public void onFailure(Throwable caught) {
applyActionsOnException(caught);
}
public void onSuccess(VREDescrBean vremodel) {
vreDesc = vremodel;
mainContainer.getCenterPanel().showVreDescription(vremodel);
mainContainer.getCenterPanel().layout();
mainContainer.getCenterPanel().unmask();
}
});
}
/**
*
*/
public void getFunctionality() {
deployerService.getFunctionality(new AsyncCallback<VREFunctionalityModel>() {
public void onFailure(Throwable caught) {
applyActionsOnException(caught);
}
public void onSuccess(VREFunctionalityModel root) {
if (root!= null) {
mainContainer.getCenterPanel().showFunctionality(root);
mainContainer.getCenterPanel().layout();
mainContainer.getCenterPanel().unmask();
} else
applyActionsOnException("");
}
});
}
/**
*
*/
public void getAvailableGhnList() {
deployerService.getAvailableGHNs(new AsyncCallback<List<GHNProfile>>() {
public void onFailure(Throwable caught) {
applyActionsOnException(caught);
}
public void onSuccess(List<GHNProfile> result) {
mainContainer.getCenterPanel().showGHNList(result);
mainContainer.getCenterPanel().layout();
if (! isCloudSelected)
mainContainer.getCenterPanel().unmask();
}
});
}
/**
*
* @param selectedGHNIds
* @param idCandidateGHN
* @return
*/
public void setGHNsSelected(GHNBean[] selectedGHNs) {
this.selectedGHNs = selectedGHNs;
isCloudSelected = false;
String[] selectedIds = new String[selectedGHNs.length];
for (int i = 0; i < selectedGHNs.length; i++) {
selectedIds[i] = selectedGHNs[i].getId();
}
deployerService.setGHNsSelected(selectedIds, new AsyncCallback<Boolean>() {
public void onSuccess(Boolean result) {
Info.display("Saving Operation", "The ghn selection was saved successfully");
}
public void onFailure(Throwable caught) {
MessageBox.alert("Error", "Error while saving ghn list: " + caught.getMessage(), null);
}
});
}
/**
*
*/
public void checkCloudSelected() {
deployerService.isCloudSelected(new AsyncCallback<Integer>() {
public void onFailure(Throwable caught) {
mainContainer.getEastPanel().addText("There was an error on server: " + caught.getMessage());
mainContainer.getEastPanel().unmask();
mainContainer.getEastPanel().layout();
}
public void onSuccess(Integer result) {
if (result != -1) {
isCloudSelected = true;
mainContainer.getEastPanel().showCloudPanel(true, result);
}
else {
isCloudSelected = false;
mainContainer.getEastPanel().showCloudPanel(false, -1);
}
}
});
}
/**
*
*/
public void getSummary() {
mainContainer.getCenterPanel().showFinalize(vreDesc, selectedGHNs, isCloudSelected());
mainContainer.getCenterPanel().layout();
}
/**
* take care of showing ens user the error cause and remove the mask
* @param caught
*/
private void applyActionsOnException(Throwable caught) {
mainContainer.getCenterPanel().addText("There was an error on server: " + caught.getMessage());
mainContainer.getCenterPanel().layout();
mainContainer.getCenterPanel().unmask();
}
/**
* take care of showing ens user the error cause and remove the mask
* @param caught
*/
private void applyActionsOnException(String message) {
mainContainer.getCenterPanel().addText("There was an error on server, please try again ina ashort while.");
mainContainer.getCenterPanel().layout();
mainContainer.getCenterPanel().unmask();
}
/**
* @return -
*/
public boolean isCloudSelected() {
return isCloudSelected;
}
/**
*
* @param isCloudSelected .
* @param virtualMachines .
*/
public void setCloudSelected(boolean isCloudSelected, int virtualMachines) {
this.isCloudSelected = isCloudSelected;
mainContainer.getEastPanel().mask("Applying settings, please hold", "loading-indicator");
deployerService.setCloudDeploy(virtualMachines, new AsyncCallback<Boolean>() {
public void onSuccess(Boolean result) {
mainContainer.getEastPanel().unmask();
Info.display("Saving Operation", "The Cloud selection was saved successfully");
}
public void onFailure(Throwable caught) {
mainContainer.getEastPanel().unmask();
}
});
}
/**
*
* @return -
*/
public VREDescrBean getVreDesc() {
return vreDesc;
}
/**
*
* @return -
*/
public GHNBean[] getSelectedGHNs() {
return selectedGHNs;
}
/**
*
*/
public void startVREDeploymentStatus() {
mainContainer.getCenterPanel().mask("VRE Deploying, please hold", "loading-indicator");
deployerService.deployVRE(new AsyncCallback<Boolean>() {
public void onFailure(Throwable caught) {
applyActionsOnException(caught);
}
public void onSuccess(Boolean result) {
mainContainer.getCenterPanel().unmask();
mainContainer.getCenterPanel().showReport();
}
});
}
}

View File

@ -0,0 +1,32 @@
package org.gcube.portlets.admin.vredeployer.client.model;
public enum NodeType {
/**
* INFO
*/
INFO,
/**
* CONTENT
*/
CONTENT,
/**
* COLLECTION
*/
COLLECTION,
/**
* METADATA
*/
METADATA,
/**
* FUNCTIONALITY
*/
FUNCTIONALITY,
/**
* REPORT
*/
REPORT,
/**
* ARCHITECTURE
*/
ARCHITECTURE;
}

View File

@ -0,0 +1,65 @@
package org.gcube.portlets.admin.vredeployer.client.model;
import com.extjs.gxt.ui.client.data.BaseTreeModel;
@SuppressWarnings("serial")
public class VREFunctionalityModel extends BaseTreeModel{
public VREFunctionalityModel() {
}
/**
* @param node
* @param description
* @param icon
*/
public VREFunctionalityModel(String id, String node, String description, String icon, boolean isSelected) {
set("id",id);
set("node", node);
set("name", node);
set("description", description);
set("icon", icon);
set("isSelected", isSelected);
}
/**
*
* @param children
*/
public void addChildren(VREFunctionalityModel[] children) {
for (int i = 0; i < children.length; i++) {
add(children[i]);
}
}
public String getId() {
return (String) get("id");
}
public String getName() {
return (String) get("name");
}
public String getNode() {
return (String) get("node");
}
public String getDescription() {
return (String) get("description");
}
public String toString() {
return getName();
}
public boolean isSelected() {
return ((Boolean) get("isSelected")).booleanValue();
}
public void setSelected(boolean selected) {
set("isSelected", selected);
}
}

View File

@ -0,0 +1,99 @@
package org.gcube.portlets.admin.vredeployer.client.util;
import org.gcube.portlets.admin.vredeployer.client.VredeployerService;
import org.gcube.portlets.admin.vredeployer.client.VredeployerServiceAsync;
import org.gcube.portlets.admin.vredeployer.client.view.panels.builders.CloudDeployStatus;
import org.gcube.portlets.admin.vredeployer.client.view.panels.builders.OverallDeployStatus;
import org.gcube.portlets.admin.vredeployer.client.view.panels.builders.ResourcesDeployStatus;
import org.gcube.portlets.admin.vredeployer.client.view.panels.builders.ServicesDeployStatus;
import org.gcube.portlets.admin.vredeployer.shared.deployreport.ClientDeployReport;
import org.gcube.portlets.admin.vredeployer.shared.deployreport.DeployStatus;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.Timer;
import com.google.gwt.user.client.rpc.AsyncCallback;
/**
* @author desperados
*
*/
public class CheckTimer {
/**
* delay in msec
*/
public static int DELAY = 8000; // 5 sec
CloudDeployStatus cloudPanel;
ServicesDeployStatus resourceManagerPanel;
ResourcesDeployStatus resourceAndFuncPanel;
OverallDeployStatus overallPanel;
/**
* Create a remote service proxy to talk to the server-side Greeting service.
*/
private final VredeployerServiceAsync deployerService = GWT.create(VredeployerService.class);
/**
* Constructor
* @param VREName VRE Name
*/
public CheckTimer(
CloudDeployStatus cloudPanel,
ServicesDeployStatus resourceManagerPanel,
ResourcesDeployStatus resourceAndFuncPanel,
OverallDeployStatus overPanel) {
this.cloudPanel = cloudPanel;
this.resourceManagerPanel = resourceManagerPanel;
this.resourceAndFuncPanel = resourceAndFuncPanel;
this.overallPanel = overPanel;
}
private Timer t = new Timer(){
public void run(){
deployerService.checkCreateVRE(timeCallback);
}
};
/**
*
*/
AsyncCallback<ClientDeployReport> timeCallback = new AsyncCallback<ClientDeployReport>(){
public void onSuccess(ClientDeployReport report) {
GWT.log("timeCallback");
//**** Updating Panels ****//
cloudPanel.updateReport(report.getCloudReport());
resourceManagerPanel.updateReport(report.getResourceManagerReport());
resourceAndFuncPanel.updateReport(report.getFunctionalityReport(), report.getResourcesReport());
overallPanel.updateReport(report);
if (report.getGlobalsStatus() == DeployStatus.FAIL || (report.getGlobalsStatus() == DeployStatus.FINISH) )
cancelScheduling() ;
}
public void onFailure(Throwable caught) {
GWT.log("timeCallback fails");
}
};
/**
* @param delayMillis delay
*/
public void scheduleTimer(int seconds){
t.scheduleRepeating(seconds*1000);
}
/**
* Cancel scheduling
*/
public void cancelScheduling() {
t.cancel();
}
}

View File

@ -0,0 +1,28 @@
package org.gcube.portlets.admin.vredeployer.client.util;
import com.google.gwt.user.client.Timer;
public abstract class DelayedOperation {
public final void start(final int delayMills) {
Timer t = new Timer() {
@Override
public void run() {
doJob();
}
};
t.schedule(delayMills);
}
public final void loop(final int delayMills) {
Timer t = new Timer() {
@Override
public void run() {
doJob();
this.schedule(delayMills);
}
};
t.schedule(delayMills);
}
public abstract void doJob();
}

View File

@ -0,0 +1,366 @@
package org.gcube.portlets.admin.vredeployer.client.view.panels;
import java.util.List;
import org.gcube.portlets.admin.vredeployer.client.VredeployerService;
import org.gcube.portlets.admin.vredeployer.client.VredeployerServiceAsync;
import org.gcube.portlets.admin.vredeployer.client.constants.ImagesConstants;
import org.gcube.portlets.admin.vredeployer.client.control.Controller;
import org.gcube.portlets.admin.vredeployer.client.model.VREFunctionalityModel;
import org.gcube.portlets.admin.vredeployer.client.util.CheckTimer;
import org.gcube.portlets.admin.vredeployer.client.view.panels.builders.CloudDeployStatus;
import org.gcube.portlets.admin.vredeployer.client.view.panels.builders.GhnGrid;
import org.gcube.portlets.admin.vredeployer.client.view.panels.builders.OverallDeployStatus;
import org.gcube.portlets.admin.vredeployer.client.view.panels.builders.ResourcesDeployStatus;
import org.gcube.portlets.admin.vredeployer.client.view.panels.builders.ServicesDeployStatus;
import org.gcube.portlets.admin.vredeployer.shared.GHNBean;
import org.gcube.portlets.admin.vredeployer.shared.GHNProfile;
import org.gcube.portlets.admin.vredeployer.shared.VREDescrBean;
import com.extjs.gxt.ui.client.Style.HorizontalAlignment;
import com.extjs.gxt.ui.client.Style.Orientation;
import com.extjs.gxt.ui.client.Style.SelectionMode;
import com.extjs.gxt.ui.client.data.ModelData;
import com.extjs.gxt.ui.client.data.ModelIconProvider;
import com.extjs.gxt.ui.client.event.ButtonEvent;
import com.extjs.gxt.ui.client.event.Events;
import com.extjs.gxt.ui.client.event.Listener;
import com.extjs.gxt.ui.client.event.SelectionListener;
import com.extjs.gxt.ui.client.event.TreePanelEvent;
import com.extjs.gxt.ui.client.store.TreeStore;
import com.extjs.gxt.ui.client.util.IconHelper;
import com.extjs.gxt.ui.client.util.Margins;
import com.extjs.gxt.ui.client.widget.ContentPanel;
import com.extjs.gxt.ui.client.widget.button.Button;
import com.extjs.gxt.ui.client.widget.form.FieldSet;
import com.extjs.gxt.ui.client.widget.form.FormPanel;
import com.extjs.gxt.ui.client.widget.form.TextArea;
import com.extjs.gxt.ui.client.widget.form.TextField;
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
import com.extjs.gxt.ui.client.widget.layout.FlowData;
import com.extjs.gxt.ui.client.widget.layout.FlowLayout;
import com.extjs.gxt.ui.client.widget.layout.FormData;
import com.extjs.gxt.ui.client.widget.layout.FormLayout;
import com.extjs.gxt.ui.client.widget.layout.RowData;
import com.extjs.gxt.ui.client.widget.layout.RowLayout;
import com.extjs.gxt.ui.client.widget.treepanel.TreePanel;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.ui.AbstractImagePrototype;
import com.google.gwt.user.client.ui.CellPanel;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.HorizontalPanel;
public class CenterPanel extends ContentPanel {
/**
* Create a remote service proxy to talk to the server-side Greeting service.
*/
private final VredeployerServiceAsync deployerService = GWT.create(VredeployerService.class);
/**
*
*/
private Controller controller;
/**
*
*/
private CheckTimer checkTimer = null;
private boolean showingSummary = false;
/**
*
* @param c -
*/
public CenterPanel(Controller c) {
controller = c;
this.setHeading("");
this.setFrame(true);
this.setBodyStyle("backgroundColor: white;");
setButtonAlign(HorizontalAlignment.CENTER);
this.mask("Loading VRE definition for Approval", "loading-indicator");
}
/**
*
*/
public void emptyPanel() {
this.removeAll();
}
/**
* view for description vre step
* @param vDesc
*/
@SuppressWarnings("deprecation")
public void showVreDescription(VREDescrBean vDesc) {
FormData formData = new FormData("-20");
FormPanel form = new FormPanel();
form.setHeaderVisible(false);
form.setFrame(false);
form.setWidth("100%");
form.setLayout(new FlowLayout());
FieldSet fieldSet = new FieldSet();
fieldSet.setHeading("VRE Information");
//fieldSet.setCheckboxToggle(true);
FormLayout layout = new FormLayout();
layout.setLabelWidth(100);
fieldSet.setLayout(layout);
TextField<String> vrename = new TextField<String>();
vrename.setFieldLabel("Name");
vrename.setValue(vDesc.getName());
fieldSet.add(vrename, formData);
TextField<String> vredesigner = new TextField<String>();
vredesigner.setFieldLabel("Designer");
vredesigner.setValue(vDesc.getDesigner());
fieldSet.add(vredesigner, formData);
TextField<String> vremanager = new TextField<String>();
vremanager.setFieldLabel("Manager");
vremanager.setValue(vDesc.getManager());
fieldSet.add(vremanager, formData);
TextArea description = new TextArea();
description.setFieldLabel("Description");
description.setValue(vDesc.getDescription());
fieldSet.add(description, formData);
form.add(fieldSet);
form.setReadOnly(true);
fieldSet = new FieldSet();
fieldSet.setHeading("Life time");
fieldSet.setCollapsible(true);
layout = new FormLayout();
layout.setLabelWidth(100);
fieldSet.setLayout(layout);
TextField<String> from = new TextField<String>();
from.setFieldLabel("From");
from.setValue(vDesc.getStartTime().toGMTString());
fieldSet.add(from, formData);
TextField<String> to = new TextField<String>();
to.setFieldLabel("To");
to.setValue(vDesc.getEndTime().toGMTString());
fieldSet.add(to, formData);
form.add(fieldSet);
// form.setButtonAlign(HorizontalAlignment.CENTER);
// form.addButton(new Button("Save"));
// form.addButton(new Button("Cancel"));
this.add(form);
}
/**
* view for the functionality step
* @param root
*/
public void showFunctionality(VREFunctionalityModel root) {
GWT.log("root func: " + root.getChildCount());
TreePanel<ModelData> tree;
TreeStore<ModelData> store = new TreeStore<ModelData>();
// The root node will not be shown
store.add(root.getChildren(), true);
tree = new TreePanel<ModelData>(store);
tree.setWidth(300);
tree.setDisplayProperty("name");
add(tree);
// Handles the selection
tree.getSelectionModel().setSelectionMode(SelectionMode.SINGLE);
// The icon decorator
tree.setIconProvider(
new ModelIconProvider<ModelData>() {
public AbstractImagePrototype getIcon(final ModelData model) {
if (model.get("node") != null && model.get("icon") != null) {
return IconHelper.createStyle((String) model.get("icon"));
}
return IconHelper.createStyle("defaultleaf-icon");
}
});
setLayout(new FitLayout());
tree.expandAll();
tree.setAutoExpand(true);
controller.setEastPanelContent(getInitFuncInfo());
tree.addListener(Events.OnClick, new Listener<TreePanelEvent<ModelData>>() {
public void handleEvent(TreePanelEvent<ModelData> be) {
VREFunctionalityModel sm = (VREFunctionalityModel) be.getItem();
if (be.getType() == Events.OnClick) {
//do nothing
}
}
});
}
private ContentPanel getInitFuncInfo() {
ContentPanel cp = new ContentPanel();
cp.setHeaderVisible(false);
cp.setBodyBorder(false);
String toAdd = "<h3>Legend:</h3>";
toAdd += "<div class=\"extres-icon\" style=\"padding-left:25px; margin-top: 10px; background-repeat: no-repeat;\">Selected Resource</div>";
toAdd += "<div class=\"runninginstance-icon\" style=\"padding-left:25px; margin-top: 10px; background-repeat: no-repeat;\">Found Service</div>";
toAdd += "<div class=\"missing-ri\" style=\"padding-left:25px; margin-top: 10px; background-repeat: no-repeat;\">Missing Service</div>";
toAdd += "<div class=\"architecture-icon\" style=\"padding-left:25px; margin-top: 10px; background-repeat: no-repeat;\">gHN</div>";
cp.add(new HTML(toAdd, true ));
cp.setStyleAttribute("margin", "10px");
cp.setLayout(new FitLayout());
return cp;
}
/**
* view for architecture step
* @param vDesc
*/
public void showGHNList(final List<GHNProfile> ghnodes) {
GhnGrid ghnGrid = new GhnGrid(controller, ghnodes);
add(ghnGrid.getGrid());
setLayout(new FitLayout());
}
/**
* view for finalize step
* @param vDesc
*/
public void showFinalize(VREDescrBean desc, GHNBean[] ghns, boolean isCloudSelected) {
ContentPanel cp = new ContentPanel(new FitLayout());
cp.setHeaderVisible(false);
String toShow = "";
if ( (ghns == null && (! isCloudSelected) ) ) {
toShow = "<h3>Step Architecture Selection is Missing</h3>";
}
else {
unmask();
toShow = "<h3>" + desc.getName() + " is ready to be deployed.</h3>";
toShow += "<brÊ/><brÊ/>selected nodes:";
if (isCloudSelected) {
toShow += "<p><img src=\""+ ImagesConstants.CLOUD_IMAGE + " \" /></p>";
} else {
toShow += "<p><ul>";
for (int i = 0; i < ghns.length; i++) {
if (ghns[i].isSelected())
toShow += "<li>&nbsp; - &nbsp; <b>"+ ghns[i].getHost()+ "</b> (" + ghns[i].getCountry() + ")</li>" ;
}
toShow += "</ul></p>";
}
toShow += "<brÊ/><brÊ/>click create button to start the creation process";
cp.add(new HTML(toShow, true));
cp.addButton(new Button("Create", new SelectionListener<ButtonEvent>() {
@Override
public void componentSelected(ButtonEvent ce) {
controller.createVreButtonClicked();
}
}));
}
cp.setStyleAttribute("margin", "10px");
cp.add(new HTML(toShow, true));
add(cp);
setLayout(new FitLayout());
showingSummary = true;
}
/**
* view for finalize step
* @param vDesc
*/
public void showReport() {
if (showingSummary) {
removeAll();
layout();
showingSummary = false;
}
this.remove(this.getHeader(), true);
ContentPanel panel = new ContentPanel();
panel.setLayout(new RowLayout(Orientation.VERTICAL));
//panel.setSize(400, 300);
panel.setFrame(false);
panel.setCollapsible(false);
panel.setHeaderVisible(false);
CloudDeployStatus cloudPanel = new CloudDeployStatus();
ServicesDeployStatus resourceManagerPanel = new ServicesDeployStatus();
CellPanel cellp = new HorizontalPanel();
cellp.setWidth("100%");
ContentPanel p1 = cloudPanel.getCloudDeployStatusPanel();
ContentPanel p2 = resourceManagerPanel.getServicesDeployStatusPanel();
cellp.add(p1);
cellp.add(p2);
cellp.setCellWidth(p1, "50%");
cellp.setCellWidth(p2, "50%");
cellp.setSpacing(5);
//two rows
panel.add(cellp, new RowData(1, -1, new Margins()));
CellPanel cellp2 = new HorizontalPanel();
cellp2.setWidth("100%");
ResourcesDeployStatus resourceAndFuncPanel = new ResourcesDeployStatus();
OverallDeployStatus overPanel = new OverallDeployStatus();
ContentPanel p3 = resourceAndFuncPanel.getResourcesDeployStatusPanel();
ContentPanel p4 = overPanel.getOverallDeployStatusPanel();
cellp2.add(p3);
cellp2.add(p4);
cellp2.setCellWidth(p3, "50%");
cellp2.setCellWidth(p4, "50%");
cellp2.setSpacing(5);
panel.add(cellp, new RowData(1, -1, new Margins()));
panel.add(cellp2, new RowData(1, -1, new Margins()));
//two rows
Button button = new Button("See textual report", new SelectionListener<ButtonEvent>() {
@Override
public void componentSelected(ButtonEvent ce) {
mask("Retrieving Textual Report", "loading-indicator");
openTextualReport();
}
});
add(panel, new FlowData(0));
add(button, new FlowData(0));
layout();
/**
* starts the timer
*/
CheckTimer reportTimer = new CheckTimer(cloudPanel, resourceManagerPanel, resourceAndFuncPanel, overPanel);
reportTimer.scheduleTimer(10);
}
private void openTextualReport() {
new ReportPanel(this);
}
}

View File

@ -0,0 +1,168 @@
package org.gcube.portlets.admin.vredeployer.client.view.panels;
import org.gcube.portlets.admin.vredeployer.client.constants.ImagesConstants;
import org.gcube.portlets.admin.vredeployer.client.control.Controller;
import com.extjs.gxt.ui.client.Style.HorizontalAlignment;
import com.extjs.gxt.ui.client.Style.Orientation;
import com.extjs.gxt.ui.client.event.ButtonEvent;
import com.extjs.gxt.ui.client.event.Events;
import com.extjs.gxt.ui.client.event.FieldEvent;
import com.extjs.gxt.ui.client.event.Listener;
import com.extjs.gxt.ui.client.event.SelectionListener;
import com.extjs.gxt.ui.client.widget.ContentPanel;
import com.extjs.gxt.ui.client.widget.HorizontalPanel;
import com.extjs.gxt.ui.client.widget.Html;
import com.extjs.gxt.ui.client.widget.LayoutContainer;
import com.extjs.gxt.ui.client.widget.button.Button;
import com.extjs.gxt.ui.client.widget.form.CheckBox;
import com.extjs.gxt.ui.client.widget.form.CheckBoxGroup;
import com.extjs.gxt.ui.client.widget.form.FieldSet;
import com.extjs.gxt.ui.client.widget.form.FormPanel;
import com.extjs.gxt.ui.client.widget.form.SimpleComboBox;
import com.extjs.gxt.ui.client.widget.form.ComboBox.TriggerAction;
import com.extjs.gxt.ui.client.widget.layout.FormData;
import com.extjs.gxt.ui.client.widget.layout.FormLayout;
import com.extjs.gxt.ui.client.widget.layout.RowData;
import com.extjs.gxt.ui.client.widget.layout.RowLayout;
import com.extjs.gxt.ui.client.widget.layout.TableData;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.Image;
public class EastPanel extends ContentPanel {
/**
*
*/
private Controller controller;
/**
* constructor
* @param c -
*/
public EastPanel(Controller c) {
controller = c;
setWidth("100%");
setHeight("100%");
}
/**
*
*/
public void showCloudPanel(boolean selected, int vmSelected) {
setHeading("deploy VRE Services on Cloud");
final Button saveButton = new Button("Commit changes");
saveButton.setEnabled(false);
removeAll();
unmask();
LayoutContainer toShow = new LayoutContainer();
HorizontalPanel hp = new HorizontalPanel();
hp.setWidth("100%");
hp.setTableWidth("100%");
TableData td = new TableData();
td.setHorizontalAlign(HorizontalAlignment.CENTER);
//toShow.setStyleAttribute("margin", "10px");
RowLayout rlayout = new RowLayout(Orientation.VERTICAL);
toShow.setLayout(rlayout);
String toAdd = "";
toAdd = "<div style=\"width:100%; font-size:24px; color: gray;text-align:center;\">Cloud available</div>";
hp.add(new Html(toAdd), td);
HorizontalPanel hp2 = new HorizontalPanel();
hp2.setWidth("100%");
hp2.setTableWidth("100%");
hp2.add(new Image(ImagesConstants.CLOUD_IMAGE), td);
toShow.add(hp);
toShow.add(hp2);
FormData formData = new FormData("-20");
FormPanel form = new FormPanel();
form.setHeaderVisible(false);
form.setBorders(false);
form.setBodyBorder(false);
form.setFrame(false);
form.setWidth("100%");
FieldSet fieldSet = new FieldSet();
fieldSet.setHeading("Resources Setup");
//fieldSet.setCheckboxToggle(true);
FormLayout layout = new FormLayout();
layout.setLabelWidth(100);
fieldSet.setLayout(layout);
final CheckBox useCloud = new CheckBox();
useCloud.addListener(Events.Change, new Listener<FieldEvent>() {
public void handleEvent(FieldEvent be) {
boolean checked = useCloud.getValue();
controller.maskCenterPanel(checked);
saveButton.setEnabled(checked);
}
});
controller.maskCenterPanel(selected);
useCloud.setValue(selected);
useCloud.setBoxLabel("");
CheckBoxGroup checkGroup = new CheckBoxGroup();
checkGroup.setFieldLabel("Use Cloud");
checkGroup.add(useCloud);
final SimpleComboBox<String> combo = new SimpleComboBox<String>();
combo.setFieldLabel("Virtual machines");
combo.add("2");
combo.add("3");
combo.add("4");
combo.add("5");
combo.add("10");
combo.add("20");
combo.setTriggerAction(TriggerAction.ALL);
combo.setSimpleValue("2");
combo.setAllowBlank(false);
combo.setEditable(false);
if (vmSelected != -1) {
combo.setSimpleValue(""+vmSelected);
}
fieldSet.add(checkGroup, formData);
fieldSet.add(combo, formData);
form.add(fieldSet, formData);
form.addButton(saveButton);
saveButton.addSelectionListener(new SelectionListener<ButtonEvent>() {
@Override
public void componentSelected(ButtonEvent ce) {
int vMachines = Integer.parseInt(combo.getSimpleValue());
controller.setCloudSelected(true, vMachines);
}
});
toShow.add(form, new RowData(-1, 165));
add(toShow);
layout();
}
}

View File

@ -0,0 +1,121 @@
package org.gcube.portlets.admin.vredeployer.client.view.panels;
import org.gcube.portlets.admin.vredeployer.client.VREDeployerConstants;
import org.gcube.portlets.admin.vredeployer.client.control.Controller;
import com.extjs.gxt.ui.client.Style.LayoutRegion;
import com.extjs.gxt.ui.client.util.Margins;
import com.extjs.gxt.ui.client.widget.ContentPanel;
import com.extjs.gxt.ui.client.widget.LayoutContainer;
import com.extjs.gxt.ui.client.widget.layout.BorderLayout;
import com.extjs.gxt.ui.client.widget.layout.BorderLayoutData;
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.Element;
import com.google.gwt.user.client.ui.HTML;
/**
*
* @author Massimiliano Assante - ISTI-CNR
*
*/
public class MainContainer extends LayoutContainer {
final BorderLayout layout = new BorderLayout();
private WestPanel west;
private CenterPanel center;
private EastPanel east;
private Controller controller;
public MainContainer(Controller c) {
controller = c;
west = new WestPanel(controller);
center = new CenterPanel(controller);
east = new EastPanel(controller);
}
protected void onRender(Element target, int index) {
super.onRender(target, index);
setLayout(layout);
setStyleAttribute("padding", "2px");
BorderLayoutData westData = new BorderLayoutData(LayoutRegion.WEST, 150);
westData.setSplit(true);
westData.setMargins(new Margins(0, 5, 0, 0));
westData.setCollapsible(false);
BorderLayoutData centerData = new BorderLayoutData(LayoutRegion.CENTER);
centerData.setSplit(false);
centerData.setCollapsible(false);
centerData.setMargins(new Margins(0));
BorderLayoutData eastData = new BorderLayoutData(LayoutRegion.EAST, 350);
eastData.setSplit(true);
eastData.setCollapsible(true);
eastData.setMargins(new Margins(0,0,0,5));
BorderLayoutData northData = new BorderLayoutData(LayoutRegion.NORTH, 100);
northData.setCollapsible(false);
northData.setFloatable(true);
northData.setHideCollapseTool(false);
northData.setSplit(false);
northData.setMargins(new Margins(0, 0, 5, 0));
//add(north, northData);
add(west, westData);
add(center, centerData);
add(east, eastData);
east.setIcon(VREDeployerConstants.ICONS.inforpanel());
}
@Override
protected void onAfterLayout() {
super.onAfterLayout();
east.collapse();
}
/**
*
* @return -
*/
public WestPanel getWestPanel() {
return west;
}
/**
*
* @return -
*/
public CenterPanel getCenterPanel() {
return center;
}
/**
*
* @return -
*/
public EastPanel getEastPanel() {
return east;
}
/**
*
* @param show
*/
public void showEastPanel(boolean show) {
east.show();
if (show && east.isCollapsed()) {
layout.expand(LayoutRegion.EAST);
}
else if (!show && east.isExpanded())
layout.collapse(LayoutRegion.EAST);
}
}

View File

@ -0,0 +1,11 @@
package org.gcube.portlets.admin.vredeployer.client.view.panels;
import com.extjs.gxt.ui.client.widget.ContentPanel;
public class NorthPanel extends ContentPanel {
public NorthPanel() {
setWidth("100%");
}
}

View File

@ -0,0 +1,69 @@
package org.gcube.portlets.admin.vredeployer.client.view.panels;
import org.gcube.portlets.admin.vredeployer.client.VredeployerService;
import org.gcube.portlets.admin.vredeployer.client.VredeployerServiceAsync;
import com.extjs.gxt.ui.client.event.ButtonEvent;
import com.extjs.gxt.ui.client.event.SelectionListener;
import com.extjs.gxt.ui.client.widget.ContentPanel;
import com.extjs.gxt.ui.client.widget.Html;
import com.extjs.gxt.ui.client.widget.Info;
import com.extjs.gxt.ui.client.widget.Window;
import com.extjs.gxt.ui.client.widget.button.Button;
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.ScrollPanel;
public class ReportPanel {
private final VredeployerServiceAsync deployerService = GWT.create(VredeployerService.class);
public ReportPanel(final CenterPanel myPanel) {
deployerService.getHTMLReport(new AsyncCallback<String>() {
public void onSuccess(String result) {
final Window window = new Window();
window.setSize(600, 350);
window.setPlain(true);
window.setModal(true);
window.setBlinkModal(true);
window.setHeading("Textual Report");
ContentPanel cp = new ContentPanel();
cp.setHeaderVisible(false);
ScrollPanel scroller = new ScrollPanel();
scroller.setSize("600", "300");
scroller.add(new Html(result));
cp.add(scroller);
cp.setLayout(new FitLayout());
window.add(cp);
window.setLayout(new FitLayout());
window.addButton(new Button("Close", new SelectionListener<ButtonEvent>() {
@Override
public void componentSelected(ButtonEvent ce) {
window.hide();
}
}));
cp.layout();
myPanel.unmask();
window.show();
}
public void onFailure(Throwable caught) {
myPanel.unmask();
Info.display("Error", "Could not locate textual report");
}
});
}
}

View File

@ -0,0 +1,92 @@
package org.gcube.portlets.admin.vredeployer.client.view.panels;
import org.gcube.portlets.admin.vredeployer.client.control.Controller;
import org.gcube.portlets.admin.vredeployer.client.model.AtomicTreeNode;
import org.gcube.portlets.admin.vredeployer.client.model.NodeType;
import com.extjs.gxt.ui.client.Style.SelectionMode;
import com.extjs.gxt.ui.client.data.ModelData;
import com.extjs.gxt.ui.client.data.ModelIconProvider;
import com.extjs.gxt.ui.client.event.Events;
import com.extjs.gxt.ui.client.event.Listener;
import com.extjs.gxt.ui.client.event.TreePanelEvent;
import com.extjs.gxt.ui.client.store.TreeStore;
import com.extjs.gxt.ui.client.util.IconHelper;
import com.extjs.gxt.ui.client.widget.ContentPanel;
import com.extjs.gxt.ui.client.widget.treepanel.TreePanel;
import com.google.gwt.user.client.ui.AbstractImagePrototype;
public class WestPanel extends ContentPanel {
private Controller controller;
private TreePanel<ModelData> tree;
final AtomicTreeNode info = new AtomicTreeNode("Info", "Info", "info-icon", NodeType.INFO);
final AtomicTreeNode func = new AtomicTreeNode("Functionality", "Functionality", "functionality-icon",NodeType.FUNCTIONALITY);
final AtomicTreeNode arch = new AtomicTreeNode("Architecture", "Architecture", "architecture-icon",NodeType.ARCHITECTURE);
final AtomicTreeNode finalize = new AtomicTreeNode("Finalize", "Finalize", "play-icon",NodeType.REPORT);
public WestPanel(Controller c) {
controller = c;
AtomicTreeNode root = new AtomicTreeNode("root");
root.add(info);
//root.add(metadata);
root.add(func);
root.add(arch);
root.add(finalize);
TreeStore<ModelData> store = new TreeStore<ModelData>();
// The root node will not be shown
store.add(root.getChildren(), true);
tree = new TreePanel<ModelData>(store);
tree.setWidth(300);
tree.setDisplayProperty("name");
add(tree);
// The icon decorator
tree.setIconProvider(
new ModelIconProvider<ModelData>() {
public AbstractImagePrototype getIcon(final ModelData model) {
if (model.get("node") != null && model.get("icon") != null) {
return IconHelper.createStyle((String) model.get("icon"));
}
return IconHelper.createStyle("defaultleaf-icon");
}
});
// Handles the selection
tree.getSelectionModel().setSelectionMode(SelectionMode.SINGLE);
tree.addListener(Events.OnClick, new Listener<TreePanelEvent<ModelData>>() {
public void handleEvent(TreePanelEvent<ModelData> be) {
if (be.getType() == Events.OnClick) {
AtomicTreeNode selectedModel = (AtomicTreeNode) be.getItem();
controller.treeItemClicked(selectedModel);
}
}
});
}
/**
*
*/
public void setDefaultSelected() {
tree.getSelectionModel().select(true, info);
controller.setDefaultTreeItemSelected();
}
public void disable() {
removeAll();
}
}

View File

@ -0,0 +1,94 @@
package org.gcube.portlets.admin.vredeployer.client.view.panels.builders;
import java.util.List;
import org.gcube.portlets.admin.vredeployer.client.charts.CloudChart;
import org.gcube.portlets.admin.vredeployer.client.util.DelayedOperation;
import org.gcube.portlets.admin.vredeployer.shared.deployreport.ClientCloudReport;
import org.gcube.portlets.admin.vredeployer.shared.deployreport.DeployStatus;
import com.extjs.gxt.charts.client.Chart;
import com.extjs.gxt.ui.client.widget.ContentPanel;
import com.extjs.gxt.ui.client.widget.Html;
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
/**
*
* @author massi
*
*/
public class CloudDeployStatus {
private ContentPanel cp;
boolean chartAdded = false;
CloudChart cloudChart;
Chart myChart;
public CloudDeployStatus() {
cp = new ContentPanel(new FitLayout());
}
/**
*
*/
public void createReport() {
cp.removeAll();
cloudChart = new CloudChart();
}
public void updateReport(ClientCloudReport report) {
cp.unmask();
final DeployStatus cloudStatus = report.getStatus();
if (cloudStatus == DeployStatus.SKIP) {
cp.setHeading("Cloud machines setup was skipped");
cp.add(new Html("Cloud deploy was not selected for this VRE"));
cp.layout();
}
else {
final List<DeployStatus> singleMachines = report.getItemsStatuses();
if (! chartAdded) {
createReport();
chartAdded = true;
myChart = cloudChart.getChart();
myChart.setChartModel(cloudChart.getChartModel(cloudStatus, singleMachines));
cp.add(myChart);
cp.layout();
}
else {
if (report.getStatus() != DeployStatus.FINISH) {
cp.mask("Retrieving data", "loading-indicator");
DelayedOperation delay = new DelayedOperation() {
@Override
public void doJob() {
cp.unmask();
myChart.setChartModel(cloudChart.getChartModel(cloudStatus, singleMachines));
myChart.refresh();
}
};
delay.start(1500);
}
else {
cp.unmask();
myChart.setChartModel(cloudChart.getChartModel(cloudStatus, singleMachines));
myChart.refresh();
}
}
}
}
/**
*
* @return
*/
public ContentPanel getCloudDeployStatusPanel() {
cp.setHeaderVisible(true);
cp.setHeading("Cloud machines setup");
cp.setHeight(250);
cp.setBorders(true);
cp.mask("Retrieving data", "loading-indicator");
return cp;
}
}

View File

@ -0,0 +1,252 @@
package org.gcube.portlets.admin.vredeployer.client.view.panels.builders;
import java.util.ArrayList;
import java.util.List;
import org.gcube.portlets.admin.vredeployer.client.control.Controller;
import org.gcube.portlets.admin.vredeployer.shared.GHNBean;
import org.gcube.portlets.admin.vredeployer.shared.GHNProfile;
import org.gcube.portlets.admin.vredeployer.shared.RunningInstance;
import com.extjs.gxt.ui.client.Style.HorizontalAlignment;
import com.extjs.gxt.ui.client.Style.SortDir;
import com.extjs.gxt.ui.client.data.ModelData;
import com.extjs.gxt.ui.client.event.ButtonEvent;
import com.extjs.gxt.ui.client.event.GridEvent;
import com.extjs.gxt.ui.client.event.SelectionListener;
import com.extjs.gxt.ui.client.store.ListStore;
import com.extjs.gxt.ui.client.widget.ContentPanel;
import com.extjs.gxt.ui.client.widget.MessageBox;
import com.extjs.gxt.ui.client.widget.button.Button;
import com.extjs.gxt.ui.client.widget.form.CheckBox;
import com.extjs.gxt.ui.client.widget.grid.CellEditor;
import com.extjs.gxt.ui.client.widget.grid.CheckColumnConfig;
import com.extjs.gxt.ui.client.widget.grid.ColumnConfig;
import com.extjs.gxt.ui.client.widget.grid.ColumnModel;
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.ui.HTML;
/**
*
* @author massi
*
*/
public class GhnGrid {
private List<GHNProfile> myGHNList;
private Controller controller;
public GhnGrid(Controller controller, List<GHNProfile> list) {
myGHNList = list;
this.controller = controller;
}
public List<GHNProfile> getGHNList() {
return myGHNList;
}
public ContentPanel getGrid() {
List<GHNBean> toShow = new ArrayList<GHNBean>();
for (GHNProfile p : myGHNList) {
toShow.add(new GHNBean(p.getId(), p.getHost(), p.getMemory().getVirtualAvailable(),
p.getSite().getDomain(), p.isSelected(), p.getMemory().getLocalAvailableSpace(),
p.getSite().getLocation(), p.getSite().getCountry(), p.isSecure()));
}
List<ColumnConfig> configs = new ArrayList<ColumnConfig>();
ColumnConfig column = new ColumnConfig();
column.setId("id");
column.setHeader("ID");
column.setWidth(50);
column.setHidden(true);
configs.add(column);
column = new ColumnConfig();
column.setId("host");
column.setHeader("Host name");
column.setWidth(150);
configs.add(column);
column = new ColumnConfig();
column.setId("domain");
column.setHeader("Domain");
column.setHidden(true);
column.setWidth(150);
configs.add(column);
column = new ColumnConfig();
column.setId("memory");
column.setHeader("mem avail.");
column.setAlignment(HorizontalAlignment.CENTER);
column.setWidth(40);
configs.add(column);
column = new ColumnConfig();
column.setId("diskspace");
column.setHeader("disk avail.");
column.setAlignment(HorizontalAlignment.CENTER);
column.setHidden(false);
column.setWidth(50);
configs.add(column);
column = new ColumnConfig();
column.setId("country");
column.setHeader("Country");
column.setAlignment(HorizontalAlignment.CENTER);
column.setHidden(true);
column.setWidth(50);
configs.add(column);
column = new ColumnConfig();
column.setId("location");
column.setHeader("Location");
column.setHidden(true);
column.setAlignment(HorizontalAlignment.CENTER);
column.setWidth(50);
configs.add(column);
column = new ColumnConfig();
column.setId("isSecure");
column.setHeader("isSecure");
column.setAlignment(HorizontalAlignment.CENTER);
column.setHidden(true);
column.setWidth(40);
configs.add(column);
CheckColumnConfig checkColumn = new CheckColumnConfig("isSelected", "isSelected", 35) {
@Override
protected void onMouseDown(final GridEvent<ModelData> ge) {
super.onMouseDown(ge);
GHNBean bean = (GHNBean) ge.getModel();
showGHNAdditionalInfo(bean.getId(), myGHNList);
}
};
checkColumn.setHeader("Select");
checkColumn.setAlignment(HorizontalAlignment.CENTER);
CheckBox checkbox = new CheckBox();
CellEditor checkBoxEditor = new CellEditor(checkbox);
checkColumn.setEditor(checkBoxEditor);
configs.add(checkColumn);
final ColumnModel cm = new ColumnModel(configs);
/**
* load the grid data
*/
final ListStore<GHNBean> store = new ListStore<GHNBean>();
//store.groupBy("domain");
store.sort("isSelectable", SortDir.DESC);
store.add(toShow);
Grid<GHNBean> grid = new Grid<GHNBean>(store, cm);
grid.addPlugin(checkColumn);
grid.setStyleAttribute("borderTop", "none");
grid.setAutoExpandColumn("host");
grid.setBorders(true);
grid.setStripeRows(true);
grid.getView().setForceFit(true);
ContentPanel gridPanel = new ContentPanel(new FitLayout());
gridPanel.setHeaderVisible(false);
gridPanel.add(grid);
gridPanel.addButton(new Button("Reset", new SelectionListener<ButtonEvent>() {
@Override
public void componentSelected(ButtonEvent ce) {
store.rejectChanges();
}
}));
gridPanel.addButton(new Button("Commit changes", new SelectionListener<ButtonEvent>() {
@Override
public void componentSelected(ButtonEvent ce) {
List<GHNBean> ghns = store.getModels();
int selectedCounter = 0;
for (GHNBean ghn : ghns)
if (ghn.isSelected())
selectedCounter++;
if (selectedCounter < 1)
MessageBox.alert("Alert", "At least one node must be added for deploying ", null);
else {
GHNBean[] selectedGHNIds = new GHNBean[selectedCounter];
//get the selected ghnID
int j = 0;
for (int i = 0; i < ghns.size(); i++)
if (ghns.get(i).isSelected()) {
selectedGHNIds[j] = ghns.get(i);;
j++;
}
GWT.log("Storing GHN List");
store.commitChanges();
controller.setGHNsSelected(selectedGHNIds);
}
}
}));
return gridPanel;
}
/**
*
* @param ghnID
* @param ghnodes
*/
private void showGHNAdditionalInfo(String ghnID, List<GHNProfile> ghnodes) {
for (GHNProfile ghn : ghnodes) {
if (ghn.getId().compareTo(ghnID) == 0) {
ContentPanel cp = new ContentPanel();
cp.setHeaderVisible(false);
cp.setBodyBorder(false);
String toAdd = "<h3>" + ghn.getHost() + "</h3>";
toAdd += "<br /><b>Site:</b>";
toAdd += "<ul>";
toAdd += "<li>&nbsp; - &nbsp; <b>Location:</b> " + ghn.getSite().getLocation() + "</li>" ;
toAdd += "<li>&nbsp; - &nbsp; <b>Country:</b> " + ghn.getSite().getCountry() + "</li>" ;
toAdd += "<li>&nbsp; - &nbsp; <b>Domain:</b> " + ghn.getSite().getDomain() + "</li>" ;
toAdd += "</ul>";
toAdd += "<br /><b>Running Instances:</b>";
List<RunningInstance> ris = ghn.getRunningInstances();
if (ris != null) {
toAdd += "<ul>";
for (RunningInstance ri : ris) {
toAdd += "<li>&nbsp; - &nbsp; <b>"+ ri.getName()+ "</b> (" + ri.getServiceClass() + ")</li>" ;
}
if (ris.size() == 0)
toAdd += "<li>&nbsp; - &nbsp; none</li>" ;
toAdd += "</ul>";
}
cp.add(new HTML(toAdd, true ));
cp.setStyleAttribute("margin", "10px");
cp.setLayout(new FitLayout());
controller.setEastPanelContent(cp);
break;
}
}
}
}

View File

@ -0,0 +1,125 @@
package org.gcube.portlets.admin.vredeployer.client.view.panels.builders;
import org.gcube.portlets.admin.vredeployer.client.util.DelayedOperation;
import org.gcube.portlets.admin.vredeployer.client.view.panels.ReportPanel;
import org.gcube.portlets.admin.vredeployer.shared.deployreport.ClientDeployReport;
import org.gcube.portlets.admin.vredeployer.shared.deployreport.DeployStatus;
import com.extjs.gxt.ui.client.event.ButtonEvent;
import com.extjs.gxt.ui.client.event.SelectionListener;
import com.extjs.gxt.ui.client.widget.ContentPanel;
import com.extjs.gxt.ui.client.widget.ProgressBar;
import com.extjs.gxt.ui.client.widget.button.Button;
import com.extjs.gxt.ui.client.widget.layout.CenterLayout;
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
import com.extjs.gxt.ui.client.widget.layout.FlowLayout;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.Window;
public class OverallDeployStatus {
/**
*
*/
private ContentPanel cp;
boolean barAdded = false;
ProgressBar bar;
/**
*
*/
public OverallDeployStatus() {
cp = new ContentPanel(new FitLayout());
cp.setLayout(new CenterLayout());
}
private int getStatusDependingOnOtherSteps(ClientDeployReport report) {
int cloudStep = 0;
if (report.getCloudReport().getStatus() != null) {
if (report.getCloudReport().getStatus() == DeployStatus.FINISH || report.getCloudReport().getStatus() == DeployStatus.SKIP)
cloudStep = 25;
}
int resourceManagerStep = 0;
if (report.getResourceManagerReport().getStatus() != null) {
if (report.getResourceManagerReport().getStatus() == DeployStatus.FINISH)
resourceManagerStep = 25;
}
int funcStep = 0;
if (report.getFunctionalityReport().getStatus() != null) {
if (report.getFunctionalityReport().getStatus() == DeployStatus.FINISH)
funcStep = 25;
}
int genresStep = 0;
if (report.getResourcesReport().getStatus() != null) {
if (report.getResourcesReport().getStatus() == DeployStatus.FINISH)
genresStep = 25;
}
return cloudStep + resourceManagerStep + funcStep + genresStep;
}
/**
*
* @param funcReport
* @param resourcesReport
*/
public void updateReport(ClientDeployReport report) {
cp.unmask();
DeployStatus overallStatus = report.getGlobalsStatus();
GWT.log("overallStatus: " + overallStatus);
int i = getStatusDependingOnOtherSteps(report);
String label = "% Complete";
if (! barAdded) {
createReport();
barAdded = true;
bar.updateProgress(0, " not started yet");
cp.add(bar);
bar.setWidth("90%");
cp.layout();
}
else {
if (report.getGlobalsStatus() != DeployStatus.FINISH || report.getGlobalsStatus() != DeployStatus.FAIL) {
cp.mask("Retrieving data", "loading-indicator");
DelayedOperation delay = new DelayedOperation() {
@Override
public void doJob() {
cp.unmask();
}
};
delay.start(1500);
}
bar.setWidth("90%");
bar.updateProgress((i/100), (int )i +label);
cp.layout();
}
if (report.getGlobalsStatus() == DeployStatus.FAIL || report.getGlobalsStatus() == DeployStatus.FINISH) {
Window.alert("VRE Deploying report completed: " + report.getGlobalsStatus() );
bar.setWidth("90%");
i = 100;
bar.updateProgress((i/100), (int )i +label);
cp.layout();
}
}
/**
*
*/
public void createReport() {
cp.removeAll();
bar = new ProgressBar();
}
/**
*
* @return
*/
public ContentPanel getOverallDeployStatusPanel() {
cp.setHeaderVisible(true);
cp.setHeading("Overall deploying status");
cp.setHeight(250);
cp.setBorders(true);
cp.mask("Retrieving data", "loading-indicator");
return cp;
}
}

View File

@ -0,0 +1,106 @@
package org.gcube.portlets.admin.vredeployer.client.view.panels.builders;
import java.util.List;
import org.gcube.portlets.admin.vredeployer.client.charts.FunctionalityChart;
import org.gcube.portlets.admin.vredeployer.client.util.DelayedOperation;
import org.gcube.portlets.admin.vredeployer.shared.deployreport.ClientCloudReport;
import org.gcube.portlets.admin.vredeployer.shared.deployreport.ClientFunctionalityDeployReport;
import org.gcube.portlets.admin.vredeployer.shared.deployreport.ClientResourcesDeployReport;
import org.gcube.portlets.admin.vredeployer.shared.deployreport.DeployStatus;
import com.extjs.gxt.charts.client.Chart;
import com.extjs.gxt.ui.client.widget.ContentPanel;
import com.extjs.gxt.ui.client.widget.ProgressBar;
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
public class ResourcesDeployStatus {
private ContentPanel cp;
boolean chartAdded = false;
FunctionalityChart funcChart;
Chart myChart;
/**
*
*/
public ResourcesDeployStatus() {
cp = new ContentPanel(new FitLayout());
}
/**
*
* @param funcReport
* @param resourcesReport
*/
public void updateReport(final ClientFunctionalityDeployReport funcReport, ClientResourcesDeployReport resourcesReport) {
cp.unmask();
if (! chartAdded) {
createReport();
chartAdded = true;
myChart = funcChart.getChart();
myChart.setChartModel(funcChart.getChartModel(funcReport));
cp.add(myChart);
cp.layout();
}
else {
if (funcReport.getStatus() != DeployStatus.FINISH) {
cp.mask("Retrieving data", "loading-indicator");
DelayedOperation delay = new DelayedOperation() {
@Override
public void doJob() {
cp.unmask();
myChart.setChartModel(funcChart.getChartModel(funcReport));
myChart.refresh();
}
};
delay.start(1500);
}
else {
cp.unmask();
myChart.setChartModel(funcChart.getChartModel(funcReport));
myChart.refresh();
}
}
}
/**
*
*/
public void createReport() {
cp.removeAll();
funcChart = new FunctionalityChart();
}
/**
*
* @param report
*/
public void updateReport(ClientFunctionalityDeployReport report) {
cp.unmask();
DeployStatus status = report.getStatus();
if (! chartAdded) {
createReport();
chartAdded = true;
myChart = funcChart.getChart();
myChart.setChartModel(funcChart.getChartModel(report));
cp.add(myChart);
cp.layout();
}
else {
myChart.setChartModel(funcChart.getChartModel(report));
myChart.refresh();
}
}
/**
*
* @return
*/
public ContentPanel getResourcesDeployStatusPanel() {
cp.setHeaderVisible(true);
cp.setHeading("Functionality deploying");
cp.setHeight(250);
cp.setBorders(true);
cp.mask("Retrieving data", "loading-indicator");
return cp;
}
}

View File

@ -0,0 +1,107 @@
package org.gcube.portlets.admin.vredeployer.client.view.panels.builders;
import java.util.List;
import org.gcube.portlets.admin.vredeployer.client.charts.CloudChart;
import org.gcube.portlets.admin.vredeployer.client.util.DelayedOperation;
import org.gcube.portlets.admin.vredeployer.shared.deployreport.ClientResourceManagerDeployingReport;
import org.gcube.portlets.admin.vredeployer.shared.deployreport.DeployStatus;
import com.extjs.gxt.ui.client.widget.ContentPanel;
import com.extjs.gxt.ui.client.widget.ProgressBar;
import com.extjs.gxt.ui.client.widget.layout.CenterLayout;
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
import com.google.gwt.user.client.Window;
public class ServicesDeployStatus {
private ContentPanel cp;
boolean barAdded = false;
ProgressBar bar;
public ServicesDeployStatus() {
cp = new ContentPanel(new FitLayout());
cp.setLayout(new CenterLayout());
}
public void updateReport(ClientResourceManagerDeployingReport report) {
cp.unmask();
DeployStatus managerStatus = report.getStatus();
int i = 0;
String label = "% Complete";
switch (managerStatus) {
case FAIL:
label = "% Failure, see textual report";
i = 0;
break;
case RUN:
i = 50;
break;
case WAIT:
label = "% not started yet";
i = 0;
break;
case FINISH:
label = "% Complete";
i = 100;
break;
default:
break;
}
if (! barAdded) {
createReport();
barAdded = true;
bar.updateProgress(0, " not started yet");
cp.add(bar);
bar.setWidth("90%");
cp.layout();
}
else {
if (report.getStatus() != DeployStatus.FINISH) {
cp.mask("Retrieving data", "loading-indicator");
DelayedOperation delay = new DelayedOperation() {
@Override
public void doJob() {
cp.unmask();
}
};
delay.start(1500);
}
bar.setWidth("90%");
bar.updateProgress((i/100), (int )i +label);
cp.layout();
}
if (report.getStatus() == DeployStatus.FAIL || report.getStatus() == DeployStatus.FINISH) {
bar.setWidth("90%");
i = 100;
bar.updateProgress((i/100), (int )i +label);
cp.layout();
}
}
/**
*
*/
public void createReport() {
cp.removeAll();
bar = new ProgressBar();
}
/**
*
* @return
*/
public ContentPanel getServicesDeployStatusPanel() {
cp.setHeaderVisible(true);
cp.setHeading("Services dynamic deploying");
cp.setHeight(250);
cp.setBorders(true);
cp.mask("Retrieving data", "loading-indicator");
return cp;
}
}

View File

@ -0,0 +1,64 @@
package org.gcube.portlets.admin.vredeployer.server;
import org.gcube.vremanagement.vremodel.cl.stubs.types.GHN;
import org.gcube.vremanagement.vremodel.cl.stubs.types.RunningInstanceMessage;
/**
* just a wrapper class
* @author massi
*
*/
public class AdditionalFuncInfo {
/**
*
*/
private GHN[] ghns;
/**
*
*/
private RunningInstanceMessage[] missingServices;
/**
*
*/
private RunningInstanceMessage[] foundServices;
public AdditionalFuncInfo() {
this.ghns = new GHN[0];
this.missingServices = new RunningInstanceMessage[0];
}
public AdditionalFuncInfo(GHN[] ghns,
RunningInstanceMessage[] missingServices,
RunningInstanceMessage[] foundServices) {
super();
this.ghns = ghns;
this.missingServices = missingServices;
this.foundServices = foundServices;
}
public GHN[] getGhns() {
return ghns;
}
public void setGhns(GHN[] ghns) {
this.ghns = ghns;
}
public RunningInstanceMessage[] getMissingServices() {
return missingServices;
}
public void setMissingServices(RunningInstanceMessage[] missingServices) {
this.missingServices = missingServices;
}
public RunningInstanceMessage[] getFoundServices() {
return foundServices;
}
public void setFoundServices(RunningInstanceMessage[] foundServices) {
this.foundServices = foundServices;
}
}

View File

@ -0,0 +1,30 @@
package org.gcube.portlets.admin.vredeployer.server;
import org.gcube.application.framework.accesslogger.model.AccessLogEntry;
/**
* Represents an access log entry for creating a new Template
*/
public class CreatedVRELogEntry extends AccessLogEntry{
private String name;
private String id;
private String designer;
private String manager;
public CreatedVRELogEntry(String name, String id, String designer, String manager) {
super("Deploy_VRE");
this.name = replaceReservedChars(name);
this.id = replaceReservedChars(id);
this.designer = replaceReservedChars(designer);
this.manager = replaceReservedChars(manager);
}
@Override
public String getLogMessage() {
String message = "Name = " + name + "|ID = " + id + "|DESIGNER = " + designer+ "|MANAGER = " + manager;
return message;
}
}

View File

@ -0,0 +1,36 @@
package org.gcube.portlets.admin.vredeployer.server.portlet;
import java.io.IOException;
import javax.portlet.ActionRequest;
import javax.portlet.ActionResponse;
import javax.portlet.GenericPortlet;
import javax.portlet.PortletException;
import javax.portlet.PortletRequestDispatcher;
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;
import org.gcube.portal.custom.scopemanager.scopehelper.ScopeHelper;
/**
* CollectionViewerPortlet Portlet Class
* @author massi
*/
public class VREViewerPortlet extends GenericPortlet {
public void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException {
ScopeHelper.setContext(request);
PortletRequestDispatcher dispatcher =
getPortletContext().getRequestDispatcher("/WEB-INF/jsp/CollectionViewerPortlet_view.jsp");
dispatcher.include(request, response);
}
/**
*
*/
public void processAction(ActionRequest request, ActionResponse response)
throws PortletException, IOException {
}
}

View File

@ -0,0 +1,42 @@
package org.gcube.portlets.admin.vredeployer.shared;
/**
* <p>
* FieldVerifier validates that the name the user enters is valid.
* </p>
* <p>
* This class is in the <code>shared</code> packing because we use it in both
* the client code and on the server. On the client, we verify that the name is
* valid before sending an RPC request so the user doesn't have to wait for a
* network round trip to get feedback. On the server, we verify that the name is
* correct to ensure that the input is correct regardless of where the RPC
* originates.
* </p>
* <p>
* When creating a class that is used on both the client and the server, be sure
* that all code is translatable and does not use native JavaScript. Code that
* is note translatable (such as code that interacts with a database or the file
* system) cannot be compiled into client side JavaScript. Code that uses native
* JavaScript (such as Widgets) cannot be run on the server.
* </p>
*/
public class FieldVerifier {
/**
* Verifies that the specified name is valid for our service.
*
* In this example, we only require that the name is at least four
* characters. In your application, you can use more complex checks to ensure
* that usernames, passwords, email addresses, URLs, and other fields have the
* proper syntax.
*
* @param name the name to validate
* @return true if valid, false if invalid
*/
public static boolean isValidName(String name) {
if (name == null) {
return false;
}
return name.length() > 3;
}
}

View File

@ -0,0 +1,77 @@
package org.gcube.portlets.admin.vredeployer.shared;
import com.extjs.gxt.ui.client.data.BaseModel;
public class GHNBean extends BaseModel {
private static final long serialVersionUID = 1L;
/**
* default const. for serialization
*/
public GHNBean() { }
/**
*
* @param id
* @param host
* @param memory
* @param uptime
* @param isSelected
*/
public GHNBean(String id, String host, String memory, String domain,
boolean isSelected, String diskSpace, String location, String country, boolean isSecure) {
set("id", id);
set("host", host);
set("memory", memory);
set("domain", domain);
set("isSelected", isSelected);
set("diskspace", diskSpace);
set("location", location);
set("country", country);
set("isSecure", isSecure);
}
/**
*
* @return
*/
public String getDiskspace() {
return (String) get("diskspace");
}
public String getLocation() {
return (String) get("location");
}
public String getCountry() {
return (String) get("country");
}
public String getSecurity() {
return (String) get("security");
}
public String getId() {
return (String) get("id");
}
public String getHost() {
return (String) get("host");
}
public String getMemory() {
return (String) get("memory");
}
public String getDomain() {
return (String) get("domain");
}
public boolean isSelected() {
return ((Boolean) get("isSelected")).booleanValue();
}
public boolean isSecure() {
return ((Boolean) get("isSecure")).booleanValue();
}
}

View File

@ -0,0 +1,35 @@
package org.gcube.portlets.admin.vredeployer.shared;
import java.io.Serializable;
public class GHNMemory implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
String virtualAvailable;
String localAvailableSpace;
public GHNMemory() {
super();
// TODO Auto-generated constructor stub
}
public GHNMemory(String virtualAvailable, String localAvailableSpace) {
super();
this.virtualAvailable = virtualAvailable + " MB";
this.localAvailableSpace = localAvailableSpace + " MB";
}
public String getVirtualAvailable() {
return virtualAvailable;
}
public void setVirtualAvailable(String virtualAvailable) {
this.virtualAvailable = virtualAvailable;
}
public String getLocalAvailableSpace() {
return localAvailableSpace;
}
public void setLocalAvailableSpace(String localAvailableSpace) {
this.localAvailableSpace = localAvailableSpace;
}
}

View File

@ -0,0 +1,92 @@
package org.gcube.portlets.admin.vredeployer.shared;
import java.io.Serializable;
import java.util.List;
/**
*
* @author Massimiliano Assante ISTI-CNR
*
*/
public class GHNProfile implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
private String id;
private String host;
private List<RunningInstance> runningInstances;
private boolean security;
private GHNMemory memory;
private GHNSite site;
private List<String> libraries;
private boolean isSelected;
public GHNProfile() {
super();
}
public GHNProfile(String id, String host,
List<RunningInstance> runningInstances, boolean security,
GHNMemory memory, GHNSite site,
List<String> libraries, boolean isSelected) {
super();
this.id = id;
this.host = host;
this.runningInstances = runningInstances;
this.security = security;
this.memory = memory;
this.site = site;
this.libraries = libraries;
this.isSelected = isSelected;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getHost() {
return host;
}
public void setHost(String host) {
this.host = host;
}
public List<RunningInstance> getRunningInstances() {
return runningInstances;
}
public void setRunningInstances(List<RunningInstance> runningInstances) {
this.runningInstances = runningInstances;
}
public boolean isSecure() {
return security;
}
public void setSecurity(Boolean securityEnabled) {
this.security = securityEnabled;
}
public GHNMemory getMemory() {
return memory;
}
public void setMemory(GHNMemory memory) {
this.memory = memory;
}
public GHNSite getSite() {
return site;
}
public void setSite(GHNSite site) {
this.site = site;
}
public List<String> getLibraries() {
return libraries;
}
public void setLibraries(List<String> libraries) {
this.libraries = libraries;
}
public boolean isSelected() {
return isSelected;
}
public void setSelected(boolean isSelected) {
this.isSelected = isSelected;
}
}

View File

@ -0,0 +1,39 @@
package org.gcube.portlets.admin.vredeployer.shared;
import java.io.Serializable;
@SuppressWarnings("serial")
public class GHNSite implements Serializable {
String location;
String country;
String domain;
public GHNSite() {
super();
}
public GHNSite(String location, String country, String domain) {
super();
this.location = location;
this.country = country;
this.domain = domain;
}
public String getLocation() {
return location;
}
public void setLocation(String location) {
this.location = location;
}
public String getCountry() {
return country;
}
public void setCountry(String country) {
this.country = country;
}
public String getDomain() {
return domain;
}
public void setDomain(String domain) {
this.domain = domain;
}
}

View File

@ -0,0 +1,57 @@
package org.gcube.portlets.admin.vredeployer.shared;
import java.io.Serializable;
import java.util.ArrayList;
@SuppressWarnings("serial")
public class ResourceCategory implements Serializable {
private String id;
private String name;
private ArrayList<ResourceCategoryItem> items;
public ResourceCategory() {
super();
}
public ResourceCategory(String id, String name,
ArrayList<ResourceCategoryItem> items) {
super();
this.id = id;
this.name = name;
this.items = items;
}
public ResourceCategory(String id, String name) {
super();
this.id = id;
this.name = name;
this.items = new ArrayList<ResourceCategoryItem>();
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public ArrayList<ResourceCategoryItem> getItems() {
return items;
}
public void setItems(ArrayList<ResourceCategoryItem> items) {
this.items = items;
}
public void addResourceItem(ResourceCategoryItem item) {
items.add(item);
}
}

View File

@ -0,0 +1,60 @@
package org.gcube.portlets.admin.vredeployer.shared;
import java.io.Serializable;
@SuppressWarnings("serial")
public class ResourceCategoryItem implements Serializable {
private String id;
private String name;
private String description;
private boolean isSelected;
public ResourceCategoryItem() {
super();
}
public ResourceCategoryItem(String id, String name, String description,
boolean isSelected) {
super();
this.id = id;
this.name = name;
this.description = description;
this.isSelected = isSelected;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public boolean isSelected() {
return isSelected;
}
public void setSelected(boolean isSelected) {
this.isSelected = isSelected;
}
}

View File

@ -0,0 +1,37 @@
package org.gcube.portlets.admin.vredeployer.shared;
import java.io.Serializable;
@SuppressWarnings("serial")
public class RunningInstance implements Serializable {
private String name;
private String serviceClass;
public RunningInstance() {
super();
}
public RunningInstance(String name, String serviceClass) {
super();
this.name = name;
this.serviceClass = serviceClass;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getServiceClass() {
return serviceClass;
}
public void setServiceClass(String serviceClass) {
this.serviceClass = serviceClass;
}
}

View File

@ -0,0 +1,23 @@
package org.gcube.portlets.admin.vredeployer.shared;
import com.google.gwt.user.client.rpc.IsSerializable;
/**
*
* @author massi
*
*/
public enum VREDeployerStatusType implements IsSerializable {
/**
* APPROVE
*/
APPROVE,
/**
* NON_APPROVE
*/
NON_APPROVE,
/**
* DEPLOYING
*/
DEPLOYING;
}

View File

@ -0,0 +1,87 @@
package org.gcube.portlets.admin.vredeployer.shared;
import java.io.Serializable;
import java.util.Calendar;
import java.util.Date;
@SuppressWarnings("serial")
public class VREDescrBean implements Serializable {
private String name;
private String description;
private String designer;
private String manager;
private Date startTime;
private Date endTime;
public VREDescrBean() {
super();
// TODO Auto-generated constructor stub
}
public VREDescrBean(String name, String description, String designer,
String manager, Date startTime, Date endTime) {
super();
this.name = name;
this.description = description;
this.designer = designer;
this.manager = manager;
this.startTime = startTime;
this.endTime = endTime;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getDesigner() {
return designer;
}
public void setDesigner(String designer) {
this.designer = designer;
}
public String getManager() {
return manager;
}
public void setManager(String manager) {
this.manager = manager;
}
public Date getStartTime() {
return startTime;
}
public void setStartTime(Date startTime) {
this.startTime = startTime;
}
public Date getEndTime() {
return endTime;
}
public void setEndTime(Date endTime) {
this.endTime = endTime;
}
}

View File

@ -0,0 +1,62 @@
package org.gcube.portlets.admin.vredeployer.shared.deployreport;
import java.io.Serializable;
import java.util.List;
/**
*
* @author massi
*
*/
public class ClientCloudReport implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
/**
*
*/
private DeployStatus status;
/**
*
*/
private List<DeployStatus> itemsStatuses;
/**
*
*/
public ClientCloudReport() {
super();
}
/**
*
* @param globalstatus
* @param itemsStatuses
*/
public ClientCloudReport(DeployStatus globalstatus,
List<DeployStatus> itemsStatuses) {
super();
this.status = globalstatus;
this.itemsStatuses = itemsStatuses;
}
public DeployStatus getStatus() {
return status;
}
public void setStatus(DeployStatus status) {
this.status = status;
}
public List<DeployStatus> getItemsStatuses() {
return itemsStatuses;
}
public void setItemsStatuses(List<DeployStatus> itemsStatuses) {
this.itemsStatuses = itemsStatuses;
}
}

View File

@ -0,0 +1,126 @@
package org.gcube.portlets.admin.vredeployer.shared.deployreport;
import java.io.Serializable;
@SuppressWarnings("serial")
public class ClientDeployReport implements Serializable {
/**
*
*/
private DeployStatus globalStatus;
/**
*
*/
private ClientCloudReport cloudReport;
/**
*
*/
private ClientResourceManagerDeployingReport resourceManagerReport;
/**
*
*/
private ClientFunctionalityDeployReport functionalityReport;
/**
*
*/
private ClientResourcesDeployReport resourcesReport;
/**
*
*/
public ClientDeployReport() {
super();
}
/**
*
* @param status status
* @param cloudReport cloudReport
* @param resourceManagerReport resourceManagerReport
* @param functionalityReport functionalityReport
* @param resourcesReport resourcesReport
*/
public ClientDeployReport(DeployStatus status,
ClientCloudReport cloudReport,
ClientResourceManagerDeployingReport resourceManagerReport,
ClientFunctionalityDeployReport functionalityReport,
ClientResourcesDeployReport resourcesReport) {
super();
this.globalStatus = status;
this.cloudReport = cloudReport;
this.resourceManagerReport = resourceManagerReport;
this.functionalityReport = functionalityReport;
this.resourcesReport = resourcesReport;
}
/**
* @return
*/
public DeployStatus getGlobalsStatus() {
return globalStatus;
}
/**
*
* @param status
*/
public void setGlobalStatus(DeployStatus status) {
this.globalStatus = status;
}
/**
*
* @return
*/
public ClientCloudReport getCloudReport() {
return cloudReport;
}
/**
*
* @param cloudReport
*/
public void setCloudReport(ClientCloudReport cloudReport) {
this.cloudReport = cloudReport;
}
/**
*
* @return
*/
public ClientResourceManagerDeployingReport getResourceManagerReport() {
return resourceManagerReport;
}
/**
*
* @param resourceManagerReport
*/
public void setResourceManagerReport(
ClientResourceManagerDeployingReport resourceManagerReport) {
this.resourceManagerReport = resourceManagerReport;
}
/**
*
* @return
*/
public ClientFunctionalityDeployReport getFunctionalityReport() {
return functionalityReport;
}
/**
*
* @param functionalityReport
*/
public void setFunctionalityReport(
ClientFunctionalityDeployReport functionalityReport) {
this.functionalityReport = functionalityReport;
}
/**
*
* @return
*/
public ClientResourcesDeployReport getResourcesReport() {
return resourcesReport;
}
/**
*
* @param resourcesReport
*/
public void setResourcesReport(ClientResourcesDeployReport resourcesReport) {
this.resourcesReport = resourcesReport;
}
}

View File

@ -0,0 +1,97 @@
package org.gcube.portlets.admin.vredeployer.shared.deployreport;
import java.io.Serializable;
import java.util.HashMap;
import java.util.List;
/**
*
* @author massi
*
*/
public class ClientFunctionalityDeployReport implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
/**
*
*/
private DeployStatus status;
/**
*
*/
private String reportXML;
/**
*
*/
private HashMap<ClientFunctionalityReport, List<ClientServiceReport>> funTable;
/**
*
*/
public ClientFunctionalityDeployReport() {
super();
// TODO Auto-generated constructor stub
}
/**
*
* @param globalstatus
* @param reportXML
* @param funTable
*/
public ClientFunctionalityDeployReport(
DeployStatus globalstatus,
String reportXML,
HashMap<ClientFunctionalityReport, List<ClientServiceReport>> funTable) {
super();
this.status = globalstatus;
this.reportXML = reportXML;
this.funTable = funTable;
}
/**
*
* @return
*/
public DeployStatus getStatus() {
return status;
}
/**
*
* @param globalstatus
*/
public void setStatus(DeployStatus globalstatus) {
this.status = globalstatus;
}
/**
*
* @return
*/
public HashMap<ClientFunctionalityReport, List<ClientServiceReport>> getFunTable() {
return funTable;
}
/**
*
* @param funTable
*/
public void setFunTable(
HashMap<ClientFunctionalityReport, List<ClientServiceReport>> funTable) {
this.funTable = funTable;
}
/**
*
* @return
*/
public String getReportXML() {
return reportXML;
}
/**
*
* @param reportXML
*/
public void setReportXML(String reportXML) {
this.reportXML = reportXML;
}
}

View File

@ -0,0 +1,80 @@
package org.gcube.portlets.admin.vredeployer.shared.deployreport;
import java.io.Serializable;
public class ClientFunctionalityReport implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
/**
*
*/
private String id;
/**
*
*/
private String name;
/**
*
*/
private DeployStatus status;
public ClientFunctionalityReport() {
super();
// TODO Auto-generated constructor stub
}
/**
*
* @param id
* @param name
* @param status
*/
public ClientFunctionalityReport(int id, String name, DeployStatus status) {
super();
this.id = id+"";
this.name = name;
this.status = status;
}
/**
*
* @return id
*/
public String getId() {
return id;
}
/**
*
* @param id
*/
public void setId(String id) {
this.id = id;
}
/**
*
* @return name
*/
public String getName() {
return name;
}
/**
*
* @param name a name
*/
public void setName(String name) {
this.name = name;
}
/**
*
* @return
*/
public DeployStatus getStatus() {
return status;
}
/**
*
* @param status
*/
public void setStatus(DeployStatus status) {
this.status = status;
}
}

View File

@ -0,0 +1,87 @@
package org.gcube.portlets.admin.vredeployer.shared.deployreport;
import com.google.gwt.user.client.rpc.IsSerializable;
/**
*
* @author massi
*
*/
public class ClientResource implements IsSerializable {
/**
*
*/
private String resourceid;
/**
*
*/
private String resourceType;
/**
*
*/
private DeployStatus status;
/**
*
*/
public ClientResource() {
super();
// TODO Auto-generated constructor stub
}
/**
*
* @param resourceid -
* @param resourceType -
* @param status -
*/
public ClientResource(String resourceid, String resourceType,
DeployStatus status) {
super();
this.resourceid = resourceid;
this.resourceType = resourceType;
this.status = status;
}
/**
*
* @return -
*/
public String getResourceid() {
return resourceid;
}
/**
*
* @param resourceid-
*/
public void setResourceid(String resourceid) {
this.resourceid = resourceid;
}
/**
*
* @return -
*/
public String getResourceType() {
return resourceType;
}
/**
*
* @param resourceType -
*/
public void setResourceType(String resourceType) {
this.resourceType = resourceType;
}
/**
*
* @return -
*/
public DeployStatus getStatus() {
return status;
}
/**
*
* @param status -
*/
public void setStatus(DeployStatus status) {
this.status = status;
}
}

View File

@ -0,0 +1,52 @@
package org.gcube.portlets.admin.vredeployer.shared.deployreport;
import java.io.Serializable;
/**
*
* @author massi
*
*/
public class ClientResourceManagerDeployingReport implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
/**
*
*/
private DeployStatus status;
/**
*
*/
private String reportXML;
public ClientResourceManagerDeployingReport() {
super();
// TODO Auto-generated constructor stub
}
public ClientResourceManagerDeployingReport(DeployStatus status,
String reportXML) {
super();
this.status = status;
this.reportXML = reportXML;
}
public DeployStatus getStatus() {
return status;
}
public void setStatus(DeployStatus status) {
this.status = status;
}
public String getReportXML() {
return reportXML;
}
public void setReportXML(String reportXML) {
this.reportXML = reportXML;
}
}

View File

@ -0,0 +1,66 @@
package org.gcube.portlets.admin.vredeployer.shared.deployreport;
import java.io.Serializable;
import java.util.List;
public class ClientResourcesDeployReport implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
/**
*
*/
private DeployStatus status;
/**
*
*/
private List<ClientResource> resources;
/**
*
*/
public ClientResourcesDeployReport() {
super();
// TODO Auto-generated constructor stub
}
/**
*
* @param globalstatus -
* @param resources -
*/
public ClientResourcesDeployReport(DeployStatus globalstatus, List<ClientResource> resources) {
super();
this.status = globalstatus;
this.resources = resources;
}
/**
*
* @return -
*/
public DeployStatus getStatus() {
return status;
}
/**
*
* @param globalstatus -
*/
public void setStatus(DeployStatus globalstatus) {
this.status = globalstatus;
}
/**
*
* @return -
*/
public List<ClientResource> getResources() {
return resources;
}
/**
*
* @param resources -
*/
public void setResources(List<ClientResource> resources) {
this.resources = resources;
}
}

View File

@ -0,0 +1,84 @@
package org.gcube.portlets.admin.vredeployer.shared.deployreport;
import java.io.Serializable;
public class ClientServiceReport implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
/**
*
*/
private String name;
/**
*
*/
private String serviceClass;
/**
*
*/
private String version;
/**
*
*/
public ClientServiceReport() {
super();
}
/**
*
* @param name service name
* @param serviceClass service class
* @param version its version
*/
public ClientServiceReport(String name, String serviceClass, String version) {
super();
this.name = name;
this.serviceClass = serviceClass;
this.version = version;
}
/**
*
* @return .
*/
public String getName() {
return name;
}
/**
*
* @param name .
*/
public void setName(String name) {
this.name = name;
}
/**
*
* @return .
*/
public String getServiceClass() {
return serviceClass;
}
/**
*
* @param serviceClass .
*/
public void setServiceClass(String serviceClass) {
this.serviceClass = serviceClass;
}
/**
*
* @return .
*/
public String getVersion() {
return version;
}
/**
*
* @param version .
*/
public void setVersion(String version) {
this.version = version;
}
}

View File

@ -0,0 +1,15 @@
package org.gcube.portlets.admin.vredeployer.shared.deployreport;
/**
*
* @author massi
*
*/
public enum DeployStatus {
WAIT,
RUN,
FINISH,
FAIL,
SKIP,
PENDING;
}

View File

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<module rename-to='vredeployer'>
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User' />
<!-- Inherit the default GWT style sheet. You can change -->
<!-- the theme of your GWT application by uncommenting -->
<!-- any one of the following lines. -->
<inherits name='com.google.gwt.user.theme.standard.Standard' />
<!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
<!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/> -->
<!-- To Comment out
<set-property name="user.agent" value="gecko1_8" />
-->
<!-- Other module inherits -->
<inherits name='com.extjs.gxt.ui.GXT' />
<inherits name='com.extjs.gxt.themes.Themes' />
<inherits name='com.extjs.gxt.charts.Chart' />
<!-- inherits GCUBE Widgets -->
<inherits name='org.gcube.portlets.user.gcubewidgets.WidgetFactory' />
<!-- Specify the app entry point class. -->
<entry-point class='org.gcube.portlets.admin.vredeployer.client.Vredeployer' />
<!-- Specify the paths for translatable code -->
<source path='client' />
<source path='shared' />
</module>

View File

@ -0,0 +1,40 @@
/** Add css rules here for your application. */
.info-icon {
background-image:url(images/icons/information.png) !important;
}
.content-icon {
background-image:url(images/icons/content.png) !important;
}
.collections-icon {
background-image:url(images/icons/collections.png) !important;
}
.metadata-icon {
background-image:url(images/icons/metadata.png) !important;
}
.functionality-icon {
background-image:url(images/icons/functionality.png) !important;
}
.functionality-add-icon {
background-image:url(images/icons/functionality_add.png) !important;
}
.architecture-icon {
background-image:url(images/icons/architecture.png) !important;
}
.report-icon {
background-image:url(images/icons/report.png) !important;
}
.play-icon {
background-image:url(images/icons/play.png) !important;
}
.runninginstance-icon {
background-image:url(images/icons/runninginstance.png) !important;
}
.missing-ri {
background-image:url(images/cog_error.png) !important;
}
.extres-icon {
background-image:url(images/icons/ext_resource.png) !important;
}

View File

@ -0,0 +1,37 @@
<!doctype html>
<!-- The DOCTYPE declaration above will set the -->
<!-- browser's rendering engine into -->
<!-- "Standards Mode". Replacing this declaration -->
<!-- with a "Quirks Mode" doctype may lead to some -->
<!-- differences in layout. -->
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<!-- -->
<!-- Consider inlining CSS to reduce the number of requested files -->
<!-- -->
<link rel="stylesheet" type="text/css" href="gxt/css/gxt-all.css" />
<link type="text/css" rel="stylesheet" href="Vredeployer.css" />
<title>VRE Deployer</title>
<script src='gxt/flash/swfobject.js'></script>
<script type="text/javascript" src="vredeployer/vredeployer.nocache.js"></script>
</head>
<body>
<!-- RECOMMENDED if your web app will not function without JavaScript enabled -->
<noscript>
<div style="width: 22em; position: absolute; left: 50%; margin-left: -11em; color: red; background-color: white; border: 1px solid red; padding: 4px; font-family: sans-serif">
Your web browser must have JavaScript enabled
in order for this application to display correctly.
</div>
</noscript>
<div id="DeployerDIV"></div>
</body>
</html>

View File

@ -0,0 +1,13 @@
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%-- Uncomment below lines to add portlet taglibs to jsp
<%@ page import="javax.portlet.*"%>
<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet"%>
<portlet:defineObjects />
--%>
<b>
EDIT MODE
</b>

View File

@ -0,0 +1,13 @@
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%-- Uncomment below lines to add portlet taglibs to jsp
<%@ page import="javax.portlet.*"%>
<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet"%>
<portlet:defineObjects />
--%>
<b>
HELP MODE
</b>

View File

@ -0,0 +1,17 @@
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%-- Uncomment below lines to add portlet taglibs to jsp
<%@ page import="javax.portlet.*"%>
<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet"%>
<portlet:defineObjects />
--%>
<link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/gxt/css/gxt-all.css" />
<link type="text/css" rel="stylesheet" href="<%=request.getContextPath()%>/Vredeployer.css">
<script type="text/javascript" language='javascript' src='<%=request.getContextPath()%>/gxt/flash/swfobject.js'></script>
<script type="text/javascript" language="javascript" src='<%=request.getContextPath()%>/vredeployer/vredeployer.nocache.js'></script>
<div id="DeployerDIV">
</div>

View File

@ -0,0 +1,8 @@
<?xml version="1.0"?>
<!DOCTYPE display PUBLIC "-//Liferay//DTD Display 5.2.0//EN" "http://www.liferay.com/dtd/liferay-display_5_2_0.dtd">
<display>
<category name="gCube Enabling Apps">
<portlet id="deployer" />
</category>
</display>

View File

@ -0,0 +1,9 @@
name=VRE Deployer
module-group-id=liferay
module-incremental-version=1
tags=
short-description=
change-log=
page-url=http://www.liferay.com
author=Liferay, Inc.
licenses=MIT

View File

@ -0,0 +1,17 @@
<?xml version="1.0"?>
<!DOCTYPE liferay-portlet-app PUBLIC "-//Liferay//DTD Portlet Application 5.2.0//EN" "http://www.liferay.com/dtd/liferay-portlet-app_5_2_0.dtd">
<liferay-portlet-app>
<portlet>
<portlet-name>deployer</portlet-name>
<layout-cacheable>false</layout-cacheable>
<instanceable>false</instanceable>
<ajaxable>false</ajaxable>
<!-- LOCATION CSS HERE -->
<header-portlet-css>/Wizard.css</header-portlet-css>
</portlet>
<role-mapper>
<role-name>administrator</role-name>
<role-link>Administrator</role-link>
</role-mapper>
</liferay-portlet-app>

View File

@ -0,0 +1,24 @@
<?xml version="1.0"?>
<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd">
<portlet>
<portlet-name>deployer</portlet-name>
<display-name>VRE Deployer</display-name>
<portlet-class>org.gcube.portlets.admin.vredeployer.server.portlet.VREViewerPortlet</portlet-class>
<init-param>
<name>view-jsp</name>
<value>/WEB-INF/jsp/VREDeployerPortlet_view.jsp</value>
</init-param>
<expiration-cache>0</expiration-cache>
<supports>
<mime-type>text/html</mime-type>
</supports>
<portlet-info>
<title>VRE Deployer</title>
<short-title>VRE Deployer</short-title>
<keywords>VRE Deployer</keywords>
</portlet-info>
<security-role-ref>
<role-name>administrator</role-name>
</security-role-ref>
</portlet>
</portlet-app>

View File

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<!-- Servlets -->
<servlet>
<servlet-name>VREDeployerServiceImpl</servlet-name>
<servlet-class>org.gcube.portlets.admin.vredeployer.server.VREDeployerServiceImpl</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>VREDeployerServiceImpl</servlet-name>
<url-pattern>/vredeployer/VREDeployerServiceImpl</url-pattern>
</servlet-mapping>
<!-- Default page to serve -->
<welcome-file-list>
<welcome-file>Vredeployer.html</welcome-file>
</welcome-file-list>
</web-app>

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,490 @@
.x-panel {
border-style: solid;
border-color: #d0d0d0;
}
.x-panel-header {
color:#333;
border:1px solid #d0d0d0;
background-image:url(../images/gray/panel/white-top-bottom.gif);
}
.x-panel-body {
border-color:#d0d0d0;
}
.x-panel-bbar .x-toolbar {
border-color:#d0d0d0;
}
.x-panel-tbar .x-toolbar {
border-color:#d0d0d0;
}
.x-panel-tbar-noheader .x-toolbar, .x-panel-mc .x-panel-tbar .x-toolbar {
border-color:#d0d0d0;
}
.x-panel-body-noheader, .x-panel-mc .x-panel-body {
border-color:#d0d0d0;
}
.x-panel-tl .x-panel-header {
color:#333;
}
.x-panel-tc {
background-image:url(../images/gray/panel/top-bottom.gif);
}
.x-panel-tl {
background-image:url(../images/gray/panel/corners-sprite.gif);
border-color:#d0d0d0;
}
.x-panel-tr {
background-image:url(../images/gray/panel/corners-sprite.gif);
}
.x-panel-bc {
background-image:url(../images/gray/panel/top-bottom.gif);
}
.x-panel-bl {
background-image:url(../images/gray/panel/corners-sprite.gif);
}
.x-panel-br {
background-image:url(../images/gray/panel/corners-sprite.gif);
}
.x-panel-mc {
background:#f1f1f1;
}
.x-panel-mc .x-panel-body {
background:transparent;
border: 0 none;
}
.x-panel-ml {
background-image:url(../images/gray/panel/left-right.gif);
}
.x-panel-mr {
background-image:url(../images/gray/panel/left-right.gif);
}
/* Tools */
.x-tool {
background-image:url(../images/gray/panel/tool-sprites.gif);
}
/* Ghosting */
.x-panel-ghost {
background:#e0e0e0;
}
.x-panel-ghost ul {
border-color:#b0b0b0;
}
.x-grid-panel .x-panel-mc .x-panel-body {
border:1px solid #d0d0d0;
}
/* Buttons */
.x-btn-left{
background-image:url(../images/gray/button/btn-sprite.gif);
}
.x-btn-right{
background-image:url(../images/gray/button/btn-sprite.gif);
}
.x-btn-center{
background-image:url(../images/gray/button/btn-sprite.gif);
}
.x-btn-group-header {
color: #333333;
}
.x-btn-group-tc {
background-image: url(../images/gray/button/group-tb.gif);
}
.x-btn-group-tl {
background-image: url(../images/gray/button/group-cs.gif);
}
.x-btn-group-tr {
background-image: url(../images/gray/button/group-cs.gif);
}
.x-btn-group-bc {
background-image: url(../images/gray/button/group-tb.gif);
}
.x-btn-group-bl {
background-image: url(../images/gray/button/group-cs.gif);
}
.x-btn-group-br {
background-image: url(../images/gray/button/group-cs.gif);
}
.x-btn-group-ml {
background-image: url(../images/gray/button/group-lr.gif);
}
.x-btn-group-mr {
background-image: url(../images/gray/button/group-lr.gif);
}
.x-btn-group-notitle .x-btn-group-tc {
background-image: url(../images/gray/button/group-tb.gif);
}
/* Layout classes */
.x-border-layout-ct {
background:#f0f0f0;
}
.x-accordion-hd {
background-image:url(../images/gray/panel/light-hd.gif);
}
.x-layout-collapsed{
background-color:#eee;
border-color:#e0e0e0;
}
.x-layout-collapsed-over{
background-color:#fbfbfb;
}
/* qtips */
.x-tip .x-tip-top {
background-image:url(../images/gray/qtip/tip-sprite.gif);
}
.x-tip .x-tip-top-left {
background-image:url(../images/gray/qtip/tip-sprite.gif);
}
.x-tip .x-tip-top-right {
background-image:url(../images/gray/qtip/tip-sprite.gif);
}
.x-tip .x-tip-ft {
background-image:url(../images/gray/qtip/tip-sprite.gif);
}
.x-tip .x-tip-ft-left {
background-image:url(../images/gray/qtip/tip-sprite.gif);
}
.x-tip .x-tip-ft-right {
background-image:url(../images/gray/qtip/tip-sprite.gif);
}
.x-tip .x-tip-bd-left {
background-image:url(../images/gray/qtip/tip-sprite.gif);
}
.x-tip .x-tip-bd-right {
background-image:url(../images/gray/qtip/tip-sprite.gif);
}
/* Toolbars */
.x-toolbar{
border-color:#d0d0d0;
background:#f0f4f5 url(../images/gray/toolbar/bg.gif) repeat-x top left;
}
.x-toolbar button {
color:#444;
}
.x-toolbar .x-btn-menu-arrow-wrap .x-btn-center button {
background-image:url(../images/gray/toolbar/btn-arrow.gif);
}
.x-toolbar .x-btn-text-icon .x-btn-menu-arrow-wrap .x-btn-center button {
background-image:url(../images/gray/toolbar/btn-arrow.gif);
}
.x-toolbar .x-btn-over .x-btn-left{
background-image:url(../images/gray/toolbar/tb-btn-sprite.gif);
}
.x-toolbar .x-btn-over .x-btn-right{
background-image:url(../images/gray/toolbar/tb-btn-sprite.gif);
}
.x-toolbar .x-btn-over .x-btn-center{
background-image:url(../images/gray/toolbar/tb-btn-sprite.gif);
}
.x-toolbar .x-btn-over button {
color:#111;
}
.x-toolbar .x-btn-click .x-btn-left, .x-toolbar .x-btn-pressed .x-btn-left, .x-toolbar .x-btn-menu-active .x-btn-left{
background-image:url(../images/gray/toolbar/tb-btn-sprite.gif);
}
.x-toolbar .x-btn-click .x-btn-right, .x-toolbar .x-btn-pressed .x-btn-right, .x-toolbar .x-btn-menu-active .x-btn-right{
background-image:url(../images/gray/toolbar/tb-btn-sprite.gif);
}
.x-toolbar .x-btn-click .x-btn-center, .x-toolbar .x-btn-pressed .x-btn-center, .x-toolbar .x-btn-menu-active .x-btn-center{
background-image:url(../images/gray/toolbar/tb-btn-sprite.gif);
}
.x-toolbar .xtb-sep {
background-image: url(../images/gray/grid/grid-split.gif);
}
/* Tabs */
.x-tab-panel-header, .x-tab-panel-footer {
background: #EAEAEA;
border-color:#d0d0d0;
}
.x-tab-panel-header {
border-color:#d0d0d0;
}
.x-tab-panel-footer {
border-color:#d0d0d0;
}
ul.x-tab-strip-top{
background:#dbdbdb url(../images/gray/tabs/tab-strip-bg.gif) repeat-x left top;
border-color:#d0d0d0;
padding-top: 2px;
}
ul.x-tab-strip-bottom{
background-image:url(../images/gray/tabs/tab-strip-btm-bg.gif);
border-color:#d0d0d0;
}
.x-tab-strip span.x-tab-strip-text {
color:#333;
}
.x-tab-strip-over span.x-tab-strip-text {
color:#111;
}
.x-tab-strip-active span.x-tab-strip-text {
color:#333;
}
.x-tab-strip-disabled .x-tabs-text {
color:#aaaaaa;
}
.x-tab-strip-top .x-tab-right {
background-image:url(../images/gray/tabs/tabs-sprite.gif);
}
.x-tab-strip-top .x-tab-left {
background-image:url(../images/gray/tabs/tabs-sprite.gif);
}
.x-tab-strip-top .x-tab-strip-inner {
background-image:url(../images/gray/tabs/tabs-sprite.gif);
}
.x-tab-strip-bottom .x-tab-right {
background-image:url(../images/gray/tabs/tab-btm-inactive-right-bg.gif);
}
.x-tab-strip-bottom .x-tab-left {
background-image:url(../images/gray/tabs/tab-btm-inactive-left-bg.gif);
}
.x-tab-strip-bottom .x-tab-strip-active .x-tab-right {
background-image:url(../images/gray/tabs/tab-btm-right-bg.gif);
}
.x-tab-strip-bottom .x-tab-strip-active .x-tab-left {
background-image:url(../images/gray/tabs/tab-btm-left-bg.gif);
}
.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close {
background-image:url(../images/gray/tabs/tab-close.gif);
}
.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close:hover{
background-image:url(../images/gray/tabs/tab-close.gif);
}
.x-tab-panel-body {
border-color:#d0d0d0;
background:#fff;
}
.x-tab-panel-bbar .x-toolbar {
border-color: #d0d0d0;
}
.x-tab-panel-tbar .x-toolbar {
border-color: #d0d0d0;
}
.x-tab-panel-header-plain .x-tab-strip-spacer {
border-color:#d0d0d0;
background: #eaeaea;
}
.x-tab-scroller-left {
background-image: url(../images/gray/tabs/scroll-left.gif);
border-color:#aeaeae;
}
.x-tab-scroller-right {
background-image: url(../images/gray/tabs/scroll-right.gif);
border-color:#aeaeae;
}
/* Window */
.x-window-proxy {
background:#e0e0e0;
border-color:#b0b0b0;
}
.x-window-tl .x-window-header {
color:#555;
}
.x-window-tc {
background-image:url(../images/gray/window/top-bottom.png);
}
.x-window-tl {
background-image:url(../images/gray/window/left-corners.png);
}
.x-window-tr {
background-image:url(../images/gray/window/right-corners.png);
}
.x-window-bc {
background-image:url(../images/gray/window/top-bottom.png);
}
.x-window-bl {
background-image:url(../images/gray/window/left-corners.png);
}
.x-window-br {
background-image:url(../images/gray/window/right-corners.png);
}
.x-window-mc {
border:1px solid #d0d0d0;
background:#e8e8e8;
}
.x-window-ml {
background-image:url(../images/gray/window/left-right.png);
}
.x-window-mr {
background-image:url(../images/gray/window/left-right.png);
}
.x-panel-ghost .x-window-tl {
border-color:#d0d0d0;
}
.x-panel-collapsed .x-window-tl {
border-color:#d0d0d0;
}
.x-window-plain .x-window-mc {
background: #e8e8e8;
border-right:1px solid #eee;
border-bottom:1px solid #eee;
border-top:1px solid #d0d0d0;
border-left:1px solid #d0d0d0;
}
.x-window-plain .x-window-body {
border-left:1px solid #eee;
border-top:1px solid #eee;
border-bottom:1px solid #d0d0d0;
border-right:1px solid #d0d0d0;
background:transparent !important;
}
body.x-body-masked .x-window-mc, body.x-body-masked .x-window-plain .x-window-mc {
background-color: #e4e4e4;
}
/* misc */
.x-html-editor-wrap {
border-color:#d0d0d0;
}
/* Borders go last for specificity */
.x-panel-noborder .x-panel-body-noborder {
border-width:0;
}
.x-panel-noborder .x-panel-header-noborder {
border-width:0;
border-bottom:1px solid #d0d0d0;
}
.x-panel-noborder .x-panel-tbar-noborder .x-toolbar {
border-width:0;
border-bottom:1px solid #d0d0d0;
}
.x-panel-noborder .x-panel-bbar-noborder .x-toolbar {
border-width:0;
border-top:1px solid #d0d0d0;
}
.x-window-noborder .x-window-mc {
border-width:0;
}
.x-window-plain .x-window-body-noborder {
border-width:0;
}
.x-tab-panel-noborder .x-tab-panel-body-noborder {
border-width:0;
}
.x-tab-panel-noborder .x-tab-panel-header-noborder {
border-top-width:0;
border-left-width:0;
border-right-width:0;
}
.x-tab-panel-noborder .x-tab-panel-footer-noborder {
border-bottom-width:0;
border-left-width:0;
border-right-width:0;
}
.x-tab-panel-bbar-noborder .x-toolbar {
border-width:0;
border-top:1px solid #d0d0d0;
}
.x-tab-panel-tbar-noborder .x-toolbar {
border-width:0;
border-bottom:1px solid #d0d0d0;
}
.x-spinner-field .x-form-spinner-up {
background-image: url('../images/gray/form/spinner.gif');
}
.x-spinner-field .x-form-spinner-down {
background-image: url('../images/gray/form/spinner.gif');
}.x-accordion-hd {
background-color: #e5e5e5;
}.x-border {
border: 1px solid #D0D0D0;
}
.x-layout-popup {
background-color: #F0F0F0;
border: 1px solid #D0D0D0;
}
.my-list {
border: 1px solid #D0D0D0;
}
.x-view {
border:1px solid #D0D0D0;
}
.x-menubar {
border-color: #D0D0D0;
background-color: #F0F0F0;
background-image: url(../images/gray/toolbar/bg.gif);
}
.x-menubar-item-active {
background-color: #D9E8FB;
}
.x-menubar-item-active {
background-color: #D9E8FB;
}.x-date-right-icon {
background-image: url(../images/default/shared/right-btn.gif);
margin-right: 2px;
text-decoration: none !important;
}
.x-date-left-icon {
background-image: url(../images/default/shared/left-btn.gif);
margin-right: 2px;
text-decoration: none !important;
}.my-tbl {
border: 1px solid #C6C5C5;
}.my-treetbl {
border: 1px solid #C6C5C5;
}

View File

@ -0,0 +1,638 @@
/*
* Ext JS Library 2.1
* Copyright(c) 2006-2008, Ext JS, LLC.
* licensing@extjs.com
*
* http://extjs.com/license
*/
html,body {
background: #3d71b8 url(../wallpapers/desktop.jpg) no-repeat left top;
font: normal 12px tahoma, arial, verdana, sans-serif;
margin: 0;
padding: 0;
border: 0 none;
overflow: hidden;
height: 100%;
}
.start {
background-image: url( ../images/taskbar/black/startbutton-icon.gif ) !important;
}
.bogus {
background-image: url( ../images/bogus.png ) !important;
}
.logout {
background-image: url( ../images/logout.gif ) !important;
}
.settings {
background-image: url( ../images/gears.gif ) !important;
}
#dpanels {
width: 250px;
float: right;
}
#dpanels .x-panel {
margin: 15px;
}
#dpanels .x-date-picker {
border: 0 none;
border-top: 0 none;
background: transparent;
}
#dpanels .x-date-picker td.x-date-active {
background: #ffffff;
}
#dpanels .x-date-picker {
width: 100% !important;
}
#x-desktop {
width: 100%;
height: 100%;
border: 0 none;
position: relative;
overflow: hidden;
zoom: 1;
}
#ux-taskbar .x-btn {
float: left;
margin: 1px 0 0 1px;
position: relative;
}
#ux-taskbar-start .x-btn {
float: left;
margin: 0;
position: relative;
}
#ux-taskbar button { /* width: 150px;
overflow: hidden; */
text-align: left;
color: #ffffff;
}
#title-bar-wrapper {
height: 35px;
}
#title-bar {
color: #225599;
padding: 9px 7px;
font: bold 16px tahoma, arial, verdana, sans-serif;
float: left;
}
#x-logout {
float: right;
padding: 6px 7px;
}
.x-btn-text-icon .x-btn-center .logout {
background-position: 0pt 3px;
background-repeat: no-repeat;
padding: 3px 0pt 3px 18px;
}
#ux-taskbar {
background: transparent none;
height: 30px;
margin: 0;
padding: 0;
position: relative;
z-index: 12001;
}
.x-btn-icon .ux-taskbutton-center .x-btn-text {
background-position: center;
background-repeat: no-repeat;
height: 16px;
width: 16px;
cursor: pointer;
white-space: nowrap;
padding: 0;
}
.x-btn-icon .ux-taskbutton-center {
padding: 1px;
}
.ux-startbutton-center .x-btn-text {
color: #000000 !important;
font-weight: bold;
}
.ux-taskbutton-left,.ux-taskbutton-right {
font-size: 1px;
line-height: 1px;
}
.ux-taskbutton-left {
width: 4px;
height: 28px;
background: url( ../images/taskbar/black/taskbutton.gif ) no-repeat 0 0;
}
.ux-taskbutton-right {
width: 4px;
height: 28px;
background: url( ../images/taskbar/black/taskbutton.gif ) no-repeat 0 -28px;
}
.ux-taskbutton-left i,.ux-taskbutton-right i {
display: block;
width: 4px;
overflow: hidden;
font-size: 1px;
line-height: 1px;
}
.ux-taskbutton-center {
background: url( ../images/taskbar/black/taskbutton.gif ) repeat-x 0 -56px;
vertical-align: middle;
text-align: center;
padding: 0 5px;
cursor: pointer;
white-space: nowrap;
}
#ux-taskbar .ux-taskbutton-left {
background-position: 0 0;
}
#ux-taskbar .ux-taskbutton-right {
background-position: 0 -28px;
}
#ux-taskbar .ux-taskbutton-center {
background-position: 0 -56px;
}
#ux-taskbar .x-btn-over .ux-taskbutton-left {
background-position: 0 -252px;
}
#ux-taskbar .x-btn-over .ux-taskbutton-right {
background-position: 0 -280px;
}
#ux-taskbar .x-btn-over .ux-taskbutton-center {
background-position: 0 -308px;
}
#ux-taskbar .x-btn-click .ux-taskbutton-left {
background-position: 0 -168px;
}
#ux-taskbar .x-btn-click .ux-taskbutton-right {
background-position: 0 -196px;
}
#ux-taskbar .x-btn-click .ux-taskbutton-center {
background-position: 0 -224px;
}
#ux-taskbar .active-win .ux-taskbutton-left {
background-position: 0 -84px;
}
#ux-taskbar .active-win .ux-taskbutton-right {
background: url( ../images/taskbar/black/taskbutton.gif ) no-repeat 0 -112px;
}
#ux-taskbar .active-win .ux-taskbutton-center {
background: url( ../images/taskbar/black/taskbutton.gif ) repeat-x 0 -140px;
}
#ux-taskbar .active-win .ux-taskbutton-center button {
color: #fff;
}
#spacer {
height: 25px;
float: left;
width: 0;
overflow: hidden;
margin-top: 2px;
}
.x-window-body p,.x-panel-body p {
padding: 10px;
margin: 0;
}
.x-window-maximized .x-window-bc {
height: 0;
}
.add {
background-image: url(../../shared/icons/fam/add.gif) !important;
}
.option {
background-image: url(../../shared/icons/fam/plugin.gif) !important;
}
.remove {
background-image: url(../../shared/icons/fam/delete.gif) !important;
}
.tabs {
background-image: url(../images/tabs.gif) !important;
}
.ux-start-menu {
background: transparent none;
border: 0px none;
padding: 0;
}
.ux-start-menu-tl .x-window-header {
color: #f1f1f1;
font: bold 11px tahoma, arial, verdana, sans-serif;
padding: 5px 0 4px 0;
}
.x-panel-tl .x-panel-icon,.ux-start-menu-tl .x-panel-icon {
background-position: 0pt 4px;
background-repeat: no-repeat;
padding-left: 20px !important;
}
.ux-start-menu-tl {
background: transparent url( ../images/taskbar/black/start-menu-left-corners.png ) no-repeat 0 0;
padding-left: 6px;
zoom: 1;
z-index: 1;
position: relative;
}
.ux-start-menu-tr {
background: transparent url( ../images/taskbar/black/start-menu-right-corners.png ) no-repeat right
0;
padding-right: 6px;
}
.ux-start-menu-tc {
background: transparent url( ../images/taskbar/black/start-menu-top-bottom.png ) repeat-x 0 0;
overflow: hidden;
zoom: 1;
}
.ux-start-menu-ml {
background: transparent url( ../images/taskbar/black/start-menu-left-right.png ) repeat-y 0 0;
padding-left: 6px;
zoom: 1;
}
.ux-start-menu-bc {
background: transparent url( ../images/taskbar/black/start-menu-top-bottom.png ) repeat-x 0 bottom;
zoom: 1;
}
.ux-start-menu-bc .x-window-footer {
padding-bottom: 6px;
zoom: 1;
font-size: 0;
line-height: 0;
}
.ux-start-menu-bl {
background: transparent url( ../images/taskbar/black/start-menu-left-corners.png ) no-repeat 0
bottom;
padding-left: 6px;
zoom: 1;
}
.ux-start-menu-br {
background: transparent url( ../images/taskbar/black/start-menu-right-corners.png ) no-repeat right
bottom;
padding-right: 6px;
zoom: 1;
}
.x-panel-nofooter .ux-start-menu-bc {
height: 6px;
}
.ux-start-menu-splitbar-h {
background-color: #d0d0d0;
}
.ux-start-menu-bwrap {
background: transparent none;
border: 0px none;
}
.ux-start-menu-body {
background: transparent none;
border: 0px none;
}
.ux-start-menu-apps-panel {
background: #ffffff none;
border: 1px solid #1e2124;
}
.ux-start-menu-tools-panel {
border: 0px none;
background: transparent url( ../images/taskbar/black/start-menu-right.png ) repeat-y scroll right
0pt;
}
#ux-taskbar-start {
background: #000000 url( ../images/taskbar/black/taskbar-start-panel-bg.gif ) repeat-x left top;
left: 0px;
padding: 0;
position: absolute;
}
#ux-taskbar-start .x-toolbar {
background: none;
padding: 0px;
border: 0px none;
}
#ux-taskbuttons-panel {
background: #000000 url( ../images/taskbar/black/taskbuttons-panel-bg.gif ) repeat-x left top;
padding-top: 0;
position: relative;
}
.ux-taskbuttons-strip-wrap { /* overflow:hidden;
position:relative;
width:100%; */
width: 100%;
overflow: hidden;
position: relative;
zoom: 1;
}
ul.ux-taskbuttons-strip {
display: block;
width: 5000px;
zoom: 1;
}
ul.ux-taskbuttons-strip li {
float: left;
margin-left: 2px;
}
ul.ux-taskbuttons-strip li.ux-taskbuttons-edge {
float: left;
margin: 0 !important;
padding: 0 !important;
border: 0 none !important;
font-size: 1px !important;
line-height: 1px !important;
overflow: hidden;
zoom: 1;
background: transparent !important;
width: 1px;
}
.x-clear {
clear: both;
height: 0;
overflow: hidden;
line-height: 0;
font-size: 0;
}
.x-taskbuttons-scrolling {
position: relative;
}
.x-taskbuttons-scrolling .ux-taskbuttons-strip-wrap {
margin-left: 18px;
margin-right: 18px;
}
td.ux-taskButtons-edge { /*float:left;*/
margin: 0 !important;
padding: 0 !important;
border: 0 none !important;
font-size: 1px !important;
line-height: 1px !important;
overflow: hidden;
zoom: 1;
background: transparent !important;
width: 1px;
}
.ux-taskbuttons-scroller-left {
background: transparent url( ../images/taskbar/black/scroll-left.gif ) no-repeat -18px 0;
width: 18px;
position: absolute;
left: 1px;
top: 0px;
z-index: 10;
cursor: pointer;
}
.ux-taskbuttons-scroller-left-over {
background-position: 0 0;
}
.ux-taskbuttons-scroller-left-disabled {
background-position: -18px 0;
opacity: .5;
-moz-opacity: .5;
filter: alpha(opacity = 50);
cursor: default;
}
.ux-taskbuttons-scroller-right {
background: transparent url( ../images/taskbar/black/scroll-right.gif ) no-repeat 0 0;
width: 18px;
position: absolute;
right: 0;
top: 0px;
z-index: 10;
cursor: pointer;
}
.ux-taskbuttons-scroller-right-over {
background-position: -18px 0;
}
.ux-taskbuttons-scroller-right-disabled {
background-position: 0 0;
opacity: .5;
-moz-opacity: .5;
filter: alpha(opacity = 50);
cursor: default;
}
.ux-toolmenu-sep {
background-color: #18191a;
border-bottom: 1px solid #858789;
display: block;
font-size: 1px;
line-height: 1px;
margin: 2px 3px;
}
.ux-start-menu-tools-panel ul.x-menu-list li.x-menu-list-item a.x-menu-item {
color: #ffffff;
}
.ux-start-menu-tools-panel ul.x-menu-list li.x-menu-list-item .x-menu-item-active a.x-menu-item {
color: #000000;
}
.ux-start-menu-tools-panel .x-menu-item-active {
background: #525456 url( ../images/taskbar/black/item-over.gif ) repeat-x left bottom;
border: 1px solid #000000;
padding: 0;
}
#ux-taskbar .x-splitbar-h {
background: #000000 url( ../images/taskbar/black/taskbar-split-h.gif ) no-repeat 0 0;
width: 8px;
}
.x-window-header-text {
cursor: default;
}
/*
* Begin Start button
*/
.ux-startbutton-left,.ux-startbutton-right {
font-size: 1px;
line-height: 1px;
}
.ux-startbutton-left {
width: 10px;
height: 28px;
background: url( ../images/taskbar/black/startbutton.gif ) no-repeat 0 0;
}
.ux-startbutton-right {
width: 10px;
height: 30px;
background: url( ../images/taskbar/black/startbutton.gif ) no-repeat 0 -28px;
}
.ux-startbutton-left i,.ux-startbutton-right i {
display: block;
width: 10px;
overflow: hidden;
font-size: 1px;
line-height: 1px;
}
.ux-startbutton-center {
background: url( ../images/taskbar/black/startbutton.gif ) repeat-x 0 -56px;
vertical-align: middle;
text-align: center;
padding: 0;
cursor: pointer;
white-space: nowrap;
}
#ux-taskbar .ux-startbutton-left {
background-position: 0 0;
}
#ux-taskbar .ux-startbutton-right {
background-position: 0 -30px;
}
#ux-taskbar .ux-startbutton-center {
background-position: 0 -60px;
}
#ux-taskbar .x-btn-over .ux-startbutton-left {
background-position: 0 -270px;
}
#ux-taskbar .x-btn-over .ux-startbutton-right {
background-position: 0 -300px;
}
#ux-taskbar .x-btn-over .ux-startbutton-center {
background-position: 0 -330px;
}
#ux-taskbar .x-btn-click .ux-startbutton-left {
background-position: 0 -180px;
}
#ux-taskbar .x-btn-click .ux-startbutton-right {
background-position: 0 -210px;
}
#ux-taskbar .x-btn-click .ux-startbutton-center {
background-position: 0 -240px;
}
#ux-taskbar .active-win .ux-startbutton-left {
background-position: 0 -90px;
}
#ux-taskbar .active-win .ux-startbutton-right {
background: url( ../images/taskbar/black/startbutton.gif ) no-repeat 0 -120px;
}
#ux-taskbar .active-win .ux-startbutton-center {
background: url( ../images/taskbar/black/startbutton.gif ) repeat-x 0 -150px;
}
#ux-taskbar .active-win .ux-startbutton-center button {
color: #fff;
}
/*
* End Start button
*/
.x-resizable-proxy {
background: #C7DFFC;
opacity: .5;
-moz-opacity: .5;
filter: alpha(opacity = 50);
border: 1px solid #3b5a82;
}
/* Desktop Shortcuts */
#x-shortcuts dt {
float: left;
margin: 15px 0 0 15px;
clear: left;
width: 64px;
font: normal 10px tahoma, arial, verdana, sans-serif;
text-align: center;
zoom: 1;
display: block;
}
#x-shortcuts dt a {
width: 64px;
display: block;
color: white;
text-decoration: none;
}
#x-shortcuts dt div {
width: 100%;
color: white;
overflow: hidden;
text-overflow: ellipsis;
cursor: pointer;
}
#x-shortcuts dt a:hover {
text-decoration: underline;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 996 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 967 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 513 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 842 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 992 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 808 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 400 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 191 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 944 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 920 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 505 B

Some files were not shown because too many files have changed in this diff Show More