-
Notifications
You must be signed in to change notification settings - Fork 992
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixes #22467 - dashboard: list hosts in build mode
- Loading branch information
1 parent
d5f2f1d
commit bde92a1
Showing
8 changed files
with
58 additions
and
5 deletions.
There are no files selected for viewing
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
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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<% hosts = @data.hosts.in_build_mode.or(@data.hosts.with_build_errors).includes(:token).preload(:owner).order(created_at: :desc).limit(9) %> | ||
|
||
<h4 class="header"> | ||
<%= _('Hosts in Build mode or with Build errors') %> | ||
</h4> | ||
|
||
<% if hosts.empty? %> | ||
<p class="ca"><%= icon_text('ok', '', kind: 'pficon') %></span><%= _('No Hosts are in build mode or have build errors.') %></p> | ||
<% else %> | ||
<%= render :partial => 'hosts_in_build_mode_widget_host_list', :locals => { :hosts => hosts } %> | ||
<% end %> |
18 changes: 18 additions & 0 deletions
18
app/views/dashboard/_hosts_in_build_mode_widget_host_list.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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<table class="<%= table_css_classes('table-fixed') %>"> | ||
<thead> | ||
<th width="40%"><%= _('Host') %></th> | ||
<th><%= _('Owner') %></th> | ||
<th><%= _('Build Duration') %></th> | ||
<th><%= _('Token Expiry') %></th> | ||
</thead> | ||
<tbody> | ||
<% hosts.each do |host| %> | ||
<tr> | ||
<td class="ellipsis"><%= host_build_status_icon(host) %> <%= link_to host.name, host_path(host) %></td> | ||
<td class="hidden-tablet hidden-xs ellipsis"><%= host.owner %></td> | ||
<td class="hidden-tablet hidden-xs ellipsis"><%= build_duration(host) %></td> | ||
<td class="hidden-tablet hidden-xs ellipsis"><%= host.token ? date_time_relative_value(host.token.expires) : _('N/A') %></td> | ||
</tr> | ||
<% end %> | ||
</tbody> | ||
</table> |
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