-
Notifications
You must be signed in to change notification settings - Fork 982
/
index.html.erb
36 lines (36 loc) · 1.42 KB
/
index.html.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<% title _("PuppetCA on %s") % @proxy.name %>
<% title_actions display_link_if_authorized(_("Autosign Entries"), hash_for_smart_proxy_autosign_index_path(:smart_proxy_id => @proxy)) %>
<table class="table table-bordered table-striped table-condensed" data-table="inline">
<thead>
<tr>
<th><%= _("Certificate Name") %></th>
<th><%= _("State") %></th>
<th><%= _("Valid from") %></th>
<th><%= _("Expires") %></th>
<th><%= _("Fingerprint") %></th>
<th></th>
</tr>
</thead>
<tbody>
<% @certificates.each do |cert| %>
<tr>
<td><%= cert.name %>
</td>
<td><%= _(cert.state) %></td>
<td><%= time_column cert.valid_from %></td>
<td><%= time_column cert.expires_at, :tense => :future %></td>
<td><%= cert.fingerprint %></td>
<td>
<%= action_buttons(
if cert.state == "pending"
display_link_if_authorized(_("Sign"), hash_for_smart_proxy_puppetca_path(:smart_proxy_id => @proxy.to_param, :id => cert, :state => params[:state]), :method => :put)
end,
if cert.state != "revoked"
display_delete_if_authorized(hash_for_smart_proxy_puppetca_path(:smart_proxy_id => @proxy.to_param, :id => cert, :class => 'delete', :state => params[:state]))
end)
%>
</td>
</tr>
<% end %>
</tbody>
</table>