Project

General

Profile

Download (1.05 KB) Statistics
| Branch: | Tag: | Revision:

foreman-docker / app / views / containers / index.html.erb @ 2402a763

1 3eab3643 Daniel Lobato
<% title _("Containers") %>
2
3 2402a763 orrabin
<%= title_actions(new_link(_("New container"))) %>
4 3eab3643 Daniel Lobato
5
<ul class="nav nav-tabs" data-tabs="tabs">
6
  <% @container_resources.each_with_index do |resource, i| %>
7
    <% if i == 0 %>
8 b0e98702 Bryan Kearney
      <li class="active"><a href="#<%= "primary" %>" data-toggle="tab"><%= resource.name %></a></li>
9 3eab3643 Daniel Lobato
    <% else %>
10 b0e98702 Bryan Kearney
      <li><a href="#<%= resource.id %>" data-toggle="tab"><%= resource.name %></a></li>
11 3eab3643 Daniel Lobato
    <% end %>
12
  <% end %>
13
</ul>
14
15
<div class="tab-content">
16
  <% @container_resources.each_with_index do |resource, i| %>
17
    <% if i == 0 %>
18
      <div class="tab-pane active" id="primary">
19
    <% else %>
20 6406ea7c Ranjan Kumar
      <div class="tab-pane" id="<%= resource.id %>">
21 3eab3643 Daniel Lobato
    <% end %>
22 bcec07f9 Daniel Lobato
    <% if resource.test_connection %>
23 ad3852f2 Ohad Levy
      <%= render 'list', :containers => resource.vms,
24
                 :resource           => resource %>
25 bcec07f9 Daniel Lobato
    <% else %>
26
      <div class="alert alert-warning">
27
        <%= (_("Error connecting with the compute resource: <strong> %s </strong>") % resource.errors.messages[:base]).html_safe %>
28
      </div>
29 ad3852f2 Ohad Levy
    <% end %>
30 3eab3643 Daniel Lobato
    </div>
31
  <% end %>
32 ad3852f2 Ohad Levy
  </div>
33 b0e98702 Bryan Kearney
</div>