app/views/containers/index.html.erb
<% title _("Containers") %>
<%= title_actions(new_link(_("Create container"))) %>
<ul class="nav nav-tabs" data-tabs="tabs">
<% @container_resources.each_with_index do |resource, i| %>
<% if i == 0 %>
<li class="active"><a href="#<%= "primary" %>" data-toggle="tab"><%= resource.name %></a></li>
<% else %>
<li><a href="#<%= resource.id %>" data-toggle="tab"><%= resource.name %></a></li>
<% end %>
<% end %>
</ul>
<div class="tab-content">
<% @container_resources.each_with_index do |resource, i| %>
<% if i == 0 %>
<div class="tab-pane active" id="primary">
<% else %>
<div class="tab-pane" id="<%= resource.id %>">
<% end %>
<% if resource.test_connection %>
<%= render 'list', :containers => resource.vms,
:resource => resource %>
<% else %>
<div class="alert alert-warning">
<%= (_("Error connecting with the compute resource: <strong> %s </strong>") % resource.errors.messages[:base]).html_safe %>
</div>
<% end %>
</div>
<% end %>
</div>
</div>