Skip to content
This repository was archived by the owner on May 14, 2025. It is now read-only.

Commit 71f5856

Browse files
committed
Fix stop execution action at execution detail page
- Use correct task execution value - Fix formatting of the header actions by using shorter label names on buttons
1 parent 7be1a02 commit 71f5856

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

ui/src/app/tasks/task-execution/task-execution.component.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,19 @@
1111
<button name="task-view" type="button" id="task-view"
1212
(click)="detailsTask(task.task.taskName)" class="btn btn-primary btn-fa" title="View details task">
1313
<span class="fa fa-info-circle"></span>
14-
View task details
14+
Details
1515
</button>
1616
<button name="task-launch" type="button" id="task-launch"
1717
(click)="launch(task.task.taskName)" class="btn btn-primary btn-fa" title="Relaunch the task"
1818
[dataflowAppRoles]="['ROLE_CREATE']">
1919
<span class="fa fa-play"></span>
20-
Relaunch task
20+
Relaunch
2121
</button>
2222
<button name="task-launch" type="button" id="task-stop"
23-
(click)="stop(taskExecution)" class="btn btn-primary btn-fa" title="Stop the task execution"
24-
[dataflowAppRoles]="['ROLE_CREATE']" [disabled]="!isRunning(taskExecution)">
23+
(click)="stop(task.task)" class="btn btn-primary btn-fa" title="Stop the task execution"
24+
[dataflowAppRoles]="['ROLE_CREATE']" [disabled]="!isRunning(task.task)">
2525
<span class="fa fa-stop"></span>
26-
Stop execution
26+
Stop
2727
</button>
2828
</app-page-head-actions>
2929
</app-page-head>

ui/src/app/tasks/task-executions-stop/task-executions-stop.component.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,10 @@ describe('TaskExecutionsStopComponent', () => {
9797
expect(spy).toHaveBeenCalledWith(mock);
9898
});
9999

100-
it('Should display a message after stop one task', (() => {
100+
it('Should display a message after stop request submitted for one task', (() => {
101101
const bt: HTMLElement = fixture.debugElement.query(By.css('#btn-stop')).nativeElement;
102102
bt.click();
103-
expect(notificationService.testSuccess[0]).toContain('1 task execution(s) stopped.');
103+
expect(notificationService.testSuccess[0]).toContain('Request submitted to stop 1 task execution(s)');
104104
}));
105105

106106
it('Should close the modal after a success stop', (() => {
@@ -162,7 +162,7 @@ describe('TaskExecutionsStopComponent', () => {
162162
it('Should display a message after stop 2 tasks', (() => {
163163
const bt: HTMLElement = fixture.debugElement.query(By.css('#btn-stop')).nativeElement;
164164
bt.click();
165-
expect(notificationService.testSuccess[0]).toContain('2 task execution(s) stopped.');
165+
expect(notificationService.testSuccess[0]).toContain('Request submitted to stop 2 task execution(s).');
166166
}));
167167

168168
it('Should close the modal after a success destroy', (() => {

ui/src/app/tasks/task-executions-stop/task-executions-stop.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export class TaskExecutionsStopComponent extends Modal implements OnDestroy {
7070
this.tasksService.stopExecutions(this.taskExecutions)
7171
.pipe(takeUntil(this.ngUnsubscribe$), finalize(() => this.blockerService.unlock()))
7272
.subscribe((data) => {
73-
this.notificationService.success(`${data.length} task execution(s) stopped.`);
73+
this.notificationService.success(`Request submitted to stop ${data.length} task execution(s).`);
7474
this.confirm.emit('done');
7575
this.cancel();
7676
}, () => {

0 commit comments

Comments
 (0)