@plutonhq/core-frontend 0.1.31 → 0.1.32

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.
@@ -1,26 +1,27 @@
1
- import { jsxs as s, jsx as e, Fragment as de } from "react/jsx-runtime";
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 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";
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 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 }) => {
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: t.downloadLabel,
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: `${t.downloadLabelFailed} ${t.downloadLabel}`,
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 n;
43
+ let c;
43
44
  if (a != null && a.ended) {
44
- const C = a.ended * 1e3 + 1440 * 60 * 1e3, l = Date.now();
45
- n = Math.max(0, Math.floor((C - l) / (3600 * 1e3)));
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 n ? /* @__PURE__ */ e(
48
+ return c ? /* @__PURE__ */ e(
48
49
  "span",
49
50
  {
50
- className: `${t.downloadLabelDone} ${t.downloadLabel}`,
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. ${n ? `Valid for the next ${n} hours.` : "⚠ Download Expired!"} </div>`,
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
- }, Ke = ({
61
+ }, _e = ({
61
62
  planId: a,
62
63
  method: M,
63
- backups: n = [],
64
+ backups: c = [],
64
65
  sourceId: q,
65
66
  sourceType: C,
66
- replicationSettings: l,
67
- storage: z,
68
- deviceId: _
67
+ replicationSettings: s,
68
+ storage: E,
69
+ deviceId: oe
69
70
  // snapLimit,
70
71
  }) => {
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;
73
- console.log("backups :", n);
74
- const te = (o) => {
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
- p.error(`Failed to Remove "backup-${o.id}"`);
78
+ u.error(`Failed to Remove "backup-${o.id}"`);
78
79
  },
79
80
  onSuccess: () => {
80
- O.invalidateQueries({ queryKey: ["plan", a] }), p.success(`Backup "backup-${o.id}" Removed Successfully.`), E(!1);
81
+ j.invalidateQueries({ queryKey: ["plan", a] }), u.success(`Backup "backup-${o.id}" Removed Successfully.`), z(!1);
81
82
  }
82
83
  });
83
- }, ie = (o) => {
84
- const i = {
84
+ }, le = (o) => {
85
+ const t = {
85
86
  title: o.title,
86
87
  description: o.description
87
88
  };
88
- console.log("update :", o.id, i), !(!i.title && !i.description) && x.mutate(
89
- { backupId: o.id, updatePayload: i },
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
- p.error(`Failed to Update "backup-${o.id}"`);
93
+ u.error(`Failed to Update "backup-${o.id}"`);
93
94
  },
94
95
  onSuccess: () => {
95
- O.invalidateQueries({ queryKey: ["plan", a] }), p.success(`Backup "backup-${o.id}" Updated Successfully.`), k(!1);
96
+ j.invalidateQueries({ queryKey: ["plan", a] }), u.success(`Backup "backup-${o.id}" Updated Successfully.`), y(!1);
96
97
  }
97
98
  }
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
+ }, 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: h }) {
107
- return `Failed to Generate Download. ${(h == null ? void 0 : h.message) || "Unknown Error."}`;
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
- }, se = (o) => {
112
- p.promise(G.mutateAsync({ backupId: o, planId: a }), {
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: i }) {
117
- return `Failed to Cancel Download. ${(i == null ? void 0 : i.message) || "Unknown Error."}`;
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__ */ s("div", { className: t.backupsTable, children: [
123
- /* @__PURE__ */ s("div", { className: t.backupsTableHead, children: [
124
- /* @__PURE__ */ s("div", { children: [
125
- c ? "Sync" : "Backup",
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__ */ 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
+ /* @__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: `${t.backupsTableRow} ${v && v === i ? t.backupsTableRowActive : ""}`,
142
+ className: `${i.backupsTableRow} ${w && w === t ? i.backupsTableRowActive : ""}`,
142
143
  children: [
143
- /* @__PURE__ */ s("div", { children: [
144
+ /* @__PURE__ */ l("div", { children: [
144
145
  /* @__PURE__ */ e(
145
146
  "span",
146
147
  {
147
- className: t.editIcon,
148
- onClick: () => k(o),
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__ */ s("span", { className: t.backupTitle, onClick: () => !c && K(i), children: [
155
- /* @__PURE__ */ e(r, { type: c ? "sync" : "box", size: 14 }),
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
- h || (c ? `sync-${i}` : `backup-${i}`),
158
+ f || (p ? `sync-${t}` : `backup-${t}`),
158
159
  " "
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
+ 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: `${t.status} ${g ? t.statusHasError : ""}`,
169
+ className: `${i.status} ${d ? i.statusHasError : ""}`,
169
170
  "data-tooltip-id": "htmlToolTip",
170
- "data-tooltip-html": `<div><string>Error</string>: ${g}</div>`,
171
- "data-tooltip-hidden": !g,
172
- children: /* @__PURE__ */ e(ye, { status: N, hasError: !!g })
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: Y + "s", children: ne(Y) }),
176
- /* @__PURE__ */ s(
177
+ /* @__PURE__ */ e("div", { title: J + "s", children: pe(J) }),
178
+ /* @__PURE__ */ l(
177
179
  "div",
178
180
  {
179
- className: t.changes,
181
+ className: i.changes,
180
182
  "data-tooltip-id": "htmlToolTip",
181
183
  "data-tooltip-html": `
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>
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__ */ s("span", { className: t.changesNew, children: [
189
+ /* @__PURE__ */ l("span", { className: i.changesNew, children: [
188
190
  /* @__PURE__ */ e(r, { type: "file-new", size: 12 }),
189
191
  " ",
190
- f.new
192
+ v.new
191
193
  ] }),
192
194
  " ",
193
- /* @__PURE__ */ s("span", { className: t.changesModified, children: [
195
+ /* @__PURE__ */ l("span", { className: i.changesModified, children: [
194
196
  /* @__PURE__ */ e(r, { type: "file-modified", size: 12 }),
195
197
  " ",
196
- f.modified
198
+ v.modified
197
199
  ] }),
198
200
  " ",
199
- /* @__PURE__ */ s("span", { className: t.changesRemoved, children: [
201
+ /* @__PURE__ */ l("span", { className: i.changesRemoved, children: [
200
202
  /* @__PURE__ */ e(r, { type: "file-removed", size: 12 }),
201
203
  " ",
202
- f.removed || 0
204
+ v.removed || 0
203
205
  ] })
204
206
  ]
205
207
  }
206
208
  ),
207
- /* @__PURE__ */ e("div", { "data-tooltip-id": "htmlToolTip", "data-tooltip-html": `${me(le)} Files `, children: ce(re) }),
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>: ${y ? V(y) : ""}</div>
216
+ <div><b>Ended</b>: ${D ? V(D) : ""}</div>
215
217
  `,
216
- title: V(y || T),
217
- children: y ? J(new Date(y)) : J(T ? new Date(T) : /* @__PURE__ */ new Date())
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: 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(
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
- d ? se(i) : ae(o), w(!1);
230
+ n ? re(t) : se(o), k(!1);
229
231
  },
230
232
  children: [
231
- /* @__PURE__ */ e(r, { type: d ? "close" : "download", size: 14 }),
233
+ /* @__PURE__ */ e(r, { type: n ? "close" : "download", size: 14 }),
232
234
  " ",
233
- d ? "Cancel Download" : "Download"
235
+ n ? "Cancel Download" : "Download"
234
236
  ]
235
237
  }
236
238
  ),
237
- !c && N === "completed" && $ && /* @__PURE__ */ s(
239
+ !p && $ === "completed" && g && /* @__PURE__ */ l(
238
240
  "button",
239
241
  {
240
242
  onClick: () => {
241
- p.promise(L.mutateAsync({ backupId: i }), {
243
+ u.promise(L.mutateAsync({ backupId: t }), {
242
244
  pending: "Getting Snapshot Data...",
243
245
  error: "Failed to Get Snapshot Data."
244
- }), w(!1), A(o);
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
- N === "completed" && $ && /* @__PURE__ */ s(
254
+ $ === "completed" && g && /* @__PURE__ */ l(
253
255
  "button",
254
256
  {
255
- className: d ? "notAllowed" : "",
256
- disabled: d,
257
+ className: n ? "notAllowed" : "",
258
+ disabled: n,
257
259
  onClick: () => {
258
- d || (H(o), w(!1));
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__ */ s(
268
+ /* @__PURE__ */ l(
267
269
  "button",
268
270
  {
269
- className: d ? "notAllowed" : "",
270
- disabled: d,
271
+ className: n ? "notAllowed" : "",
272
+ disabled: n,
271
273
  onClick: () => {
272
- d || (E(o), w(!1));
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
- i
285
+ t
284
286
  );
285
287
  }),
286
- n.length === 0 && /* @__PURE__ */ e("div", { className: t.noBackups, children: "Hasn't been backed up yet." })
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
- X,
291
+ Z,
290
292
  {
291
293
  title: "Remove Backup",
292
- message: /* @__PURE__ */ s(de, { children: [
294
+ message: /* @__PURE__ */ l(ce, { children: [
293
295
  "Are you sure you want to remove the Backup ",
294
- /* @__PURE__ */ s("strong", { children: [
296
+ /* @__PURE__ */ l("strong", { children: [
295
297
  '"backup-',
296
298
  S.id,
297
299
  '"'
298
300
  ] }),
299
301
  "?"
300
302
  ] }),
301
- closeModal: () => !F.isPending && E(!1),
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: () => te(S)
310
+ action: () => ae(S)
309
311
  }
310
312
  }
311
313
  ),
312
314
  b && /* @__PURE__ */ e(
313
- ke,
315
+ De,
314
316
  {
315
317
  close: () => H(!1),
316
318
  planId: a,
317
319
  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 : []
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
- De,
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
- u && /* @__PURE__ */ e(
334
- X,
335
+ h && /* @__PURE__ */ e(
336
+ Z,
335
337
  {
336
338
  title: "Edit Backup Title & Description",
337
- message: /* @__PURE__ */ s("div", { className: t.updateModalContent, children: [
338
- /* @__PURE__ */ e("div", { className: t.field, children: /* @__PURE__ */ e(
339
- Z,
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: u.title || "",
343
- onUpdate: (o) => k({ ...u, title: 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: t.field, children: /* @__PURE__ */ e(
350
- Z,
351
+ /* @__PURE__ */ e("div", { className: i.field, children: /* @__PURE__ */ e(
352
+ ee,
351
353
  {
352
354
  label: "Description",
353
- fieldValue: u.description || "",
354
- onUpdate: (o) => k({ ...u, description: 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 && k(!1),
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: () => ie(u)
369
+ action: () => le(h)
368
370
  }
369
371
  }
370
372
  ),
371
373
  P && /* @__PURE__ */ e(
372
- Be,
374
+ $e,
373
375
  {
374
376
  mirrors: P.mirrors || [],
375
- primaryStorage: z,
377
+ primaryStorage: E,
376
378
  onSelect: (o) => {
377
- Q(P.id, o), R(!1);
379
+ _(P.id, o), R(!1);
378
380
  },
379
381
  onClose: () => R(!1)
380
382
  }
381
383
  ),
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
+ 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: oe || [],
386
- backup: D,
387
+ files: ie || [],
388
+ backup: B,
387
389
  planId: a,
388
- isSync: c,
390
+ isSync: p,
389
391
  onClose: () => A(!1),
390
- mirrors: l != null && l.enabled ? D.mirrors : void 0,
391
- primaryStorage: l != null && l.enabled ? z : void 0
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
- Ke as default
401
+ _e as default
398
402
  };
399
403
  //# sourceMappingURL=Backups.js.map