foreman/app/views/hypervisors/guests/index.html.erb @ 82e47ae0
b3f525e2 | Ohad Levy | <% title "Guests on #{@hypervisor}" %>
|
|
82e47ae0 | Amos Benari | <table class="table table-bordered">
|
|
b3f525e2 | Ohad Levy | <th> Name </th>
|
|
<th> CPUs </th>
|
|||
<th> Memory </th>
|
|||
<th> NIC </th>
|
|||
<th> Disk </th>
|
|||
<th> Storage </th>
|
|||
<th> Power </th>
|
|||
<th></th>
|
|||
<% @guests.each do |guest| -%>
|
|||
<tr>
|
|||
35bed1a6 | Ohad Levy | <td> <%= link_to_if_authorized guest, hash_for_hypervisor_guest_path(:hypervisor_id => @hypervisor, :id => guest) %> </td>
|
|
b3f525e2 | Ohad Levy | <td> <%= guest.vcpu %> </td>
|
|
<td> <%= number_to_human_size guest.memory*1024 %> </td>
|
|||
a7ab36f3 | Ohad Levy | <td> <%= guest.interface.device rescue "N/A" %> </td>
|
|
b3f525e2 | Ohad Levy | <td> <%= guest.volume.size %> GB </td>
|
|
<td> <%= guest.volume.pool %> </td>
|
|||
05ab4c16 | Ohad Levy | <td <%= power_class(guest.running?)%>> <%= state(!guest.running?) %> </td>
|
|
200e91c8 | Ohad Levy | <td>
|
|
82e47ae0 | Amos Benari | <%= action_buttons(power_action(guest),
|
|
display_delete_if_authorized(hash_for_hypervisor_guest_path(:hypervisor_id => @hypervisor, :id => guest))) %>
|
|||
200e91c8 | Ohad Levy | </td>
|
|
b3f525e2 | Ohad Levy | </tr>
|
|
<% end -%>
|
|||
</table>
|
|||
200e91c8 | Ohad Levy | <p>
|
|
a7ab36f3 | Ohad Levy | Total of <%= number_to_human_size @guests.delete_if{|g| !g.running?}.sum {|g| g.memory*1024} %> / <%= number_to_human_size @hypervisor.memory * 1024 %> memory used
|
|
200e91c8 | Ohad Levy | </p>
|
|
b3f525e2 | Ohad Levy | <%= page_entries_info @guests %>
|
|
<%= will_paginate @guests %>
|