aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-ui
diff options
context:
space:
mode:
authorfranciscovila <javier.paradela.vila@est.tech>2023-10-04 11:34:24 +0100
committerfranciscovila <javier.paradela.vila@est.tech>2023-10-04 11:34:24 +0100
commit92919e1c189cfcc9ca063d391dadb7b51a88f9d7 (patch)
tree0fdfd671de6fca87b1ba08c3b2b67ca3047baf95 /catalog-ui
parentd37d9e6adead6a6568aafb2ac831237de32fbdca (diff)
Issues found when trying to create activities in interface operations
Issue-ID: SDC-4644 Signed-off-by: franciscovila <javier.paradela.vila@est.tech> Change-Id: Ib615973bf83b15525b8841c1560eaac9ba81ea46
Diffstat (limited to 'catalog-ui')
-rw-r--r--catalog-ui/src/app/ng2/pages/composition/interface-operatons/operation-creator/interface-operation-handler.component.html2
-rw-r--r--catalog-ui/src/app/ng2/pages/composition/interface-operatons/operation-creator/interface-operation-handler.component.ts2
-rw-r--r--catalog-ui/src/app/ng2/pages/interface-definition/interface-definition.page.component.html4
-rw-r--r--catalog-ui/src/app/ng2/pages/interface-definition/interface-definition.page.component.ts6
4 files changed, 8 insertions, 6 deletions
diff --git a/catalog-ui/src/app/ng2/pages/composition/interface-operatons/operation-creator/interface-operation-handler.component.html b/catalog-ui/src/app/ng2/pages/composition/interface-operatons/operation-creator/interface-operation-handler.component.html
index e0889c78b1..b187fa5d99 100644
--- a/catalog-ui/src/app/ng2/pages/composition/interface-operatons/operation-creator/interface-operation-handler.component.html
+++ b/catalog-ui/src/app/ng2/pages/composition/interface-operatons/operation-creator/interface-operation-handler.component.html
@@ -157,7 +157,7 @@
</select>
</div>
- <div class="group-with-border content-row">
+ <div class="group-with-border content-row" *ngIf="showActivities">
<label class="sub-operations-label"> Sub operations </label>
<tabs tabStyle="basic-tabs" [hideIndicationOnTabChange]="true" (tabChanged)="tabChanged($event)">
<div *ngFor="let milestone of milestones">
diff --git a/catalog-ui/src/app/ng2/pages/composition/interface-operatons/operation-creator/interface-operation-handler.component.ts b/catalog-ui/src/app/ng2/pages/composition/interface-operatons/operation-creator/interface-operation-handler.component.ts
index d3f02e71c1..f82ad66e08 100644
--- a/catalog-ui/src/app/ng2/pages/composition/interface-operatons/operation-creator/interface-operation-handler.component.ts
+++ b/catalog-ui/src/app/ng2/pages/composition/interface-operatons/operation-creator/interface-operation-handler.component.ts
@@ -103,6 +103,7 @@ export class InterfaceOperationHandlerComponent {
customToscaFunctions: Array<CustomToscaFunction>;
enableAddArtifactImplementation: boolean;
propertyValueValid: boolean = true;
+ showActivities: boolean = false;
inputTypeOptions: any[];
timeoutValue = new FormControl('');
timeoutType = new FormControl('');
@@ -157,6 +158,7 @@ export class InterfaceOperationHandlerComponent {
this.dataTypeService.findAllDataTypesByModel(this.modelName)
.then((dataTypesMap: Map<string, DataTypeModel>) => {
subscriber.next(dataTypesMap);
+ this.showActivities = dataTypesMap.has("tosca.dataTypes.tmf.milestoneJeopardyData");
});
});
this.dataTypeMap$.subscribe(value => {
diff --git a/catalog-ui/src/app/ng2/pages/interface-definition/interface-definition.page.component.html b/catalog-ui/src/app/ng2/pages/interface-definition/interface-definition.page.component.html
index 15fe65a784..cfdba12037 100644
--- a/catalog-ui/src/app/ng2/pages/interface-definition/interface-definition.page.component.html
+++ b/catalog-ui/src/app/ng2/pages/interface-definition/interface-definition.page.component.html
@@ -28,7 +28,7 @@
<div class="top-add-btn add-btn" [ngClass]="{'disabled': readonly}" *ngIf="!component.isService()" data-tests-id="add-operation" (click)="onSelectInterfaceOperation(undefined, undefined)">
{{ 'INTERFACE_ADD_OPERATION' | translate }}
</div>
- <div class="operation-list">
+ <div class="operation-list" *ngIf="!this.component.isService() || this.enableFlag || this.selectedInstanceData && !this.selectedInstanceData.name === 'SELF'">
<div *ngIf="!isInterfaceListEmpty()">
<div class="expand-collapse" *ngIf="isOperationListEmpty()">
<a class="link"
@@ -87,7 +87,7 @@
</div>
</div>
<div class="right-column" *ngIf="component.isService()">
- <div class="add-btn" [ngClass]="{'disabled': disableFlag}" data-tests-id="add-operation" (click)="onSelectInterfaceOperation(undefined, undefined)">
+ <div class="add-btn" [ngClass]="{'disabled': !enableFlag}" data-tests-id="add-operation" (click)="onSelectInterfaceOperation(undefined, undefined)">
{{ 'INTERFACE_ADD_OPERATION' | translate }}
</div>
<tabs #hierarchyNavTabs tabStyle="simple-tabs" class="gray-border">
diff --git a/catalog-ui/src/app/ng2/pages/interface-definition/interface-definition.page.component.ts b/catalog-ui/src/app/ng2/pages/interface-definition/interface-definition.page.component.ts
index 4ada629cea..4a2ad8abdb 100644
--- a/catalog-ui/src/app/ng2/pages/interface-definition/interface-definition.page.component.ts
+++ b/catalog-ui/src/app/ng2/pages/interface-definition/interface-definition.page.component.ts
@@ -139,7 +139,7 @@ export class InterfaceDefinitionComponent {
loadingInstances: boolean = false;
selectedInstanceData: any = null;
hierarchyInstancesDisplayOptions: HierarchyDisplayOptions = new HierarchyDisplayOptions('uniqueId', 'name', 'archived', null, 'iconClass');
- disableFlag : boolean = true;
+ enableFlag : boolean = false;
deploymentArtifactsFilePath: Array<DropdownValue> = [];
@@ -241,7 +241,7 @@ export class InterfaceDefinitionComponent {
this.interfaces = [];
this.selectedInstanceData = instance;
if (instance.name != "SELF") {
- this.disableFlag = !this.isAllowAddOperation(instance.originType);
+ this.enableFlag = this.isAllowAddOperation(instance.originType);
if (!instance.interfaces) {
return;
}
@@ -284,7 +284,7 @@ export class InterfaceDefinitionComponent {
}
this.interfaces = newInterfaces.map((interf) => new UIInterfaceModel(interf));
} else {
- this.disableFlag = true;
+ this.enableFlag = false;
this.interfaces = this.serviceInterfaces.map((interf) => new UIInterfaceModel(interf));
}
this.sortInterfaces();