summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/ng2/pages/composition
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-ui/src/app/ng2/pages/composition')
-rw-r--r--catalog-ui/src/app/ng2/pages/composition/interface-operatons/operation-creator/input-list/input-list-item/input-list-item.component.html2
-rw-r--r--catalog-ui/src/app/ng2/pages/composition/interface-operatons/operation-creator/interface-operation-handler.component.html2
-rw-r--r--catalog-ui/src/app/ng2/pages/composition/interface-operatons/operation-creator/interface-operation-handler.component.ts13
3 files changed, 13 insertions, 4 deletions
diff --git a/catalog-ui/src/app/ng2/pages/composition/interface-operatons/operation-creator/input-list/input-list-item/input-list-item.component.html b/catalog-ui/src/app/ng2/pages/composition/interface-operatons/operation-creator/input-list/input-list-item/input-list-item.component.html
index 44db3b0d00..3824d75055 100644
--- a/catalog-ui/src/app/ng2/pages/composition/interface-operatons/operation-creator/input-list/input-list-item/input-list-item.component.html
+++ b/catalog-ui/src/app/ng2/pages/composition/interface-operatons/operation-creator/input-list/input-list-item/input-list-item.component.html
@@ -102,7 +102,7 @@
[name]="property.name"
[type]="getDataType(property.type)"
[dataTypeMap]="dataTypeMap"
- [valueObjRef]="valueObjRef[property.name]"
+ [valueObjRef]="valueObjRef ? valueObjRef[property.name] : undefined"
[schema]="property.schema"
[nestingLevel]="nestingLevel + 1"
[isViewOnly]="isViewOnly"
diff --git a/catalog-ui/src/app/ng2/pages/composition/interface-operatons/operation-creator/interface-operation-handler.component.html b/catalog-ui/src/app/ng2/pages/composition/interface-operatons/operation-creator/interface-operation-handler.component.html
index 8ab1b97cda..cf9a04ae0a 100644
--- a/catalog-ui/src/app/ng2/pages/composition/interface-operatons/operation-creator/interface-operation-handler.component.html
+++ b/catalog-ui/src/app/ng2/pages/composition/interface-operatons/operation-creator/interface-operation-handler.component.html
@@ -130,6 +130,8 @@
[dataTypeMap]="dataTypeMap"
[isViewOnly]="isViewOnly"
[allowDeletion]="true"
+ [componentInstanceMap]="componentInstanceMap"
+ [showToscaFunctionOption]="true"
(onValueChange)="onInputValueChange($event)"
(onDelete)="onInputDelete($event)"
>
diff --git a/catalog-ui/src/app/ng2/pages/composition/interface-operatons/operation-creator/interface-operation-handler.component.ts b/catalog-ui/src/app/ng2/pages/composition/interface-operatons/operation-creator/interface-operation-handler.component.ts
index ab9cad0a39..4ceaa78148 100644
--- a/catalog-ui/src/app/ng2/pages/composition/interface-operatons/operation-creator/interface-operation-handler.component.ts
+++ b/catalog-ui/src/app/ng2/pages/composition/interface-operatons/operation-creator/interface-operation-handler.component.ts
@@ -138,8 +138,10 @@ export class InterfaceOperationHandlerComponent {
private initCustomToscaFunctions() {
this.customToscaFunctions = [];
this.topologyTemplateService.getDefaultCustomFunction().toPromise().then((data) => {
- for (let customFunction of data) {
- this.customToscaFunctions.push(new CustomToscaFunction(customFunction));
+ if (data) {
+ for (let customFunction of data) {
+ this.customToscaFunctions.push(new CustomToscaFunction(customFunction));
+ }
}
});
}
@@ -299,7 +301,12 @@ export class InterfaceOperationHandlerComponent {
changedInput.value = JSON.stringify(changedInput.value);
}
const inputOperationParameter = this.inputs.find(value => value.name == changedInput.name);
+ inputOperationParameter.toscaFunction = null;
inputOperationParameter.value = changedInput.value;
+ if (changedInput.isToscaFunction()) {
+ inputOperationParameter.toscaFunction = changedInput.toscaFunction;
+ inputOperationParameter.value = changedInput.toscaFunction.buildValueString();
+ }
}
onArtifactPropertyValueChange(changedProperty: InputOperationParameter) {
@@ -345,7 +352,7 @@ export class InterfaceOperationHandlerComponent {
const input1 = currentInputs.find(value => value.name === inputName);
const indexOfInput = currentInputs.indexOf(input1);
if (indexOfInput === -1) {
- console.error(`Could delete input '${inputName}'. Input not found.`);
+ console.error(`Could not delete input '${inputName}'. Input not found.`);
return;
}
currentInputs.splice(currentInputs.indexOf(input1), 1);