Actions
Bug #11791
closedN+1 query on hosts#index retrieving puppet_proxy
Description
Since #11704, the hosts#index page is generating an N+1 query warning on the host puppet_proxy attribute.
| http://0.0.0.0:3000/hosts | N+1 Query detected | Host::Managed => [:puppet_proxy] | Add to your finder: :includes => [:puppet_proxy] | N+1 Query method call stack | /home/dcleal/code/foreman/foreman/app/models/host_status/configuration_status.rb:37:in `to_global' | /home/dcleal/code/foreman/foreman/app/models/host_status/global.rb:10:in `block in build' | /home/dcleal/code/foreman/foreman/app/models/host_status/global.rb:10:in `map' | /home/dcleal/code/foreman/foreman/app/models/host_status/global.rb:10:in `build' | /home/dcleal/code/foreman/foreman/app/models/host/managed.rb:889:in `build_global_status' | /home/dcleal/code/foreman/foreman/app/helpers/hosts_helper.rb:94:in `host_global_status_icon_class_for_host' | /home/dcleal/code/foreman/foreman/app/helpers/hosts_helper.rb:83:in `name_column' | /home/dcleal/code/foreman/foreman/app/views/hosts/_list.html.erb:22:in `block in _app_views_hosts__list_html_erb___275981041170289430_92907540' | /home/dcleal/code/foreman/foreman/app/views/hosts/_list.html.erb:17:in `_app_views_hosts__list_html_erb___275981041170289430_92907540' | /home/dcleal/code/foreman/foreman/app/views/hosts/index.html.erb:4:in `_app_views_hosts_index_html_erb___1661929246903238241_92718560'
It probably doesn't even need to check for puppet_proxy itself, but just checking the presence of an ID may be enough.
Updated by Dominic Cleal over 9 years ago
- Related to Bug #11704: Configuration no report appears as "green" icon added
Updated by Marek Hulán over 9 years ago
- Status changed from New to Assigned
- Assignee set to Marek Hulán
Updated by The Foreman Bot over 9 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/2712 added
- Pull request deleted (
)
Updated by Marek Hulán over 9 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 7397bf15ef66bfb26bedc3c2bf8e63ef5a63e071.
Actions