Project

General

Profile

« Previous | Next » 

Revision ec1b5011

Added by Ohad Levy almost 12 years ago

  • ID ec1b50118b285c64db563565d650544eed879e68

make sure usernames are not in the logs

View differences:

app/controllers/topbar_sweeper.rb
private
def expire_cache_for(record)
expire_fragment("tabs_and_title_records_for_#{User.current}")
expire_fragment("tabs_and_title_records-#{User.current.id}")
end
end
app/models/host.rb
counter = Host.count(:include => association.pluralize, :group => "#{association}_id")
# returns {:id => count...}
#Puppetclass.find(counter.keys.compact)...
Hash[eval("#{association.camelize}.find(#{counter.keys.compact.join(',')})").map {|i| [i.to_label, counter[i.id]]}]
Hash[eval(association.camelize).send(:find, counter.keys.compact).map {|i| [i.to_label, counter[i.id]]}]
end
def resources_chart(timerange = 1.day.ago)
app/views/home/_topbar.rhtml
<!-- menu -->
<% if User.current -%>
<% cache("tabs_and_title_bookmarks_for_#{User.current}") do %>
<% cache("tabs_and_title_records-#{User.current.id}") do %>
<div class="nav-collapse nav1">
<ul class="nav" id="menu">
<% my_bookmarks = Bookmark.my_bookmarks %>

Also available in: Unified diff