Add runbooks, backup coverage, inventory, roles from groups, Prometheus metrics and event webhooks
- Runbooks: notes per server/integration, shown next to matching alerts - Backup coverage page across Proxmox and PBS, with a digest section - Hardware inventory with warranty, power and running cost - Authentik group to role mapping with preview and safeguards - /metrics (bearer token) and signed outgoing event webhooks - Docs: README, DATABASE, NOTIFICATIONS, ROLES and new API.md Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c36e2092c5
commit
c17e9aa140
55 files changed
+7177
-27
No files matched your search
+20
-3
@@ -1,4 +1,5 @@
|
||||
import { useEffect, useState } from "react";
|
||||
import { Link } from "react-router-dom";
|
||||
import { api, type UserRecord, type UserRole } from "../api/client";
|
||||
import { formatDateTime } from "../utils/date";
|
||||
import { useSortable } from "../hooks/useSortable";
|
||||
@@ -14,11 +15,16 @@ export default function Users() {
|
||||
const [users, setUsers] = useState<UserRecord[] | null>(null);
|
||||
const [error, setError] = useState<string | null>(null);
|
||||
const [savingId, setSavingId] = useState<number | null>(null);
|
||||
// Roles follow sign-in groups (Settings → Sign-in): they are shown, not set here.
|
||||
const [followGroups, setFollowGroups] = useState(false);
|
||||
|
||||
function load() {
|
||||
api.users
|
||||
.list()
|
||||
.then((res) => setUsers(res.users))
|
||||
.then((res) => {
|
||||
setUsers(res.users);
|
||||
setFollowGroups(res.rolesFollowGroups);
|
||||
})
|
||||
.catch((err) => setError(String(err)));
|
||||
}
|
||||
|
||||
@@ -58,6 +64,12 @@ export default function Users() {
|
||||
</button>
|
||||
</div>
|
||||
<ErrorNotice error={error} />
|
||||
{followGroups && (
|
||||
<div className="alert alert-info">
|
||||
Roles are set from sign-in groups, so they can't be changed here: change a person's group in the identity provider, and their role follows at their next sign-in.{" "}
|
||||
<Link to="/settings/sign-in">Sign-in settings</Link>
|
||||
</div>
|
||||
)}
|
||||
<div className="card">
|
||||
<div className="card-header">
|
||||
<SearchBox value={tableSearch.query} onChange={tableSearch.setQuery} />
|
||||
@@ -69,6 +81,7 @@ export default function Users() {
|
||||
<SortableTh<UserRecord> label="Name" sortKeyName="name" activeKey={sortKey} direction={sortDir} onSort={requestSort} />
|
||||
<SortableTh<UserRecord> label="Email" sortKeyName="email" activeKey={sortKey} direction={sortDir} onSort={requestSort} />
|
||||
<SortableTh<UserRecord> label="Role" sortKeyName="role" activeKey={sortKey} direction={sortDir} onSort={requestSort} />
|
||||
<th>Groups at last sign-in</th>
|
||||
<SortableTh<UserRecord>
|
||||
label="Last login"
|
||||
sortKeyName="lastLoginAt"
|
||||
@@ -87,7 +100,8 @@ export default function Users() {
|
||||
<select
|
||||
className="form-select form-select-sm"
|
||||
value={u.role}
|
||||
disabled={savingId === u.id}
|
||||
disabled={savingId === u.id || followGroups}
|
||||
title={followGroups ? "Set from sign-in groups" : undefined}
|
||||
onChange={(e) => changeRole(u.id, e.target.value as UserRole)}
|
||||
>
|
||||
{ROLES.map((r) => (
|
||||
@@ -97,12 +111,15 @@ export default function Users() {
|
||||
))}
|
||||
</select>
|
||||
</td>
|
||||
<td className="text-secondary small">
|
||||
{u.groups === null ? "—" : u.groups.length === 0 ? "none" : u.groups.length <= 3 ? u.groups.join(", ") : `${u.groups.slice(0, 3).join(", ")} and ${u.groups.length - 3} more`}
|
||||
</td>
|
||||
<td>{u.lastLoginAt ? formatDateTime(new Date(u.lastLoginAt)) : "never"}</td>
|
||||
</tr>
|
||||
))}
|
||||
{sorted?.length === 0 && (
|
||||
<tr>
|
||||
<td colSpan={4} className="text-secondary text-center">
|
||||
<td colSpan={5} className="text-secondary text-center">
|
||||
No users yet.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in new issue
Block a user