diff options
author | aribeiro <anderson.ribeiro@est.tech> | 2021-07-15 09:18:37 +0100 |
---|---|---|
committer | aribeiro <anderson.ribeiro@est.tech> | 2021-08-06 17:22:20 +0100 |
commit | 47bcc63a9daff1f310125fed006f27c93656fa83 (patch) | |
tree | 3c61670b039c0e63d14880f909e6047d54776492 /catalog-ui/src/app/view-models/forms/property-forms/component-property-form/property-form-view-model.ts | |
parent | 0ed125f98ae8ea9e80c855a640c328654660d081 (diff) |
Retrieve data types based on component model
Issue-ID: SDC-3660
Signed-off-by: aribeiro <anderson.ribeiro@est.tech>
Change-Id: I09c533eb39277532b29e581e4dd57e9df952e8e6
Diffstat (limited to 'catalog-ui/src/app/view-models/forms/property-forms/component-property-form/property-form-view-model.ts')
-rw-r--r-- | catalog-ui/src/app/view-models/forms/property-forms/component-property-form/property-form-view-model.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/catalog-ui/src/app/view-models/forms/property-forms/component-property-form/property-form-view-model.ts b/catalog-ui/src/app/view-models/forms/property-forms/component-property-form/property-form-view-model.ts index c63dd8a208..c36a242c2a 100644 --- a/catalog-ui/src/app/view-models/forms/property-forms/component-property-form/property-form-view-model.ts +++ b/catalog-ui/src/app/view-models/forms/property-forms/component-property-form/property-form-view-model.ts @@ -59,6 +59,7 @@ interface IPropertyFormViewModelScope extends ng.IScope { isPropertyValueOwner:boolean; isVnfConfiguration:boolean; constraints:string[]; + modelNameFilter:string; validateJson(json:string):boolean; save(doNotCloseModal?:boolean):void; @@ -125,7 +126,6 @@ export class PropertyFormViewModel { private workspaceService: WorkspaceService) { this.formState = angular.isDefined(property.name) ? FormState.UPDATE : FormState.CREATE; - this.initScope(); } @@ -203,9 +203,10 @@ export class PropertyFormViewModel { this.$scope.modalInstanceProperty = this.$uibModalInstance; this.$scope.currentPropertyIndex = _.findIndex(this.filteredProperties, i=> i.name == this.property.name); this.$scope.isLastProperty = this.$scope.currentPropertyIndex == (this.filteredProperties.length - 1); - this.$scope.dataTypes = this.DataTypesService.getAllDataTypes(); + this.$scope.dataTypes = this.DataTypesService.getAllDataTypesFromModel(this.workspaceService.metadata.model); this.$scope.isPropertyValueOwner = this.isPropertyValueOwner; this.$scope.propertyOwnerType = this.propertyOwnerType; + this.$scope.modelNameFilter = this.workspaceService.metadata.model; this.$scope.editPropertyModel = { property : new PropertyModel(this.property), |