Skip to content

Commit

Permalink
Merge pull request #3365 from OSC/31-bugfix
Browse files Browse the repository at this point in the history
Show app card host only for running sessions (#3363)
  • Loading branch information
johrstrom authored Feb 21, 2024
2 parents 93d3160 + 4f91b76 commit 2180cc8
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions apps/dashboard/app/views/batch_connect/sessions/card/_host.html.erb
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
<% if session.ssh_to_compute_node? %>
<p>
<strong><%= t('dashboard.batch_connect_sessions_stats_host') %></strong>
<% if session.running? && session.connect.host %>
<a href="<%= OodAppkit.shell.url(host: session.connect.host).to_s %>" target="_blank" class="btn btn-primary btn-sm fas fa-terminal">
<%= session.connect.host %>
</a>
<% else %>
<%= t('dashboard.batch_connect_sessions_stats_undetermined_host') %>
<% end %>
</p>
<% else %>
<% if session.running? %>
<% if session.ssh_to_compute_node? %>
<p>
<strong><%= t('dashboard.batch_connect_sessions_stats_host') %></strong>
<% if session.connect.host %>
<a href="<%= OodAppkit.shell.url(host: session.connect.host).to_s %>" target="_blank" class="btn btn-primary btn-sm fas fa-terminal">
<%= session.connect.host %>
</a>
<% else %>
<%= t('dashboard.batch_connect_sessions_stats_undetermined_host') %>
<% end %>
</p>
<% else %>
<p>
<strong><%= t('dashboard.batch_connect_sessions_stats_host') %></strong>
<%= session.connect.host || t('dashboard.batch_connect_sessions_stats_undetermined_host') %>
</p>
</p>
<% end %>
<% end %>

0 comments on commit 2180cc8

Please sign in to comment.