Sha256: 30e87ddaf49d1097ad17a7591e13b2b37d47e692ffad7401ec91874d14f03066

Contents?: true

Size: 1.76 KB

Versions: 8

Compression:

Stored size: 1.76 KB

Contents

<% title _('Salt States') %>

<% title_actions import_from_proxies,
                 button_group(display_link_if_authorized(_('New Salt State'), hash_for_new_salt_module_path)) %>


<table class="table table-bordered table-striped">
  <tr>
    <th><%= sort :name, :as => s_('SaltModule|Name') %></th>
    <th><%= _('Environments') %></th>
    <th><%= sort :host, :as => _('Hosts'), :default => 'DESC'  %></th>
    <th><%= sort :hostgroup, :as => _('Host groups'), :default => 'DESC' %></th>
    <th></th>
  </tr>
  <% for salt_module in @salt_modules %>
    <tr>
      <td><%= link_to_if_authorized(colorize(salt_module.name), hash_for_edit_salt_module_path(:id => salt_module)) %></td>
      <td>
          <% salt_module.salt_environments.sort.each do |environment| -%>
              <%= link_to environment.name, :controller => :'foreman_salt/salt_modules', :action => :index, :search => "environment = #{environment.name}" %>
          <% end -%>
      </td>
      <td><%= link_to_if_authorized(salt_module.hosts.count, hash_for_hosts_path(:search => "salt_state = #{salt_module}")) %></td>
      <td><%= link_to_if_authorized(salt_module.hostgroups.count, hash_for_hostgroups_path(:search => "salt_state = #{salt_module}")) %></td>
      <td>
          <%= action_buttons([display_link_if_authorized(_('Edit'), hash_for_edit_salt_module_path(:id => salt_module).merge(:auth_object => salt_module, :authorizer => authorizer)),
                             display_delete_if_authorized(hash_for_salt_module_path(:id => salt_module).merge(:auth_object => salt_module, :authorizer => authorizer),
                            :confirm => _('Delete %s?') % salt_module.name)]) %>
      </td>
    </tr>
  <% end %>
</table>

<%= page_entries_info @salt_modules %>
<%= will_paginate @salt_modules %>

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
foreman_salt-5.0.1 app/views/foreman_salt/salt_modules/index.html.erb
foreman_salt-5.0.0 app/views/foreman_salt/salt_modules/index.html.erb
foreman_salt-4.0.1 app/views/foreman_salt/salt_modules/index.html.erb
foreman_salt-4.0.0 app/views/foreman_salt/salt_modules/index.html.erb
foreman_salt-3.0.2 app/views/foreman_salt/salt_modules/index.html.erb
foreman_salt-3.0.1 app/views/foreman_salt/salt_modules/index.html.erb
foreman_salt-3.0.0 app/views/foreman_salt/salt_modules/index.html.erb
foreman_salt-2.1.0 app/views/foreman_salt/salt_modules/index.html.erb