feature: the CA certificates and CRLs are always published over HTTP and HTTPS on the status and Manager ports, the Shell page is an entry of the page menu, and the web interface passes its lint.
Release / release (push) Successful in 26s

This commit is contained in:
slawek committed 2026-11-24 18:06:34 +01:00
1 parent 4b5318c676
commit 0cec95c19b
72 files changed
+910 -861

No files matched your search

+23 -18
View File
@@ -30,31 +30,36 @@ export default function SiteToSitePanel() {
const [error, setError] = useState<string | null>(null)
const [unavailable, setUnavailable] = useState(false)
const [note, setNote] = useState<string | null>(null)
const [busy, setBusy] = useState(false)
const [busy, setBusy] = useState(true)
const [adding, setAdding] = useState(false)
const [editing, setEditing] = useState<SiteToSiteConnection | null>(null)
const [confirm, setConfirm] = useState<ConfirmDialogProps | null>(null)
const refresh = useCallback(async () => {
setBusy(true)
try {
const found = await request<{ connections: SiteToSiteConnection[] }>('GET', '/site-to-site', SITE_TO_SITE_SHAPE)
setConnections(found.connections)
setError(null)
setUnavailable(false)
} catch (caught) {
const failure = caught as ApiError
setConnections(null)
setUnavailable(failure.status === 404)
setError(failure.message)
} finally {
setBusy(false)
}
/** Reads the connections; the state changes only once the server answers. */
const read = useCallback(async () => {
await request<{ connections: SiteToSiteConnection[] }>('GET', '/site-to-site', SITE_TO_SITE_SHAPE)
.then((found) => {
setConnections(found.connections)
setError(null)
setUnavailable(false)
}, (caught) => {
const failure = caught as ApiError
setConnections(null)
setUnavailable(failure.status === 404)
setError(failure.message)
})
.finally(() => setBusy(false))
}, [])
/** Reads the connections again, busy until the server answers. */
const refresh = useCallback(() => {
setBusy(true)
return read()
}, [read])
useEffect(() => {
void refresh()
}, [refresh])
void read()
}, [read])
function remove(connection: SiteToSiteConnection) {
setConfirm({