[ui] Show a different message when there are no tasks in a job (#14071)

Different mesage when there are not tasks in a job
This commit is contained in:
Giovani Avelar 2022-09-02 16:20:45 -03:00 committed by GitHub
parent 98022376be
commit b5cf358212
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

3
.changelog/14071.txt Normal file
View File

@ -0,0 +1,3 @@
```release-note:improvement
ui: Display different message when trying to exec into a job with no task running.
```

View File

@ -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;