gontrol/templates/partials/agent_list.html

41 lines
2.0 KiB
HTML

<table class="table table-bordered">
<thead>
<tr>
<th>ID</th>
<th>Name</th>
<th>Type</th>
<th>IPv4 Address</th>
<!-- <th>Initial Contact</th> -->
<!-- <th>Last Contact</th> -->
<th>Status</th>
<!-- <th>Actions <input type="checkbox" class="select-agent-checkbox" onClick="toggleAllCheckboxes(this)"></th> -->
<th><button type="button" class="btn btn-primary btn-sm" onClick="toggleAllCheckboxes()">Toggle Agents</button></th>
</tr>
</thead>
<tbody>
{{range .}}
<tr>
<td>{{.AgentID}}</td>
<td>{{.AgentName}}</td>
<td>{{.AgentType}}</td>
<td>{{.IPv4Address}}</td>
<!-- <td>{{.InitialContact}}</td> -->
<!-- <td>{{.LastContact}}</td> -->
<!-- <td><span class="badge bg-success">Connected</span></td> -->
<!-- <td><span class="badge bg-danger">Disconnected</span></td> -->
<td>{{.Status}}</td>
<td>
<button class="btn btn-danger btn-sm" hx-delete="/agents/{{.AgentID}}" hx-target="#agentList" hx-swap="innerHTML">Delete</button>
<!-- <button class="btn btn-warning btn-sm" hx-get="/agents/{{.AgentID}}" hx-target="#agentDetails" hx-swap="innerHTML">View</button> -->
<button class="btn btn-warning btn-sm" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvasRight" aria-controls="offcanvasRight" hx-get="/agents/{{.AgentID}}" hx-target="#offcanvas-body">View</button>
<input type="checkbox" class="agent-checkbox" data-agent-name="{{.AgentName}}" name="agent-checkbox">
<!-- <input type="checkbox" class="agent-checkbox btn-check" data-agent-name="{{.AgentName}}" id="{{.AgentName}}"> -->
<!-- <label class="btn btn-outline-primary btn-sm" for="{{.AgentName}}">Select</label> -->
</td>
</tr>
{{end}}
</tbody>
</table>