summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/ng2/pages
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-ui/src/app/ng2/pages')
-rw-r--r--catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-custom-function/tosca-custom-function.component.ts3
-rw-r--r--catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-function.component.html1
-rw-r--r--catalog-ui/src/app/ng2/pages/service-dependencies-editor/service-dependencies-editor.component.html4
-rw-r--r--catalog-ui/src/app/ng2/pages/service-dependencies-editor/service-dependencies-editor.component.ts19
4 files changed, 18 insertions, 9 deletions
diff --git a/catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-custom-function/tosca-custom-function.component.ts b/catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-custom-function/tosca-custom-function.component.ts
index ad72adad22..7db332236b 100644
--- a/catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-custom-function/tosca-custom-function.component.ts
+++ b/catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-custom-function/tosca-custom-function.component.ts
@@ -49,6 +49,7 @@ export class ToscaCustomFunctionComponent implements OnInit {
@Input() propertyType: string;
@Input() propertySchemaType: string = undefined;
@Input() isDefaultCustomFunction: boolean;
+ @Input() overridingType: PROPERTY_TYPES;
@Output() onValidFunction: EventEmitter<ToscaCustomFunction> = new EventEmitter<ToscaCustomFunction>();
@Output() onValidityChange: EventEmitter<ToscaCustomFunctionValidationEvent> = new EventEmitter<ToscaCustomFunctionValidationEvent>();
@@ -194,7 +195,7 @@ export class ToscaCustomFunctionComponent implements OnInit {
createProperty(value?: any): PropertyBEModel {
const property = new PropertyBEModel();
if (this.type === this.GET_INPUT) {
- property.type = this.propertyType;
+ property.type = this.overridingType ? this.overridingType.toString() : this.propertyType;
if (this.propertySchemaType) {
property.schemaType = this.propertySchemaType;
}
diff --git a/catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-function.component.html b/catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-function.component.html
index 0d5a4973da..db96f1cece 100644
--- a/catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-function.component.html
+++ b/catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-function.component.html
@@ -45,6 +45,7 @@
[propertyType]="property.type"
[propertySchemaType]="property.schemaType"
[componentInstanceMap]="componentInstanceMap"
+ [overridingType]="overridingType"
[isDefaultCustomFunction]="isDefaultCustomFunction()"
(onValidityChange)="onCustomFunctionValidityChange($event)">
</app-tosca-custom-function>
diff --git a/catalog-ui/src/app/ng2/pages/service-dependencies-editor/service-dependencies-editor.component.html b/catalog-ui/src/app/ng2/pages/service-dependencies-editor/service-dependencies-editor.component.html
index c90cfd8210..b5cc0cdc9e 100644
--- a/catalog-ui/src/app/ng2/pages/service-dependencies-editor/service-dependencies-editor.component.html
+++ b/catalog-ui/src/app/ng2/pages/service-dependencies-editor/service-dependencies-editor.component.html
@@ -77,6 +77,8 @@
<tosca-function [property]="selectedProperty"
[overridingType] = "isLengthOperator() ? overridingType : undefined"
[componentInstanceMap]="componentInstanceMap"
+ [customToscaFunctions]="customToscaFunctions"
+ [overridingType]="overridingType"
[allowClear]="false"
(onValidityChange)="onToscaFunctionValidityChange($event)"
>
@@ -103,6 +105,7 @@
<tosca-function [property]="selectedProperty"
[inToscaFunction]="val"
[componentInstanceMap]="componentInstanceMap"
+ [customToscaFunctions]="customToscaFunctions"
[allowClear]="false"
(onValidityChange)="onToscaRangeFunctionListValidityChange($event, valueIndex)"
>
@@ -123,6 +126,7 @@
<tosca-function [property]="selectedProperty"
[inToscaFunction]="val"
[componentInstanceMap]="componentInstanceMap"
+ [customToscaFunctions]="customToscaFunctions"
[allowClear]="false"
(onValidityChange)="onToscaFunctionListValidityChange($event, valueIndex)"
>
diff --git a/catalog-ui/src/app/ng2/pages/service-dependencies-editor/service-dependencies-editor.component.ts b/catalog-ui/src/app/ng2/pages/service-dependencies-editor/service-dependencies-editor.component.ts
index 5897f272b3..d560285be9 100644
--- a/catalog-ui/src/app/ng2/pages/service-dependencies-editor/service-dependencies-editor.component.ts
+++ b/catalog-ui/src/app/ng2/pages/service-dependencies-editor/service-dependencies-editor.component.ts
@@ -72,6 +72,7 @@ export class ServiceDependenciesEditorComponent implements OnInit {
@Input() capabilityNameAndPropertiesMap: Map<string, PropertyModel[]>;
@Input() filterType: FilterType;
@Input() filterConstraint: PropertyFilterConstraintUi;
+ @Input() customToscaFunctions: Array<CustomToscaFunction>;
//output
currentRule: PropertyFilterConstraintUi;
@@ -100,7 +101,7 @@ export class ServiceDependenciesEditorComponent implements OnInit {
selectedProperty: PropertyFEModel;
selectedSourceType: string;
componentInstanceMap: Map<string, InstanceFeDetails> = new Map<string, InstanceFeDetails>();
- customToscaFunctions: Array<CustomToscaFunction>;
+
capabilityDropdownList: DropdownValue[] = [];
validValuesToscaFunctionList: ToscaFunction[];
rangeToscaFunctionList: ToscaFunction[];
@@ -133,13 +134,15 @@ export class ServiceDependenciesEditorComponent implements OnInit {
}
private initCustomToscaFunctions() {
- this.customToscaFunctions = [];
- this.topologyTemplateService.getDefaultCustomFunction().toPromise().then((data) => {
- for (let customFunction of data) {
- this.customToscaFunctions.push(new CustomToscaFunction(customFunction));
- }
- });
-}
+ if (!this.customToscaFunctions) {
+ this.customToscaFunctions = [];
+ this.topologyTemplateService.getDefaultCustomFunction().toPromise().then((data) => {
+ for (let customFunction of data) {
+ this.customToscaFunctions.push(new CustomToscaFunction(customFunction));
+ }
+ });
+ }
+ }
private initCapabilityDropdown(): void {
if (this.filterType == FilterType.CAPABILITY) {