(core) add a sandbox check to admin panel, and start reconciling boot and admin pages

Summary:
This adds a basic sandbox check to the admin panel. It also makes
the "probes" used in the boot page available from the admin panel,
though they are not yet displayed. The sandbox check is built as
a probe.

In the interests of time, a lot of steps had to be deferred:
 * Reconcile fully the admin panel and boot page. Specifically, the
   admin panel should be equally robust to common configuration problems.
 * Add tests for the sandbox check.
 * Generalize to multi-server setups. The read-out will not yet be useful
   for setups where doc workers and home servers are configured
   separately.

Test Plan: Added new test

Reviewers: jarek, georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D4241
This commit is contained in:
Paul Fitzpatrick
2024-04-29 20:31:10 -04:00
parent 61cb80d4e3
commit d431c1eb63
15 changed files with 385 additions and 125 deletions

View File

@@ -1,9 +1,11 @@
import { SandboxInfo } from 'app/common/SandboxInfo';
export type BootProbeIds =
'boot-page' |
'health-check' |
'reachable' |
'host-header' |
'sandboxing' |
'system-user'
;
@@ -20,3 +22,4 @@ export interface BootProbeInfo {
name: string;
}
export type SandboxingBootProbeDetails = SandboxInfo;

View File

@@ -0,0 +1,9 @@
export interface SandboxInfo {
flavor: string; // the type of sandbox in use (gvisor, unsandboxed, etc)
functional: boolean; // whether the sandbox can run code
effective: boolean; // whether the sandbox is actually giving protection
configured: boolean; // whether a sandbox type has been specified
// if sandbox fails to run, this records the last step that worked
lastSuccessfulStep: 'none' | 'create' | 'use' | 'all';
error?: string; // if sandbox fails, this stores an error
}

View File

@@ -87,6 +87,7 @@ export const commonUrls = {
helpCalendarWidget: "https://support.getgrist.com/widget-calendar",
helpLinkKeys: "https://support.getgrist.com/examples/2021-04-link-keys",
helpFilteringReferenceChoices: "https://support.getgrist.com/col-refs/#filtering-reference-choices-in-dropdown",
helpSandboxing: "https://support.getgrist.com/self-managed/#how-do-i-sandbox-documents",
freeCoachingCall: getFreeCoachingCallUrl(),
contactSupport: getContactSupportUrl(),
plans: "https://www.getgrist.com/pricing",