From c53d40dd69c956dabfd30eb7dcecad03151747fe Mon Sep 17 00:00:00 2001 From: JvD_Ericsson Date: Wed, 5 Oct 2022 14:54:09 +0100 Subject: Support viewing of VFC property details when checked in Issue-ID: SDC-4208 Signed-off-by: JvD_Ericsson Change-Id: I4c16ca4058716bfee6a52b37604a045ecabc975c --- .../property-form-view-model.ts | 12 +++++++---- .../property-form-view.html | 24 +++++++++++----------- .../tabs/properties/properties-view-model.ts | 2 +- .../workspace/tabs/properties/properties-view.html | 3 +-- 4 files changed, 22 insertions(+), 19 deletions(-) (limited to 'catalog-ui/src/app/view-models') 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 17e82099ab..103b1341c0 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 @@ -62,6 +62,7 @@ interface IPropertyFormViewModelScope extends ng.IScope { dataTypes:DataTypesMap; isTypeDataType:boolean; maxLength:number; + isViewOnly:boolean; isPropertyValueOwner:boolean; isVnfConfiguration:boolean; constraints:string[]; @@ -101,6 +102,7 @@ export class PropertyFormViewModel { 'ModalServiceSdcUI', 'filteredProperties', '$timeout', + 'isViewOnly', 'isPropertyValueOwner', 'propertyOwnerType', 'propertyOwnerId', @@ -125,6 +127,7 @@ export class PropertyFormViewModel { private modalService:SdcUiServices.ModalService, private filteredProperties:Array, private $timeout:ng.ITimeoutService, + private isViewOnly:boolean, private isPropertyValueOwner:boolean, private propertyOwnerType:string, private propertyOwnerId:string, @@ -232,6 +235,7 @@ export class PropertyFormViewModel { private initScope = ():void => { //scope properties + this.$scope.isViewOnly = this.isViewOnly; this.$scope.isLoading = true; this.$scope.forms = {}; this.$scope.validationPattern = this.ValidationPattern; @@ -398,17 +402,17 @@ export class PropertyFormViewModel { this.$scope.$watch("forms.editForm.$invalid", (newVal) => { if (this.$scope.editPropertyModel.hasGetFunctionValue) { - this.$scope.footerButtons[0].disabled = newVal || !this.$scope.editPropertyModel.property.toscaFunction; + this.$scope.footerButtons[0].disabled = newVal || !this.$scope.editPropertyModel.property.toscaFunction || this.isViewOnly; } else { - this.$scope.footerButtons[0].disabled = newVal; + this.$scope.footerButtons[0].disabled = newVal || this.isViewOnly; } }); this.$scope.$watch("forms.editForm.$valid", (newVal) => { if (this.$scope.editPropertyModel.hasGetFunctionValue) { - this.$scope.footerButtons[0].disabled = !newVal || !this.$scope.editPropertyModel.property.toscaFunction; + this.$scope.footerButtons[0].disabled = !newVal || !this.$scope.editPropertyModel.property.toscaFunction || this.isViewOnly; } else { - this.$scope.footerButtons[0].disabled = !newVal; + this.$scope.footerButtons[0].disabled = !newVal || this.isViewOnly; } }); diff --git a/catalog-ui/src/app/view-models/forms/property-forms/component-property-form/property-form-view.html b/catalog-ui/src/app/view-models/forms/property-forms/component-property-form/property-form-view.html index 67fce08311..a6fd69755a 100644 --- a/catalog-ui/src/app/view-models/forms/property-forms/component-property-form/property-form-view.html +++ b/catalog-ui/src/app/view-models/forms/property-forms/component-property-form/property-form-view.html @@ -13,11 +13,11 @@ ~ See the License for the specific language governing permissions and ~ limitations under the License. --> - +
- Delete + Delete Previous Next @@ -38,7 +38,7 @@ @@ -88,7 +88,7 @@