@Input() capabilityNameAndPropertiesMap: Map<string, PropertyModel[]>;
@Input() filterType: FilterType;
@Input() filterConstraint: PropertyFilterConstraintUi;
+ @Input() customToscaFunctions: Array<CustomToscaFunction>;
//output
currentRule: PropertyFilterConstraintUi;
selectedProperty: PropertyFEModel;
selectedSourceType: string;
componentInstanceMap: Map<string, InstanceFeDetails> = new Map<string, InstanceFeDetails>();
- customToscaFunctions: Array<CustomToscaFunction>;
+
capabilityDropdownList: DropdownValue[] = [];
validValuesToscaFunctionList: ToscaFunction[];
rangeToscaFunctionList: ToscaFunction[];
}
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) {