-
{{ 'workflow_create' | translate }}
-
-
-
-
-
-
-
-
{{'common_workflow' | translate}}
-
{{'workflow_wizard_description' | translate}}
-
-
-
-
-
-
{{'common_pipeline' | translate}}
-
{{'pipeline_wizard_description' | translate}}
-
-
-
-
-
+
+
+
+
+
+
+
+
diff --git a/ui/src/app/views/workflow/add/workflow.add.scss b/ui/src/app/views/workflow/add/workflow.add.scss
index 209216f98c..3870a0bc1b 100644
--- a/ui/src/app/views/workflow/add/workflow.add.scss
+++ b/ui/src/app/views/workflow/add/workflow.add.scss
@@ -6,23 +6,38 @@
align-content: stretch;
height: 100%;
+ .nzSegment {
+ padding: 10px;
+ }
+
h2 {
text-align: center;
}
- .red {
- color: #9F3A38;
+ nz-row {
+ margin-top: 10px;
}
- .ui.active.inline.loader {
- margin-right: 5px;
+ nz-button-group {
+ width: 100%;
+ text-align: center;
+
+ button {
+ width: 300px;
+ }
}
- .mt5 {
- margin-top: 5px;
+ nz-form-item.alignCenter {
+ text-align: center;
}
- .resync {
- margin-top: 1.6em;
+ nz-form-item.alignRight {
+ text-align: right;
+ button {
+ margin-left: 10px;
+ }
+ }
+ hr {
+ margin-bottom: 20px;
}
}
diff --git a/ui/src/app/views/workflow/workflow.component.ts b/ui/src/app/views/workflow/workflow.component.ts
index 5ea4250f50..a59dac0270 100644
--- a/ui/src/app/views/workflow/workflow.component.ts
+++ b/ui/src/app/views/workflow/workflow.component.ts
@@ -4,7 +4,6 @@ import {
Component,
OnDestroy,
OnInit,
- ViewChild,
} from '@angular/core';
import { ActivatedRoute, NavigationStart, Router } from '@angular/router';
import { TranslateService } from '@ngx-translate/core';
@@ -16,7 +15,6 @@ import { WorkflowCoreService } from 'app/service/workflow/workflow.core.service'
import { AsCodeSaveModalComponent } from 'app/shared/ascode/save-modal/ascode.save-modal.component';
import { AutoUnsubscribe } from 'app/shared/decorator/autoUnsubscribe';
import { ToastService } from 'app/shared/toast/ToastService';
-import { WorkflowTemplateApplyModalComponent } from 'app/shared/workflow-template/apply-modal/workflow-template.apply-modal.component';
import { AddFeatureResult, FeaturePayload } from 'app/store/feature.action';
import { ProjectState, ProjectStateModel } from 'app/store/project.state';
import {
@@ -30,6 +28,9 @@ import { WorkflowState } from 'app/store/workflow.state';
import { Observable, Subscription } from 'rxjs';
import { finalize } from 'rxjs/operators';
import { NzModalService } from 'ng-zorro-antd/modal';
+import {
+ WorkflowTemplateApplyModalComponent
+} from 'app/shared/workflow-template/apply-modal/workflow-template.apply-modal.component';
@Component({
@@ -40,8 +41,6 @@ import { NzModalService } from 'ng-zorro-antd/modal';
})
@AutoUnsubscribe()
export class WorkflowComponent implements OnInit, OnDestroy {
- @ViewChild('templateApplyModal')
- templateApplyModal: WorkflowTemplateApplyModalComponent;
project: Project;
@@ -211,9 +210,16 @@ export class WorkflowComponent implements OnInit, OnDestroy {
}
showTemplateFrom(): void {
- if (this.templateApplyModal) {
- this.templateApplyModal.show();
- }
+ this._modalService.create({
+ nzTitle: 'Update workflow from template',
+ nzWidth: '1100px',
+ nzContent: WorkflowTemplateApplyModalComponent,
+ nzComponentParams: {
+ projectIn: this.project,
+ workflowIn: this.workflow
+ },
+ nzFooter: null
+ });
}
initTemplateFromWorkflow(): void {
diff --git a/ui/src/app/views/workflow/workflow.html b/ui/src/app/views/workflow/workflow.html
index 4d5f10a9ea..79c63d1943 100644
--- a/ui/src/app/views/workflow/workflow.html
+++ b/ui/src/app/views/workflow/workflow.html
@@ -79,10 +79,6 @@
-
-
-
-