Project

General

Profile

Download (1.16 KB) Statistics
| Branch: | Tag: | Revision:
<% title "Guests on #{@hypervisor}" %>

<table class="table table-bordered">
<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>
<td> <%= link_to_if_authorized guest, hash_for_hypervisor_guest_path(:hypervisor_id => @hypervisor, :id => guest) %> </td>
<td> <%= guest.vcpu %> </td>
<td> <%= number_to_human_size guest.memory*1024 %> </td>
<td> <%= guest.interface.device rescue "N/A" %> </td>
<td> <%= guest.volume.size %> GB </td>
<td> <%= guest.volume.pool %> </td>
<td <%= power_class(guest.running?)%>> <%= state(!guest.running?) %> </td>
<td>
<%= action_buttons(power_action(guest),
display_delete_if_authorized(hash_for_hypervisor_guest_path(:hypervisor_id => @hypervisor, :id => guest))) %>
</td>
</tr>
<% end -%>
</table>

<p>
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
</p>

<%= page_entries_info @guests %>
<%= will_paginate @guests %>
(1-1/2)