added dummy gHN in gHN list
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/admin/vre-deploy@118938 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
91545c0ff3
commit
7dee759b82
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" output="target/vre-deploy-3.3.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
|
||||
<classpathentry kind="src" output="target/vre-deploy-3.4.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
|
||||
<attributes>
|
||||
<attribute name="optional" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
|
@ -31,5 +31,5 @@
|
|||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="output" path="target/vre-deploy-3.3.0-SNAPSHOT/WEB-INF/classes"/>
|
||||
<classpathentry kind="output" path="target/vre-deploy-3.4.0-SNAPSHOT/WEB-INF/classes"/>
|
||||
</classpath>
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
eclipse.preferences.version=1
|
||||
validateFragments=false
|
||||
validation.use-project-settings=true
|
|
@ -1,8 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
|
||||
<wb-module deploy-name="${module}">
|
||||
<wb-module deploy-name="vre-deploy-portlet">
|
||||
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
|
||||
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||
<dependent-module archiveName="aslvre-5.1.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/asl-vre/asl-vre">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
<property name="java-output-path" value="/${module}/target/www/WEB-INF/classes"/>
|
||||
<property name="context-root" value="vre-deploy"/>
|
||||
</wb-module>
|
||||
|
|
|
@ -4,4 +4,5 @@
|
|||
<installed facet="jst.web" version="2.3"/>
|
||||
<installed facet="wst.jsdt.web" version="1.0"/>
|
||||
<installed facet="java" version="1.7"/>
|
||||
<installed facet="liferay.portlet" version="6.0"/>
|
||||
</faceted-project>
|
||||
|
|
3
pom.xml
3
pom.xml
|
@ -12,7 +12,7 @@
|
|||
<groupId>org.gcube.portlets.admin</groupId>
|
||||
<artifactId>vre-deploy</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<version>3.3.0-SNAPSHOT</version>
|
||||
<version>3.4.0-SNAPSHOT</version>
|
||||
<name>gCube VRE Deploy Wizard Portlet</name>
|
||||
<description>
|
||||
gCube VRE Deploy Wizard Portlet.
|
||||
|
@ -49,6 +49,7 @@
|
|||
<dependency>
|
||||
<groupId>com.google.gwt</groupId>
|
||||
<artifactId>gwt-user</artifactId>
|
||||
<version>${gwtVersion}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
|
@ -1,12 +1,16 @@
|
|||
package org.gcube.portlets.admin.vredeployer.client.model;
|
||||
|
||||
import java.util.LinkedList;
|
||||
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.GHNMemory;
|
||||
import org.gcube.portlets.admin.vredeployer.shared.GHNProfile;
|
||||
import org.gcube.portlets.admin.vredeployer.shared.GHNSite;
|
||||
import org.gcube.portlets.admin.vredeployer.shared.RunningInstance;
|
||||
import org.gcube.portlets.admin.vredeployer.shared.VREDeployerStatusType;
|
||||
import org.gcube.portlets.admin.vredeployer.shared.VREDescrBean;
|
||||
|
||||
|
@ -122,6 +126,14 @@ public class Model {
|
|||
}
|
||||
|
||||
public void onSuccess(List<GHNProfile> result) {
|
||||
GHNMemory mem = new GHNMemory("9900000000", "990000000");
|
||||
GHNSite site = new GHNSite("Lucca", "Italy", "d4science.org");
|
||||
List<RunningInstance> run = new LinkedList<RunningInstance>();
|
||||
List<String> libs = new LinkedList<String>();
|
||||
GHNProfile dummy = new GHNProfile(
|
||||
"13ea2882-97f7-4961-bae1-872fa2ff7157", "node-dummy",
|
||||
run, false, mem, site, libs, false);
|
||||
result.add(dummy);
|
||||
mainContainer.getCenterPanel().showGHNList(result);
|
||||
mainContainer.getCenterPanel().layout();
|
||||
if (! isCloudSelected)
|
||||
|
|
|
@ -733,10 +733,25 @@ public class VREDeployerServiceImpl extends RemoteServiceServlet implements Vre
|
|||
log.info("--- CREATED LAYOUTS AND COMMUNITY OK, updating Calendar Application Profile.");
|
||||
String vreScope = getScopeByOrganizationId(""+vreCreated.getOrganizationId());
|
||||
String vreUrl = "/group/"+vreCreated.getName().toLowerCase();
|
||||
updateApplicationProfile(CALENDAR_APPID, vreScope, vreUrl+"/calendar");
|
||||
updateApplicationProfile(NEWS_FEED_APPID, vreScope, vreUrl); //assumes it is deployed in the home of the VRE
|
||||
boolean calandarAppProfileUpdated = false;
|
||||
try {
|
||||
calandarAppProfileUpdated = updateApplicationProfile(CALENDAR_APPID, vreScope, vreUrl+"/calendar");
|
||||
}
|
||||
catch (Exception e) {
|
||||
log.error("Something wrong in updateApplicationProfile for " + CALENDAR_APPID);
|
||||
}
|
||||
boolean newsFeedAppProfileUpdated = false;
|
||||
try {
|
||||
newsFeedAppProfileUpdated = updateApplicationProfile(NEWS_FEED_APPID, vreScope, vreUrl); //assumes it is deployed in the home of the VRE
|
||||
}
|
||||
catch (Exception e) {
|
||||
log.error("Something wrong in updateApplicationProfile for " + NEWS_FEED_APPID);
|
||||
}
|
||||
log.info("updateApplicationProfile for " + CALENDAR_APPID + "="+calandarAppProfileUpdated);
|
||||
log.info("updateApplicationProfile for " + NEWS_FEED_APPID + "="+newsFeedAppProfileUpdated);
|
||||
|
||||
log.info("--- creating VRE Group Folder");
|
||||
|
||||
log.info("Trying to create VRE Group Folder through HomeLibrary ...");
|
||||
createVRESharedGroupFolder(vreCreated, designer, manager, description);
|
||||
|
||||
log.info("--- createVRESharedGroupFolder OK, sending Message to designer.");
|
||||
|
@ -758,9 +773,9 @@ public class VREDeployerServiceImpl extends RemoteServiceServlet implements Vre
|
|||
if (nnm.notifyMessageReceived(designer, subject))
|
||||
log.trace("Sending Definition create notification: " + subject + " OK");
|
||||
} catch (Exception e) {
|
||||
|
||||
e.printStackTrace();
|
||||
}
|
||||
log.info("--- Trying to share a news for this VRE");
|
||||
//log.info("--- Trying to share a news for this VRE");
|
||||
//shareCreatedVRENews(designer, manager, name, description);
|
||||
|
||||
|
||||
|
@ -786,7 +801,7 @@ public class VREDeployerServiceImpl extends RemoteServiceServlet implements Vre
|
|||
* @param vreScope the scope to add
|
||||
* @param vreURL the absolute URL of the portlet
|
||||
*/
|
||||
private void updateApplicationProfile(String appId, String vreScope, String vreURL) {
|
||||
private boolean updateApplicationProfile(String appId, String vreScope, String vreURL) {
|
||||
|
||||
String currScope = ScopeProvider.instance.get();
|
||||
String scopeToQuery = PortalContext.getConfiguration().getInfrastructureName();
|
||||
|
@ -799,10 +814,10 @@ public class VREDeployerServiceImpl extends RemoteServiceServlet implements Vre
|
|||
query.addCondition("$resource/Profile/Body/AppId/text() eq '" + appId + "'");
|
||||
|
||||
DiscoveryClient<GenericResource> client = clientFor(GenericResource.class);
|
||||
//
|
||||
|
||||
List<GenericResource> list = client.submit(query);
|
||||
if (list == null || list.isEmpty()) {
|
||||
log.warn("Cannot retrieve the ApplicationProfile from IS for generic resource havin <Body><AppId> = " + appId);
|
||||
log.warn("Cannot retrieve the ApplicationProfile from IS for generic resource having <Body><AppId> = " + appId);
|
||||
log.info("Triggering Creation of ApplicationProfile for " + appId);
|
||||
GenericResource toCreate = new GenericResource();
|
||||
toCreate.newProfile().name("Application Profile for " + appId);
|
||||
|
@ -812,7 +827,7 @@ public class VREDeployerServiceImpl extends RemoteServiceServlet implements Vre
|
|||
RegistryPublisher rp=RegistryPublisherFactory.create();
|
||||
rp.create(toCreate);
|
||||
log.info("Creation of ApplicationProfile for " + appId + " OK!");
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
GenericResource gr = list.get(0);
|
||||
|
@ -827,12 +842,12 @@ public class VREDeployerServiceImpl extends RemoteServiceServlet implements Vre
|
|||
elem.appendChild(fragmentNode);
|
||||
} catch (Exception e) {
|
||||
//in case no xml is entered, just text
|
||||
log.error("errore");
|
||||
log.error("error");
|
||||
}
|
||||
RegistryPublisher rp=RegistryPublisherFactory.create();
|
||||
rp.update(gr);
|
||||
ScopeProvider.instance.set(currScope);
|
||||
|
||||
return true;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -11,11 +11,8 @@
|
|||
<!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/> -->
|
||||
|
||||
|
||||
<!-- To Comment out
|
||||
<set-property name="user.agent" value="gecko1_8" />
|
||||
-->
|
||||
<set-property name="user.agent" value="gecko1_8,safari" />
|
||||
|
||||
<!-- Other module inherits -->
|
||||
|
||||
<inherits name='com.extjs.gxt.ui.GXT' />
|
||||
<inherits name='com.extjs.gxt.themes.Themes' />
|
||||
|
|
Loading…
Reference in New Issue