added host to the grid columns for service endpoint resources

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/admin/rmp-common-library@101847 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Massimiliano Assante 2014-12-02 18:32:05 +00:00
parent f532f36926
commit f4edc8c476
6 changed files with 23 additions and 6 deletions

View File

@ -11,7 +11,7 @@
<groupId>org.gcube.portlets.admin</groupId> <groupId>org.gcube.portlets.admin</groupId>
<artifactId>rmp-common-library</artifactId> <artifactId>rmp-common-library</artifactId>
<version>2.0.0-SNAPSHOT</version> <version>2.1.0-SNAPSHOT</version>
<name>Resource Management Library</name> <name>Resource Management Library</name>
<description> <description>
gCube Resource Management Library is a common library containing shared code for Information System Operations gCube Resource Management Library is a common library containing shared code for Information System Operations

View File

@ -4,4 +4,5 @@
<SubType>{$subtype}</SubType> <SubType>{$subtype}</SubType>
<Scopes>{$scopes}</Scopes> <Scopes>{$scopes}</Scopes>
<Name>{$profiles//Resource/Profile/Name/text()}</Name> <Name>{$profiles//Resource/Profile/Name/text()}</Name>
<Host>{$profiles//Resource/Profile/RunTime/HostedOn/text()}</Host>
</Resource> </Resource>

View File

@ -56,6 +56,7 @@ import org.gcube.vremanagement.resourcemanager.client.proxies.Proxies;
* <a href="https://gcube.wiki.gcube-system.org/gcube/index.php/Programmatic_Administration_Interface"> * <a href="https://gcube.wiki.gcube-system.org/gcube/index.php/Programmatic_Administration_Interface">
* official wiki</a>. * official wiki</a>.
* @author Daniele Strollo (ISTI-CNR) * @author Daniele Strollo (ISTI-CNR)
* @author Massimiliano Assante (ISTI-CNR)
*/ */
public abstract class AbstractResourceManager { public abstract class AbstractResourceManager {
private String id = null; private String id = null;
@ -231,6 +232,11 @@ public abstract class AbstractResourceManager {
LOG_PREFIX, LOG_PREFIX,
"[BIND-SCOPE-ENTER] Adding " + this.getType() + " " + this.getID() + " to scope [" + "[BIND-SCOPE-ENTER] Adding " + this.getType() + " " + this.getID() + " to scope [" +
targetScope.toString() + "]"); targetScope.toString() + "]");
System.out.println("***\n\n[BIND-SCOPE-ENTER] Adding " + this.getType() + " " + this.getID() + " to scope [" +
targetScope.toString() + "]");
String curr = ScopeProvider.instance.get(); String curr = ScopeProvider.instance.get();
ScopeProvider.instance.set(targetScope.toString()); ScopeProvider.instance.set(targetScope.toString());
@ -254,6 +260,8 @@ public abstract class AbstractResourceManager {
ScopeProvider.instance.set(scope.enclosingScope().toString()); ScopeProvider.instance.set(scope.enclosingScope().toString());
} else } else
ScopeProvider.instance.set(targetScope); ScopeProvider.instance.set(targetScope);
System.out.println("***\n\nCalling manager.addResources(addParam) addParam.toString()=" + addParam.toString());
String reportID = manager.addResources(addParam); String reportID = manager.addResources(addParam);
ServerConsole.trace( ServerConsole.trace(
@ -261,6 +269,9 @@ public abstract class AbstractResourceManager {
"[BIND-SCOPE-EXIT] Applyed Adding " + this.getType() + " " + this.getID() + " to scope [" + "[BIND-SCOPE-EXIT] Applyed Adding " + this.getType() + " " + this.getID() + " to scope [" +
targetScope.toString() + "]... reportID: " + reportID); targetScope.toString() + "]... reportID: " + reportID);
System.out.println("***\n\n[BIND-SCOPE-EXIT] Applyed Adding " + this.getType() + " " + this.getID() + " to scope [" +
targetScope.toString() + "]... reportID: " + reportID);
RMReportingLibrary pt = this.getReportResourceManager(scope.toString()); RMReportingLibrary pt = this.getReportResourceManager(scope.toString());
String toReturn = pt.getReport(reportID); String toReturn = pt.getReport(reportID);
@ -271,6 +282,7 @@ public abstract class AbstractResourceManager {
ServerConsole.trace( ServerConsole.trace(
LOG_PREFIX, LOG_PREFIX,
"[BIND-SCOPE-EXIT] [FAILURE]"); "[BIND-SCOPE-EXIT] [FAILURE]");
System.out.println("***[BIND-SCOPE-EXIT] [FAILURE]" +e.getMessage());
throw new ResourceOperationException("During resource::addToScope: "+ targetScope + " Message: \n" + e.getMessage()); throw new ResourceOperationException("During resource::addToScope: "+ targetScope + " Message: \n" + e.getMessage());
} }
} }

