diff options
author | andre.schmid <andre.schmid@est.tech> | 2021-10-13 16:01:51 +0100 |
---|---|---|
committer | andre.schmid <andre.schmid@est.tech> | 2021-10-21 17:07:40 +0100 |
commit | 68eed7997aab4aa4f785085303aab61cf8e16a31 (patch) | |
tree | 119f4857936e217a063ce5342134b2ce11a6f3c6 /catalog-ui/src/app/ng2/pages/properties-assignment | |
parent | cef866edcf8a14ede6762297dd9ab04b1f3d0375 (diff) |
Make Service base type optional
Issue-ID: SDC-3759
Change-Id: I8adf112966ee9303fc965a74cec7203274acd735
Signed-off-by: andre.schmid <andre.schmid@est.tech>
Diffstat (limited to 'catalog-ui/src/app/ng2/pages/properties-assignment')
2 files changed, 9 insertions, 2 deletions
diff --git a/catalog-ui/src/app/ng2/pages/properties-assignment/properties-assignment.page.component.html b/catalog-ui/src/app/ng2/pages/properties-assignment/properties-assignment.page.component.html index b54cbc97c2..747624a03f 100644 --- a/catalog-ui/src/app/ng2/pages/properties-assignment/properties-assignment.page.component.html +++ b/catalog-ui/src/app/ng2/pages/properties-assignment/properties-assignment.page.component.html @@ -87,7 +87,7 @@ </div> <div class="right-column"> <div *ngIf="!isReadonly && !isInputsTabSelected" class="add-btn" - (click)="addProperty(component.model)" data-tests-id="properties-add-button" [ngClass]="{'disabled': !isSelf()}">Add Property</div> + (click)="addProperty(component.model)" data-tests-id="properties-add-button" [ngClass]="{'disabled': !showAddProperties()}">Add Property</div> <div *ngIf="!isReadonly && isInputsTabSelected" class="add-btn" (click)="addInput()" [ngClass]="{'disabled': !isSelf()}">Add Input</div> <tabs #hierarchyNavTabs tabStyle="simple-tabs" class="gray-border"> diff --git a/catalog-ui/src/app/ng2/pages/properties-assignment/properties-assignment.page.component.ts b/catalog-ui/src/app/ng2/pages/properties-assignment/properties-assignment.page.component.ts index 09fd888755..e0a1cbf8ff 100644 --- a/catalog-ui/src/app/ng2/pages/properties-assignment/properties-assignment.page.component.ts +++ b/catalog-ui/src/app/ng2/pages/properties-assignment/properties-assignment.page.component.ts @@ -38,6 +38,7 @@ import { PropertyBEModel, PropertyFEModel, PropertyInputDetail, + Service, SimpleFlatProperty } from "app/models"; import {ResourceType} from "app/utils"; @@ -67,7 +68,6 @@ import {ToscaPresentationData} from "../../../models/tosca-presentation"; import {Observable} from "rxjs"; import {ToscaGetFunctionType} from "../../../models/tosca-get-function-type.enum"; import {TranslateService} from "../../shared/translator/translate.service"; -import {Model} from '../../../models/model'; const SERVICE_SELF_TITLE = "SELF"; @Component({ @@ -250,6 +250,13 @@ export class PropertiesAssignmentComponent { return this.selectedInstanceData && this.selectedInstanceData.uniqueId == this.component.uniqueId; } + showAddProperties = (): boolean => { + if (this.component.isService() && !(<Service>this.component).isSubstituteCandidate()) { + return false; + } + return this.isSelf(); + } + getServiceProperties() { this.loadingProperties = true; this.topologyTemplateService |