Project

General

Profile

« Previous | Next » 

Revision d9a2ebac

Added by Ohad Levy almost 12 years ago

  • ID d9a2ebac6e9ec0082e60265b794f54a29a1f7e65

[SQL optimizations] - many small optimizations

This is one of a few patches aim to improve Foreman performance
  • Bookmarks have only users, not usergroups
  • added caching to the settings table
  • removed notice message lookups (we are not really using those)
  • added caching to top bar (tabs + bookmarks) and expiry.
  • removed non needed JS to load

View differences:

app/views/domains/index.html.erb
<% for domain in @domains %>
<tr class="<%= cycle("even", "odd") -%>">
<td><%= link_to_if_authorized h(domain.fullname.empty? ? domain.name : domain.fullname), hash_for_edit_domain_path(:id => domain.name)%></td>
<td><%= link_to_if domain.hosts.any?, domain.hosts.size, hosts_path(:search => "domain = #{domain}") %>
<td><%= link_to @counter[domain.id] || 0, hosts_path(:search => "domain = #{domain}") %>
<td><%= display_delete_if_authorized hash_for_domain_path(:id => domain), :confirm => "Delete #{domain.name}?" %></td>
</tr>
<% end %>

Also available in: Unified diff