1
|
<% title _("Containers") %>
|
2
|
|
3
|
<% if authorized? %>
|
4
|
<% title_actions button_group(link_to_if_authorized _("New container"), hash_for_new_container_path,
|
5
|
:class => 'btn-success') %>
|
6
|
<% end %>
|
7
|
|
8
|
<ul class="nav nav-tabs" data-tabs="tabs">
|
9
|
<% @container_resources.each_with_index do |resource, i| %>
|
10
|
<% if i == 0 %>
|
11
|
<li class="active"><a href="#<%= "primary" %>" data-toggle="tab"><%= _("#{resource.name}") %></a></li>
|
12
|
<% else %>
|
13
|
<li><a href="#<%= resource.name %>" data-toggle="tab"><%= _("#{resource.name}") %></a></li>
|
14
|
<% end %>
|
15
|
<% end %>
|
16
|
</ul>
|
17
|
|
18
|
<div class="tab-content">
|
19
|
<% @container_resources.each_with_index do |resource, i| %>
|
20
|
<% if i == 0 %>
|
21
|
<div class="tab-pane active" id="primary">
|
22
|
<% else %>
|
23
|
<div class="tab-pane" id="<%= resource.name %>">
|
24
|
<% end %>
|
25
|
<% if resource.test_connection %>
|
26
|
<%= render 'list', :containers => resource.vms,
|
27
|
:resource => resource %>
|
28
|
<% else %>
|
29
|
<div class="alert alert-warning">
|
30
|
<%= (_("Error connecting with the compute resource: <strong> %s </strong>") % resource.errors.messages[:base]).html_safe %>
|
31
|
</div>
|
32
|
<% end %>
|
33
|
</div>
|
34
|
<% end %>
|
35
|
</div>
|
36
|
</div>
|