app/views/ems_infra/scaledown.html.haml
= render :partial => "layouts/flash_msg"
= form_tag('/ems_infra/scaledown', :method => :post)
= hidden_field_tag('id', @infra.id)
- unless @stack.nil?
.form-horizontal
.form-group
%label.col-md-2.control-label
= _('Orchestration Stack')
.col-md-8
= @stack.name
.form-group
%label.col-md-2.control-label
= _('Number of Compute Hosts')
.col-md-8
= @compute_hosts.count
%table.table.table-bordered.table-striped
%thead
%tr
%th
%th= _('Node')
%th= _('VMs')
%th= _('Maintenance')
%tbody
- @compute_hosts.each do |host|
%tr
%td
- if host.number_of(:vms) == 0 && host.maintenance
%input{:type => 'checkbox', :name => 'host_ids[]', :value => host.id}
%td
= host.uid_ems
%td
= host.number_of(:vms)
%td
= host.maintenance
%table{:width => "100%"}
%tr
%td{:align => "right"}
#buttons_on
= button_tag(_("Scale Down"),
:name => "scaledown",
:class => "btn btn-primary",
:alt => t = _("Scale Infrastructure Provider Down"),
:title => t,
:type => "submit")
= button_tag(_("Cancel"),
:name => "cancel",
:class => "btn btn-default",
:alt => t = _("Cancel"),
:title => t,
:type => "submit")