Sha256: 05ff902ef10a3a5ac3f3fb49dd7678ad0e63e0cf23457f4a2e46143ae95e6171

Contents?: true

Size: 1.94 KB

Versions: 8

Compression:

Stored size: 1.94 KB

Contents

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

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


<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>
          <%
              links = [
                  link_to(
                  _('Variables'), salt_variables_path(:search => "salt_module = #{salt_module}")),
                  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)
              ]
          %>
          <%= action_buttons(*links) %>
      </td>
      </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-14.1.0 app/views/foreman_salt/salt_modules/index.html.erb
foreman_salt-14.0.0 app/views/foreman_salt/salt_modules/index.html.erb
foreman_salt-13.2.4 app/views/foreman_salt/salt_modules/index.html.erb
foreman_salt-13.2.3 app/views/foreman_salt/salt_modules/index.html.erb
foreman_salt-13.2.2 app/views/foreman_salt/salt_modules/index.html.erb
foreman_salt-13.2.1 app/views/foreman_salt/salt_modules/index.html.erb
foreman_salt-13.2.0 app/views/foreman_salt/salt_modules/index.html.erb
foreman_salt-13.1.0 app/views/foreman_salt/salt_modules/index.html.erb