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