Sha256: 3704f886314a2be22e4d97ea1970940aad1fea77d56b4110e38a420a0847501f

Contents?: true

Size: 540 Bytes

Versions: 18

Compression:

Stored size: 540 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]
    tag.td class: ['hidden-xs', 'ellipsis', 'text-center'] do
      if host_hits
        link_to(
          host_hits,
          InsightsCloud::WebUi.system_url(InsightsCloud::WebUi::ADVISOR, host.insights.uuid),
          :rel => 'external noopener noreferrer',
          :target => '_blank'
        )
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
foreman_rh_cloud-2.0.18.1 app/helpers/foreman_inventory_upload_host_helper.rb
foreman_rh_cloud-1.0.18 app/helpers/foreman_inventory_upload_host_helper.rb
foreman_rh_cloud-2.0.18 app/helpers/foreman_inventory_upload_host_helper.rb
foreman_rh_cloud-1.0.17 app/helpers/foreman_inventory_upload_host_helper.rb
foreman_rh_cloud-2.0.17 app/helpers/foreman_inventory_upload_host_helper.rb
foreman_rh_cloud-2.0.16 app/helpers/foreman_inventory_upload_host_helper.rb
foreman_rh_cloud-1.0.16 app/helpers/foreman_inventory_upload_host_helper.rb
foreman_rh_cloud-1.0.15 app/helpers/foreman_inventory_upload_host_helper.rb
foreman_rh_cloud-2.0.15 app/helpers/foreman_inventory_upload_host_helper.rb
foreman_rh_cloud-2.0.14 app/helpers/foreman_inventory_upload_host_helper.rb
foreman_rh_cloud-1.0.14 app/helpers/foreman_inventory_upload_host_helper.rb
foreman_rh_cloud-0.9.14 app/helpers/foreman_inventory_upload_host_helper.rb
foreman_rh_cloud-0.9.13.1 app/helpers/foreman_inventory_upload_host_helper.rb
foreman_rh_cloud-1.0.13.1 app/helpers/foreman_inventory_upload_host_helper.rb
foreman_rh_cloud-2.0.13.1 app/helpers/foreman_inventory_upload_host_helper.rb
foreman_rh_cloud-0.9.13 app/helpers/foreman_inventory_upload_host_helper.rb
foreman_rh_cloud-1.0.13 app/helpers/foreman_inventory_upload_host_helper.rb
foreman_rh_cloud-2.0.13 app/helpers/foreman_inventory_upload_host_helper.rb