Revision ad3852f2
Added by Ohad Levy over 8 years ago
app/views/containers/_list.html.erb | ||
---|---|---|
1 | 1 |
<table class="table table-bordered table-striped table-condensed" data-table="inline"> |
2 |
</thead>
|
|
3 |
<tr>
|
|
4 |
<th class="text-center"><%= sort :name, :as => _("Name") %></th>
|
|
5 |
<th class="hidden-tablet hidden-xs text-center"><%= sort :status, :as => _("Status") %></th>
|
|
6 |
<th class="hidden-tablet hidden-xs text-center"><%= sort :image, :as => _("Image") %></th>
|
|
7 |
<th class="hidden-tablet hidden-xs text-center"><%= sort :command, :as => _("Command") %></th>
|
|
8 |
<th class="hidden-tablet hidden-xs text-center"><%= sort :uptime, :as => _("Uptime") %></th>
|
|
9 |
<th class="hidden-tablet hidden-xs text-center"><%= sort :running_on, :as => _("Running on") %></th>
|
|
10 |
<th class="hidden-tablet hidden-xs text-center"><%= sort :managed , :as => _("Managed") %></th>
|
|
11 |
<th></th>
|
|
12 |
</tr>
|
|
2 |
<thead> |
|
3 |
<tr> |
|
4 |
<th class="text-center"><%= _("Name") %></th>
|
|
5 |
<th class="hidden-tablet hidden-xs text-center"><%= _("Status") %></th>
|
|
6 |
<th class="hidden-tablet hidden-xs text-center"><%= _("Image") %></th>
|
|
7 |
<th class="hidden-tablet hidden-xs text-center"><%= _("Command") %></th>
|
|
8 |
<th class="hidden-tablet hidden-xs text-center"><%= _("Uptime") %></th>
|
|
9 |
<th class="hidden-tablet hidden-xs text-center"><%= _("Running on") %></th>
|
|
10 |
<th class="hidden-tablet hidden-xs text-center"><%= _("Managed") %></th>
|
|
11 |
<th></th> |
|
12 |
</tr> |
|
13 | 13 |
</thead> |
14 | 14 |
|
15 |
<tbody> |
|
15 | 16 |
<% containers.each do |container| %> |
16 | 17 |
<tr> |
17 | 18 |
<td class="ellipsis text-center"><%= link_to_container(container, resource) %></td> |
18 |
<td class="hidden-tablet hidden-xs text-center"><span <%= vm_power_class(container.ready?) %>><%= vm_state(container) %></span></td> |
|
19 |
<td class="hidden-tablet hidden-xs text-center"> |
|
20 |
<span <%= vm_power_class(container.ready?) %>><%= vm_state(container) %></span></td> |
|
19 | 21 |
<td class="hidden-tablet hidden-xs text-center"><%= trunc(container.image_friendly_name) %></td> |
20 | 22 |
<td class="hidden-tablet hidden-xs text-center"><%= trunc(container.command) %></td> |
21 |
<td class="hidden-tablet hidden-xs text-center"><span class="glyphicon glyphicon-time"></span> <%= container.ready? ? time_ago_in_words(container.started_at) : "N/A" %></td> |
|
22 |
<td class="hidden-tablet hidden-xs text-center"><%= link_to resource, compute_resource_path(resource)%> </td> |
|
23 |
<td class="hidden-tablet hidden-xs text-center"> |
|
24 |
<span class="glyphicon glyphicon-time"></span> <%= container.ready? ? time_ago_in_words(container.started_at) : "N/A" %> |
|
25 |
</td> |
|
26 |
<td class="hidden-tablet hidden-xs text-center"><%= link_to resource, compute_resource_path(resource) %> </td> |
|
23 | 27 |
<td class="hidden-tablet hidden-xs text-center"><%= managed_icon(container, resource) %></td> |
24 | 28 |
<% @compute_resource = resource %> |
25 | 29 |
<td><%= action_buttons(vm_power_action(container), |
... | ... | |
30 | 34 |
:confirm => _("Delete %s?") % container.name)) %></td> |
31 | 35 |
</tr> |
32 | 36 |
<% end %> |
37 |
</tbody> |
|
33 | 38 |
</table> |
34 |
|
|
35 |
<!-- To be replaced by will_paginate_with_info after 1.6 support is deprecated --> |
|
36 |
<%= page_entries_info containers %> |
|
37 |
<%= will_paginate containers %> |
Also available in: Unified diff
fixes #8718 - refactor container index
- simplify controller to use the correct compute resource type in sql
- used icon helper methods
- fixed html syntax + removed duplicate pagination