Sha256: c3cde018952696a2aa9921ad1129f9e0182171b345fd1d382f9aca8f532cfd3c

Contents?: true

Size: 384 Bytes

Versions: 6

Compression:

Stored size: 384 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]
    content = n_('One recommendation', '%{hits} recommendations', host_hits) % { hits: host_hits } if host_hits
    tag.td content, class: ['hidden-xs', 'ellipsis']
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
foreman_rh_cloud-2.0.9 app/helpers/foreman_inventory_upload_host_helper.rb
foreman_rh_cloud-1.0.9 app/helpers/foreman_inventory_upload_host_helper.rb
foreman_rh_cloud-0.9.9 app/helpers/foreman_inventory_upload_host_helper.rb
foreman_rh_cloud-0.9.8 app/helpers/foreman_inventory_upload_host_helper.rb
foreman_rh_cloud-1.0.8 app/helpers/foreman_inventory_upload_host_helper.rb
foreman_rh_cloud-2.0.8 app/helpers/foreman_inventory_upload_host_helper.rb