Skip to content

Commit

Permalink
fix bug in Targets#capture_vm_targets
Browse files Browse the repository at this point in the history
introduced in eef58e1

specs in metric_capture expose
  • Loading branch information
kbrock committed Nov 1, 2017
1 parent 48675e0 commit bf03cf9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/metric/targets.rb
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def self.capture_storage_targets(hosts)
# we want to work with only enabled_hosts, so hosts needs to be further filtered
def self.capture_vm_targets(emses, hosts)
enabled_host_ids = hosts.select(&:perf_capture_enabled?).index_by(&:id)
emses.flat_map { |e| e.vms.select { |v| enabled_host_ids.include?(v.host_id) && v.state == 'on' && v.supports_capture? } }
emses.flat_map { |e| e.vms.select { |v| enabled_host_ids.key?(v.host_id) && v.state == 'on' && v.supports_capture? } }
end

# If a Cluster, standalone Host, or Storage is not enabled, skip it.
Expand Down

0 comments on commit bf03cf9

Please sign in to comment.