summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/view-models/forms/property-forms/component-property-form/property-form-view-model.ts
diff options
context:
space:
mode:
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.ts13
1 files changed, 13 insertions, 0 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 8b9acbcab7..ee2e94f934 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
@@ -23,6 +23,7 @@ import {
PROPERTY_TYPES, ModalsHandler, ValidationUtils, PROPERTY_VALUE_CONSTRAINTS, FormState, PROPERTY_DATA} from "app/utils";
import {DataTypesService} from "app/services";
import {PropertyModel, DataTypesMap, Component} from "app/models";
+import {ComponentInstance} from "../../../../models/componentsInstances/componentInstance";
export interface IEditPropertyModel {
property:PropertyModel;
@@ -50,6 +51,7 @@ interface IPropertyFormViewModelScope extends ng.IScope {
isTypeDataType:boolean;
maxLength:number;
isPropertyValueOwner:boolean;
+ isVnfConfiguration:boolean;
validateJson(json:string):boolean;
save(doNotCloseModal?:boolean):void;
@@ -192,6 +194,17 @@ export class PropertyFormViewModel {
this.$scope.isPropertyValueOwner = this.isPropertyValueOwner;
this.initEditPropertyModel();
+ //check if property of VnfConfiguration
+ this.$scope.isVnfConfiguration = false;
+ if(angular.isArray(this.component.componentInstances)) {
+ var componentPropertyOwner:ComponentInstance = this.component.componentInstances.find((ci:ComponentInstance) => {
+ return ci.uniqueId === this.property.resourceInstanceUniqueId;
+ });
+ if (componentPropertyOwner.componentName === 'vnfConfiguration') {
+ this.$scope.isVnfConfiguration = true;
+ }
+ }
+
this.$scope.nonPrimitiveTypes = _.filter(Object.keys(this.$scope.dataTypes), (type:string)=> {
return this.$scope.editPropertyModel.types.indexOf(type) == -1;
});