unclesp1d3r/CipherSwarm

View on GitHub
app/views/agents/index.html.erb

Summary

Maintainability
Test Coverage
<%= render Railsboot::HeaderComponent.new do |header| %>
  <% header.with_heading do %>
    <%= title "Agents" %>
  <% end %>
  <%= header.with_actions do %>
    <% if can? :create, Agent %>
      <%= render Railsboot::ButtonComponent.new(tag: "a", href: new_agent_path, size: "sm", title: "New Agent") do %>
        <%= icon("plus-circle-fill") %>
      <% end %>
    <% end %>
  <% end %>

  <% header.with_breadcrumb.with_items([
       { text: "Dashboard", href: root_path },
       { text: "Agents", href: agents_path, active: true }
                                       ]) %>
<% end %>


<table class="table table-striped table-responsive">
  <thead>
  <tr>
    <th>State</th>
    <th>Name</th>
    <th>Projects</th>
    <th>Client Signature</th>
    <th>Enabled</th>
    <th>OS</th>
    <th>Last Seen</th>
    <th></th>
  </tr>
  </thead>
  <tbody>
  <%= render partial: "agent", collection: @agents, cache: true %>
  </tbody>
</table>