Project

General

Profile

Download (1.95 KB) Statistics
| Branch: | Tag: | Revision:
<% title @vm.name %>

<div class='row'>
<div class='span12'>
<table class="table table-bordered table-striped">
<tr><th colspan="2">Properties</th></tr>
<tr>
<td>Name</td>
<td><%= @vm.name %></td>
</tr>

<tr>
<td>Machine Type</td>
<td><%= @vm.domain_type %> / <%= @vm.arch %></td>
</tr>

<tr>
<td>VCPU(s)</td>
<td><%= @vm.cpus %></td>
</tr>

<tr>
<td>UUID</td>
<td><%= @vm.uuid %></td>
</tr>
<tr>
<td>Memory</td>
<td><%= number_to_human_size @vm.max_memory_size*1024 %> <%= "(Allocated: #{number_to_human_size @vm.memory_size*1024})" %></td>
</tr>

<tr>
<td>Display</td>
<td><%= @vm.display[:type] %> (<%= @vm.display[:port] %>)</td>
</tr>
<% @vm.nics.each do |nic| -%>
<tr>
<td>NIC</td>
<td><%= "#{nic.bridge} - #{nic.mac} (#{nic.model})" %></td>
</tr>
<% end -%>

<% @vm.volumes.each do |vol| -%>
<tr>
<td>Disk</td>
<td><%= "using #{vol.allocation} GB out of #{vol.capacity} GB (#{vol.pool_name} storage pool - #{vol.path})" %></td>
</tr>
<% end -%>

<tr>
<td>Running on</td>
<td><%= link_to @compute_resource, compute_resource_path(@compute_resource) %></td>
</tr>
</table>
</div>
</div>
<% title_actions display_link_if_authorized("Power#{state(@vm.ready?)}", hash_for_power_compute_resource_vm_path(:compute_resource_id => @compute_resource, :id => @vm.uuid), :confirm => 'Are you sure?', :method => :put, :class=>'btn ' + (@vm.ready? ? "btn-danger" : "btn-success")),
display_delete_if_authorized(hash_for_compute_resource_vm_path(:compute_resource_id => @compute_resource, :id => @vm.uuid), :class=>'btn btn-danger'),
display_link_if_authorized("Other VMs on #{@compute_resource}", hash_for_compute_resource_vms_path(:compute_resource_id => @compute_resource), :class=>'btn') %>
(1-1/2)