View File

@ -52,8 +52,8 @@ import org.xml.sax.SAXException;
/** /**
* @author Massimiliano Assante (ISTI-CNR)
* @author Daniele Strollo (ISTI-CNR) * @author Daniele Strollo (ISTI-CNR)
*
*/ */
public class GenericResourceManager extends AbstractResourceManager { public class GenericResourceManager extends AbstractResourceManager {
// Used internally to require static functionalities (e.g. deploy). // Used internally to require static functionalities (e.g. deploy).

View File

@ -53,7 +53,7 @@ import org.gcube.vremanagement.resourcemanager.client.fws.Types.SoftwareList;
/** /**
* @author Daniele Strollo (ISTI-CNR) * @author Daniele Strollo (ISTI-CNR)
* * @author Massimiliano Assante (ISTI-CNR)
*/ */
public class RunningInstanceManager extends AbstractResourceManager { public class RunningInstanceManager extends AbstractResourceManager {
// Used internally to require static functionalities (e.g. deploy). // Used internally to require static functionalities (e.g. deploy).

View File

@ -474,16 +474,18 @@ public class ResourceDetailModel {
********************************************/ ********************************************/
// The column model for grid representation // The column model for grid representation
modelColumns = new ArrayList<ColumnConfig>(); modelColumns = new ArrayList<ColumnConfig>();
modelColumns.add(new ColumnConfig("Name", "Name", 300)); modelColumns.add(new ColumnConfig("Name", "Name", 200));
modelColumns.add(new ColumnConfig("Host", "Host", 250));
modelColumns.add(new ColumnConfig("Scopes", "Scopes", 300)); modelColumns.add(new ColumnConfig("Scopes", "Scopes", 300));
//Optional //Optional
modelColumns.add(new ColumnConfig("ID", "ID", 220)); modelColumns.add(new ColumnConfig("ID", "ID", 100));
modelColumns.add(new ColumnConfig("SubType", "Category", 370)); modelColumns.add(new ColumnConfig("SubType", "Category", 370));
// create the column model // create the column model
cm = new ColumnModel(modelColumns); cm = new ColumnModel(modelColumns);
for (int i = 3; i < modelColumns.size(); i++) { for (int i = 4; i < modelColumns.size(); i++) {
cm.setHidden(i, true); cm.setHidden(i, true);
} }
RECORD_DEFINITION.put(ResourceTypeDecorator.RuntimeResource.name(), cm); RECORD_DEFINITION.put(ResourceTypeDecorator.RuntimeResource.name(), cm);
@ -495,6 +497,7 @@ public class ResourceDetailModel {
type.addField("ID"); type.addField("ID");
type.addField("Name"); type.addField("Name");
type.addField("Scopes"); type.addField("Scopes");
type.addField("Host");
type.addField("SubType"); type.addField("SubType");
type.addField("Type"); type.addField("Type");
@ -773,6 +776,7 @@ public class ResourceDetailModel {
"Name", "Name",
"SubType", "SubType",
"ID", "ID",
"Host",
"Scopes" "Scopes"
}); });
REQUIRED_FIELDS.put( REQUIRED_FIELDS.put(