Module: ForemanInsightsHostHelper

Defined in:
app/helpers/foreman_insights_host_helper.rb

Instance Method Summary collapse

Instance Method Details

#insights_host_overview_buttons(host) ⇒ Object



2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'app/helpers/foreman_insights_host_helper.rb', line 2

def insights_host_overview_buttons(host)
  search_condition = "hostname=#{host.fqdn}"
  [
    {
      button: link_to_if_authorized(
        _("Recommendations"),
        hash_for_foreman_rh_cloud_insights_cloud_path(
          search: search_condition,
          select_all: true
        ),
        title: _("Host Insights recommendations"),
        class: 'btn btn-default'
      ),
      priority: 1000,
    },
  ]
end