Project

General

Profile

« Previous | Next » 

Revision a8ae8d43

Added by Ohad Levy over 11 years ago

  • ID a8ae8d437f91cb774e309aff4fb23b1637722eee

minor view improvments to vmware

- adds a console link to all vms
- adds a minimal vm details view

View differences:

app/views/compute_resources_vms/index/_vmware.html.erb
</tr>
<% @compute_resource.vms.each do |vm| -%>
<tr>
<td><%= vm.name %></td>
<td><%= link_to_if_authorized vm.name, hash_for_compute_resource_vm_path(:compute_resource_id => @compute_resource, :id => vm.identity) %></td>
<td><%= vm.cpus %></td>
<td> <%= number_to_human_size vm.memory %></td>
<td <%= vm_power_class(vm.ready?) %>> <%= vm_state(!vm.ready?) %> </td>
app/views/compute_resources_vms/show.html.erb
</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.id), :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.id), :class=>'btn btn-danger'),
link_to("Back", compute_resource_path(@compute_resource), :class=>'btn') %>
link_to_if_authorized("Console", hash_for_console_compute_resource_vm_path, {:disabled => @vm.nil? || !@vm.ready?, :class => "btn btn-info"}),
link_to("Back", compute_resource_path(@compute_resource), :class=>'btn')
%>
app/views/compute_resources_vms/show/_vmware.html.erb
<% title @vm.name %>
<div class='span12'>
<table class="table table-bordered table-striped">
<tr><th colspan="2">Properties</th></tr>
<%= prop :memory %>
<%= prop :ipaddress %>
<%= prop :cpus %>
<%= prop :hypervisor %>
</table>
</div>

Also available in: Unified diff