aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--catalog-ui/src/app/ng2/pages/workspace/req-and-capabilities/req-and-capabilities.service.ts7
1 files changed, 5 insertions, 2 deletions
diff --git a/catalog-ui/src/app/ng2/pages/workspace/req-and-capabilities/req-and-capabilities.service.ts b/catalog-ui/src/app/ng2/pages/workspace/req-and-capabilities/req-and-capabilities.service.ts
index e7b39c0a84..4421c2708b 100644
--- a/catalog-ui/src/app/ng2/pages/workspace/req-and-capabilities/req-and-capabilities.service.ts
+++ b/catalog-ui/src/app/ng2/pages/workspace/req-and-capabilities/req-and-capabilities.service.ts
@@ -41,16 +41,19 @@ export class ReqAndCapabilitiesService {
// -- COMMON for both --
this.capabilityTypesList = [];
let capabilityTypesResult = await this.toscaTypesServiceNg2.fetchCapabilityTypes(this.workspaceService.metadata.model);
- Object.keys(capabilityTypesResult).forEach(key => {this.capabilityTypesList.push(capabilityTypesResult[key])})
+ Object.keys(capabilityTypesResult).forEach(key => {this.capabilityTypesList.push(capabilityTypesResult[key])});
+ this.capabilityTypesList.sort((capabilityType1, capabilityType2) => capabilityType1.toscaPresentation.type.localeCompare(capabilityType2.toscaPresentation.type));
if (initInputsFor === 'INPUTS_FOR_REQUIREMENTS') {
this.relationshipTypesList = [];
let relationshipTypesResult = await this.toscaTypesServiceNg2.fetchRelationshipTypes(this.workspaceService.metadata.model);
Object.keys(relationshipTypesResult).forEach(key => {this.relationshipTypesList.push(relationshipTypesResult[key])});
+ this.relationshipTypesList.sort((relationship1,relationship2) => relationship1.toscaPresentation.type.localeCompare(relationship2.toscaPresentation.type));
this.nodeTypesList = [];
let nodeTypesResult = await this.toscaTypesServiceNg2.fetchNodeTypes(this.workspaceService.metadata.model);
- Object.keys(nodeTypesResult).forEach(key => {this.nodeTypesList.push(nodeTypesResult[key])})
+ Object.keys(nodeTypesResult).forEach(key => {this.nodeTypesList.push(nodeTypesResult[key])});
+ this.nodeTypesList.sort((node1,node2) => node1.componentMetadataDefinition.componentMetadataDataDefinition.toscaResourceName.localeCompare(node2.componentMetadataDefinition.componentMetadataDataDefinition.toscaResourceName));
}
}