From b43eb22f91ffdc1e2ba5d82b3dc1a2c4250d06e0 Mon Sep 17 00:00:00 2001 From: "andre.schmid" Date: Wed, 18 May 2022 22:09:25 +0100 Subject: Support of get_property in property assignment Refactors the current way store a get_input function allowing to support different get functions (get_property in this case). The information stored allows recreating and correctly validating the get function. Fix get function schema validation, the schema was being ignored. Improve validation error status and messages. Improve tosca get function dialog. Change-Id: I5de5f96dfba3c7a0fbb458885af5528bea7835aa Issue-ID: SDC-4014 Signed-off-by: andre.schmid --- .../interface-operations.component.ts | 22 +++++++++++----------- .../properties-tab/properties-tab.component.ts | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) (limited to 'catalog-ui/src/app/ng2/pages/composition') diff --git a/catalog-ui/src/app/ng2/pages/composition/interface-operatons/interface-operations.component.ts b/catalog-ui/src/app/ng2/pages/composition/interface-operatons/interface-operations.component.ts index ba19e266b7..c0a883a1ed 100644 --- a/catalog-ui/src/app/ng2/pages/composition/interface-operatons/interface-operations.component.ts +++ b/catalog-ui/src/app/ng2/pages/composition/interface-operatons/interface-operations.component.ts @@ -93,12 +93,12 @@ class ModalTranslation { CLOSE_BUTTON: string; SAVE_BUTTON: string; - constructor(private TranslateService: TranslateService) { - this.TranslateService.languageChangedObservable.subscribe(lang => { - this.EDIT_TITLE = this.TranslateService.translate('INTERFACE_EDIT_TITLE'); - this.CANCEL_BUTTON = this.TranslateService.translate("INTERFACE_CANCEL_BUTTON"); - this.CLOSE_BUTTON = this.TranslateService.translate("INTERFACE_CLOSE_BUTTON"); - this.SAVE_BUTTON = this.TranslateService.translate("INTERFACE_SAVE_BUTTON"); + constructor(private translateService: TranslateService) { + this.translateService.languageChangedObservable.subscribe(lang => { + this.EDIT_TITLE = this.translateService.translate('INTERFACE_EDIT_TITLE'); + this.CANCEL_BUTTON = this.translateService.translate("INTERFACE_CANCEL_BUTTON"); + this.CLOSE_BUTTON = this.translateService.translate("INTERFACE_CLOSE_BUTTON"); + this.SAVE_BUTTON = this.translateService.translate("INTERFACE_SAVE_BUTTON"); }); } } @@ -148,15 +148,15 @@ export class InterfaceOperationsComponent { constructor( - private TranslateService: TranslateService, - private PluginsService: PluginsService, + private translateService: TranslateService, + private pluginsService: PluginsService, private topologyTemplateService: TopologyTemplateService, private toscaArtifactService: ToscaArtifactService, private modalServiceNg2: ModalService, private workspaceService: WorkspaceService, @Inject("Notification") private Notification: any, ) { - this.modalTranslation = new ModalTranslation(TranslateService); + this.modalTranslation = new ModalTranslation(translateService); } ngOnInit(): void { @@ -214,8 +214,8 @@ export class InterfaceOperationsComponent { ).length === 0; } - private enableOrDisableSaveButton = (): boolean => { - return this.isViewOnly; + private enableOrDisableSaveButton = (isValid): boolean => { + return isValid; } onSelectInterfaceOperation(interfaceModel: UIInterfaceModel, operation: InterfaceOperationModel) { diff --git a/catalog-ui/src/app/ng2/pages/composition/panel/panel-tabs/properties-tab/properties-tab.component.ts b/catalog-ui/src/app/ng2/pages/composition/panel/panel-tabs/properties-tab/properties-tab.component.ts index dc16a12d3e..6bb697be2c 100644 --- a/catalog-ui/src/app/ng2/pages/composition/panel/panel-tabs/properties-tab/properties-tab.component.ts +++ b/catalog-ui/src/app/ng2/pages/composition/panel/panel-tabs/properties-tab/properties-tab.component.ts @@ -12,7 +12,7 @@ import { InputsGroup, InputModel } from 'app/models'; -import {ToscaGetFunctionType} from "app/models/tosca-get-function-type.enum"; +import {ToscaGetFunctionType} from "app/models/tosca-get-function-type"; import { CompositionService } from 'app/ng2/pages/composition/composition.service'; import { WorkspaceService } from 'app/ng2/pages/workspace/workspace.service'; import { GroupByPipe } from 'app/ng2/pipes/groupBy.pipe'; -- cgit 1.2.3-korg