Sha256: 84c750c7bd9bc4c20f198f1718afe4cd367b1e61d2d094f6b4367ded19275964

Contents?: true

Size: 387 Bytes

Versions: 26

Compression:

Stored size: 387 Bytes

Contents

module ForemanInventoryUploadHostHelper
  def hits_counts
    @hits_counts ||= InsightsHit.where(host_id: @hosts).group(:host_id).count
  end

  def hits_counts_cell(host)
    host_hits = hits_counts[host.id]
    host_link = Setting['host_details_ui'] ? "#{host_details_page_path(host)}#/Insights" : "#{host_path(host)}#insights"
    link_to(host_hits, host_link) if host_hits
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
foreman_rh_cloud-8.0.49 app/helpers/foreman_inventory_upload_host_helper.rb
foreman_rh_cloud-8.0.48 app/helpers/foreman_inventory_upload_host_helper.rb
foreman_rh_cloud-8.0.47 app/helpers/foreman_inventory_upload_host_helper.rb
foreman_rh_cloud-8.0.46 app/helpers/foreman_inventory_upload_host_helper.rb
foreman_rh_cloud-7.0.46 app/helpers/foreman_inventory_upload_host_helper.rb
foreman_rh_cloud-7.0.45 app/helpers/foreman_inventory_upload_host_helper.rb