-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3365 from OSC/31-bugfix
Show app card host only for running sessions (#3363)
- Loading branch information
Showing
1 changed file
with
15 additions
and
13 deletions.
There are no files selected for viewing
28 changes: 15 additions & 13 deletions
28
apps/dashboard/app/views/batch_connect/sessions/card/_host.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 %> |