4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# File 'app/models/concerns/foreman_mco/hosts_helper.rb', line 4
def mco_multiple_actions_select
actions = []
if Setting[:use_mco]
actions << [_('Ping'), ping_commands_path, 'pencil']
actions << [_('Install Package'), install_package_commands_path, 'pencil', 'mco-filtered']
actions << [_('Uninstall Package'), uninstall_package_commands_path, 'pencil', 'mco-filtered']
actions << [_('Service Status'), service_status_commands_path, 'pencil', 'mco-filtered']
actions << [_('Start Service'), start_service_commands_path, 'pencil', 'mco-filtered']
actions << [_('Stop Service'), stop_service_commands_path, 'pencil', 'mco-filtered']
actions << [_('Puppet Runonce'), puppet_runonce_commands_path, 'pencil', 'mco-filtered']
actions << [_('Puppet Enable'), puppet_enable_commands_path, 'pencil', 'mco-filtered']
actions << [_('Puppet Disable'), puppet_disable_commands_path, 'pencil', 'mco-filtered']
end
content_tag :span, :id => 'mco_submit_multiple' do
select_action_button( _("Select MCO Action"), actions.map do |action|
link_to(icon_text(action[2], action[0]) , action[1], :class=>'btn ' + (action.try(:[], 3) || ''), :title => _("%s - The following hosts are about to be changed") % action[0])
end.flatten)
end
end
|