From 84a51513bca9c41c8757db017eb45b2d801da195 Mon Sep 17 00:00:00 2001 From: xuegao Date: Fri, 4 Sep 2020 15:29:15 +0200 Subject: Use meaningful workflow name When generate csar, use meaningful workflow name instead of null. Issue-ID: SDC-3230 Signed-off-by: xuegao Change-Id: I250e2f928aa33b2da86a7c458c098713c43a5074 --- catalog-ui/src/app/models/operation.ts | 8 ++++++++ .../operation-creator/operation-creator.component.ts | 6 ++++++ 2 files changed, 14 insertions(+) (limited to 'catalog-ui/src') diff --git a/catalog-ui/src/app/models/operation.ts b/catalog-ui/src/app/models/operation.ts index 30095b92ef..3d4917fd45 100644 --- a/catalog-ui/src/app/models/operation.ts +++ b/catalog-ui/src/app/models/operation.ts @@ -42,6 +42,8 @@ export class BEOperationModel { workflowAssociationType: string; workflowId: string; workflowVersionId: string; + workflowName: string; + workflowVersion: string; implementation?: { artifactName: string; @@ -60,6 +62,8 @@ export class BEOperationModel { this.workflowAssociationType = operation.workflowAssociationType; this.workflowId = operation.workflowId; this.workflowVersionId = operation.workflowVersionId; + this.workflowName = operation.workflowName; + this.workflowVersion = operation.workflowVersion; this.implementation = operation.implementation || {}; } } @@ -94,6 +98,8 @@ export class OperationModel extends BEOperationModel{ workflowId: string; workflowVersionId: string; + workflowName: string; + workflowVersion: string; protected OperationTypeEnum: Array = [ 'Create', @@ -117,6 +123,8 @@ export class OperationModel extends BEOperationModel{ this.workflowVersionId = operation.workflowVersionId; this.artifactFileName = operation.artifactFileName; this.artifactData = operation.artifactData; + this.workflowName = operation.workflowName; + this.workflowVersion = operation.workflowVersion; } } diff --git a/catalog-ui/src/app/ng2/pages/interface-operation/operation-creator/operation-creator.component.ts b/catalog-ui/src/app/ng2/pages/interface-operation/operation-creator/operation-creator.component.ts index 23b678177f..1e217f10d4 100644 --- a/catalog-ui/src/app/ng2/pages/interface-operation/operation-creator/operation-creator.component.ts +++ b/catalog-ui/src/app/ng2/pages/interface-operation/operation-creator/operation-creator.component.ts @@ -339,6 +339,11 @@ export class OperationCreatorComponent implements OperationCreatorInput { this.assignInputParameters[this.operation.workflowId] = {}; this.assignOutputParameters[this.operation.workflowId] = {}; } + this.operation.workflowName = workflowId.label; + if (!this.assignInputParameters[this.operation.workflowName]) { + this.assignInputParameters[this.operation.workflowName] = {}; + this.assignOutputParameters[this.operation.workflowName] = {}; + } this.isLoading = true; this.validityChanged(); @@ -366,6 +371,7 @@ export class OperationCreatorComponent implements OperationCreatorInput { ); if (!selectedVersionId && this.workflowVersions.length) { this.operation.workflowVersionId = _.last(this.workflowVersions).value; + this.operation.workflowVersion = _.last(this.workflowVersions).label; } this.changeWorkflowVersion(new DropDownOption(this.operation.workflowVersionId)); -- cgit 1.2.3-korg