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-11.0.3 app/helpers/foreman_inventory_upload_host_helper.rb
foreman_rh_cloud-9.0.59 app/helpers/foreman_inventory_upload_host_helper.rb
foreman_rh_cloud-11.0.2 app/helpers/foreman_inventory_upload_host_helper.rb
foreman_rh_cloud-11.0.1 app/helpers/foreman_inventory_upload_host_helper.rb
foreman_rh_cloud-11.0.0 app/helpers/foreman_inventory_upload_host_helper.rb
foreman_rh_cloud-9.0.58 app/helpers/foreman_inventory_upload_host_helper.rb
foreman_rh_cloud-10.0.2 app/helpers/foreman_inventory_upload_host_helper.rb
foreman_rh_cloud-9.0.57 app/helpers/foreman_inventory_upload_host_helper.rb
foreman_rh_cloud-10.0.1 app/helpers/foreman_inventory_upload_host_helper.rb
foreman_rh_cloud-9.0.56 app/helpers/foreman_inventory_upload_host_helper.rb
foreman_rh_cloud-9.0.55 app/helpers/foreman_inventory_upload_host_helper.rb
foreman_rh_cloud-9.0.54 app/helpers/foreman_inventory_upload_host_helper.rb
foreman_rh_cloud-9.0.53 app/helpers/foreman_inventory_upload_host_helper.rb
foreman_rh_cloud-9.0.52 app/helpers/foreman_inventory_upload_host_helper.rb
foreman_rh_cloud-8.0.52 app/helpers/foreman_inventory_upload_host_helper.rb
foreman_rh_cloud-9.0.51 app/helpers/foreman_inventory_upload_host_helper.rb
foreman_rh_cloud-8.0.51 app/helpers/foreman_inventory_upload_host_helper.rb
foreman_rh_cloud-7.0.48 app/helpers/foreman_inventory_upload_host_helper.rb
foreman_rh_cloud-7.0.47 app/helpers/foreman_inventory_upload_host_helper.rb
foreman_rh_cloud-8.0.50 app/helpers/foreman_inventory_upload_host_helper.rb