@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
|
@@ -1,22 +1,24 @@
|
|
|
1
|
-
import { jsxs as l, jsx as e, Fragment as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { toast as
|
|
4
|
-
import { formatDuration as
|
|
1
|
+
import { jsxs as l, jsx as e, Fragment as ie } from "react/jsx-runtime";
|
|
2
|
+
import { useState as h } from "react";
|
|
3
|
+
import { toast as f } from "react-toastify";
|
|
4
|
+
import { formatDuration as ae, formatBytes as le, formatNumberToK as se, timeAgo as V, formatDateTime as F } from "../../../utils/helpers.js";
|
|
5
5
|
import s from "../../common/Icon/Icon.js";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { useDeleteBackup as
|
|
9
|
-
import { useQueryClient as
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
|
|
6
|
+
import o from "./Backups.module.scss.js";
|
|
7
|
+
import j from "../../common/ActionModal/ActionModal.js";
|
|
8
|
+
import { useDeleteBackup as de, useUpdateBackup as re, useDownloadBackup as ne, useCancelBackupDownload as ce, useGetBackupDownload as me } from "../../../services/backups.js";
|
|
9
|
+
import { useQueryClient as pe } from "@tanstack/react-query";
|
|
10
|
+
import ue from "../../Restore/RestoreWizard/RestoreWizard.js";
|
|
11
|
+
import he from "../../common/StatusLabel/StatusLabel.js";
|
|
12
|
+
import fe from "../BackupEvents/BackupEvents.js";
|
|
13
|
+
import W from "../../common/form/Input/Input.js";
|
|
14
|
+
import ve from "../Mirrors/MirrorStatusBadge.js";
|
|
15
|
+
import ke from "../Mirrors/MirrorStorageSelectorModal.js";
|
|
16
|
+
const we = ({ download: a, downloadBackup: B }) => {
|
|
15
17
|
if ((a == null ? void 0 : a.status) === "started")
|
|
16
18
|
return /* @__PURE__ */ e(
|
|
17
19
|
"span",
|
|
18
20
|
{
|
|
19
|
-
className:
|
|
21
|
+
className: o.downloadLabel,
|
|
20
22
|
"data-tooltip-id": "htmlToolTip",
|
|
21
23
|
"data-tooltip-place": "top",
|
|
22
24
|
"data-tooltip-html": "<div>Generating Download...</div>",
|
|
@@ -27,7 +29,7 @@ const ce = ({ download: a, downloadBackup: D }) => {
|
|
|
27
29
|
return /* @__PURE__ */ e(
|
|
28
30
|
"span",
|
|
29
31
|
{
|
|
30
|
-
className: `${
|
|
32
|
+
className: `${o.downloadLabelFailed} ${o.downloadLabel}`,
|
|
31
33
|
"data-tooltip-id": "htmlToolTip",
|
|
32
34
|
"data-tooltip-place": "top",
|
|
33
35
|
"data-tooltip-html": `<div><div>Download Generation Failed!</div>${a.error ? `<div>${a.error}<div>` : ""}</div>`,
|
|
@@ -35,84 +37,89 @@ const ce = ({ download: a, downloadBackup: D }) => {
|
|
|
35
37
|
}
|
|
36
38
|
);
|
|
37
39
|
if ((a == null ? void 0 : a.status) === "complete") {
|
|
38
|
-
let
|
|
40
|
+
let n;
|
|
39
41
|
if (a != null && a.ended) {
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
+
const N = a.ended * 1e3 + 1440 * 60 * 1e3, d = Date.now();
|
|
43
|
+
n = Math.max(0, Math.floor((N - d) / (3600 * 1e3)));
|
|
42
44
|
}
|
|
43
|
-
return
|
|
45
|
+
return n ? /* @__PURE__ */ e(
|
|
44
46
|
"span",
|
|
45
47
|
{
|
|
46
|
-
className: `${
|
|
47
|
-
onClick:
|
|
48
|
+
className: `${o.downloadLabelDone} ${o.downloadLabel}`,
|
|
49
|
+
onClick: B,
|
|
48
50
|
"data-tooltip-id": "htmlToolTip",
|
|
49
51
|
"data-tooltip-place": "top",
|
|
50
|
-
"data-tooltip-html": `<div><div>Download Generated. Click to Download. ${
|
|
52
|
+
"data-tooltip-html": `<div><div>Download Generated. Click to Download. ${n ? `Valid for the next ${n} hours.` : "⚠ Download Expired!"} </div>`,
|
|
51
53
|
children: /* @__PURE__ */ e(s, { type: "download", size: 12 })
|
|
52
54
|
}
|
|
53
55
|
) : null;
|
|
54
56
|
} else
|
|
55
57
|
return;
|
|
56
|
-
},
|
|
58
|
+
}, Pe = ({
|
|
57
59
|
planId: a,
|
|
58
|
-
method:
|
|
59
|
-
backups:
|
|
60
|
-
sourceId:
|
|
61
|
-
sourceType:
|
|
60
|
+
method: B,
|
|
61
|
+
backups: n = [],
|
|
62
|
+
sourceId: U,
|
|
63
|
+
sourceType: N,
|
|
64
|
+
replicationSettings: d,
|
|
65
|
+
storage: L,
|
|
66
|
+
deviceId: Y
|
|
62
67
|
// snapLimit,
|
|
63
68
|
}) => {
|
|
64
|
-
const [
|
|
65
|
-
console.log("backups :",
|
|
66
|
-
const
|
|
67
|
-
console.log("remove :", t.id),
|
|
69
|
+
const [v, D] = h(!1), [$, M] = h(!1), [k, G] = h(!1), [q, H] = h(!1), [c, w] = h(!1), [C, E] = h(!1), I = pe(), z = de(), S = re(), R = ne(), A = ce(), J = me(), m = B === "sync";
|
|
70
|
+
console.log("backups :", n);
|
|
71
|
+
const X = (t) => {
|
|
72
|
+
console.log("remove :", t.id), z.mutate(t.id, {
|
|
68
73
|
onError: () => {
|
|
69
|
-
|
|
74
|
+
f.error(`Failed to Remove "backup-${t.id}"`);
|
|
70
75
|
},
|
|
71
76
|
onSuccess: () => {
|
|
72
|
-
|
|
77
|
+
I.invalidateQueries({ queryKey: ["plan", a] }), f.success(`Backup "backup-${t.id}" Removed Successfully.`), M(!1);
|
|
73
78
|
}
|
|
74
79
|
});
|
|
75
|
-
},
|
|
76
|
-
const
|
|
80
|
+
}, Z = (t) => {
|
|
81
|
+
const i = {
|
|
77
82
|
title: t.title,
|
|
78
83
|
description: t.description
|
|
79
84
|
};
|
|
80
|
-
console.log("update :", t.id,
|
|
81
|
-
{ backupId: t.id, updatePayload:
|
|
85
|
+
console.log("update :", t.id, i), !(!i.title && !i.description) && S.mutate(
|
|
86
|
+
{ backupId: t.id, updatePayload: i },
|
|
82
87
|
{
|
|
83
88
|
onError: () => {
|
|
84
|
-
|
|
89
|
+
f.error(`Failed to Update "backup-${t.id}"`);
|
|
85
90
|
},
|
|
86
91
|
onSuccess: () => {
|
|
87
|
-
|
|
92
|
+
I.invalidateQueries({ queryKey: ["plan", a] }), f.success(`Backup "backup-${t.id}" Updated Successfully.`), w(!1);
|
|
88
93
|
}
|
|
89
94
|
}
|
|
90
95
|
);
|
|
91
|
-
},
|
|
92
|
-
|
|
96
|
+
}, _ = (t) => {
|
|
97
|
+
d != null && d.enabled && t.mirrors && t.mirrors.some((i) => i.status === "completed") ? E(t) : K(t.id);
|
|
98
|
+
}, K = (t, i) => {
|
|
99
|
+
f.promise(R.mutateAsync({ backupId: t, planId: a, replicationId: i }), {
|
|
93
100
|
pending: "Sending Download Request...",
|
|
94
101
|
success: "Generating Download. This might take a while..",
|
|
95
102
|
error: {
|
|
96
|
-
render({ data:
|
|
97
|
-
return `Failed to Generate Download. ${(
|
|
103
|
+
render({ data: p }) {
|
|
104
|
+
return `Failed to Generate Download. ${(p == null ? void 0 : p.message) || "Unknown Error."}`;
|
|
98
105
|
}
|
|
99
106
|
}
|
|
100
107
|
});
|
|
101
|
-
},
|
|
102
|
-
|
|
108
|
+
}, ee = (t) => {
|
|
109
|
+
f.promise(A.mutateAsync({ backupId: t, planId: a }), {
|
|
103
110
|
pending: "Cancelling Download...",
|
|
104
111
|
success: "Download Cancelled",
|
|
105
112
|
error: {
|
|
106
|
-
render({ data:
|
|
107
|
-
return `Failed to Cancel Download. ${(
|
|
113
|
+
render({ data: i }) {
|
|
114
|
+
return `Failed to Cancel Download. ${(i == null ? void 0 : i.message) || "Unknown Error."}`;
|
|
108
115
|
}
|
|
109
116
|
}
|
|
110
117
|
});
|
|
111
118
|
};
|
|
112
|
-
return /* @__PURE__ */ l("div", { className:
|
|
113
|
-
/* @__PURE__ */ l("div", { className:
|
|
119
|
+
return /* @__PURE__ */ l("div", { className: o.backupsTable, children: [
|
|
120
|
+
/* @__PURE__ */ l("div", { className: o.backupsTableHead, children: [
|
|
114
121
|
/* @__PURE__ */ l("div", { children: [
|
|
115
|
-
|
|
122
|
+
m ? "Sync" : "Backup",
|
|
116
123
|
" ID"
|
|
117
124
|
] }),
|
|
118
125
|
/* @__PURE__ */ e("div", { children: "Status" }),
|
|
@@ -122,114 +129,115 @@ const ce = ({ download: a, downloadBackup: D }) => {
|
|
|
122
129
|
/* @__PURE__ */ e("div", { children: "Date" }),
|
|
123
130
|
/* @__PURE__ */ e("div", {})
|
|
124
131
|
] }),
|
|
125
|
-
/* @__PURE__ */ l("div", { className:
|
|
126
|
-
|
|
127
|
-
const { id:
|
|
132
|
+
/* @__PURE__ */ l("div", { className: o.backupsTableContent, children: [
|
|
133
|
+
n.filter((t) => !t.inProgress).map((t) => {
|
|
134
|
+
const { id: i, title: p, description: O, started: y, ended: b, download: g, status: P, errorMsg: T, duration: Q, totalFiles: te, totalSize: oe, changes: u, active: x } = t, r = g && g.status === "started";
|
|
128
135
|
return /* @__PURE__ */ l(
|
|
129
136
|
"div",
|
|
130
137
|
{
|
|
131
|
-
className: `${
|
|
138
|
+
className: `${o.backupsTableRow} ${v && v === i ? o.backupsTableRowActive : ""}`,
|
|
132
139
|
children: [
|
|
133
140
|
/* @__PURE__ */ l("div", { children: [
|
|
134
141
|
/* @__PURE__ */ e(
|
|
135
142
|
"span",
|
|
136
143
|
{
|
|
137
|
-
className:
|
|
138
|
-
onClick: () =>
|
|
144
|
+
className: o.editIcon,
|
|
145
|
+
onClick: () => w(t),
|
|
139
146
|
"data-tooltip-id": "htmlToolTip",
|
|
140
147
|
"data-tooltip-html": "Edit Title & Description",
|
|
141
148
|
children: /* @__PURE__ */ e(s, { type: "edit", size: 12 })
|
|
142
149
|
}
|
|
143
150
|
),
|
|
144
|
-
/* @__PURE__ */ l("span", { className:
|
|
145
|
-
/* @__PURE__ */ e(s, { type:
|
|
151
|
+
/* @__PURE__ */ l("span", { className: o.backupTitle, onClick: () => !m && H(i), children: [
|
|
152
|
+
/* @__PURE__ */ e(s, { type: m ? "sync" : "box", size: 14 }),
|
|
146
153
|
" ",
|
|
147
|
-
|
|
154
|
+
p || (m ? `sync-${i}` : `backup-${i}`),
|
|
148
155
|
" "
|
|
149
156
|
] }),
|
|
150
|
-
|
|
151
|
-
!
|
|
152
|
-
|
|
157
|
+
O && /* @__PURE__ */ e("span", { className: o.backupDescription, "data-tooltip-id": "htmlToolTip", "data-tooltip-content": O, children: /* @__PURE__ */ e(s, { type: "note", size: 13 }) }),
|
|
158
|
+
!m && x && /* @__PURE__ */ e("span", { className: o.activeBackup, "data-tooltip-id": "htmlToolTip", "data-tooltip-html": "Active Snapshot", children: /* @__PURE__ */ e(s, { type: "bolt", size: 14 }) }),
|
|
159
|
+
(d == null ? void 0 : d.enabled) && t.mirrors && t.mirrors.length > 0 && /* @__PURE__ */ e(ve, { mirrors: t.mirrors, planId: a, backupId: i, replicationSettings: d }),
|
|
160
|
+
g && /* @__PURE__ */ e(we, { download: g, downloadBackup: () => J.mutate(i) })
|
|
153
161
|
] }),
|
|
154
162
|
/* @__PURE__ */ e(
|
|
155
163
|
"div",
|
|
156
164
|
{
|
|
157
|
-
className: `${
|
|
165
|
+
className: `${o.status} ${T ? o.statusHasError : ""}`,
|
|
158
166
|
"data-tooltip-id": "htmlToolTip",
|
|
159
|
-
"data-tooltip-html": `<div><string>Error</string>: ${
|
|
160
|
-
"data-tooltip-hidden": !
|
|
161
|
-
children: /* @__PURE__ */ e(
|
|
167
|
+
"data-tooltip-html": `<div><string>Error</string>: ${T}</div>`,
|
|
168
|
+
"data-tooltip-hidden": !T,
|
|
169
|
+
children: /* @__PURE__ */ e(he, { status: P, hasError: !!T })
|
|
162
170
|
}
|
|
163
171
|
),
|
|
164
|
-
/* @__PURE__ */ e("div", { title:
|
|
172
|
+
/* @__PURE__ */ e("div", { title: Q + "s", children: ae(Q) }),
|
|
165
173
|
/* @__PURE__ */ l(
|
|
166
174
|
"div",
|
|
167
175
|
{
|
|
168
|
-
className:
|
|
176
|
+
className: o.changes,
|
|
169
177
|
"data-tooltip-id": "htmlToolTip",
|
|
170
178
|
"data-tooltip-html": `
|
|
171
|
-
<div><b>New Items</b>: ${
|
|
172
|
-
<div><b>Modified Items</b>: ${
|
|
173
|
-
<div><b>Deleted Items</b>: ${
|
|
179
|
+
<div><b>New Items</b>: ${u.new}</div>
|
|
180
|
+
<div><b>Modified Items</b>: ${u.modified}</div>
|
|
181
|
+
<div><b>Deleted Items</b>: ${u.removed || 0}</div>
|
|
174
182
|
`,
|
|
175
183
|
children: [
|
|
176
|
-
/* @__PURE__ */ l("span", { className:
|
|
184
|
+
/* @__PURE__ */ l("span", { className: o.changesNew, children: [
|
|
177
185
|
/* @__PURE__ */ e(s, { type: "file-new", size: 12 }),
|
|
178
186
|
" ",
|
|
179
|
-
|
|
187
|
+
u.new
|
|
180
188
|
] }),
|
|
181
189
|
" ",
|
|
182
|
-
/* @__PURE__ */ l("span", { className:
|
|
190
|
+
/* @__PURE__ */ l("span", { className: o.changesModified, children: [
|
|
183
191
|
/* @__PURE__ */ e(s, { type: "file-modified", size: 12 }),
|
|
184
192
|
" ",
|
|
185
|
-
|
|
193
|
+
u.modified
|
|
186
194
|
] }),
|
|
187
195
|
" ",
|
|
188
|
-
/* @__PURE__ */ l("span", { className:
|
|
196
|
+
/* @__PURE__ */ l("span", { className: o.changesRemoved, children: [
|
|
189
197
|
/* @__PURE__ */ e(s, { type: "file-removed", size: 12 }),
|
|
190
198
|
" ",
|
|
191
|
-
|
|
199
|
+
u.removed || 0
|
|
192
200
|
] })
|
|
193
201
|
]
|
|
194
202
|
}
|
|
195
203
|
),
|
|
196
|
-
/* @__PURE__ */ e("div", { "data-tooltip-id": "htmlToolTip", "data-tooltip-html": `${
|
|
204
|
+
/* @__PURE__ */ e("div", { "data-tooltip-id": "htmlToolTip", "data-tooltip-html": `${se(te)} Files `, children: le(oe) }),
|
|
197
205
|
/* @__PURE__ */ e(
|
|
198
206
|
"div",
|
|
199
207
|
{
|
|
200
208
|
"data-tooltip-id": "htmlToolTip",
|
|
201
209
|
"data-tooltip-html": `
|
|
202
|
-
<div><b>Started</b>: ${
|
|
203
|
-
<div><b>Ended</b>: ${
|
|
210
|
+
<div><b>Started</b>: ${F(y)}</div>
|
|
211
|
+
<div><b>Ended</b>: ${b ? F(b) : ""}</div>
|
|
204
212
|
`,
|
|
205
|
-
title:
|
|
206
|
-
children:
|
|
213
|
+
title: F(b || y),
|
|
214
|
+
children: b ? V(new Date(b)) : V(y ? new Date(y) : /* @__PURE__ */ new Date())
|
|
207
215
|
}
|
|
208
216
|
),
|
|
209
|
-
/* @__PURE__ */ e("div", { className:
|
|
210
|
-
|
|
211
|
-
!
|
|
217
|
+
/* @__PURE__ */ e("div", { className: o.snapOptsBtn, children: /* @__PURE__ */ e("button", { onClick: () => D(v && v === i ? !1 : i), children: /* @__PURE__ */ e(s, { type: "dots-vertical", size: 12 }) }) }),
|
|
218
|
+
v === i && /* @__PURE__ */ l("div", { className: o.settings, children: [
|
|
219
|
+
!m && P === "completed" && x && /* @__PURE__ */ l(
|
|
212
220
|
"button",
|
|
213
221
|
{
|
|
214
|
-
className:
|
|
215
|
-
disabled:
|
|
222
|
+
className: R.isPending || A.isPending ? "notAllowed" : "",
|
|
223
|
+
disabled: R.isPending || A.isPending,
|
|
216
224
|
onClick: () => {
|
|
217
|
-
|
|
225
|
+
r ? ee(i) : _(t), D(!1);
|
|
218
226
|
},
|
|
219
227
|
children: [
|
|
220
|
-
/* @__PURE__ */ e(s, { type:
|
|
228
|
+
/* @__PURE__ */ e(s, { type: r ? "close" : "download", size: 14 }),
|
|
221
229
|
" ",
|
|
222
|
-
|
|
230
|
+
r ? "Cancel Download" : "Download"
|
|
223
231
|
]
|
|
224
232
|
}
|
|
225
233
|
),
|
|
226
|
-
|
|
234
|
+
P === "completed" && x && /* @__PURE__ */ l(
|
|
227
235
|
"button",
|
|
228
236
|
{
|
|
229
|
-
className:
|
|
230
|
-
disabled:
|
|
237
|
+
className: r ? "notAllowed" : "",
|
|
238
|
+
disabled: r,
|
|
231
239
|
onClick: () => {
|
|
232
|
-
|
|
240
|
+
r || (G(t), D(!1));
|
|
233
241
|
},
|
|
234
242
|
children: [
|
|
235
243
|
/* @__PURE__ */ e(s, { type: "restore", size: 14 }),
|
|
@@ -240,10 +248,10 @@ const ce = ({ download: a, downloadBackup: D }) => {
|
|
|
240
248
|
/* @__PURE__ */ l(
|
|
241
249
|
"button",
|
|
242
250
|
{
|
|
243
|
-
className:
|
|
244
|
-
disabled:
|
|
251
|
+
className: r ? "notAllowed" : "",
|
|
252
|
+
disabled: r,
|
|
245
253
|
onClick: () => {
|
|
246
|
-
|
|
254
|
+
r || (M(t), D(!1));
|
|
247
255
|
},
|
|
248
256
|
children: [
|
|
249
257
|
/* @__PURE__ */ e(s, { type: "trash", size: 14 }),
|
|
@@ -254,87 +262,108 @@ const ce = ({ download: a, downloadBackup: D }) => {
|
|
|
254
262
|
] })
|
|
255
263
|
]
|
|
256
264
|
},
|
|
257
|
-
|
|
265
|
+
i
|
|
258
266
|
);
|
|
259
267
|
}),
|
|
260
|
-
|
|
268
|
+
n.length === 0 && /* @__PURE__ */ e("div", { className: o.noBackups, children: "Hasn't been backed up yet." })
|
|
261
269
|
] }),
|
|
262
|
-
|
|
263
|
-
|
|
270
|
+
$ && /* @__PURE__ */ e(
|
|
271
|
+
j,
|
|
264
272
|
{
|
|
265
273
|
title: "Remove Backup",
|
|
266
|
-
message: /* @__PURE__ */ l(
|
|
274
|
+
message: /* @__PURE__ */ l(ie, { children: [
|
|
267
275
|
"Are you sure you want to remove the Backup ",
|
|
268
276
|
/* @__PURE__ */ l("strong", { children: [
|
|
269
277
|
'"backup-',
|
|
270
|
-
|
|
278
|
+
$.id,
|
|
271
279
|
'"'
|
|
272
280
|
] }),
|
|
273
281
|
"?"
|
|
274
282
|
] }),
|
|
275
|
-
closeModal: () => !
|
|
283
|
+
closeModal: () => !z.isPending && M(!1),
|
|
276
284
|
width: "400px",
|
|
277
285
|
primaryAction: {
|
|
278
286
|
title: "Yes, Remove Backup",
|
|
279
287
|
type: "danger",
|
|
280
288
|
icon: "trash",
|
|
281
|
-
isPending:
|
|
282
|
-
action: () =>
|
|
289
|
+
isPending: z.isPending,
|
|
290
|
+
action: () => X($)
|
|
283
291
|
}
|
|
284
292
|
}
|
|
285
293
|
),
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
re,
|
|
294
|
+
k && /* @__PURE__ */ e(
|
|
295
|
+
ue,
|
|
289
296
|
{
|
|
290
|
-
|
|
297
|
+
close: () => G(!1),
|
|
291
298
|
planId: a,
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
299
|
+
backupId: k.id,
|
|
300
|
+
deviceId: Y,
|
|
301
|
+
planStorage: L,
|
|
302
|
+
mirrors: d != null && d.enabled && k.mirrors && k.mirrors.some((t) => t.status === "completed") ? k.mirrors : []
|
|
303
|
+
}
|
|
304
|
+
),
|
|
305
|
+
q && /* @__PURE__ */ e(
|
|
306
|
+
fe,
|
|
307
|
+
{
|
|
308
|
+
id: q,
|
|
309
|
+
planId: a,
|
|
310
|
+
sourceId: U,
|
|
311
|
+
sourceType: N,
|
|
312
|
+
close: () => H(!1)
|
|
295
313
|
}
|
|
296
314
|
),
|
|
297
315
|
c && /* @__PURE__ */ e(
|
|
298
|
-
|
|
316
|
+
j,
|
|
299
317
|
{
|
|
300
318
|
title: "Edit Backup Title & Description",
|
|
301
|
-
message: /* @__PURE__ */ l("div", { className:
|
|
302
|
-
/* @__PURE__ */ e("div", { className:
|
|
303
|
-
|
|
319
|
+
message: /* @__PURE__ */ l("div", { className: o.updateModalContent, children: [
|
|
320
|
+
/* @__PURE__ */ e("div", { className: o.field, children: /* @__PURE__ */ e(
|
|
321
|
+
W,
|
|
304
322
|
{
|
|
305
323
|
label: "Title",
|
|
306
324
|
fieldValue: c.title || "",
|
|
307
|
-
onUpdate: (t) =>
|
|
325
|
+
onUpdate: (t) => w({ ...c, title: t }),
|
|
308
326
|
placeholder: "Enter Backup Title",
|
|
309
327
|
full: !0,
|
|
310
328
|
inline: !1
|
|
311
329
|
}
|
|
312
330
|
) }),
|
|
313
|
-
/* @__PURE__ */ e("div", { className:
|
|
314
|
-
|
|
331
|
+
/* @__PURE__ */ e("div", { className: o.field, children: /* @__PURE__ */ e(
|
|
332
|
+
W,
|
|
315
333
|
{
|
|
316
334
|
label: "Description",
|
|
317
335
|
fieldValue: c.description || "",
|
|
318
|
-
onUpdate: (t) =>
|
|
336
|
+
onUpdate: (t) => w({ ...c, description: t }),
|
|
319
337
|
placeholder: "Enter Backup Description",
|
|
320
338
|
full: !0,
|
|
321
339
|
inline: !1
|
|
322
340
|
}
|
|
323
341
|
) })
|
|
324
342
|
] }),
|
|
325
|
-
closeModal: () =>
|
|
343
|
+
closeModal: () => !S.isPending && w(!1),
|
|
326
344
|
width: "400px",
|
|
327
345
|
primaryAction: {
|
|
328
346
|
title: "Update Backup",
|
|
329
347
|
type: "default",
|
|
330
|
-
isPending:
|
|
331
|
-
action: () =>
|
|
348
|
+
isPending: S.isPending,
|
|
349
|
+
action: () => Z(c)
|
|
332
350
|
}
|
|
333
351
|
}
|
|
352
|
+
),
|
|
353
|
+
C && /* @__PURE__ */ e(
|
|
354
|
+
ke,
|
|
355
|
+
{
|
|
356
|
+
mirrors: C.mirrors || [],
|
|
357
|
+
primaryStorage: L,
|
|
358
|
+
onSelect: (t) => {
|
|
359
|
+
K(C.id, t), E(!1);
|
|
360
|
+
},
|
|
361
|
+
onClose: () => E(!1)
|
|
362
|
+
}
|
|
334
363
|
)
|
|
335
364
|
] });
|
|
336
365
|
};
|
|
337
366
|
export {
|
|
338
|
-
|
|
367
|
+
Pe as default
|
|
339
368
|
};
|
|
340
369
|
//# sourceMappingURL=Backups.js.map
|