@plutonhq/core-frontend 0.1.13 → 0.1.15
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 +121 -94
- package/dist-lib/components/Plan/PlanForm/PlanForm.js.map +1 -1
- package/dist-lib/components/Plan/PlanIntegrity/PlanIntegrity.d.ts +16 -0
- package/dist-lib/components/Plan/PlanIntegrity/PlanIntegrity.d.ts.map +1 -0
- package/dist-lib/components/Plan/PlanIntegrity/PlanIntegrity.js +115 -0
- package/dist-lib/components/Plan/PlanIntegrity/PlanIntegrity.js.map +1 -0
- package/dist-lib/components/Plan/PlanIntegrity/PlanIntegrity.module.scss.js +26 -0
- package/dist-lib/components/Plan/PlanIntegrity/PlanIntegrity.module.scss.js.map +1 -0
- 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/PlanPendingBackup/PlanPendingBackup.d.ts +2 -2
- package/dist-lib/components/Plan/PlanPendingBackup/PlanPendingBackup.d.ts.map +1 -1
- package/dist-lib/components/Plan/PlanPendingBackup/PlanPendingBackup.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.d.ts +1 -1
- package/dist-lib/components/Settings/GeneralSettings/GeneralSettings.d.ts.map +1 -1
- package/dist-lib/components/Settings/GeneralSettings/GeneralSettings.js +52 -24
- 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/Settings/TwoFactorSetup/TwoFactorSetup.d.ts +7 -0
- package/dist-lib/components/Settings/TwoFactorSetup/TwoFactorSetup.d.ts.map +1 -0
- package/dist-lib/components/Settings/TwoFactorSetup/TwoFactorSetup.js +79 -0
- package/dist-lib/components/Settings/TwoFactorSetup/TwoFactorSetup.js.map +1 -0
- package/dist-lib/components/Settings/TwoFactorSetup/TwoFactorSetup.module.scss.js +24 -0
- package/dist-lib/components/Settings/TwoFactorSetup/TwoFactorSetup.module.scss.js.map +1 -0
- 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 +6 -0
- package/dist-lib/components/index.d.ts.map +1 -1
- package/dist-lib/components.js +102 -90
- 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/routes/PlanSingle/PlanSingle.d.ts.map +1 -1
- package/dist-lib/routes/PlanSingle/PlanSingle.js +123 -98
- package/dist-lib/routes/PlanSingle/PlanSingle.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 +20 -0
- package/dist-lib/services/plans.d.ts.map +1 -1
- package/dist-lib/services/plans.js +227 -172
- 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/settings.d.ts +16 -0
- package/dist-lib/services/settings.d.ts.map +1 -1
- package/dist-lib/services/settings.js +147 -68
- package/dist-lib/services/settings.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 +113 -101
- 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 +44 -17
- package/src/components/Plan/PlanIntegrity/PlanIntegrity.module.scss +110 -0
- package/src/components/Plan/PlanIntegrity/PlanIntegrity.tsx +187 -0
- package/src/components/Plan/PlanItems/PlanItem.tsx +3 -3
- package/src/components/Plan/PlanPendingBackup/PlanPendingBackup.tsx +2 -2
- 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 +38 -2
- package/src/components/Settings/IntegrationSettings/IntegrationSettings.tsx +9 -2
- package/src/components/Settings/TwoFactorSetup/TwoFactorSetup.module.scss +62 -0
- package/src/components/Settings/TwoFactorSetup/TwoFactorSetup.tsx +102 -0
- package/src/components/common/Icon/Icon.tsx +10 -1
- package/src/components/common/PageHeader/PageHeader.module.scss +3 -0
- package/src/components/index.ts +8 -0
- package/src/hooks/usePwaAutoUpdate.ts +51 -11
- package/src/router.tsx +26 -17
- package/src/routes/DeviceSingle/DeviceSingle.tsx +3 -3
- package/src/routes/PlanSingle/PlanSingle.tsx +21 -0
- package/src/services/backups.ts +32 -9
- package/src/services/plans.ts +75 -0
- package/src/services/restores.ts +10 -2
- package/src/services/settings.ts +90 -0
- package/src/services/users.ts +14 -5
- package/src/utils/progressHelpers.ts +85 -1
|
@@ -1,269 +1,269 @@
|
|
|
1
|
-
import { useQuery as
|
|
2
|
-
import { toast as
|
|
1
|
+
import { useQuery as y, useMutation as r, useQueryClient as c } from "@tanstack/react-query";
|
|
2
|
+
import { toast as u } from "react-toastify";
|
|
3
3
|
import { API_URL as a } from "../utils/constants.js";
|
|
4
4
|
async function g() {
|
|
5
|
-
const
|
|
5
|
+
const n = new URL(`${a}/plans`), t = await (await fetch(n.toString(), {
|
|
6
6
|
method: "GET",
|
|
7
7
|
credentials: "include"
|
|
8
8
|
})).json();
|
|
9
|
-
if (!
|
|
10
|
-
throw new Error(
|
|
11
|
-
return
|
|
9
|
+
if (!t.success)
|
|
10
|
+
throw new Error(t.error);
|
|
11
|
+
return t;
|
|
12
12
|
}
|
|
13
|
-
function
|
|
14
|
-
return
|
|
13
|
+
function U() {
|
|
14
|
+
return y({
|
|
15
15
|
queryKey: ["plans"],
|
|
16
16
|
queryFn: () => g(),
|
|
17
17
|
refetchOnMount: !0,
|
|
18
18
|
retry: !1
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
|
-
async function P(
|
|
22
|
-
if (!
|
|
21
|
+
async function P(n) {
|
|
22
|
+
if (!n)
|
|
23
23
|
throw new Error("ID Not Provided.");
|
|
24
|
-
const
|
|
24
|
+
const e = new URL(`${a}/plans/${n}`), t = await fetch(e.toString(), {
|
|
25
25
|
method: "GET",
|
|
26
26
|
credentials: "include"
|
|
27
|
-
}),
|
|
28
|
-
if (!
|
|
29
|
-
const s = new Error(
|
|
30
|
-
throw s.status =
|
|
27
|
+
}), o = await t.json();
|
|
28
|
+
if (!o.success) {
|
|
29
|
+
const s = new Error(o.error);
|
|
30
|
+
throw s.status = t.status, s;
|
|
31
31
|
}
|
|
32
|
-
return
|
|
32
|
+
return o;
|
|
33
33
|
}
|
|
34
|
-
function
|
|
35
|
-
return
|
|
36
|
-
queryKey: ["plan",
|
|
37
|
-
queryFn: () => P(
|
|
34
|
+
function A(n) {
|
|
35
|
+
return y({
|
|
36
|
+
queryKey: ["plan", n],
|
|
37
|
+
queryFn: () => P(n),
|
|
38
38
|
refetchOnMount: !0,
|
|
39
39
|
retry: !1,
|
|
40
40
|
staleTime: 0
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
|
-
async function
|
|
44
|
-
const
|
|
43
|
+
async function E(n) {
|
|
44
|
+
const e = new URL(`${a}/plans/${n}/logs`), t = await fetch(e.toString(), {
|
|
45
45
|
method: "GET",
|
|
46
46
|
credentials: "include"
|
|
47
|
-
}),
|
|
48
|
-
if (!
|
|
49
|
-
const s = new Error(
|
|
50
|
-
throw s.status =
|
|
47
|
+
}), o = await t.json();
|
|
48
|
+
if (!o.success) {
|
|
49
|
+
const s = new Error(o.error);
|
|
50
|
+
throw s.status = t.status, s;
|
|
51
51
|
}
|
|
52
|
-
return
|
|
52
|
+
return o;
|
|
53
53
|
}
|
|
54
|
-
function
|
|
55
|
-
return
|
|
56
|
-
queryKey: ["planLogs",
|
|
57
|
-
queryFn: () =>
|
|
54
|
+
function B(n) {
|
|
55
|
+
return y({
|
|
56
|
+
queryKey: ["planLogs", n],
|
|
57
|
+
queryFn: () => E(n),
|
|
58
58
|
refetchOnMount: !0,
|
|
59
59
|
retry: !1
|
|
60
60
|
});
|
|
61
61
|
}
|
|
62
|
-
async function
|
|
63
|
-
var w,
|
|
64
|
-
const
|
|
62
|
+
async function j(n) {
|
|
63
|
+
var w, f;
|
|
64
|
+
const e = await fetch(`${a}/plans/${n}/logs/download`, {
|
|
65
65
|
method: "GET",
|
|
66
66
|
credentials: "include"
|
|
67
67
|
// headers: header,
|
|
68
68
|
});
|
|
69
|
-
if (!
|
|
70
|
-
const
|
|
71
|
-
throw new Error(
|
|
69
|
+
if (!e.ok) {
|
|
70
|
+
const l = await e.json();
|
|
71
|
+
throw new Error(l.error);
|
|
72
72
|
}
|
|
73
|
-
const
|
|
74
|
-
async start(
|
|
73
|
+
const t = ((w = e.headers.get("content-disposition")) == null ? void 0 : w.split("filename=")[1]) || `plan-${n}.log`, o = (f = e.body) == null ? void 0 : f.getReader(), s = new ReadableStream({
|
|
74
|
+
async start(l) {
|
|
75
75
|
for (; ; ) {
|
|
76
|
-
const { done: h, value: m } = await
|
|
76
|
+
const { done: h, value: m } = await o.read();
|
|
77
77
|
if (h) break;
|
|
78
|
-
|
|
78
|
+
l.enqueue(m);
|
|
79
79
|
}
|
|
80
|
-
|
|
80
|
+
l.close(), o.releaseLock();
|
|
81
81
|
}
|
|
82
|
-
}),
|
|
83
|
-
i.href = p, i.download =
|
|
82
|
+
}), d = await new Response(s).blob(), p = window.URL.createObjectURL(d), i = document.createElement("a");
|
|
83
|
+
i.href = p, i.download = t, document.body.appendChild(i), i.click(), i.remove(), window.URL.revokeObjectURL(p);
|
|
84
84
|
}
|
|
85
|
-
function
|
|
85
|
+
function D() {
|
|
86
86
|
return r({
|
|
87
|
-
mutationFn:
|
|
88
|
-
onSuccess: (
|
|
89
|
-
console.log("# Logs Downloaded! :",
|
|
87
|
+
mutationFn: j,
|
|
88
|
+
onSuccess: (n) => {
|
|
89
|
+
console.log("# Logs Downloaded! :", n);
|
|
90
90
|
},
|
|
91
|
-
onError: (
|
|
92
|
-
console.log("# Logs Download Failed! :",
|
|
91
|
+
onError: (n) => {
|
|
92
|
+
console.log("# Logs Download Failed! :", n);
|
|
93
93
|
}
|
|
94
94
|
});
|
|
95
95
|
}
|
|
96
|
-
async function
|
|
97
|
-
const
|
|
98
|
-
console.log("newPlan :",
|
|
99
|
-
const
|
|
96
|
+
async function S(n) {
|
|
97
|
+
const e = new Headers({ "Content-Type": "application/json", Accept: "application/json" });
|
|
98
|
+
console.log("newPlan :", n);
|
|
99
|
+
const o = await (await fetch(`${a}/plans`, {
|
|
100
100
|
method: "POST",
|
|
101
101
|
credentials: "include",
|
|
102
|
-
headers:
|
|
103
|
-
body: JSON.stringify(
|
|
102
|
+
headers: e,
|
|
103
|
+
body: JSON.stringify(n)
|
|
104
104
|
})).json();
|
|
105
|
-
if (!
|
|
106
|
-
throw new Error(
|
|
107
|
-
return
|
|
105
|
+
if (!o.success)
|
|
106
|
+
throw new Error(o.error || o.result);
|
|
107
|
+
return o;
|
|
108
108
|
}
|
|
109
|
-
function
|
|
110
|
-
const
|
|
109
|
+
function G() {
|
|
110
|
+
const n = c();
|
|
111
111
|
return r({
|
|
112
|
-
mutationFn:
|
|
113
|
-
onSuccess: (
|
|
114
|
-
console.log("# Plan Created! :",
|
|
112
|
+
mutationFn: S,
|
|
113
|
+
onSuccess: (e) => {
|
|
114
|
+
console.log("# Plan Created! :", e), n.invalidateQueries({ queryKey: ["plans"] });
|
|
115
115
|
}
|
|
116
116
|
});
|
|
117
117
|
}
|
|
118
|
-
async function
|
|
119
|
-
const
|
|
120
|
-
console.log("newPlan :",
|
|
121
|
-
const
|
|
118
|
+
async function k(n) {
|
|
119
|
+
const e = new Headers({ "Content-Type": "application/json", Accept: "application/json" });
|
|
120
|
+
console.log("newPlan :", n);
|
|
121
|
+
const o = await (await fetch(`${a}/plans/${n.id}`, {
|
|
122
122
|
method: "PUT",
|
|
123
123
|
credentials: "include",
|
|
124
|
-
headers:
|
|
125
|
-
body: JSON.stringify({ plan:
|
|
124
|
+
headers: e,
|
|
125
|
+
body: JSON.stringify({ plan: n.data })
|
|
126
126
|
})).json();
|
|
127
|
-
if (console.log("data :",
|
|
128
|
-
throw new Error(
|
|
129
|
-
return
|
|
127
|
+
if (console.log("data :", o), !o.success)
|
|
128
|
+
throw new Error(o.error);
|
|
129
|
+
return o;
|
|
130
130
|
}
|
|
131
|
-
function
|
|
132
|
-
const
|
|
131
|
+
function H() {
|
|
132
|
+
const n = c();
|
|
133
133
|
return r({
|
|
134
|
-
mutationFn:
|
|
135
|
-
onSuccess: (
|
|
136
|
-
var
|
|
137
|
-
console.log("# Plan Updated! :",
|
|
138
|
-
const
|
|
139
|
-
|
|
134
|
+
mutationFn: k,
|
|
135
|
+
onSuccess: (e) => {
|
|
136
|
+
var o;
|
|
137
|
+
console.log("# Plan Updated! :", e);
|
|
138
|
+
const t = (o = e == null ? void 0 : e.result) == null ? void 0 : o.id;
|
|
139
|
+
t && n.invalidateQueries({ queryKey: ["plan", t] }), n.invalidateQueries({ queryKey: ["plans"] });
|
|
140
140
|
}
|
|
141
141
|
});
|
|
142
142
|
}
|
|
143
|
-
async function
|
|
144
|
-
const
|
|
143
|
+
async function q({ id: n, removeRemoteData: e }) {
|
|
144
|
+
const t = new Headers({ "Content-Type": "application/json", Accept: "application/json" }), s = await (await fetch(`${a}/plans/${n}?removeData=${e}`, {
|
|
145
145
|
method: "DELETE",
|
|
146
146
|
credentials: "include",
|
|
147
|
-
headers:
|
|
147
|
+
headers: t
|
|
148
148
|
})).json();
|
|
149
149
|
if (!s.success)
|
|
150
150
|
throw new Error(s.error);
|
|
151
151
|
return s;
|
|
152
152
|
}
|
|
153
|
-
function
|
|
154
|
-
const
|
|
153
|
+
function M() {
|
|
154
|
+
const n = c();
|
|
155
155
|
return r({
|
|
156
|
-
mutationFn:
|
|
157
|
-
onSuccess: (
|
|
158
|
-
console.log("# Plan Removed! :",
|
|
156
|
+
mutationFn: q,
|
|
157
|
+
onSuccess: (e) => {
|
|
158
|
+
console.log("# Plan Removed! :", e), n.invalidateQueries({ queryKey: ["plans"] });
|
|
159
159
|
}
|
|
160
160
|
});
|
|
161
161
|
}
|
|
162
|
-
async function $(
|
|
163
|
-
const
|
|
162
|
+
async function $(n) {
|
|
163
|
+
const e = new Headers({ "Content-Type": "application/json", Accept: "application/json" }), o = await (await fetch(`${a}/plans/${n}/action/backup`, {
|
|
164
164
|
method: "POST",
|
|
165
165
|
credentials: "include",
|
|
166
|
-
headers:
|
|
166
|
+
headers: e
|
|
167
167
|
})).json();
|
|
168
|
-
if (!
|
|
169
|
-
throw new Error(
|
|
170
|
-
return
|
|
168
|
+
if (!o.success)
|
|
169
|
+
throw new Error(o.error);
|
|
170
|
+
return o;
|
|
171
171
|
}
|
|
172
|
-
function
|
|
173
|
-
const
|
|
172
|
+
function N() {
|
|
173
|
+
const n = c();
|
|
174
174
|
return r({
|
|
175
175
|
mutationFn: $,
|
|
176
|
-
onSuccess: (
|
|
177
|
-
console.log("# Backup Started! :",
|
|
176
|
+
onSuccess: (e, t) => {
|
|
177
|
+
console.log("# Backup Started! :", e, t), n.invalidateQueries({ queryKey: ["plan", t] }), n.invalidateQueries({ queryKey: ["plans"] });
|
|
178
178
|
}
|
|
179
179
|
});
|
|
180
180
|
}
|
|
181
|
-
async function v(
|
|
182
|
-
const
|
|
181
|
+
async function v(n) {
|
|
182
|
+
const e = new Headers({ "Content-Type": "application/json", Accept: "application/json" }), o = await (await fetch(`${a}/plans/${n}/action/pause`, {
|
|
183
183
|
method: "POST",
|
|
184
184
|
credentials: "include",
|
|
185
|
-
headers:
|
|
185
|
+
headers: e
|
|
186
186
|
})).json();
|
|
187
|
-
if (!
|
|
188
|
-
throw new Error(
|
|
189
|
-
return
|
|
187
|
+
if (!o.success)
|
|
188
|
+
throw new Error(o.error);
|
|
189
|
+
return o;
|
|
190
190
|
}
|
|
191
|
-
function
|
|
192
|
-
const
|
|
191
|
+
function I() {
|
|
192
|
+
const n = c();
|
|
193
193
|
return r({
|
|
194
194
|
mutationFn: v,
|
|
195
|
-
onSuccess: (
|
|
196
|
-
console.log("# Backup Paused! :",
|
|
195
|
+
onSuccess: (e, t) => {
|
|
196
|
+
console.log("# Backup Paused! :", e, t), n.invalidateQueries({ queryKey: ["plan", t] }), n.invalidateQueries({ queryKey: ["plans"] });
|
|
197
197
|
}
|
|
198
198
|
});
|
|
199
199
|
}
|
|
200
|
-
async function C(
|
|
201
|
-
const
|
|
200
|
+
async function C(n) {
|
|
201
|
+
const e = new Headers({ "Content-Type": "application/json", Accept: "application/json" }), o = await (await fetch(`${a}/plans/${n}/action/resume`, {
|
|
202
202
|
method: "POST",
|
|
203
203
|
credentials: "include",
|
|
204
|
-
headers:
|
|
204
|
+
headers: e
|
|
205
205
|
})).json();
|
|
206
|
-
if (!
|
|
207
|
-
throw new Error(
|
|
208
|
-
return
|
|
206
|
+
if (!o.success)
|
|
207
|
+
throw new Error(o.error);
|
|
208
|
+
return o;
|
|
209
209
|
}
|
|
210
|
-
function
|
|
211
|
-
const
|
|
210
|
+
function J() {
|
|
211
|
+
const n = c();
|
|
212
212
|
return r({
|
|
213
213
|
mutationFn: C,
|
|
214
|
-
onSuccess: (
|
|
215
|
-
console.log("# Backup Resumed! :",
|
|
214
|
+
onSuccess: (e, t) => {
|
|
215
|
+
console.log("# Backup Resumed! :", e, t), n.invalidateQueries({ queryKey: ["plan", t] }), n.invalidateQueries({ queryKey: ["plans"] });
|
|
216
216
|
}
|
|
217
217
|
});
|
|
218
218
|
}
|
|
219
|
-
async function
|
|
220
|
-
const
|
|
219
|
+
async function R(n) {
|
|
220
|
+
const e = new Headers({ "Content-Type": "application/json", Accept: "application/json" }), o = await (await fetch(`${a}/plans/${n}/action/prune`, {
|
|
221
221
|
method: "POST",
|
|
222
222
|
credentials: "include",
|
|
223
|
-
headers:
|
|
223
|
+
headers: e
|
|
224
224
|
})).json();
|
|
225
|
-
if (!
|
|
226
|
-
throw new Error(
|
|
227
|
-
return
|
|
225
|
+
if (!o.success)
|
|
226
|
+
throw new Error(o.error);
|
|
227
|
+
return o;
|
|
228
228
|
}
|
|
229
|
-
function
|
|
230
|
-
const
|
|
229
|
+
function x() {
|
|
230
|
+
const n = c();
|
|
231
231
|
return r({
|
|
232
|
-
mutationFn:
|
|
233
|
-
onError: (
|
|
234
|
-
console.log("error :",
|
|
232
|
+
mutationFn: R,
|
|
233
|
+
onError: (e) => {
|
|
234
|
+
console.log("error :", e == null ? void 0 : e.message), u.error(e.message || "Error Removing Old Backups.");
|
|
235
235
|
},
|
|
236
|
-
onSuccess: (
|
|
237
|
-
console.log("# Backup Pruned! :",
|
|
236
|
+
onSuccess: (e, t) => {
|
|
237
|
+
console.log("# Backup Pruned! :", e, t), n.invalidateQueries({ queryKey: ["plan", t] }), u.success((e == null ? void 0 : e.message) || "Removed Old Backups Successfully!", { autoClose: 5e3 });
|
|
238
238
|
}
|
|
239
239
|
});
|
|
240
240
|
}
|
|
241
|
-
async function
|
|
242
|
-
const
|
|
241
|
+
async function T(n) {
|
|
242
|
+
const e = new Headers({ "Content-Type": "application/json", Accept: "application/json" }), o = await (await fetch(`${a}/plans/${n}/action/unlock`, {
|
|
243
243
|
method: "POST",
|
|
244
244
|
credentials: "include",
|
|
245
|
-
headers:
|
|
245
|
+
headers: e
|
|
246
246
|
})).json();
|
|
247
|
-
if (!
|
|
248
|
-
throw new Error(
|
|
249
|
-
return
|
|
247
|
+
if (!o.success)
|
|
248
|
+
throw new Error(o.error);
|
|
249
|
+
return o;
|
|
250
250
|
}
|
|
251
|
-
function
|
|
252
|
-
const
|
|
251
|
+
function _() {
|
|
252
|
+
const n = c();
|
|
253
253
|
return r({
|
|
254
|
-
mutationFn:
|
|
255
|
-
onError: (
|
|
256
|
-
console.log("error :",
|
|
254
|
+
mutationFn: T,
|
|
255
|
+
onError: (e) => {
|
|
256
|
+
console.log("error :", e == null ? void 0 : e.message), u.error(e.message || "Error Removing stale locks.");
|
|
257
257
|
},
|
|
258
|
-
onSuccess: (
|
|
259
|
-
console.log("# Backup Pruned! :",
|
|
258
|
+
onSuccess: (e, t) => {
|
|
259
|
+
console.log("# Backup Pruned! :", e, t), n.invalidateQueries({ queryKey: ["plan", t] }), u.success("Removed Stale locks Successfully!", { autoClose: 5e3 });
|
|
260
260
|
}
|
|
261
261
|
});
|
|
262
262
|
}
|
|
263
|
-
async function
|
|
264
|
-
const
|
|
265
|
-
|
|
266
|
-
const s = await (await fetch(
|
|
263
|
+
async function O(n, e = "backup") {
|
|
264
|
+
const t = new URL(`${a}/plans/${n}/checkactive`);
|
|
265
|
+
t.searchParams.append("type", e);
|
|
266
|
+
const s = await (await fetch(t.toString(), {
|
|
267
267
|
method: "GET",
|
|
268
268
|
credentials: "include"
|
|
269
269
|
})).json();
|
|
@@ -271,39 +271,94 @@ async function L(e, n = "backup") {
|
|
|
271
271
|
throw new Error(s.error);
|
|
272
272
|
return s;
|
|
273
273
|
}
|
|
274
|
-
function
|
|
274
|
+
function z() {
|
|
275
275
|
return r({
|
|
276
276
|
// queryKey: ['planActiveBackups-' + planId],
|
|
277
|
-
mutationFn: ({ planId:
|
|
277
|
+
mutationFn: ({ planId: n, type: e }) => O(n, e)
|
|
278
278
|
// refetchOnMount: true,
|
|
279
279
|
});
|
|
280
280
|
}
|
|
281
|
+
async function K({
|
|
282
|
+
planID: n,
|
|
283
|
+
storageID: e,
|
|
284
|
+
storagePath: t,
|
|
285
|
+
removeData: o,
|
|
286
|
+
replicationId: s
|
|
287
|
+
}) {
|
|
288
|
+
const d = new Headers({ "Content-Type": "application/json", Accept: "application/json" }), i = await (await fetch(`${a}/plans/${n}/action/delete-replication-storage`, {
|
|
289
|
+
method: "POST",
|
|
290
|
+
credentials: "include",
|
|
291
|
+
headers: d,
|
|
292
|
+
body: JSON.stringify({ storageID: e, storagePath: t, removeData: o, replicationId: s })
|
|
293
|
+
})).json();
|
|
294
|
+
if (!i.success)
|
|
295
|
+
throw new Error(i.error);
|
|
296
|
+
return i;
|
|
297
|
+
}
|
|
298
|
+
function V() {
|
|
299
|
+
const n = c();
|
|
300
|
+
return r({
|
|
301
|
+
mutationFn: K,
|
|
302
|
+
onError: (e) => {
|
|
303
|
+
console.log("error :", e == null ? void 0 : e.message), u.error(e.message || "Error removing replication storage.");
|
|
304
|
+
},
|
|
305
|
+
onSuccess: (e, t) => {
|
|
306
|
+
console.log("# Replication Storage Removed! :", e, t), n.invalidateQueries({ queryKey: ["plan", t.planID] }), n.invalidateQueries({ queryKey: ["plans"] }), u.success((e == null ? void 0 : e.message) || "Replication storage removed successfully!", { autoClose: 5e3 });
|
|
307
|
+
}
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
async function L({ planId: n }) {
|
|
311
|
+
const t = await (await fetch(`${a}/plans/${n}/action/checkintegrity`, {
|
|
312
|
+
method: "POST",
|
|
313
|
+
credentials: "include"
|
|
314
|
+
// headers: header,
|
|
315
|
+
})).json();
|
|
316
|
+
if (!t.success)
|
|
317
|
+
throw new Error(t.error);
|
|
318
|
+
return t;
|
|
319
|
+
}
|
|
320
|
+
function W() {
|
|
321
|
+
const n = c();
|
|
322
|
+
return r({
|
|
323
|
+
mutationFn: L,
|
|
324
|
+
onSuccess: (e, t) => {
|
|
325
|
+
n.invalidateQueries({ queryKey: ["plan", t.planId] }), console.log("res :", t, e);
|
|
326
|
+
},
|
|
327
|
+
onError: (e, t) => {
|
|
328
|
+
console.error("Error checking plan integrity for planId:", t.planId, e), u.error(`Error checking plan integrity. ${e instanceof Error ? e.message : "Unknown error"}`, { autoClose: !1 });
|
|
329
|
+
}
|
|
330
|
+
});
|
|
331
|
+
}
|
|
281
332
|
export {
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
S as
|
|
285
|
-
|
|
333
|
+
O as checkActiveBackupsOrRestore,
|
|
334
|
+
L as checkPlanIntegrity,
|
|
335
|
+
S as createPlan,
|
|
336
|
+
q as deletePlan,
|
|
337
|
+
K as deleteReplicationStorage,
|
|
338
|
+
j as downloadPlanLogs,
|
|
286
339
|
g as getAllPlans,
|
|
287
|
-
|
|
340
|
+
E as getPlanLogs,
|
|
288
341
|
P as getSinglePlan,
|
|
289
342
|
v as pausePlan,
|
|
290
343
|
$ as performBackup,
|
|
291
|
-
|
|
344
|
+
R as prunePlan,
|
|
292
345
|
C as resumePlan,
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
N as
|
|
306
|
-
x as
|
|
307
|
-
|
|
346
|
+
T as unlockPlan,
|
|
347
|
+
k as updatePlan,
|
|
348
|
+
z as useCheckActiveBackupsOrRestore,
|
|
349
|
+
W as useCheckPlanIntegrity,
|
|
350
|
+
G as useCreatePlan,
|
|
351
|
+
M as useDeletePlan,
|
|
352
|
+
V as useDeleteReplicationStorage,
|
|
353
|
+
D as useGetDownloadLogs,
|
|
354
|
+
A as useGetPlan,
|
|
355
|
+
B as useGetPlanLogs,
|
|
356
|
+
U as useGetPlans,
|
|
357
|
+
I as usePausePlan,
|
|
358
|
+
N as usePerformBackup,
|
|
359
|
+
x as usePrunePlan,
|
|
360
|
+
J as useResumePlan,
|
|
361
|
+
_ as useUnlockPlan,
|
|
362
|
+
H as useUpdatePlan
|
|
308
363
|
};
|
|
309
364
|
//# sourceMappingURL=plans.js.map
|