mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
wip(dedicated-db): in-progress overview/HA/storage tweaks
This commit is contained in:
@@ -17,7 +17,7 @@ Tracking file for all missing dedicated DB features in console vs cloud/edge/ddb
|
||||
- [x] `BackupStorageProvider` (s3, gcs, azure)
|
||||
- [x] `RestorationType` (backup, pitr)
|
||||
- [x] `RestorationStatusValue` (pending, running, completed, failed)
|
||||
- [x] `HASyncMode` (async, sync, quorum)
|
||||
- [x] `HighAvailabilitySyncMode` (async, sync, quorum)
|
||||
- [x] `ReplicaRole` (primary, standby, readReplica)
|
||||
- [x] `MaintenanceDay` (sun–sat)
|
||||
- [x] `DataResidency` (eu, us, apac, global)
|
||||
@@ -31,7 +31,7 @@ Tracking file for all missing dedicated DB features in console vs cloud/edge/ddb
|
||||
|
||||
## 2. Properties on `DedicatedDatabase` Type — ALL DONE
|
||||
|
||||
- [x] `projectId`, `externalIP`, `internalIP`, `lastActivityAt`, `idleUntil`, `networkPublicTcp`
|
||||
- [x] `projectId`, `externalIP`, `internalIP`, `lastAccessedAt`, `idleUntil`, `networkPublicTcp`
|
||||
- [x] `storageAutoscaling`, `storageAutoscalingMaxGb`, `storageAutoscalingThresholdPercent`
|
||||
- [x] `securityEncryptionAtRest`, `securityKeyManagement`, `securityKeyRotationDays`, `securityCMKKeyId`
|
||||
- [x] `securityAuditLogEnabled`, `securityLogRetentionDays`, `securityDataResidency`
|
||||
|
||||
+3
-15
@@ -35,7 +35,6 @@
|
||||
sqlApiAllowedStatements?: string[];
|
||||
maintenanceUpgradePolicy?: string;
|
||||
networkPublicTcp?: boolean;
|
||||
internalIP?: string;
|
||||
};
|
||||
|
||||
const {
|
||||
@@ -54,7 +53,6 @@
|
||||
sqlApiAllowedStatements: [],
|
||||
maintenanceUpgradePolicy: 'manual',
|
||||
networkPublicTcp: false,
|
||||
internalIP: '',
|
||||
pitrRetentionDays: 0,
|
||||
storageAutoscaling: false,
|
||||
storageAutoscalingThresholdPercent: 0,
|
||||
@@ -432,16 +430,6 @@
|
||||
{#if defaultDatabaseName}
|
||||
<CopyInput label="Database" value={defaultDatabaseName} />
|
||||
{/if}
|
||||
{#if database.externalIP || database.internalIP}
|
||||
<Layout.Grid columns={2} columnsS={1} gap="m">
|
||||
{#if database.externalIP}
|
||||
<CopyInput label="External IP" value={database.externalIP} />
|
||||
{/if}
|
||||
{#if database.internalIP}
|
||||
<CopyInput label="Internal IP" value={database.internalIP} />
|
||||
{/if}
|
||||
</Layout.Grid>
|
||||
{/if}
|
||||
{:else}
|
||||
<Layout.Stack gap="m">
|
||||
<CopyInput label="Connection String" value={resolvedConnectionString} />
|
||||
@@ -577,16 +565,16 @@
|
||||
Replicas
|
||||
</Typography.Caption>
|
||||
<Typography.Text variant="m-500">
|
||||
{database.haReplicaCount}
|
||||
{database.highAvailabilityReplicaCount}
|
||||
</Typography.Text>
|
||||
</Layout.Stack>
|
||||
{#if database.haSyncMode}
|
||||
{#if database.highAvailabilitySyncMode}
|
||||
<Layout.Stack gap="xxs">
|
||||
<Typography.Caption variant="400" color="--fgcolor-neutral-tertiary">
|
||||
Sync Mode
|
||||
</Typography.Caption>
|
||||
<Typography.Text variant="m-500">
|
||||
{capitalize(database.haSyncMode)}
|
||||
{capitalize(database.highAvailabilitySyncMode)}
|
||||
</Typography.Text>
|
||||
</Layout.Stack>
|
||||
{/if}
|
||||
|
||||
+9
-9
@@ -8,7 +8,7 @@
|
||||
import { addNotification } from '$lib/stores/notifications';
|
||||
import { sdk } from '$lib/stores/sdk';
|
||||
import { onMount } from 'svelte';
|
||||
import { HaSyncMode, type Models } from '@appwrite.io/console';
|
||||
import { HighAvailabilitySyncMode, type Models } from '@appwrite.io/console';
|
||||
import { Badge, Layout } from '@appwrite.io/pink-svelte';
|
||||
|
||||
let {
|
||||
@@ -17,9 +17,9 @@
|
||||
database: Models.DedicatedDatabase;
|
||||
} = $props();
|
||||
|
||||
type HASyncMode = 'async' | 'sync' | 'quorum';
|
||||
type HighAvailabilitySyncMode = 'async' | 'sync' | 'quorum';
|
||||
|
||||
const syncModeOptions: { value: HASyncMode; label: string }[] = [
|
||||
const syncModeOptions: { value: HighAvailabilitySyncMode; label: string }[] = [
|
||||
{ value: 'async', label: 'Asynchronous' },
|
||||
{ value: 'sync', label: 'Synchronous' },
|
||||
{ value: 'quorum', label: 'Quorum' }
|
||||
@@ -29,12 +29,12 @@
|
||||
let isLoading = $state(true);
|
||||
|
||||
let haEnabled: boolean = $state(database.highAvailability);
|
||||
let replicaCount: number = $state(database.haReplicaCount);
|
||||
let syncMode: HASyncMode = $state((database.haSyncMode ?? 'async') as HASyncMode);
|
||||
let replicaCount: number = $state(database.highAvailabilityReplicaCount);
|
||||
let syncMode: HighAvailabilitySyncMode = $state((database.highAvailabilitySyncMode ?? 'async') as HighAvailabilitySyncMode);
|
||||
|
||||
let initialEnabled = $state(database.highAvailability);
|
||||
let initialReplicaCount = $state(database.haReplicaCount);
|
||||
let initialSyncMode: HASyncMode = $state((database.haSyncMode ?? 'async') as HASyncMode);
|
||||
let initialReplicaCount = $state(database.highAvailabilityReplicaCount);
|
||||
let initialSyncMode: HighAvailabilitySyncMode = $state((database.highAvailabilitySyncMode ?? 'async') as HighAvailabilitySyncMode);
|
||||
|
||||
let showFailoverConfirm = $state(false);
|
||||
let isFailingOver = $state(false);
|
||||
@@ -75,8 +75,8 @@
|
||||
await sdk.forProject(page.params.region, page.params.project).compute.updateDatabase({
|
||||
databaseId: database.$id,
|
||||
highAvailability: haEnabled,
|
||||
haReplicaCount: replicaCount,
|
||||
haSyncMode: syncMode as HaSyncMode
|
||||
highAvailabilityReplicaCount: replicaCount,
|
||||
highAvailabilitySyncMode: syncMode as HighAvailabilitySyncMode
|
||||
});
|
||||
|
||||
initialEnabled = haEnabled;
|
||||
|
||||
+1
-1
@@ -52,7 +52,7 @@
|
||||
id="storage"
|
||||
label="Storage (GB)"
|
||||
min={database.storage}
|
||||
max={database.maxStorageGb || 1000}
|
||||
max={database.storageMaxGb || 1000}
|
||||
bind:value={storageGb}
|
||||
required />
|
||||
{#if storageGb < database.storage}
|
||||
|
||||
Reference in New Issue
Block a user