diff --git a/.gitignore b/.gitignore index 631ba01..7df0292 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /target/ /node_modules/ /myLogFile.*.log +/**/.DS_Store diff --git a/script-deploy.txt b/script-deploy.txt new file mode 100644 index 0000000..ce6c2e4 --- /dev/null +++ b/script-deploy.txt @@ -0,0 +1,11 @@ +%%%TODO: sostituire 1.1.1 con valore desiderato (es: 1.1.2) +%%%TODO: rimuovere le credenziali prima del deploy (nome+secret) da file *.yml + +java-11 +./mvnw -DskipTests -Pprod verify jib:dockerBuild +docker tag information-system-gui:latest hub.dev.d4science.org/gcube/information-system-gui:1.1.1 +docker tag information-system-gui:latest hub.dev.d4science.org/gcube/information-system-gui:stable +docker login hub.dev.d4science.org +docker push hub.dev.d4science.org/gcube/information-system-gui:1.1.1 +docker push hub.dev.d4science.org/gcube/information-system-gui:stable +curl -X POST https://portainer.cloud-dev.d4science.org/api/webhooks/ff8d58f3-bc9c-41dd-b57f-7547f1fe688d \ No newline at end of file diff --git a/src/main/java/org/gcube/informationsystem/service/dto/VirtualServiceDTO.java b/src/main/java/org/gcube/informationsystem/service/dto/VirtualServiceDTO.java new file mode 100644 index 0000000..f976b57 --- /dev/null +++ b/src/main/java/org/gcube/informationsystem/service/dto/VirtualServiceDTO.java @@ -0,0 +1,18 @@ +package org.gcube.informationsystem.service.dto; + + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@Data +@AllArgsConstructor +@NoArgsConstructor +public class VirtualServiceDTO { + private String id; + private String lastMod; + private String name; + private String version; + private String group; + private String qualifier; +} diff --git a/src/main/java/org/gcube/informationsystem/service/dto/angular/VirtualServiceAngular.java b/src/main/java/org/gcube/informationsystem/service/dto/angular/VirtualServiceAngular.java new file mode 100644 index 0000000..087b76d --- /dev/null +++ b/src/main/java/org/gcube/informationsystem/service/dto/angular/VirtualServiceAngular.java @@ -0,0 +1,119 @@ +package org.gcube.informationsystem.service.dto.angular; + +import java.util.ArrayList; + + +public class VirtualServiceAngular{ + String typeName; + ArrayList facets; + public String getTypeName() { + return typeName; + } + public void setTypeName(String typeName) { + this.typeName = typeName; + } + public ArrayList getFacets() { + return facets; + } + public void setFacets(ArrayList facets) { + this.facets = facets; + } +} + +class FacetDescription{ + //da elminare - begin + String facetName; + String max; + String min; + String facetDescription; + String relationFacet; + boolean isAdded; + boolean prop_optional; + //da elminare - end + String prop_name; + String prop_group; + String prop_description; + String prop_version; + String prop_qualifier; + ArrayList extraProps; + + public String getFacetName() { + return facetName; + } + public void setFacetName(String facetName) { + this.facetName = facetName; + } + public String getMax() { + return max; + } + public void setMax(String max) { + this.max = max; + } + public String getMin() { + return min; + } + public void setMin(String min) { + this.min = min; + } + public String getFacetDescription() { + return facetDescription; + } + public void setFacetDescription(String facetDescription) { + this.facetDescription = facetDescription; + } + public String getRelationFacet() { + return relationFacet; + } + public void setRelationFacet(String relationFacet) { + this.relationFacet = relationFacet; + } + public boolean isAdded() { + return isAdded; + } + public void setAdded(boolean isAdded) { + this.isAdded = isAdded; + } + public boolean isProp_optional() { + return prop_optional; + } + public void setProp_optional(boolean prop_optional) { + this.prop_optional = prop_optional; + } + public String getProp_name() { + return prop_name; + } + public void setProp_name(String prop_name) { + this.prop_name = prop_name; + } + public String getProp_group() { + return prop_group; + } + public void setProp_group(String prop_group) { + this.prop_group = prop_group; + } + public String getProp_description() { + return prop_description; + } + public void setProp_description(String prop_description) { + this.prop_description = prop_description; + } + public String getProp_version() { + return prop_version; + } + public void setProp_version(String prop_version) { + this.prop_version = prop_version; + } + public String getProp_qualifier() { + return prop_qualifier; + } + public void setProp_qualifier(String prop_qualifier) { + this.prop_qualifier = prop_qualifier; + } + public ArrayList getExtraProps() { + return extraProps; + } + public void setExtraProps(ArrayList extraProps) { + this.extraProps = extraProps; + } +} + diff --git a/src/main/java/org/gcube/informationsystem/web/rest/ExtraProp.java b/src/main/java/org/gcube/informationsystem/web/rest/ExtraProp.java new file mode 100644 index 0000000..daf4afd --- /dev/null +++ b/src/main/java/org/gcube/informationsystem/web/rest/ExtraProp.java @@ -0,0 +1,16 @@ +package org.gcube.informationsystem.web.rest; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@Data +@AllArgsConstructor +@NoArgsConstructor +public class ExtraProp { + + String prop_deno; + String prop_val; + String prop_tipo; + +} diff --git a/src/main/java/org/gcube/informationsystem/web/rest/FacetDescription.java b/src/main/java/org/gcube/informationsystem/web/rest/FacetDescription.java new file mode 100644 index 0000000..bbeff54 --- /dev/null +++ b/src/main/java/org/gcube/informationsystem/web/rest/FacetDescription.java @@ -0,0 +1,15 @@ +package org.gcube.informationsystem.web.rest; + +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.Map; + +import com.fasterxml.jackson.annotation.JsonAnySetter; + +//Risorsa da inviare per la creazione +public class FacetDescription { + String type; + FacetProperties target; +} + + diff --git a/src/main/java/org/gcube/informationsystem/web/rest/FacetProperties.java b/src/main/java/org/gcube/informationsystem/web/rest/FacetProperties.java new file mode 100644 index 0000000..6192868 --- /dev/null +++ b/src/main/java/org/gcube/informationsystem/web/rest/FacetProperties.java @@ -0,0 +1,20 @@ +package org.gcube.informationsystem.web.rest; + +import java.util.LinkedHashMap; +import java.util.Map; + +import com.fasterxml.jackson.annotation.JsonAnySetter; + +//Risorsa da inviare per la creazione +public class FacetProperties { + String type; + Map facetprops = new LinkedHashMap(); + + @JsonAnySetter + void setDetail(String key, Object value) { + facetprops.put(key, value); + } + +} + + diff --git a/src/main/java/org/gcube/informationsystem/web/rest/InformationSystemResource.java b/src/main/java/org/gcube/informationsystem/web/rest/InformationSystemResource.java index 7abb1b7..159c0a8 100644 --- a/src/main/java/org/gcube/informationsystem/web/rest/InformationSystemResource.java +++ b/src/main/java/org/gcube/informationsystem/web/rest/InformationSystemResource.java @@ -31,17 +31,13 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.util.UriUtils; -import com.fasterxml.jackson.databind.node.ArrayNode; -import com.jayway.jsonpath.JsonPath; -import com.jayway.jsonpath.internal.filter.ValueNode.JsonNode; - import lombok.RequiredArgsConstructor; -import net.minidev.json.JSONArray; import tech.jhipster.web.util.HeaderUtil; @@ -245,15 +241,11 @@ public class InformationSystemResource { //CRUD - 1 @PostMapping("/createresource") - String createResource(@RequestParam String resourceType, @RequestParam String rawJson) throws Exception { - //NB: Luca dice che non serve UmaToken e context! - //TODO: modifica rawjson in versione compliant col servizio - //TODO: aggiungere resType sul rawJson - //JsonNode jsonNode = objectMapper.readTree(json); - //String color = jsonNode.get("color").asText(); + String createResource(@RequestParam String resourceType, @RequestBody String rawJson) throws Exception { + //NB: non serve UmaToken e context! log.debug("********** RAWJSON ******"); - log.debug(rawJson); + String eccolo = rawJson; log.debug("****************"); String rawJson2=""; @@ -273,10 +265,11 @@ public class InformationSystemResource { } */ switch(resourceType) { + case "VirtualService": { - VirtualServiceAngular inputObject = om.readValue(rawJson, VirtualServiceAngular.class); + VirtualServiceAngular inputObject = om.readValue(rawJson.toString(), VirtualServiceAngular.class); inputObject.setTypeName("VirtualService"); - inputObject.getFacets(); } + } break; } @@ -301,6 +294,6 @@ public class InformationSystemResource { //TODO: GESTIRE ERRORI! } - + } diff --git a/src/main/java/org/gcube/informationsystem/web/rest/ResourceDescription.java b/src/main/java/org/gcube/informationsystem/web/rest/ResourceDescription.java new file mode 100644 index 0000000..272c513 --- /dev/null +++ b/src/main/java/org/gcube/informationsystem/web/rest/ResourceDescription.java @@ -0,0 +1,15 @@ +package org.gcube.informationsystem.web.rest; + +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.Map; + +import com.fasterxml.jackson.annotation.JsonAnySetter; + +//Risorsa da inviare per la creazione +public class ResourceDescription { + String type; + ArrayList consistsOf; +} + + diff --git a/src/main/java/org/gcube/informationsystem/web/rest/package-info.java b/src/main/java/org/gcube/informationsystem/web/rest/package-info.java new file mode 100644 index 0000000..ebb665f --- /dev/null +++ b/src/main/java/org/gcube/informationsystem/web/rest/package-info.java @@ -0,0 +1,4 @@ +/** + * Spring MVC REST controllers. + */ +package org.gcube.informationsystem.web.rest; diff --git a/src/main/java/org/gcube/informationsystem/web/rest/vm/package-info.java b/src/main/java/org/gcube/informationsystem/web/rest/vm/package-info.java new file mode 100644 index 0000000..62f0f32 --- /dev/null +++ b/src/main/java/org/gcube/informationsystem/web/rest/vm/package-info.java @@ -0,0 +1,4 @@ +/** + * View Models used by Spring MVC REST controllers. + */ +package org.gcube.informationsystem.web.rest.vm; diff --git a/src/main/webapp/app/facet-composer/HostingNode_simplified.json b/src/main/webapp/app/facet-composer/HostingNode_simplified.json new file mode 100644 index 0000000..da0bc76 --- /dev/null +++ b/src/main/webapp/app/facet-composer/HostingNode_simplified.json @@ -0,0 +1,240 @@ +{ + "type": "HostingNode", + "consistsOf": [ + { + "type": "HasPersistentMemory", + "target": { + "type": "MemoryFacet", + "unit": "MB", + "size": "12278", + "used": "6337", + "message": "Unable to detect disk space information." + } + }, + { + "type": "IsIdentifiedBy", + "target": { + "type": "NetworkingFacet", + "hostName": "storagehub2.dev.int.d4science.net", + "domainName": "dev.int.d4science.net", + "Port": "80", + "IPAddress": "10.122.0.166", + "mask": null, + "broadcastAddress": null + } + }, + { + "type": "ConsistsOf", + "target": { + "type": "CPUFacet", + "siblings": "2", + "apicid": "18", + "physical_id": "0", + "flags": "fpu de tsc msr pae cx8 apic sep cmov pat clflush mmx fxsr sse sse2 ss ht syscall nx lm constant_tsc rep_good nopl cpuid pni pclmulqdq ssse3 sdbg cx16 sse4_1 sse4_2 movbe popcnt tsc_deadline_timer aes f16c rdrand hypervisor lahf_lm abm 3dnowprefetch cpuid_fault epb fsgsbase erms dtherm ida arat pln pts", + "clflush_size": "64", + "stepping": "1", + "bogomips": "4395.04", + "address_sizes": "46 bits physical, 48 bits virtual", + "bugs": "null_seg cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf", + "cpu_family": "6", + "core_id": "9", + "clockSpeed": "2197.522", + "vendor": "GenuineIntel", + "wp": "yes", + "model": "Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz", + "initial_apicid": "18", + "cache_size": "30720 KB", + "cpuid_level": "20", + "cpu_cores": "1", + "fpu": "yes", + "microcode": "0xb00001e", + "processor": "0", + "cache_alignment": "64", + "fpu_exception": "yes", + "modelNumber": "79" + } + }, + { + "type": "ConsistsOf", + "target": { + "type": "CPUFacet", + "siblings": "2", + "apicid": "18", + "physical_id": "0", + "flags": "fpu de tsc msr pae cx8 apic sep cmov pat clflush mmx fxsr sse sse2 ss ht syscall nx lm constant_tsc rep_good nopl cpuid pni pclmulqdq ssse3 sdbg cx16 sse4_1 sse4_2 movbe popcnt tsc_deadline_timer aes f16c rdrand hypervisor lahf_lm abm 3dnowprefetch cpuid_fault epb fsgsbase erms dtherm ida arat pln pts", + "clflush_size": "64", + "stepping": "1", + "bogomips": "4395.04", + "address_sizes": "46 bits physical, 48 bits virtual", + "bugs": "null_seg cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf", + "cpu_family": "6", + "core_id": "9", + "clockSpeed": "2197.522", + "vendor": "GenuineIntel", + "wp": "yes", + "model": "Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz", + "initial_apicid": "18", + "cache_size": "30720 KB", + "cpuid_level": "20", + "cpu_cores": "1", + "fpu": "yes", + "microcode": "0xb00001e", + "processor": "1", + "cache_alignment": "64", + "fpu_exception": "yes", + "modelNumber": "79" + } + }, + { + "type": "ConsistsOf", + "target": { + "type": "SoftwareFacet", + "Description": "Ubuntu 18.04.5 LTS", + "description": null, + "optional": false, + "version": "4.15.0-38-generic", + "Codename": "bionic", + "qualifier": null, + "name": "amd64", + "Distributor ID": "Ubuntu", + "Release": "18.04", + "group": "Linux" + } + }, + { + "type": "ConsistsOf", + "target": { + "type": "SoftwareFacet", + "qualifier": null, + "name": "SmartGears", + "description": null, + "optional": false, + "version": "4.0.0-SNAPSHOT", + "group": "gCube" + } + }, + { + "type": "ConsistsOf", + "target": { + "type": "SoftwareFacet", + "qualifier": null, + "name": "SmartGearsDistribution", + "description": null, + "optional": false, + "version": "4.0.0-SNAPSHOT", + "group": "gCube", + "publication-frequency": "300" + } + }, + { + "type": "ConsistsOf", + "target": { + "type": "SoftwareFacet", + "java.specification.version": "11", + "description": null, + "optional": false, + "version": "11.0.18", + "java.vendor.url": "https://ubuntu.com/", + "qualifier": null, + "name": "Java", + "group": "Ubuntu" + } + }, + { + "type": "ConsistsOf", + "target": { + "type": "SimplePropertyFacet", + "TOMCAT_USER": "gcube", + "INVOCATION_ID": "776b2c3c50234e9eb059af65c692645c", + "CATALINA_PID": "/var/run/tomcat-instance-8080.pid", + "CATALINA_TMPDIR": "/tomcat/temp", + "JAVA_HOME": "/usr/lib/jvm/java-11-openjdk-amd64", + "LC_MESSAGES": "C.UTF-8", + "JAVA_OPTS": "-XX:+UseConcMarkSweepGC -XX:+CrashOnOutOfMemoryError -server -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Xms3000m -Xmx3000m -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=8186 -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=10.122.0.166 -Dcom.sun.management.jmxremote.authenticate=false -XX:+DisableAttachMechanism -Dcom.sun.management.jmxremote.rmi.port=8186 -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027", + "JSSE_HOME": "", + "LANG": "", + "JVM_TMP": "/tomcat/temp/jvm_tmp", + "WEB_CONTAINER_HOME": "/home/gcube/tomcat", + "CATALINA_BASE": "/home/gcube/tomcat", + "JOURNAL_STREAM": "9:121955156", + "PWD": "/home/gcube/tomcat", + "value": "", + "SmartGearsDistributionBundle": "UnBundled", + "TOMCAT_GROUP": "gcube", + "CATALINA_HOME": "/usr/share/tomcat8", + "JDK_JAVA_OPTIONS": " --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED", + "OLDPWD": "/tomcat/temp", + "name": "ENVIRONMENT_VARIABLES", + "SmartGearsDistribution": "4.0.0-SNAPSHOT", + "JAVA_HEAP": "-Xms3000m -Xmx3000m", + "GHN_HOME": "/home/gcube/SmartGears", + "JAVA_PERMGEN": "", + "HOME": "/home/gcube", + "SHLVL": "1" + } + }, + { + "type": "ConsistsOf", + "target": { + "type": "StateFacet", + "date": "2024-03-25 14:24:35.863 +0100", + "value": "down" + } + }, + { + "type": "ConsistsOf", + "target": { + "type": "EventFacet", + "date": "2024-03-25 14:21:58.001 +0100", + "event": "certified" + } + }, + { + "type": "ConsistsOf", + "target": { + "type": "LocationFacet", + "country": "it", + "latitude": null, + "location": "rome", + "longitude": null + } + }, + { + "type": "ConsistsOf", + "target": { + "type": "EventFacet", + "date": "2024-03-25 14:24:35.863 +0100", + "event": "down" + } + }, + { + "type": "ConsistsOf", + "target": { + "type": "EventFacet", + "date": "2024-01-26 09:50:47.054 +0100", + "event": "ready" + } + }, + { + "type": "HasVolatileMemory", + "memoryType": "RAM", + "target": { + "type": "MemoryFacet", + "unit": "MB", + "size": "5860", + "used": "2299" + } + }, + { + "type": "HasVolatileMemory", + "memoryType": "JVM", + "target": { + "type": "MemoryFacet", + "unit": "MB", + "size": "2983", + "used": "201", + "jvmMaxMemory": "2983" + } + } + ] +} \ No newline at end of file diff --git a/src/main/webapp/app/facet-composer/VirtualService_form.json b/src/main/webapp/app/facet-composer/VirtualService_form.json new file mode 100644 index 0000000..6fce7a0 --- /dev/null +++ b/src/main/webapp/app/facet-composer/VirtualService_form.json @@ -0,0 +1,30 @@ +{ + "SoftwareFacet_IsIdentifiedBy": [ + { + "facetName": "SoftwareFacet", + "max": "many", + "min": "1", + "facetDescription": "SoftwareFacet captures information on any software associated with the resource.", + "relationFacet": "IsIdentifiedBy", + "isAdded": false, + "extraProps": [ + { + "prop_deno": "custom 1", + "prop_val": "value 1", + "prop_tipo": "String" + }, + { + "prop_deno": "custom 2", + "prop_val": "value 2", + "prop_tipo": "String" + } + ], + "prop_optional": true, + "prop_name": "npome", + "prop_group": "gruppo", + "prop_description": "", + "prop_version": "versione", + "prop_qualifier": "" + } + ] +} \ No newline at end of file diff --git a/src/main/webapp/app/facet-composer/facet-composer.component.html b/src/main/webapp/app/facet-composer/facet-composer.component.html index 89fef5c..f0ffd16 100644 --- a/src/main/webapp/app/facet-composer/facet-composer.component.html +++ b/src/main/webapp/app/facet-composer/facet-composer.component.html @@ -43,13 +43,15 @@ -
+
+
{{prop.label}}
+
Custom Properties diff --git a/src/main/webapp/app/facet-composer/facet-composer.component.ts b/src/main/webapp/app/facet-composer/facet-composer.component.ts index f6597b9..61514f4 100644 --- a/src/main/webapp/app/facet-composer/facet-composer.component.ts +++ b/src/main/webapp/app/facet-composer/facet-composer.component.ts @@ -180,6 +180,8 @@ export class FacetComposerComponent implements OnInit { addPropertyControls(facetFg:FormGroup, props: IFacetProps[]){ + const propsFg = this.fb.group({}); + let fc:FormControl; for(let i=0; i { + //TODO: qui ritorna un codice di errore per la form! + console.log('ok'); + }, error => { + console.log(JSON.stringify(error)); + }); + + + /* + this.guiService.createResource(this.titleType, this.testData).subscribe((res => { + dummy = res; + //TODO: QUI TRASFORMA OGGETTO + console.log("-------- DUMMY -----------"); + console.log(dummy); + }) + ); + */ + + //parto con una facet per tipo + //this.createForm(res); + + /* this.guiService.getFormStructure(this.titlePath,this.titleType).subscribe(res => { + this.typeSpec = res; + this.fieldsMap = new Map(res.facetSpecs.map((obj) => [obj.name+'_'+obj.relation, obj])); + //parto con una facet per tipo + this.createForm(res); + }); + */ + } @@ -305,22 +337,24 @@ export class FacetComposerComponent implements OnInit { "isAdded": false, "extraProps": [ { - "prop_deno": "custom 1", - "prop_val": "value 1", + "prop_deno": "customname1", + "prop_val": "customval1", "prop_tipo": "String" }, { - "prop_deno": "custom 2", - "prop_val": "value 2", + "prop_deno": "customname2", + "prop_val": "customval2", "prop_tipo": "String" } ], - "prop_optional": true, - "prop_name": "npome", - "prop_group": "gruppo", - "prop_description": "", - "prop_version": "versione", - "prop_qualifier": "" + "props": { + "prop_name": "name1", + "prop_optional": true, + "prop_group": "group1", + "prop_description": "descr1", + "prop_version": "version1", + "prop_qualifier": "qual1" + } }, { "facetName": "SoftwareFacet", @@ -331,20 +365,39 @@ export class FacetComposerComponent implements OnInit { "isAdded": true, "extraProps": [ { - "prop_deno": "custom11", - "prop_val": "value11", + "prop_deno": "customname22", + "prop_val": "customval22", "prop_tipo": "String" } ], - "prop_optional": true, - "prop_name": "name2", - "prop_group": "group2", - "prop_description": "description", - "prop_version": "version2", - "prop_qualifier": "" + "props": { + "prop_name": "name2", + "prop_optional": true, + "prop_group": "group2", + "prop_description": "descr2", + "prop_version": "vers2", + "prop_qualifier": "" + } + }, + { + "facetName": "SoftwareFacet", + "max": "many", + "min": "1", + "facetDescription": "SoftwareFacet captures information on any software associated with the resource.", + "relationFacet": "IsIdentifiedBy", + "isAdded": true, + "extraProps": [], + "props": { + "prop_name": "name3", + "prop_optional": true, + "prop_group": "group3", + "prop_description": "", + "prop_version": "vers3", + "prop_qualifier": "" + } } ] -} +}; } diff --git a/src/main/webapp/app/facet-composer/facet-composer.service.ts b/src/main/webapp/app/facet-composer/facet-composer.service.ts index 45680b0..ef26016 100644 --- a/src/main/webapp/app/facet-composer/facet-composer.service.ts +++ b/src/main/webapp/app/facet-composer/facet-composer.service.ts @@ -1,3 +1,4 @@ +/* eslint-disable no-console */ import { Injectable } from '@angular/core'; import { Observable } from 'rxjs'; import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http'; @@ -40,22 +41,20 @@ export class FacetComposerService { return this.http.get(serviceUrl,{params:queryParams}); } - createResource(type:string, data:string): Observable { - //alert('create?'); + + createResource(type:string, body:string): Observable { const serviceUrl = this.applicationConfigService.getEndpointFor('api/is/createresource'); - let queryParams = new HttpParams(); - queryParams = queryParams.append("typeName",type).append("data",data); + const headers = new HttpHeaders() + .append( + 'Content-Type', + 'application/json' + ); + //const body=JSON.stringify(myObject); + //const params = new HttpParams().append("resourceType",type); + //TODO:CAMBIARE QUI + const params = new HttpParams().append("resourceType","VirtualService"); // eslint-disable-next-line @typescript-eslint/no-unsafe-return - let res : Observable|undefined; - try{ alert('prima') - res = this.http.post(serviceUrl, {params:queryParams}); - }catch(error){ - alert('errore') - console.error('---------------------'); - console.error(error); - return new Observable(); - }; - return new Observable(); + return this.http.post(serviceUrl,body,{ headers,params}) } } diff --git a/src/main/webapp/app/facet-composer/formresult.json b/src/main/webapp/app/facet-composer/formresult.json new file mode 100644 index 0000000..eda3816 --- /dev/null +++ b/src/main/webapp/app/facet-composer/formresult.json @@ -0,0 +1,155 @@ +{ + "NetworkingFacet_IsIdentifiedBy": [ + { + "facetName": "NetworkingFacet", + "max": "1", + "min": "1", + "facetDescription": "NetworkingFacet captures information on any (computer) network interface associated with the resource.It is mainly used to describe the network interface of a host. It should not be confused with the {@link AccessPointFacet} which instead describes the protocol and the endpoint of a web-based service.", + "relationFacet": "IsIdentifiedBy", + "isAdded": false, + "extraProps": [], + "prop_broadcastAddress": "broadcastAddress_1", + "prop_IPAddress": "12.66.86", + "prop_hostName": "host name 1", + "prop_domainName": "domain name 1", + "prop_mask": "mask 1" + } + ], + "CPUFacet_ConsistsOf": [ + { + "facetName": "CPUFacet", + "max": "many", + "min": "1", + "facetDescription": "CPUFacet captures information on the Central Processing Unit (CPU) of the resource it is associated with. A resource which needs to indicate a multi-processor/multi-core CPU will consist of more than one CPUFacet. Even if more than one CPUFacet is associated with a resource (i.e., an {@link HostingNode}), we did not find any reason to differentiate the CPUs.", + "relationFacet": "ConsistsOf", + "isAdded": false, + "extraProps": [ + { + "prop_deno": "extra1", + "prop_val": "value1", + "prop_tipo": "String" + }, + { + "prop_deno": "extra2", + "prop_val": "value2", + "prop_tipo": "String" + } + ], + "prop_model": "aaaaaaa", + "prop_vendor": "bbbbb", + "prop_clockSpeed": "45" + }, + { + "facetName": "CPUFacet", + "max": "many", + "min": "1", + "facetDescription": "CPUFacet captures information on the Central Processing Unit (CPU) of the resource it is associated with. A resource which needs to indicate a multi-processor/multi-core CPU will consist of more than one CPUFacet. Even if more than one CPUFacet is associated with a resource (i.e., an {@link HostingNode}), we did not find any reason to differentiate the CPUs.", + "relationFacet": "HasRemoveAction", + "isAdded": true, + "extraProps": [ + { + "prop_deno": "extra deno 1", + "prop_val": "extra value 1", + "prop_tipo": "String" + } + ], + "prop_model": "ccccc", + "prop_vendor": "dddd", + "prop_clockSpeed": "124" + } + ], + "MemoryFacet_HasPersistentMemory": [ + { + "facetName": "MemoryFacet", + "max": "many", + "min": "1", + "facetDescription": "MemoryFacet captures information on computer memory equipping the resource and its usage. Any resource describing a computing machine must have at least two types of memories i.e., persistent and volatile. For such a reason, it has been identified the ConsistsOf relation called {@link HasMemory}. It is in charge of the specialisation {@link HasVolatileMemory} and {@link HasPersistentMemory} to clarify the semantics of the memory.", + "relationFacet": "HasPersistentMemory", + "isAdded": false, + "extraProps": [], + "prop_used": "2355", + "prop_unit": "MB", + "prop_size": "2466" + } + ], + "MemoryFacet_HasVolatileMemory": [ + { + "facetName": "MemoryFacet", + "max": "many", + "min": "1", + "facetDescription": "MemoryFacet captures information on computer memory equipping the resource and its usage. Any resource describing a computing machine must have at least two types of memories i.e., persistent and volatile. For such a reason, it has been identified the ConsistsOf relation called {@link HasMemory}. It is in charge of the specialisation {@link HasVolatileMemory} and {@link HasPersistentMemory} to clarify the semantics of the memory.", + "relationFacet": "HasVolatileMemory", + "isAdded": false, + "extraProps": [], + "prop_used": "222", + "prop_unit": "MB", + "prop_size": "1000" + } + ], + "EventFacet_ConsistsOf": [ + { + "facetName": "EventFacet", + "max": "many", + "min": "1", + "facetDescription": "EventFacet captures information on a certain event/happening characterising the life cycle of the resource. Examples of an event are the start time of a virtual machine or the activation time of an electronic service.", + "relationFacet": "ConsistsOf", + "isAdded": false, + "extraProps": [], + "prop_event": "ddddd", + "prop_date": "2024-04-24" + } + ], + "StateFacet_ConsistsOf": [ + { + "facetName": "StateFacet", + "max": "1", + "min": "1", + "facetDescription": "StateFacet captures information on state to be associated with the resource. The state is captured by any controlled vocabulary which is an integral part of the facet. Examples of usage are the state of service e.g., running or down or the state of a virtual machine e.g., activated or unreachable.", + "relationFacet": "ConsistsOf", + "isAdded": false, + "extraProps": [ + { + "prop_deno": "custom A", + "prop_val": "valuecustom A", + "prop_tipo": "String" + }, + { + "prop_deno": "custom B", + "prop_val": "valuecustom B", + "prop_tipo": "String" + } + ], + "prop_value": "On" + } + ], + "SimplePropertyFacet_ConsistsOf": [ + { + "facetName": "SimplePropertyFacet", + "max": "many", + "min": "0", + "facetDescription": "Collect name-value property", + "relationFacet": "ConsistsOf", + "isAdded": false, + "extraProps": [], + "prop_value": "mmmmmm", + "prop_name": "ttttt" + } + ], + "SoftwareFacet_ConsistsOf": [ + { + "facetName": "SoftwareFacet", + "max": "many", + "min": "0", + "facetDescription": "SoftwareFacet captures information on any software associated with the resource.", + "relationFacet": "ConsistsOf", + "isAdded": false, + "extraProps": [], + "prop_name": "zzzzzz", + "prop_optional": true, + "prop_group": "ffffffff", + "prop_description": "description", + "prop_version": "14.9", + "prop_qualifier": "qualifier" + } + ] +} \ No newline at end of file diff --git a/src/main/webapp/app/facet-composer/nuovaform.json b/src/main/webapp/app/facet-composer/nuovaform.json new file mode 100644 index 0000000..e40b2cc --- /dev/null +++ b/src/main/webapp/app/facet-composer/nuovaform.json @@ -0,0 +1,99 @@ + + +{ + "NetworkingFacet_IsIdentifiedBy": [ + { + "name": "NetworkingFacet", + "max": "1", + "min": "1", + "description": "NetworkingFacet captures information on any (computer) network interface associated with the resource.It is mainly used to describe the network interface of a host. It should not be confused with the {@link AccessPointFacet} which instead describes the protocol and the endpoint of a web-based service.", + "relation": "IsIdentifiedBy", + "broadcastAddress": "", + "IPAddress": "666", + "hostName": "", + "domainName": "", + "mask": "" + } + ], + "CPUFacet_ConsistsOf": [ + { + "name": "CPUFacet", + "max": "many", + "min": "1", + "description": "CPUFacet captures information on the Central Processing Unit (CPU) of the resource it is associated with. A resource which needs to indicate a multi-processor/multi-core CPU will consist of more than one CPUFacet. Even if more than one CPUFacet is associated with a resource (i.e., an {@link HostingNode}), we did not find any reason to differentiate the CPUs.", + "relation": "ConsistsOf", + "model": "kkk", + "vendor": "kkk", + "clockSpeed": "99ij" + } + ], + "MemoryFacet_HasPersistentMemory": [ + { + "name": "MemoryFacet", + "max": "many", + "min": "1", + "description": "MemoryFacet captures information on computer memory equipping the resource and its usage. Any resource describing a computing machine must have at least two types of memories i.e., persistent and volatile. For such a reason, it has been identified the ConsistsOf relation called {@link HasMemory}. It is in charge of the specialisation {@link HasVolatileMemory} and {@link HasPersistentMemory} to clarify the semantics of the memory.", + "relation": "HasPersistentMemory", + "used": "", + "unit": "", + "size": "" + } + ], + "MemoryFacet_HasVolatileMemory": [ + { + "name": "MemoryFacet", + "max": "many", + "min": "1", + "description": "MemoryFacet captures information on computer memory equipping the resource and its usage. Any resource describing a computing machine must have at least two types of memories i.e., persistent and volatile. For such a reason, it has been identified the ConsistsOf relation called {@link HasMemory}. It is in charge of the specialisation {@link HasVolatileMemory} and {@link HasPersistentMemory} to clarify the semantics of the memory.", + "relation": "HasVolatileMemory", + "used": "", + "unit": "", + "size": "" + } + ], + "EventFacet_ConsistsOf": [ + { + "name": "EventFacet", + "max": "many", + "min": "1", + "description": "EventFacet captures information on a certain event/happening characterising the life cycle of the resource. Examples of an event are the start time of a virtual machine or the activation time of an electronic service.", + "relation": "ConsistsOf", + "event": "ppp", + "date": "2024-03-28" + } + ], + "StateFacet_ConsistsOf": [ + { + "name": "StateFacet", + "max": "1", + "min": "1", + "description": "StateFacet captures information on state to be associated with the resource. The state is captured by any controlled vocabulary which is an integral part of the facet. Examples of usage are the state of service e.g., running or down or the state of a virtual machine e.g., activated or unreachable.", + "relation": "ConsistsOf", + "value": "" + } + ], + "SimplePropertyFacet_ConsistsOf": [ + { + "name": "SimplePropertyFacet", + "max": "many", + "min": "0", + "description": "Collect name-value property", + "relation": "ConsistsOf", + "value": "" + } + ], + "SoftwareFacet_ConsistsOf": [ + { + "name": "SoftwareFacet", + "max": "many", + "min": "0", + "description": "SoftwareFacet captures information on any software associated with the resource.", + "relation": "ConsistsOf", + "optional": true, + "group": "", + "qualifier": "", + "version": "" + } + ] +} + diff --git a/src/main/webapp/app/facet-composer/props.json b/src/main/webapp/app/facet-composer/props.json new file mode 100644 index 0000000..85f0f64 --- /dev/null +++ b/src/main/webapp/app/facet-composer/props.json @@ -0,0 +1,69 @@ +[ + { + "type": "ConsistsOfType", + "id": "998bdc11-6f96-4708-afef-0806c365d44e", + "name": "IsIdentifiedBy", + "description": "Each {@link GCubeResource} has been defined to have at least a facet linked with an IsIdentifiedBy relation. IsIdentifiedBy indicates that the target facet represents a sort of identification for the source resource. For instance, a software can consist of one or more {@link SoftwareFacet} but the one related with IsIdentifiedBy represents the identify of the software.", + "version": "1.0.0", + "changelog": { + "1.0.0": "First Version" + }, + "abstract": false, + "final": false, + "extendedTypes": [ + "ConsistsOf" + ], + "source": { + "type": "ResourceType", + "id": "4251601f-6b7c-4a0f-a827-892e0cba1de8", + "name": "Resource", + "description": "This is the base type for any Resource", + "facets": [ + { + "type": "LinkedEntity", + "source": "Resource", + "relation": "ConsistsOf", + "target": "Facet", + "description": "Any Resource consists of one or more Facets which describes the different aspects of the resource.", + "min": 1, + "max": null + } + ], + "resources": [ + { + "type": "LinkedEntity", + "source": "Resource", + "relation": "IsRelatedTo", + "target": "Resource", + "description": "Any Resource can be related to any other resource.", + "min": 0, + "max": null + } + ], + "version": "1.0.0", + "changelog": { + "1.0.0": "First Version" + }, + "abstract": true, + "final": false, + "extendedTypes": [ + "Entity" + ] + }, + "target": { + "type": "FacetType", + "id": "e51b6a96-d1ba-463c-98f6-3272b0427059", + "name": "Facet", + "description": "This is the base type for any Facet", + "version": "1.0.0", + "changelog": { + "1.0.0": "First Version" + }, + "abstract": true, + "final": false, + "extendedTypes": [ + "Entity" + ] + } + } +] \ No newline at end of file diff --git a/src/main/webapp/app/facet-composer/singleHostingNode.json b/src/main/webapp/app/facet-composer/singleHostingNode.json new file mode 100644 index 0000000..2e19961 --- /dev/null +++ b/src/main/webapp/app/facet-composer/singleHostingNode.json @@ -0,0 +1,486 @@ +{ + "type": "HostingNode", + "supertypes": [ + "Service", + "GCubeResource", + "Resource" + ], + "id": "34498fb5-e184-473b-ad2f-08f7ab1afd35", + "consistsOf": [ + { + "type": "HasPersistentMemory", + "supertypes": [ + "HasMemory", + "ConsistsOf" + ], + "id": "950c9212-d98e-4137-b1ba-dd2c4017785e", + "propagationConstraint": { + "type": "PropagationConstraint", + "add": "propagate", + "delete": "cascade", + "remove": "cascade", + "supertypes": [ + "Property" + ] + }, + "target": { + "type": "MemoryFacet", + "supertypes": [ + "Facet" + ], + "id": "38f4c88b-d18b-4309-82f9-c1fc436fddd5", + "unit": "MB", + "size": "12278", + "used": "6337", + "message": "Unable to detect disk space information." + } + }, + { + "type": "IsIdentifiedBy", + "supertypes": [ + "ConsistsOf" + ], + "id": "2a52dc4b-a997-4b0e-aae1-d43175269ab2", + "propagationConstraint": { + "type": "PropagationConstraint", + "add": "propagate", + "delete": "cascade", + "remove": "cascade", + "supertypes": [ + "Property" + ] + }, + "target": { + "type": "NetworkingFacet", + "supertypes": [ + "Facet" + ], + "id": "124967c5-e1c6-4c27-877d-18d564e57c43", + "hostName": "storagehub2.dev.int.d4science.net", + "domainName": "dev.int.d4science.net", + "Port": "80", + "IPAddress": "10.122.0.166", + "mask": null, + "broadcastAddress": null + } + }, + { + "type": "ConsistsOf", + "id": "9c005448-1b18-4477-b799-49d167ad4c47", + "propagationConstraint": { + "type": "PropagationConstraint", + "add": "propagate", + "delete": "cascade", + "remove": "cascade", + "supertypes": [ + "Property" + ] + }, + "target": { + "type": "CPUFacet", + "supertypes": [ + "Facet" + ], + "id": "6b6db989-cffc-4872-bf60-e51c789d1826", + "siblings": "2", + "apicid": "18", + "physical_id": "0", + "flags": "fpu de tsc msr pae cx8 apic sep cmov pat clflush mmx fxsr sse sse2 ss ht syscall nx lm constant_tsc rep_good nopl cpuid pni pclmulqdq ssse3 sdbg cx16 sse4_1 sse4_2 movbe popcnt tsc_deadline_timer aes f16c rdrand hypervisor lahf_lm abm 3dnowprefetch cpuid_fault epb fsgsbase erms dtherm ida arat pln pts", + "clflush_size": "64", + "stepping": "1", + "bogomips": "4395.04", + "address_sizes": "46 bits physical, 48 bits virtual", + "bugs": "null_seg cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf", + "cpu_family": "6", + "core_id": "9", + "clockSpeed": "2197.522", + "vendor": "GenuineIntel", + "wp": "yes", + "model": "Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz", + "initial_apicid": "18", + "cache_size": "30720 KB", + "cpuid_level": "20", + "cpu_cores": "1", + "fpu": "yes", + "microcode": "0xb00001e", + "processor": "0", + "cache_alignment": "64", + "fpu_exception": "yes", + "modelNumber": "79" + } + }, + { + "type": "ConsistsOf", + "id": "93d9fa8d-ae0c-4393-9020-3e1243a8c65d", + "propagationConstraint": { + "type": "PropagationConstraint", + "add": "propagate", + "delete": "cascade", + "remove": "cascade", + "supertypes": [ + "Property" + ] + }, + "target": { + "type": "CPUFacet", + "supertypes": [ + "Facet" + ], + "id": "b15df23e-04fe-4528-97ae-f4d729a0c8e4", + "siblings": "2", + "apicid": "18", + "physical_id": "0", + "flags": "fpu de tsc msr pae cx8 apic sep cmov pat clflush mmx fxsr sse sse2 ss ht syscall nx lm constant_tsc rep_good nopl cpuid pni pclmulqdq ssse3 sdbg cx16 sse4_1 sse4_2 movbe popcnt tsc_deadline_timer aes f16c rdrand hypervisor lahf_lm abm 3dnowprefetch cpuid_fault epb fsgsbase erms dtherm ida arat pln pts", + "clflush_size": "64", + "stepping": "1", + "bogomips": "4395.04", + "address_sizes": "46 bits physical, 48 bits virtual", + "bugs": "null_seg cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf", + "cpu_family": "6", + "core_id": "9", + "clockSpeed": "2197.522", + "vendor": "GenuineIntel", + "wp": "yes", + "model": "Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz", + "initial_apicid": "18", + "cache_size": "30720 KB", + "cpuid_level": "20", + "cpu_cores": "1", + "fpu": "yes", + "microcode": "0xb00001e", + "processor": "1", + "cache_alignment": "64", + "fpu_exception": "yes", + "modelNumber": "79" + } + }, + { + "type": "ConsistsOf", + "id": "89de1226-e7b1-4b08-a26e-46a13b551c57", + "propagationConstraint": { + "type": "PropagationConstraint", + "add": "propagate", + "delete": "cascade", + "remove": "cascade", + "supertypes": [ + "Property" + ] + }, + "target": { + "type": "SoftwareFacet", + "supertypes": [ + "Facet" + ], + "id": "56c5e755-0631-4419-8362-e961e6b91743", + "Description": "Ubuntu 18.04.5 LTS", + "description": null, + "optional": false, + "version": "4.15.0-38-generic", + "Codename": "bionic", + "qualifier": null, + "name": "amd64", + "Distributor ID": "Ubuntu", + "Release": "18.04", + "group": "Linux" + } + }, + { + "type": "ConsistsOf", + "id": "6a91074f-8ff1-4284-a1f1-5feeb1418782", + "propagationConstraint": { + "type": "PropagationConstraint", + "add": "propagate", + "delete": "cascade", + "remove": "cascade", + "supertypes": [ + "Property" + ] + }, + "target": { + "type": "SoftwareFacet", + "supertypes": [ + "Facet" + ], + "id": "e57f33ef-89e0-4de1-a3f2-79963eb6aff9", + "qualifier": null, + "name": "SmartGears", + "description": null, + "optional": false, + "version": "4.0.0-SNAPSHOT", + "group": "gCube" + } + }, + { + "type": "ConsistsOf", + "id": "9a95cb44-7d5b-40ae-99ed-fc29bed014a4", + "propagationConstraint": { + "type": "PropagationConstraint", + "add": "propagate", + "delete": "cascade", + "remove": "cascade", + "supertypes": [ + "Property" + ] + }, + "target": { + "type": "SoftwareFacet", + "supertypes": [ + "Facet" + ], + "id": "c4e55779-7e85-46af-8ca5-bfe0f718660a", + "qualifier": null, + "name": "SmartGearsDistribution", + "description": null, + "optional": false, + "version": "4.0.0-SNAPSHOT", + "group": "gCube", + "publication-frequency": "300" + } + }, + { + "type": "ConsistsOf", + "id": "6c7b85f6-b438-4745-ace3-81cd9285bbee", + "propagationConstraint": { + "type": "PropagationConstraint", + "add": "propagate", + "delete": "cascade", + "remove": "cascade", + "supertypes": [ + "Property" + ] + }, + "target": { + "type": "SoftwareFacet", + "supertypes": [ + "Facet" + ], + "id": "cc566b3c-06b5-4fb7-90aa-7770a943c3a5", + "java.specification.version": "11", + "description": null, + "optional": false, + "version": "11.0.18", + "java.vendor.url": "https://ubuntu.com/", + "qualifier": null, + "name": "Java", + "group": "Ubuntu" + } + }, + { + "type": "ConsistsOf", + "id": "7e188a04-baa5-4ac1-a46a-1e42970667a0", + "propagationConstraint": { + "type": "PropagationConstraint", + "add": "propagate", + "delete": "cascade", + "remove": "cascade", + "supertypes": [ + "Property" + ] + }, + "target": { + "type": "SimplePropertyFacet", + "supertypes": [ + "Facet" + ], + "id": "fdcdba83-1392-431b-bc70-bb268904a8ca", + "TOMCAT_USER": "gcube", + "INVOCATION_ID": "776b2c3c50234e9eb059af65c692645c", + "CATALINA_PID": "/var/run/tomcat-instance-8080.pid", + "CATALINA_TMPDIR": "/tomcat/temp", + "JAVA_HOME": "/usr/lib/jvm/java-11-openjdk-amd64", + "LC_MESSAGES": "C.UTF-8", + "JAVA_OPTS": "-XX:+UseConcMarkSweepGC -XX:+CrashOnOutOfMemoryError -server -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Xms3000m -Xmx3000m -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=8186 -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=10.122.0.166 -Dcom.sun.management.jmxremote.authenticate=false -XX:+DisableAttachMechanism -Dcom.sun.management.jmxremote.rmi.port=8186 -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027", + "JSSE_HOME": "", + "LANG": "", + "JVM_TMP": "/tomcat/temp/jvm_tmp", + "WEB_CONTAINER_HOME": "/home/gcube/tomcat", + "CATALINA_BASE": "/home/gcube/tomcat", + "JOURNAL_STREAM": "9:121955156", + "PWD": "/home/gcube/tomcat", + "value": "", + "SmartGearsDistributionBundle": "UnBundled", + "TOMCAT_GROUP": "gcube", + "CATALINA_HOME": "/usr/share/tomcat8", + "JDK_JAVA_OPTIONS": " --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED", + "OLDPWD": "/tomcat/temp", + "name": "ENVIRONMENT_VARIABLES", + "SmartGearsDistribution": "4.0.0-SNAPSHOT", + "JAVA_HEAP": "-Xms3000m -Xmx3000m", + "GHN_HOME": "/home/gcube/SmartGears", + "JAVA_PERMGEN": "", + "HOME": "/home/gcube", + "SHLVL": "1" + } + }, + { + "type": "ConsistsOf", + "id": "eac90912-ae1b-4ff8-86f0-a44c2aed673c", + "propagationConstraint": { + "type": "PropagationConstraint", + "add": "propagate", + "delete": "cascade", + "remove": "cascade", + "supertypes": [ + "Property" + ] + }, + "target": { + "type": "StateFacet", + "supertypes": [ + "Facet" + ], + "id": "b0f10d58-25d9-4022-a264-ca5c2f888f91", + "date": "2024-03-25 14:24:35.863 +0100", + "value": "down" + } + }, + { + "type": "ConsistsOf", + "id": "7c68bc64-bb54-41bc-a0f8-14e7a0c85443", + "propagationConstraint": { + "type": "PropagationConstraint", + "add": "propagate", + "delete": "cascade", + "remove": "cascade", + "supertypes": [ + "Property" + ] + }, + "target": { + "type": "EventFacet", + "supertypes": [ + "Facet" + ], + "id": "a243ddd3-8ac5-4097-8568-813f76143f66", + "date": "2024-03-25 14:21:58.001 +0100", + "event": "certified" + } + }, + { + "type": "ConsistsOf", + "id": "cd03d1da-f8d4-455a-b086-1039456ab515", + "propagationConstraint": { + "type": "PropagationConstraint", + "add": "propagate", + "delete": "cascade", + "remove": "cascade", + "supertypes": [ + "Property" + ] + }, + "target": { + "type": "LocationFacet", + "supertypes": [ + "Facet" + ], + "id": "e3db10ef-a9ca-4cd1-8cd0-985bb82497ec", + "country": "it", + "latitude": null, + "location": "rome", + "longitude": null + } + }, + { + "type": "ConsistsOf", + "id": "9ea0a9fc-abe9-423c-8c41-b89b0926007c", + "propagationConstraint": { + "type": "PropagationConstraint", + "add": "propagate", + "delete": "cascade", + "remove": "cascade", + "supertypes": [ + "Property" + ] + }, + "target": { + "type": "EventFacet", + "supertypes": [ + "Facet" + ], + "id": "a7a69c32-4c8a-46f2-8fdc-321d96e51f0d", + "date": "2024-03-25 14:24:35.863 +0100", + "event": "down" + } + }, + { + "type": "ConsistsOf", + "id": "8d618031-0c51-4243-befd-dc0427d26dfc", + "propagationConstraint": { + "type": "PropagationConstraint", + "add": "propagate", + "delete": "cascade", + "remove": "cascade", + "supertypes": [ + "Property" + ] + }, + "target": { + "type": "EventFacet", + "supertypes": [ + "Facet" + ], + "id": "cf7436e2-bf58-46c0-8d65-c59a8308cf05", + "date": "2024-01-26 09:50:47.054 +0100", + "event": "ready" + } + }, + { + "type": "HasVolatileMemory", + "supertypes": [ + "HasMemory", + "ConsistsOf" + ], + "id": "a1f4d155-4688-4426-aa03-dc2a3cd834ec", + "propagationConstraint": { + "type": "PropagationConstraint", + "add": "propagate", + "delete": "cascade", + "remove": "cascade", + "supertypes": [ + "Property" + ] + }, + "memoryType": "RAM", + "target": { + "type": "MemoryFacet", + "supertypes": [ + "Facet" + ], + "id": "ff63f5b7-f58b-4110-8208-b2060fa6f728", + "unit": "MB", + "size": "5860", + "used": "2299" + } + }, + { + "type": "HasVolatileMemory", + "supertypes": [ + "HasMemory", + "ConsistsOf" + ], + "id": "9cb50edd-5ae0-4f2e-bc34-bd99c8d0572e", + "propagationConstraint": { + "type": "PropagationConstraint", + "add": "propagate", + "delete": "cascade", + "remove": "cascade", + "supertypes": [ + "Property" + ] + }, + "memoryType": "JVM", + "target": { + "type": "MemoryFacet", + "supertypes": [ + "Facet" + ], + "id": "69629225-1a54-4f0f-aebc-54465b3a5660", + "unit": "MB", + "size": "2983", + "used": "201", + "jvmMaxMemory": "2983" + } + } + ] +} + diff --git a/src/main/webapp/assets/formresult.json b/src/main/webapp/assets/formresult.json new file mode 100644 index 0000000..eda3816 --- /dev/null +++ b/src/main/webapp/assets/formresult.json @@ -0,0 +1,155 @@ +{ + "NetworkingFacet_IsIdentifiedBy": [ + { + "facetName": "NetworkingFacet", + "max": "1", + "min": "1", + "facetDescription": "NetworkingFacet captures information on any (computer) network interface associated with the resource.It is mainly used to describe the network interface of a host. It should not be confused with the {@link AccessPointFacet} which instead describes the protocol and the endpoint of a web-based service.", + "relationFacet": "IsIdentifiedBy", + "isAdded": false, + "extraProps": [], + "prop_broadcastAddress": "broadcastAddress_1", + "prop_IPAddress": "12.66.86", + "prop_hostName": "host name 1", + "prop_domainName": "domain name 1", + "prop_mask": "mask 1" + } + ], + "CPUFacet_ConsistsOf": [ + { + "facetName": "CPUFacet", + "max": "many", + "min": "1", + "facetDescription": "CPUFacet captures information on the Central Processing Unit (CPU) of the resource it is associated with. A resource which needs to indicate a multi-processor/multi-core CPU will consist of more than one CPUFacet. Even if more than one CPUFacet is associated with a resource (i.e., an {@link HostingNode}), we did not find any reason to differentiate the CPUs.", + "relationFacet": "ConsistsOf", + "isAdded": false, + "extraProps": [ + { + "prop_deno": "extra1", + "prop_val": "value1", + "prop_tipo": "String" + }, + { + "prop_deno": "extra2", + "prop_val": "value2", + "prop_tipo": "String" + } + ], + "prop_model": "aaaaaaa", + "prop_vendor": "bbbbb", + "prop_clockSpeed": "45" + }, + { + "facetName": "CPUFacet", + "max": "many", + "min": "1", + "facetDescription": "CPUFacet captures information on the Central Processing Unit (CPU) of the resource it is associated with. A resource which needs to indicate a multi-processor/multi-core CPU will consist of more than one CPUFacet. Even if more than one CPUFacet is associated with a resource (i.e., an {@link HostingNode}), we did not find any reason to differentiate the CPUs.", + "relationFacet": "HasRemoveAction", + "isAdded": true, + "extraProps": [ + { + "prop_deno": "extra deno 1", + "prop_val": "extra value 1", + "prop_tipo": "String" + } + ], + "prop_model": "ccccc", + "prop_vendor": "dddd", + "prop_clockSpeed": "124" + } + ], + "MemoryFacet_HasPersistentMemory": [ + { + "facetName": "MemoryFacet", + "max": "many", + "min": "1", + "facetDescription": "MemoryFacet captures information on computer memory equipping the resource and its usage. Any resource describing a computing machine must have at least two types of memories i.e., persistent and volatile. For such a reason, it has been identified the ConsistsOf relation called {@link HasMemory}. It is in charge of the specialisation {@link HasVolatileMemory} and {@link HasPersistentMemory} to clarify the semantics of the memory.", + "relationFacet": "HasPersistentMemory", + "isAdded": false, + "extraProps": [], + "prop_used": "2355", + "prop_unit": "MB", + "prop_size": "2466" + } + ], + "MemoryFacet_HasVolatileMemory": [ + { + "facetName": "MemoryFacet", + "max": "many", + "min": "1", + "facetDescription": "MemoryFacet captures information on computer memory equipping the resource and its usage. Any resource describing a computing machine must have at least two types of memories i.e., persistent and volatile. For such a reason, it has been identified the ConsistsOf relation called {@link HasMemory}. It is in charge of the specialisation {@link HasVolatileMemory} and {@link HasPersistentMemory} to clarify the semantics of the memory.", + "relationFacet": "HasVolatileMemory", + "isAdded": false, + "extraProps": [], + "prop_used": "222", + "prop_unit": "MB", + "prop_size": "1000" + } + ], + "EventFacet_ConsistsOf": [ + { + "facetName": "EventFacet", + "max": "many", + "min": "1", + "facetDescription": "EventFacet captures information on a certain event/happening characterising the life cycle of the resource. Examples of an event are the start time of a virtual machine or the activation time of an electronic service.", + "relationFacet": "ConsistsOf", + "isAdded": false, + "extraProps": [], + "prop_event": "ddddd", + "prop_date": "2024-04-24" + } + ], + "StateFacet_ConsistsOf": [ + { + "facetName": "StateFacet", + "max": "1", + "min": "1", + "facetDescription": "StateFacet captures information on state to be associated with the resource. The state is captured by any controlled vocabulary which is an integral part of the facet. Examples of usage are the state of service e.g., running or down or the state of a virtual machine e.g., activated or unreachable.", + "relationFacet": "ConsistsOf", + "isAdded": false, + "extraProps": [ + { + "prop_deno": "custom A", + "prop_val": "valuecustom A", + "prop_tipo": "String" + }, + { + "prop_deno": "custom B", + "prop_val": "valuecustom B", + "prop_tipo": "String" + } + ], + "prop_value": "On" + } + ], + "SimplePropertyFacet_ConsistsOf": [ + { + "facetName": "SimplePropertyFacet", + "max": "many", + "min": "0", + "facetDescription": "Collect name-value property", + "relationFacet": "ConsistsOf", + "isAdded": false, + "extraProps": [], + "prop_value": "mmmmmm", + "prop_name": "ttttt" + } + ], + "SoftwareFacet_ConsistsOf": [ + { + "facetName": "SoftwareFacet", + "max": "many", + "min": "0", + "facetDescription": "SoftwareFacet captures information on any software associated with the resource.", + "relationFacet": "ConsistsOf", + "isAdded": false, + "extraProps": [], + "prop_name": "zzzzzz", + "prop_optional": true, + "prop_group": "ffffffff", + "prop_description": "description", + "prop_version": "14.9", + "prop_qualifier": "qualifier" + } + ] +} \ No newline at end of file