blob: 894ea853583ac67ea62bb446e76fa3a5db7e5dfc [file] [log] [blame]
- @title=collection_name @machines
- content_for :breadcrumb do
%ul.breadcrumb
%li
%a{ :href => "/cimi/cloudEntryPoint"} CloudEntryPoint
%span.divider="/"
%li.active
MachineCollection
- content_for :actions do
%p
%a{ :href => '#machineModal', :class => 'btn btn-primary', :'data-toggle' => :modal} New Machine
%div{ :id => :machineModal, :class => 'modal hide fade' }
.modal-header
%h3 Create new Machine entity
.modal-body
%form{ :action => "/cimi/machines", :method => :post }
%fieldset
.control-group
%label.control-label{ :for => 'machine[name]' } Machine Name
.controls
%input{ :type => :text, :name => 'machine[name]' }
%label.control-label{ :for => 'machine[machine_image]' } Machine Image
.controls
%select{ :name => 'machine[machine_image]' }
- @machine_images.machine_images.each do |image|
%option{ :value => image.id }=href_to_id(image.id)
%label.control-label{ :for => 'machine[machine_configuration]' } Machine Configuration
.controls
%select{ :name => 'machine[machine_configuration]' }
- @machine_configurations.machine_configurations.each do |configuration|
%option{ :value => configuration.id }=href_to_id(configuration.id)
- unless @creds.kind_of?(Array)
%label.control-label{ :for => 'machine[credential]' } Credential
.controls
%select{ :name => 'machine[credential]' }
- @creds.credentials.each do |cred|
%option{ :value => cred.id }=href_to_id(cred.id)
.modal-footer
%a{ :href => '#', :class => 'btn btn-primary', :'data-loading-text' => 'Creating Machine...', :onclick => "postModalForm(this, 'machineModal')"} Continue
%a{ :href => '#', :class => 'btn', :'data-dismiss' => 'modal'} Cancel
%p{:style => 'text-align:right;'}
%a{ :href => "#{@machines.id}?format=xml", :class => 'label warning' } XML
%a{ :href => "#{@machines.id}?format=json", :class => 'label warning' } JSON
%ul
- @machines.machines.each do |machine|
%li
%a{ :href => "/cimi/machines/#{href_to_id(machine.id)}"}=href_to_id(machine.id)
- if @machines.machines.empty?
.alert-message.block-message.warning
%p
There are no Machine entities defined for this collection.
.alert_actions
%a{ :href => '/cimi/machine/new', :class => 'btn'} Create new
- details do
- row 'ID', @machines.id
- row 'Count', @machines.count