show.html.erb 1.2 KB

123456789101112131415161718192021222324252627
  1. <% content_for :head do %>
  2. <%= javascript_include_tag "diagram" %>
  3. <% end %>
  4. <div class='container'>
  5. <div class='row'>
  6. <div class='col-md-12'>
  7. <div class="page-header">
  8. <h2>Agent Event Flow</h2>
  9. </div>
  10. <div class="btn-group">
  11. <%= link_to icon_tag('glyphicon-chevron-left') + ' Back'.html_safe, (@scenario ? scenario_path(@scenario) : agents_path), class: "btn btn-default" %>
  12. <% if (num_disabled = @disabled_agents.count).nonzero? -%>
  13. <% if params[:exclude_disabled] %>
  14. <%= link_to @scenario ? scenario_diagram_path(@scenario) : diagram_path, class: 'btn btn-default' do %><%= icon_tag('glyphicon-eye-open') %> Show <%= pluralize(num_disabled, 'disabled Agent') %><% end %>
  15. <% else %>
  16. <%= link_to @scenario ? scenario_diagram_path(@scenario, exclude_disabled: true) : diagram_path(exclude_disabled: true), class: 'btn btn-default' do %><%= icon_tag('glyphicon-eye-close') %> Hide <%= pluralize(num_disabled, 'disabled Agent') %><% end %>
  17. <% end %>
  18. <% end %>
  19. </div>
  20. <div class='digraph'>
  21. <%= render_agents_diagram(@agents) %>
  22. </div>
  23. </div>
  24. </div>
  25. </div>