package pages
import (
"git.ma-al.com/goc_marek/zfs/internal/server/templates/components"
)
// AdminPage renders the main admin panel
templ AdminPage(username string) {
@components.Layout("ZFS Backup Admin Panel", username) {
@components.Header(username)
@components.StatsCard("Clients", "Loading...")
@components.StatsCard("Total Snapshots", "Loading...")
@components.StatsCard("Total Storage", "Loading...")
@components.TabButton("clients", "Clients", true)
@components.TabButton("snapshots", "Snapshots", false)
@components.TabButton("admins", "Admins", false)
Clients
| Client ID |
Storage Type |
Quota |
Used |
Snapshots |
Status |
Actions |
Snapshots
| Client |
Snapshot ID |
Timestamp |
Size |
Type |
Actions |
Admin Users
| ID |
Username |
Role |
Created |
Actions |
@AddClientModal()
@EditClientModal()
@AddAdminModal()
@ChangePasswordModal()
@ClientPasswordModal()
@AdminScripts()
}
}
// AddClientModal renders the add client modal
templ AddClientModal() {
@components.Modal("add-client-modal", "Add New Client") {
}
}
// EditClientModal renders the edit client modal
templ EditClientModal() {
@components.Modal("edit-client-modal", "Edit Client") {
}
}
// AddAdminModal renders the add admin modal
templ AddAdminModal() {
@components.Modal("add-admin-modal", "Add New Admin") {
}
}
// ChangePasswordModal renders the change password modal for admins
templ ChangePasswordModal() {
@components.Modal("change-password-modal", "Change Password") {
}
}
// ClientPasswordModal renders the set client API key modal
templ ClientPasswordModal() {
@components.Modal("client-password-modal", "Set Client API Key") {
}
}
// AdminScripts renders the JavaScript for the admin panel
templ AdminScripts() {
}