Add RBAC support with roles, permissions, and session management. Implement middleware for authentication and CSRF protection. Enhance audit logging with additional fields. Update HTTP handlers and routes for new features.
This commit is contained in:
32
internal/templates/hx_iscsi_luns.html
Normal file
32
internal/templates/hx_iscsi_luns.html
Normal file
@@ -0,0 +1,32 @@
|
||||
{{ define "hx_iscsi_luns" }}
|
||||
<div>
|
||||
<table class="w-full">
|
||||
<thead><tr><th>LUN ID</th><th>ZVol</th><th>Size</th><th>Action</th></tr></thead>
|
||||
<tbody>
|
||||
{{ if . }}
|
||||
{{ range . }}
|
||||
<tr>
|
||||
<td>{{ .lun_id }}</td>
|
||||
<td>{{ .zvol }}</td>
|
||||
<td>{{ .size }}</td>
|
||||
<td>
|
||||
<div>
|
||||
<form hx-post="/api/iscsi/unmap_lun" hx-include="closest form" style="display:inline-block">
|
||||
<input type="hidden" name="id" value="{{ .id }}" />
|
||||
<button type="submit">Drain</button>
|
||||
</form>
|
||||
<form hx-post="/api/iscsi/delete_lun" hx-include="closest form" style="display:inline-block">
|
||||
<input type="hidden" name="id" value="{{ .id }}" />
|
||||
<input type="checkbox" name="force" id="force-{{ .id }}" value="1" />
|
||||
<label for="force-{{ .id }}">Force delete</label>
|
||||
<button type="submit">Delete</button>
|
||||
</form>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{ end }}
|
||||
Reference in New Issue
Block a user