aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/view-models
diff options
context:
space:
mode:
authoraribeiro <anderson.ribeiro@est.tech>2021-04-14 15:43:59 +0100
committerChristophe Closset <christophe.closset@intl.att.com>2021-04-19 12:54:21 +0000
commita82ac17a702339bdb1af830a6581e3b30b3f5ec1 (patch)
tree94a4e46295a0e4245342a8812de425618cb8dc17 /catalog-ui/src/app/view-models
parentb451083f7db8144822118613076c05ea8b25898f (diff)
Fix add property to a VFC
Added properties to a VFC were not being displayed on the UI Issue-ID: SDC-3559 Signed-off-by: aribeiro <anderson.ribeiro@est.tech> Change-Id: Iede582ada4a25ddfb8f5ca5936c71e5c2b25e50b
Diffstat (limited to 'catalog-ui/src/app/view-models')
-rw-r--r--catalog-ui/src/app/view-models/forms/property-forms/component-property-form/property-form-view-model.ts16
-rw-r--r--catalog-ui/src/app/view-models/workspace/tabs/properties/properties.less3
2 files changed, 9 insertions, 10 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 609997ca19..c63dd8a208 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
@@ -260,7 +260,6 @@ export class PropertyFormViewModel {
};
let onPropertySuccess = (propertyFromBE:PropertyModel):void => {
- console.info('onPropertyResourceSuccess : ', propertyFromBE);
this.$scope.isLoading = false;
this.filteredProperties[this.$scope.currentPropertyIndex] = propertyFromBE;
if (!doNotCloseModal) {
@@ -410,19 +409,18 @@ export class PropertyFormViewModel {
});
};
- private addOrUpdateProperty = (property:PropertyModel):Observable<PropertyModel> => {
+ private addOrUpdateProperty = (property: PropertyModel): Observable<PropertyModel> => {
if (!property.uniqueId) {
- let onSuccess = (property:PropertyModel):PropertyModel => {
- let newProperty = new PropertyModel(property);
+ let onSuccess = (newProperty: PropertyModel): PropertyModel => {
this.filteredProperties.push(newProperty);
return newProperty;
};
- return this.topologyTemplateService.addProperty(this.workspaceService.metadata.componentType, this.workspaceService.metadata.uniqueId, property).map(onSuccess);
- }
- else {
- let onSuccess = (newProperty:PropertyModel):PropertyModel => {
+ return this.topologyTemplateService.addProperty(this.workspaceService.metadata.componentType, this.workspaceService.metadata.uniqueId, property)
+ .map(onSuccess);
+ } else {
+ let onSuccess = (newProperty: PropertyModel): PropertyModel => {
// find exist instance property in parent component for update the new value ( find bu uniqueId )
- let existProperty:PropertyModel = <PropertyModel>_.find(this.filteredProperties, {uniqueId: newProperty.uniqueId});
+ let existProperty: PropertyModel = <PropertyModel>_.find(this.filteredProperties, {uniqueId: newProperty.uniqueId});
let propertyIndex = this.filteredProperties.indexOf(existProperty);
this.filteredProperties[propertyIndex] = newProperty;
return newProperty;
diff --git a/catalog-ui/src/app/view-models/workspace/tabs/properties/properties.less b/catalog-ui/src/app/view-models/workspace/tabs/properties/properties.less
index 48c462e143..0797126cb8 100644
--- a/catalog-ui/src/app/view-models/workspace/tabs/properties/properties.less
+++ b/catalog-ui/src/app/view-models/workspace/tabs/properties/properties.less
@@ -60,7 +60,8 @@
}
.table{
- height:490px;
+ height: 100%;
+ min-height: 500px;
margin-bottom: 0;
}