Skip to content

Commit

Permalink
Typo fix
Browse files Browse the repository at this point in the history
  • Loading branch information
philrenaud committed Mar 17, 2023
1 parent eddd430 commit ba6f522
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions ui/app/components/job-page/parts/title.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@ export default class Title extends Component {
handleError() {}

/**
* @param {boolean} withNNotifications - Whether to show a toast on success, as when triggered by keyboard shortcut
* @param {boolean} withNotifications - Whether to show a toast on success, as when triggered by keyboard shortcut
*/
@task(function* (withNNotifications = false) {
@task(function* (withNotifications = false) {
try {
const job = this.job;
yield job.stop();
// Eagerly update the job status to avoid flickering
this.job.set('status', 'dead');
if (withNNotifications) {
job.set('status', 'dead');
if (withNotifications) {
this.notifications.add({
title: 'Job Stopped',
message: `${this.job.name} has been stopped`,
message: `${job.name} has been stopped`,
color: 'success',
});
}
Expand All @@ -48,7 +48,7 @@ export default class Title extends Component {
yield job.purge();
this.notifications.add({
title: 'Job Purged',
message: `You have purged ${this.job.name}`,
message: `You have purged ${job.name}`,
color: 'success',
});
this.router.transitionTo('jobs');
Expand Down Expand Up @@ -79,7 +79,7 @@ export default class Title extends Component {
if (withNotifications) {
this.notifications.add({
title: 'Job Started',
message: `${this.job.name} has started`,
message: `${job.name} has started`,
color: 'success',
});
}
Expand Down

0 comments on commit ba6f522

Please sign in to comment.