@plutonhq/core-frontend 0.1.13 → 0.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-lib/@types/backups.d.ts +26 -0
- package/dist-lib/@types/backups.d.ts.map +1 -1
- package/dist-lib/@types/devices.d.ts +7 -0
- package/dist-lib/@types/devices.d.ts.map +1 -1
- package/dist-lib/@types/plans.d.ts +21 -1
- package/dist-lib/@types/plans.d.ts.map +1 -1
- package/dist-lib/@types/restores.d.ts +2 -0
- package/dist-lib/@types/restores.d.ts.map +1 -1
- package/dist-lib/components/Device/DeviceBackups/DeviceBackups.d.ts +3 -2
- package/dist-lib/components/Device/DeviceBackups/DeviceBackups.d.ts.map +1 -1
- package/dist-lib/components/Device/DeviceBackups/DeviceBackups.js +73 -85
- package/dist-lib/components/Device/DeviceBackups/DeviceBackups.js.map +1 -1
- package/dist-lib/components/Plan/BackupEvents/BackupEvents.d.ts.map +1 -1
- package/dist-lib/components/Plan/BackupEvents/BackupEvents.js +88 -50
- package/dist-lib/components/Plan/BackupEvents/BackupEvents.js.map +1 -1
- package/dist-lib/components/Plan/BackupEvents/BackupEvents.module.scss.js +70 -38
- package/dist-lib/components/Plan/BackupEvents/BackupEvents.module.scss.js.map +1 -1
- package/dist-lib/components/Plan/BackupProgress/BackupProgress.d.ts.map +1 -1
- package/dist-lib/components/Plan/BackupProgress/BackupProgress.js +166 -123
- package/dist-lib/components/Plan/BackupProgress/BackupProgress.js.map +1 -1
- package/dist-lib/components/Plan/BackupProgress/BackupProgress.module.scss.js +64 -30
- package/dist-lib/components/Plan/BackupProgress/BackupProgress.module.scss.js.map +1 -1
- package/dist-lib/components/Plan/Backups/Backups.d.ts +8 -1
- package/dist-lib/components/Plan/Backups/Backups.d.ts.map +1 -1
- package/dist-lib/components/Plan/Backups/Backups.js +154 -125
- package/dist-lib/components/Plan/Backups/Backups.js.map +1 -1
- package/dist-lib/components/Plan/EditPlan/EditPlan.d.ts.map +1 -1
- package/dist-lib/components/Plan/EditPlan/EditPlan.js +11 -10
- package/dist-lib/components/Plan/EditPlan/EditPlan.js.map +1 -1
- package/dist-lib/components/Plan/Mirrors/MirrorDetails.d.ts +12 -0
- package/dist-lib/components/Plan/Mirrors/MirrorDetails.d.ts.map +1 -0
- package/dist-lib/components/Plan/Mirrors/MirrorDetails.js +68 -0
- package/dist-lib/components/Plan/Mirrors/MirrorDetails.js.map +1 -0
- package/dist-lib/components/Plan/Mirrors/MirrorDetails.module.scss.js +26 -0
- package/dist-lib/components/Plan/Mirrors/MirrorDetails.module.scss.js.map +1 -0
- package/dist-lib/components/Plan/Mirrors/MirrorStatusBadge.d.ts +11 -0
- package/dist-lib/components/Plan/Mirrors/MirrorStatusBadge.d.ts.map +1 -0
- package/dist-lib/components/Plan/Mirrors/MirrorStatusBadge.js +38 -0
- package/dist-lib/components/Plan/Mirrors/MirrorStatusBadge.js.map +1 -0
- package/dist-lib/components/Plan/Mirrors/MirrorStatusBadge.module.scss.js +16 -0
- package/dist-lib/components/Plan/Mirrors/MirrorStatusBadge.module.scss.js.map +1 -0
- package/dist-lib/components/Plan/Mirrors/MirrorStorageSelector.d.ts +14 -0
- package/dist-lib/components/Plan/Mirrors/MirrorStorageSelector.d.ts.map +1 -0
- package/dist-lib/components/Plan/Mirrors/MirrorStorageSelector.js +54 -0
- package/dist-lib/components/Plan/Mirrors/MirrorStorageSelector.js.map +1 -0
- package/dist-lib/components/Plan/Mirrors/MirrorStorageSelector.module.scss.js +26 -0
- package/dist-lib/components/Plan/Mirrors/MirrorStorageSelector.module.scss.js.map +1 -0
- package/dist-lib/components/Plan/Mirrors/MirrorStorageSelectorModal.d.ts +15 -0
- package/dist-lib/components/Plan/Mirrors/MirrorStorageSelectorModal.d.ts.map +1 -0
- package/dist-lib/components/Plan/Mirrors/MirrorStorageSelectorModal.js +34 -0
- package/dist-lib/components/Plan/Mirrors/MirrorStorageSelectorModal.js.map +1 -0
- package/dist-lib/components/Plan/PlanBackups/PlanBackups.d.ts.map +1 -1
- package/dist-lib/components/Plan/PlanBackups/PlanBackups.js +20 -17
- package/dist-lib/components/Plan/PlanBackups/PlanBackups.js.map +1 -1
- package/dist-lib/components/Plan/PlanForm/PlanForm.d.ts +2 -1
- package/dist-lib/components/Plan/PlanForm/PlanForm.d.ts.map +1 -1
- package/dist-lib/components/Plan/PlanForm/PlanForm.js +85 -58
- package/dist-lib/components/Plan/PlanForm/PlanForm.js.map +1 -1
- package/dist-lib/components/Plan/PlanItems/PlanItem.d.ts.map +1 -1
- package/dist-lib/components/Plan/PlanItems/PlanItem.js +58 -59
- package/dist-lib/components/Plan/PlanItems/PlanItem.js.map +1 -1
- package/dist-lib/components/Plan/PlanRemoveModal/PlanRemoveModal.js +8 -8
- package/dist-lib/components/Plan/PlanRemoveModal/PlanRemoveModal.js.map +1 -1
- package/dist-lib/components/Plan/PlanSettings/PlanReplicationSettings.d.ts +14 -0
- package/dist-lib/components/Plan/PlanSettings/PlanReplicationSettings.d.ts.map +1 -0
- package/dist-lib/components/Plan/PlanSettings/PlanReplicationSettings.js +290 -0
- package/dist-lib/components/Plan/PlanSettings/PlanReplicationSettings.js.map +1 -0
- package/dist-lib/components/Plan/PlanSettings/PlanReplicationSettings.module.scss.js +26 -0
- package/dist-lib/components/Plan/PlanSettings/PlanReplicationSettings.module.scss.js.map +1 -0
- package/dist-lib/components/Plan/PlanStats/PlanStats.d.ts.map +1 -1
- package/dist-lib/components/Plan/PlanStats/PlanStats.js +41 -42
- package/dist-lib/components/Plan/PlanStats/PlanStats.js.map +1 -1
- package/dist-lib/components/Plan/PlanStats/PlanStats.module.scss.js +5 -5
- package/dist-lib/components/Plan/PlanStorageInfo/PlanStorageInfo.d.ts +15 -0
- package/dist-lib/components/Plan/PlanStorageInfo/PlanStorageInfo.d.ts.map +1 -0
- package/dist-lib/components/Plan/PlanStorageInfo/PlanStorageInfo.js +69 -0
- package/dist-lib/components/Plan/PlanStorageInfo/PlanStorageInfo.js.map +1 -0
- package/dist-lib/components/Plan/PlanStorageInfo/PlanStorageInfo.module.scss.js +16 -0
- package/dist-lib/components/Plan/PlanStorageInfo/PlanStorageInfo.module.scss.js.map +1 -0
- package/dist-lib/components/Restore/RestoreWizard/RestoreConfirmStep.d.ts.map +1 -1
- package/dist-lib/components/Restore/RestoreWizard/RestoreConfirmStep.js +36 -34
- package/dist-lib/components/Restore/RestoreWizard/RestoreConfirmStep.js.map +1 -1
- package/dist-lib/components/Restore/RestoreWizard/RestorePreviewStep.d.ts.map +1 -1
- package/dist-lib/components/Restore/RestoreWizard/RestorePreviewStep.js +7 -5
- package/dist-lib/components/Restore/RestoreWizard/RestorePreviewStep.js.map +1 -1
- package/dist-lib/components/Restore/RestoreWizard/RestoreSettingsStep.d.ts +12 -4
- package/dist-lib/components/Restore/RestoreWizard/RestoreSettingsStep.d.ts.map +1 -1
- package/dist-lib/components/Restore/RestoreWizard/RestoreSettingsStep.js +44 -32
- package/dist-lib/components/Restore/RestoreWizard/RestoreSettingsStep.js.map +1 -1
- package/dist-lib/components/Restore/RestoreWizard/RestoreWizard.d.ts +5 -1
- package/dist-lib/components/Restore/RestoreWizard/RestoreWizard.d.ts.map +1 -1
- package/dist-lib/components/Restore/RestoreWizard/RestoreWizard.js +48 -44
- package/dist-lib/components/Restore/RestoreWizard/RestoreWizard.js.map +1 -1
- package/dist-lib/components/Restore/RestoreWizard/RestoreWizard.module.scss.js +32 -32
- package/dist-lib/components/Settings/GeneralSettings/GeneralSettings.js +14 -14
- package/dist-lib/components/Settings/GeneralSettings/GeneralSettings.js.map +1 -1
- package/dist-lib/components/Settings/IntegrationSettings/IntegrationSettings.d.ts.map +1 -1
- package/dist-lib/components/Settings/IntegrationSettings/IntegrationSettings.js +28 -19
- package/dist-lib/components/Settings/IntegrationSettings/IntegrationSettings.js.map +1 -1
- package/dist-lib/components/common/Icon/Icon.d.ts.map +1 -1
- package/dist-lib/components/common/Icon/Icon.js +11 -0
- package/dist-lib/components/common/Icon/Icon.js.map +1 -1
- package/dist-lib/components/common/PageHeader/PageHeader.module.scss.js +6 -6
- package/dist-lib/components/index.d.ts +4 -0
- package/dist-lib/components/index.d.ts.map +1 -1
- package/dist-lib/components.js +86 -78
- package/dist-lib/components.js.map +1 -1
- package/dist-lib/hooks/usePwaAutoUpdate.d.ts +11 -2
- package/dist-lib/hooks/usePwaAutoUpdate.d.ts.map +1 -1
- package/dist-lib/hooks/usePwaAutoUpdate.js +32 -10
- package/dist-lib/hooks/usePwaAutoUpdate.js.map +1 -1
- package/dist-lib/router.d.ts.map +1 -1
- package/dist-lib/router.js +46 -35
- package/dist-lib/router.js.map +1 -1
- package/dist-lib/routes/DeviceSingle/DeviceSingle.d.ts.map +1 -1
- package/dist-lib/routes/DeviceSingle/DeviceSingle.js +40 -40
- package/dist-lib/routes/DeviceSingle/DeviceSingle.js.map +1 -1
- package/dist-lib/services/backups.d.ts +15 -2
- package/dist-lib/services/backups.d.ts.map +1 -1
- package/dist-lib/services/backups.js +119 -100
- package/dist-lib/services/backups.js.map +1 -1
- package/dist-lib/services/plans.d.ts +14 -0
- package/dist-lib/services/plans.d.ts.map +1 -1
- package/dist-lib/services/plans.js +160 -129
- package/dist-lib/services/plans.js.map +1 -1
- package/dist-lib/services/restores.d.ts +10 -2
- package/dist-lib/services/restores.d.ts.map +1 -1
- package/dist-lib/services/restores.js +61 -57
- package/dist-lib/services/restores.js.map +1 -1
- package/dist-lib/services/users.d.ts.map +1 -1
- package/dist-lib/services/users.js +32 -32
- package/dist-lib/services/users.js.map +1 -1
- package/dist-lib/services.js +107 -103
- package/dist-lib/styles/core-frontend.css +1 -1
- package/dist-lib/utils/progressHelpers.d.ts +12 -1
- package/dist-lib/utils/progressHelpers.d.ts.map +1 -1
- package/dist-lib/utils/progressHelpers.js +121 -63
- package/dist-lib/utils/progressHelpers.js.map +1 -1
- package/dist-lib/utils.js +29 -28
- package/package.json +1 -1
- package/src/@types/backups.ts +28 -0
- package/src/@types/devices.ts +8 -0
- package/src/@types/plans.ts +23 -1
- package/src/@types/restores.ts +2 -0
- package/src/components/Device/DeviceBackups/DeviceBackups.tsx +11 -36
- package/src/components/Plan/BackupEvents/BackupEvents.module.scss +65 -0
- package/src/components/Plan/BackupEvents/BackupEvents.tsx +65 -4
- package/src/components/Plan/BackupProgress/BackupProgress.module.scss +121 -3
- package/src/components/Plan/BackupProgress/BackupProgress.tsx +149 -71
- package/src/components/Plan/Backups/Backups.tsx +52 -4
- package/src/components/Plan/EditPlan/EditPlan.tsx +1 -0
- package/src/components/Plan/Mirrors/MirrorDetails.module.scss +76 -0
- package/src/components/Plan/Mirrors/MirrorDetails.tsx +100 -0
- package/src/components/Plan/Mirrors/MirrorStatusBadge.module.scss +25 -0
- package/src/components/Plan/Mirrors/MirrorStatusBadge.tsx +65 -0
- package/src/components/Plan/Mirrors/MirrorStorageSelector.module.scss +97 -0
- package/src/components/Plan/Mirrors/MirrorStorageSelector.tsx +70 -0
- package/src/components/Plan/Mirrors/MirrorStorageSelectorModal.tsx +40 -0
- package/src/components/Plan/PlanBackups/PlanBackups.tsx +4 -1
- package/src/components/Plan/PlanForm/PlanForm.tsx +30 -3
- package/src/components/Plan/PlanItems/PlanItem.tsx +3 -3
- package/src/components/Plan/PlanRemoveModal/PlanRemoveModal.tsx +1 -1
- package/src/components/Plan/PlanSettings/PlanReplicationSettings.module.scss +105 -0
- package/src/components/Plan/PlanSettings/PlanReplicationSettings.tsx +334 -0
- package/src/components/Plan/PlanStats/PlanStats.module.scss +1 -1
- package/src/components/Plan/PlanStats/PlanStats.tsx +8 -8
- package/src/components/Plan/PlanStorageInfo/PlanStorageInfo.module.scss +43 -0
- package/src/components/Plan/PlanStorageInfo/PlanStorageInfo.tsx +83 -0
- package/src/components/Restore/RestoreWizard/RestoreConfirmStep.tsx +2 -0
- package/src/components/Restore/RestoreWizard/RestorePreviewStep.tsx +2 -0
- package/src/components/Restore/RestoreWizard/RestoreSettingsStep.tsx +36 -13
- package/src/components/Restore/RestoreWizard/RestoreWizard.module.scss +4 -0
- package/src/components/Restore/RestoreWizard/RestoreWizard.tsx +9 -1
- package/src/components/Settings/GeneralSettings/GeneralSettings.tsx +1 -1
- package/src/components/Settings/IntegrationSettings/IntegrationSettings.tsx +9 -2
- package/src/components/common/Icon/Icon.tsx +10 -1
- package/src/components/common/PageHeader/PageHeader.module.scss +3 -0
- package/src/components/index.ts +6 -0
- package/src/hooks/usePwaAutoUpdate.ts +51 -11
- package/src/router.tsx +26 -17
- package/src/routes/DeviceSingle/DeviceSingle.tsx +3 -3
- package/src/services/backups.ts +32 -9
- package/src/services/plans.ts +45 -0
- package/src/services/restores.ts +10 -2
- package/src/services/users.ts +14 -5
- package/src/utils/progressHelpers.ts +85 -1
|
@@ -25,6 +25,7 @@ export function generateBackupProgressMessage(progressData: BackupProgressData |
|
|
|
25
25
|
'pre-backup': 'Pre-Backup',
|
|
26
26
|
backup: 'Backup',
|
|
27
27
|
'post-backup': 'Post-Backup',
|
|
28
|
+
replicating: 'Replicating',
|
|
28
29
|
finished: 'Complete',
|
|
29
30
|
};
|
|
30
31
|
|
|
@@ -72,7 +73,7 @@ const handleScriptAction = (action: string): string | null => {
|
|
|
72
73
|
};
|
|
73
74
|
|
|
74
75
|
// Function to extract numbers from action strings and create meaningful messages
|
|
75
|
-
export const getBackupEventActionMessage = (action: string): string => {
|
|
76
|
+
export const getBackupEventActionMessage = (action: string, storageName?: string): string => {
|
|
76
77
|
// Handle script actions first
|
|
77
78
|
const scriptMessage = handleScriptAction(action);
|
|
78
79
|
if (scriptMessage) {
|
|
@@ -93,6 +94,20 @@ export const getBackupEventActionMessage = (action: string): string => {
|
|
|
93
94
|
return `Scheduling Retry (${parseInt(current)}/${total})...`;
|
|
94
95
|
}
|
|
95
96
|
|
|
97
|
+
// Handle replication retry scheduling
|
|
98
|
+
const replicationRetryScheduledMatch = action.match(/REPLICATION_RETRY_(\d+)_OF_(\d+)_SCHEDULED/);
|
|
99
|
+
if (replicationRetryScheduledMatch) {
|
|
100
|
+
const [, current, total] = replicationRetryScheduledMatch;
|
|
101
|
+
return `Retrying (${current}/${total})...`;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// Handle replication retry start
|
|
105
|
+
const replicationRetryStartMatch = action.match(/REPLICATION_RETRY_(\d+)_OF_(\d+)_START/);
|
|
106
|
+
if (replicationRetryStartMatch) {
|
|
107
|
+
const [, current, total] = replicationRetryStartMatch;
|
|
108
|
+
return `Retrying (${current}/${total})...`;
|
|
109
|
+
}
|
|
110
|
+
|
|
96
111
|
// Static action mappings
|
|
97
112
|
const staticMessages: Record<string, string> = {
|
|
98
113
|
INITIALIZE: 'Starting Backup...',
|
|
@@ -134,8 +149,53 @@ export const getBackupEventActionMessage = (action: string): string => {
|
|
|
134
149
|
ISO_UPLOAD_COMPLETE: 'ISO Upload Complete',
|
|
135
150
|
ISO_UPLOAD_FAILED: 'ISO Upload Failed',
|
|
136
151
|
BACKUP_WARNING: 'Hiccup Detected During Backup',
|
|
152
|
+
// Replication actions
|
|
153
|
+
REPLICATION_START: 'Replicating Snapshots...',
|
|
154
|
+
REPLICATION_INIT_START: 'Initializing Replication Repository...',
|
|
155
|
+
REPLICATION_INIT_COMPLETE: 'Replication Repository Initialized',
|
|
156
|
+
REPLICATION_INIT_FAILED: 'Replication Repository Init Failed',
|
|
157
|
+
REPLICATION_UNLOCK_START: 'Unlocking Replication Repository...',
|
|
158
|
+
REPLICATION_UNLOCK_COMPLETE: 'Replication Repository Unlocked',
|
|
159
|
+
REPLICATION_COPY_START: 'Copying Snapshot to Replication...',
|
|
160
|
+
REPLICATION_COPY_COMPLETE: 'Snapshot Copied to Replication',
|
|
161
|
+
REPLICATION_COPY_FAILED: 'Replication Copy Failed',
|
|
162
|
+
REPLICATION_PRUNE_START: 'Pruning Replication Repository...',
|
|
163
|
+
REPLICATION_PRUNE_COMPLETE: 'Replication Prune Complete',
|
|
164
|
+
REPLICATION_PRUNE_FAILED: 'Replication Prune Failed',
|
|
165
|
+
REPLICATION_STATS_START: 'Updating Replication Stats...',
|
|
166
|
+
REPLICATION_STATS_COMPLETE: 'Replication Stats Updated',
|
|
167
|
+
REPLICATION_COMPLETE: 'Replication Complete',
|
|
168
|
+
REPLICATION_FAILED: 'Replication Failed',
|
|
169
|
+
REPLICATION_PARTIAL_FAILURE: 'Some Replications Failed',
|
|
170
|
+
REPLICATION_MANUAL_RETRY_START: 'Retrying Failed Replications...',
|
|
171
|
+
REPLICATION_MANUAL_RETRY_COMPLETE: 'Replication Retry Complete',
|
|
172
|
+
REPLICATION_MANUAL_RETRY_PARTIAL_FAILURE: 'Some Replication Retries Still Failed',
|
|
137
173
|
};
|
|
138
174
|
|
|
175
|
+
// Storage-name-aware replication action mappings
|
|
176
|
+
const replicationMessagesWithStorage: Record<string, (name: string) => string> = {
|
|
177
|
+
REPLICATION_START: (name) => `Replicating Snapshot to ${name}...`,
|
|
178
|
+
REPLICATION_INIT_START: (name) => `Initializing Replication Repository in ${name}...`,
|
|
179
|
+
REPLICATION_INIT_COMPLETE: (name) => `Replication Repository Initialized in ${name}`,
|
|
180
|
+
REPLICATION_INIT_FAILED: (name) => `Replication Repository Init Failed in ${name}`,
|
|
181
|
+
REPLICATION_UNLOCK_START: (name) => `Unlocking Replication Repository in ${name}...`,
|
|
182
|
+
REPLICATION_UNLOCK_COMPLETE: (name) => `Replication Repository Unlocked in ${name}`,
|
|
183
|
+
REPLICATION_COPY_START: (name) => `Copying Snapshot to ${name}...`,
|
|
184
|
+
REPLICATION_COPY_COMPLETE: (name) => `Snapshot Copied to ${name}`,
|
|
185
|
+
REPLICATION_COPY_FAILED: (name) => `Replication Copy Failed for ${name}`,
|
|
186
|
+
REPLICATION_PRUNE_START: (name) => `Pruning Replication Repository in ${name}...`,
|
|
187
|
+
REPLICATION_PRUNE_COMPLETE: (name) => `Replication Prune Complete for ${name}`,
|
|
188
|
+
REPLICATION_PRUNE_FAILED: (name) => `Replication Prune Failed for ${name}`,
|
|
189
|
+
REPLICATION_STATS_START: (name) => `Updating Replication Stats for ${name}...`,
|
|
190
|
+
REPLICATION_STATS_COMPLETE: (name) => `Replication Stats Updated for ${name}`,
|
|
191
|
+
REPLICATION_COMPLETE: (name) => `Replication Complete for ${name}`,
|
|
192
|
+
REPLICATION_FAILED: (name) => `Replication Failed for ${name}`,
|
|
193
|
+
};
|
|
194
|
+
|
|
195
|
+
if (storageName && replicationMessagesWithStorage[action]) {
|
|
196
|
+
return replicationMessagesWithStorage[action](storageName);
|
|
197
|
+
}
|
|
198
|
+
|
|
139
199
|
return staticMessages[action] || action;
|
|
140
200
|
};
|
|
141
201
|
|
|
@@ -242,3 +302,27 @@ export function extractResticData(progressData: BackupProgressData | null) {
|
|
|
242
302
|
|
|
243
303
|
return eventWithResticData?.resticData || null;
|
|
244
304
|
}
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* Generates a human-readable progress message for a specific replication mirror.
|
|
308
|
+
* Uses the mirror's latest event action and includes the storage name.
|
|
309
|
+
*/
|
|
310
|
+
export function generateMirrorProgressMessage(mirror: { storageName: string; events?: { action: string; completed: boolean }[] }): string {
|
|
311
|
+
if (!mirror.events?.length) {
|
|
312
|
+
return 'Pending...';
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
// Find the last incomplete event or the most recent event
|
|
316
|
+
const lastIncompleteEvent = mirror.events
|
|
317
|
+
.slice()
|
|
318
|
+
.reverse()
|
|
319
|
+
.find((event) => !event.completed);
|
|
320
|
+
|
|
321
|
+
const currentEvent = lastIncompleteEvent || mirror.events[mirror.events.length - 1];
|
|
322
|
+
|
|
323
|
+
if (!currentEvent) {
|
|
324
|
+
return 'Pending...';
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
return getBackupEventActionMessage(currentEvent.action, mirror.storageName);
|
|
328
|
+
}
|