diff --git a/.changelog/14071.txt b/.changelog/14071.txt new file mode 100644 index 000000000000..b4f729dcf23f --- /dev/null +++ b/.changelog/14071.txt @@ -0,0 +1,3 @@ +```release-note:improvement +ui: Display different message when trying to exec into a job with no task running. +``` diff --git a/ui/app/controllers/exec.js b/ui/app/controllers/exec.js index 1738300d806b..0049cc1e2391 100644 --- a/ui/app/controllers/exec.js +++ b/ui/app/controllers/exec.js @@ -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;