From 6bd9962a9cbd9aa5cc4187b3f8454270fb1e0c61 Mon Sep 17 00:00:00 2001 From: Giovani Avelar Date: Sun, 7 Aug 2022 19:44:12 -0300 Subject: [PATCH] Different mesage when there are not tasks in a job --- ui/app/controllers/exec.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ui/app/controllers/exec.js b/ui/app/controllers/exec.js index 1738300d806b..c3d9acf00d69 100644 --- a/ui/app/controllers/exec.js +++ b/ui/app/controllers/exec.js @@ -47,7 +47,14 @@ 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( + 'Run a job and then select a task to start your session.' + ); + } } @alias('model.allocations') allocations;