From 4f91b766a1c70130a3be86fe44aae770619e5a9a Mon Sep 17 00:00:00 2001 From: Robin Karlsson <61623634+robinkar@users.noreply.github.com> Date: Tue, 20 Feb 2024 17:37:59 +0200 Subject: [PATCH] Show app card host only for running sessions (#3363) --- .../sessions/card/_host.html.erb | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/apps/dashboard/app/views/batch_connect/sessions/card/_host.html.erb b/apps/dashboard/app/views/batch_connect/sessions/card/_host.html.erb index a05bd7f90c..32f1673afd 100644 --- a/apps/dashboard/app/views/batch_connect/sessions/card/_host.html.erb +++ b/apps/dashboard/app/views/batch_connect/sessions/card/_host.html.erb @@ -1,17 +1,19 @@ -<% if session.ssh_to_compute_node? %> -
- <%= t('dashboard.batch_connect_sessions_stats_host') %> - <% if session.running? && session.connect.host %> - - <%= session.connect.host %> - - <% else %> - <%= t('dashboard.batch_connect_sessions_stats_undetermined_host') %> - <% end %> -
-<% else %> +<% if session.running? %> + <% if session.ssh_to_compute_node? %> ++ <%= t('dashboard.batch_connect_sessions_stats_host') %> + <% if session.connect.host %> + + <%= session.connect.host %> + + <% else %> + <%= t('dashboard.batch_connect_sessions_stats_undetermined_host') %> + <% end %> +
+ <% else %><%= t('dashboard.batch_connect_sessions_stats_host') %> <%= session.connect.host || t('dashboard.batch_connect_sessions_stats_undetermined_host') %> -
+ + <% end %> <% end %>