Module: HostsExtensionsHelper

Defined in:
app/helpers/hosts_extensions_helper.rb

Instance Method Summary collapse

Instance Method Details

#host_title_actions(*args) ⇒ Object



14
15
16
17
18
# File 'app/helpers/hosts_extensions_helper.rb', line 14

def host_title_actions(*args)
  title_actions(button_group(schedule_job_multi_button(*args)),
    button_group(web_console_button(*args)))
  super(*args)
end

#rex_host_overview_buttons(host) ⇒ Object



8
9
10
11
12
# File 'app/helpers/hosts_extensions_helper.rb', line 8

def rex_host_overview_buttons(host)
  [
    { button: link_to_if_authorized(_("Jobs"), hash_for_job_invocations_path(search: "host=#{host.name}"), title: _("Job invocations"), class: 'btn btn-default'), priority: 200 },
  ]
end

#rex_hosts_multiple_actionsObject



2
3
4
5
6
# File 'app/helpers/hosts_extensions_helper.rb', line 2

def rex_hosts_multiple_actions
  return [] unless can_schedule_jobs?

  [{ action: [_('Schedule Remote Job'), new_job_invocation_path, false], priority: 1000 }]
end