<% if agent.can_be_scheduled? %>
  • <%= link_to icon_tag('glyphicon-refresh', class: 'color-success') + ' Run', run_agent_path(agent, return: return_to), method: :post, tabindex: "-1" %>
  • <% end %> <% if agent.can_dry_run? %>
  • <%= link_to icon_tag('glyphicon-refresh') + ' Dry Run', '#', 'data-action-url' => dry_run_agent_path(agent), 'data-with-event-mode' => agent_dry_run_with_event_mode(agent), tabindex: "-1", onclick: "Utils.handleDryRunButton(this)" %>
  • <% end %>
  • <%= link_to icon_tag('glyphicon-eye-open') + ' Show'.html_safe, agent_path(agent, return: return_to) %>
  • <%= link_to icon_tag('glyphicon-pencil') + ' Edit agent'.html_safe, edit_agent_path(agent, return: return_to) %>
  • <%= link_to icon_tag('fa-copy') + ' Clone agent'.html_safe, new_agent_path(id: agent), tabindex: "-1" %>
  • <%= link_to '#', 'data-toggle' => 'modal', 'data-target' => "#confirm-agent#{agent.id}" do %> <% if agent.disabled? %> <%= icon_tag('glyphicon-play') %> Enable agent <% else %> <%= icon_tag('glyphicon-pause') %> Disable agent <% end %> <% end %>
  • <% if agent.scenarios.length > 0 %>
  • <% agent.scenarios.each do |scenario| %>
  • <%= link_to icon_tag('glyphicon-remove-circle', class: 'color-warning') + " Remove from #{scenario_label(scenario)}".html_safe, leave_scenario_agent_path(agent, scenario_id: scenario.to_param, return: return_to), method: :put, tabindex: "-1" %>
  • <% end %> <% end %>
  • <% if agent.can_create_events? && agent.events.count > 0 %>
  • <%= link_to icon_tag('glyphicon-trash', class: 'color-danger') + ' Delete all events', remove_events_agent_path(agent, return: return_to), method: :delete, data: {confirm: 'Are you sure you want to delete ALL emitted events for this Agent?'}, tabindex: "-1" %>
  • <% end %>
  • <%= link_to icon_tag('glyphicon-remove', class: 'color-danger') + ' Delete agent', agent_path(agent, return: return_to), method: :delete, data: { confirm: 'Are you sure that you want to permanently delete this Agent?' }, tabindex: "-1" %>

Confirm

<% if agent.disabled? %>Enable<% else %>Disable<% end %> "<%= agent.name %>"?

<%= form_for(agent, as: :agent, url: agent_path(agent, return: return_to), method: 'PUT') do |f| %> <% if agent.disabled && agent.can_receive_events? %>
<%= f.check_box :drop_pending_events %> <%= f.label :drop_pending_events, 'Drop pending events' %>
<% end %> <%= f.hidden_field :disabled, value: (!agent.disabled).to_s %> <%= f.button 'No', class: 'btn btn-default', 'data-dismiss' => 'modal' %> <%= f.submit 'Yes', class: 'btn btn-primary' %> <% end %>