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