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
Release / release (push) Successful in 26s
This commit is contained in:
1 parent
4b5318c676
commit
0cec95c19b
72 files changed
+910
-861
No files matched your search
+13
-8
@@ -4,10 +4,15 @@ import Refresh from '@mui/icons-material/Refresh'
|
||||
import { Alert, Box, Button, Table, TableBody, TableCell, TableHead, TablePagination, TableRow } from '@mui/material'
|
||||
import { useCallback, useEffect, useRef, useState } from 'react'
|
||||
import BackupDialog from './BackupDialog.tsx'
|
||||
import { BackupChip, TARGET_LABELS, backupRows, when } from './BackupSummary.tsx'
|
||||
import { Board, BoardButtons, useBoard, type BoardPanel } from './PanelBoard.tsx'
|
||||
import { Pairs, bytes } from './ServerPanel.tsx'
|
||||
import SearchField, { matches } from './SearchField.tsx'
|
||||
import { BackupChip } from './BackupSummary.tsx'
|
||||
import { backupRows, TARGET_LABELS } from './backup.ts'
|
||||
import { when } from './format.ts'
|
||||
import { Board, BoardButtons, type BoardPanel } from './PanelBoard.tsx'
|
||||
import { useBoard } from './useBoard.ts'
|
||||
import { Pairs } from './ServerPanel.tsx'
|
||||
import { bytes } from './format.ts'
|
||||
import SearchField from './SearchField.tsx'
|
||||
import { matches } from './search.ts'
|
||||
import Toolbar from './Toolbar.tsx'
|
||||
import { ApiError, BACKUP_KEEPS, BACKUP_SCHEDULES, BACKUP_SETTINGS_SHAPE, BACKUP_SHAPE, STARTED_SHAPE, request, type Backup } from './api.ts'
|
||||
|
||||
@@ -41,22 +46,22 @@ export default function BackupPanel() {
|
||||
// The start of the last run when Run now was pressed; watching ends once a later run has ended.
|
||||
const startedBefore = useRef<string | null>(null)
|
||||
|
||||
/** Reads the backups; the state changes only once the server answers. */
|
||||
const refresh = useCallback(async () => {
|
||||
try {
|
||||
const found = await request<Backup>('GET', '/backup', BACKUP_SHAPE)
|
||||
await request<Backup>('GET', '/backup', BACKUP_SHAPE).then((found) => {
|
||||
setBackup(found)
|
||||
setError(null)
|
||||
setUnavailable(false)
|
||||
if (found.state && found.state.result !== 'running' && found.state.started !== startedBefore.current) {
|
||||
setWatching(false)
|
||||
}
|
||||
} catch (caught) {
|
||||
}, (caught) => {
|
||||
const failure = caught as ApiError
|
||||
setBackup(null)
|
||||
setUnavailable(failure.status === 404)
|
||||
setError(failure.message)
|
||||
setWatching(false)
|
||||
}
|
||||
})
|
||||
}, [])
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
Reference in new issue
Block a user