Project

General

Profile

« Previous | Next » 

Revision 3146fd86

Added by Oleh Fedorenko over 1 year ago

Fixes #35621 - Make power status a selectable column

View differences:

app/views/hosts/_list.html.erb
<thead>
<tr>
<th class="ca" width="40px"><%= check_box_tag "check_all", "", false, { :onchange => "tfm.hosts.table.toggleCheck()", :'check-title' => _("Select all items on this page"), :'uncheck-title'=> _("items selected. Uncheck to Clear") } %></th>
<% if power_status_visible? %>
<th class="ca" width="80px"><%= _('Power') %></th>
<% end %>
<th hidden="true" class="ca" width="80px"><%= _('Power') %></th>
<%= render_pagelets_for(:hosts_table_column_header) %>
<th hidden="true" width="25%"><%= sort :name, :as => _('Name') %></th>
<th hidden="true" class="hidden-xs" width="17%"><%= sort :os_title, :as => _("Operating system") %></th>
......
<td class="ca">
<%= check_box_tag "host_ids[]", nil, false, :id => "host_ids_#{host.id}", :class => 'host_select_boxes', :onclick => 'tfm.hosts.table.hostChecked(this)' %>
</td>
<% if power_status_visible? %>
<td class="ca">
<%= react_component('PowerStatus', id: host.id, url: power_api_host_path(host)) %>
</td>
<% end %>
<td hidden="true" class="ca">
<%= react_component('PowerStatus', id: host.id, url: power_api_host_path(host)) %>
</td>
<%= render_pagelets_for(:hosts_table_column_content, :subject => host) %>
<td hidden="true" class="ellipsis"><%= name_column(host) %></td>
<td hidden="true" class="hidden-xs ellipsis"><%= (icon(host.operatingsystem, :size => "16x16") + " #{host.operatingsystem.to_label}").html_safe if host.operatingsystem %></td>

Also available in: Unified diff