summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/ng2/pages/properties-assignment
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-ui/src/app/ng2/pages/properties-assignment')
-rw-r--r--catalog-ui/src/app/ng2/pages/properties-assignment/properties-assignment.page.component.html2
-rw-r--r--catalog-ui/src/app/ng2/pages/properties-assignment/properties-assignment.page.component.ts9
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