Skip to content

Commit

Permalink
[ui] Show a different message when there are no tasks in a job (#14071)
Browse files Browse the repository at this point in the history
Different mesage when there are not tasks in a job
  • Loading branch information
geovannyAvelar committed Sep 2, 2022
1 parent df043d7 commit fe9e453
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .changelog/14071.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:improvement
ui: Display different message when trying to exec into a job with no task running.
```
7 changes: 6 additions & 1 deletion ui/app/controllers/exec.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,12 @@ export default class ExecController extends Controller {
window.execTerminal = this.terminal; // Issue to improve: https://github.com/hashicorp/nomad/issues/7457

this.terminal.write(ANSI_UI_GRAY_400);
this.terminal.writeln('Select a task to start your session.');

if (this.sortedTaskGroups.length > 0) {
this.terminal.writeln('Select a task to start your session.');
} else {
this.terminal.writeln(`There are no tasks running for this job.`);
}
}

@alias('model.allocations') allocations;
Expand Down

0 comments on commit fe9e453

Please sign in to comment.