@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
package/dist-lib/components.js
CHANGED
|
@@ -6,10 +6,10 @@ import { default as u } from "./components/App/SideNav/SideNav.js";
|
|
|
6
6
|
import { default as x } from "./components/common/ActionModal/ActionModal.js";
|
|
7
7
|
import { default as n } from "./components/common/AnimatedWrapper/AnimatedWrapper.js";
|
|
8
8
|
import { default as g } from "./components/common/Button/Button.js";
|
|
9
|
-
import { default as
|
|
9
|
+
import { default as c } from "./components/common/FileIcon/FileIcon.js";
|
|
10
10
|
import { FileManager as F } from "./components/common/FileManager/FileManager.js";
|
|
11
|
-
import { default as
|
|
12
|
-
import { default as
|
|
11
|
+
import { default as R } from "./components/common/FolderPicker/FolderPicker.js";
|
|
12
|
+
import { default as D } from "./components/common/Icon/Icon.js";
|
|
13
13
|
import { default as T } from "./components/common/ItemsLayout/ItemsLayout.js";
|
|
14
14
|
import { default as B } from "./components/common/Logo/Logo.js";
|
|
15
15
|
import { default as A } from "./components/common/LogViewer/LogViewer.js";
|
|
@@ -20,217 +20,221 @@ import { default as G } from "./components/common/PathPicker/PathPicker.js";
|
|
|
20
20
|
import { default as z } from "./components/common/SearchItems/SearchItems.js";
|
|
21
21
|
import { default as W } from "./components/common/SidePanel/SidePanel.js";
|
|
22
22
|
import { default as q } from "./components/common/SortItems/SortItems.js";
|
|
23
|
-
import { default as K } from "./components/
|
|
24
|
-
import {
|
|
25
|
-
import { default as $ } from "./components/common/
|
|
26
|
-
import { default as te } from "./components/common/
|
|
27
|
-
import { default as oe } from "./components/common/form/
|
|
28
|
-
import { default as fe } from "./components/common/form/
|
|
29
|
-
import { default as le } from "./components/common/form/
|
|
30
|
-
import { default as de } from "./components/common/form/
|
|
31
|
-
import { default as me } from "./components/common/form/
|
|
32
|
-
import { default as ie } from "./components/common/form/
|
|
33
|
-
import { default as Se } from "./components/common/form/
|
|
34
|
-
import { default as
|
|
35
|
-
import { default as ve } from "./components/common/form/
|
|
36
|
-
import { default as Ie } from "./components/common/form/
|
|
37
|
-
import { default as
|
|
38
|
-
import { default as ke } from "./components/common/form/
|
|
39
|
-
import { default as he } from "./components/common/form/
|
|
40
|
-
import { default as Me } from "./components/
|
|
41
|
-
import { default as Ne } from "./components/Device/
|
|
42
|
-
import { default as ye } from "./components/Device/
|
|
43
|
-
import { default as Ee } from "./components/Device/
|
|
44
|
-
import { default as Ce } from "./components/Device/
|
|
45
|
-
import { default as Ue } from "./components/Device/
|
|
46
|
-
import { default as He } from "./components/Device/
|
|
47
|
-
import { default as je } from "./components/Device/
|
|
48
|
-
import { default as Je } from "./components/Device/
|
|
49
|
-
import { default as Oe } from "./components/Device/
|
|
50
|
-
import { default as Xe } from "./components/Device/
|
|
51
|
-
import { default as Ze } from "./components/Device/
|
|
52
|
-
import { default as $e } from "./components/
|
|
53
|
-
import { default as tt } from "./components/Plan/
|
|
54
|
-
import { default as ot } from "./components/Plan/
|
|
55
|
-
import { default as ft } from "./components/Plan/
|
|
56
|
-
import { default as lt } from "./components/Plan/
|
|
57
|
-
import { default as dt } from "./components/Plan/
|
|
58
|
-
import { default as mt } from "./components/Plan/
|
|
59
|
-
import { default as it } from "./components/Plan/PlanForm/
|
|
60
|
-
import { default as St } from "./components/Plan/
|
|
61
|
-
import { default as
|
|
62
|
-
import { default as vt } from "./components/Plan/
|
|
63
|
-
import { default as It } from "./components/Plan/
|
|
64
|
-
import { default as
|
|
65
|
-
import { default as kt } from "./components/Plan/
|
|
66
|
-
import { default as ht } from "./components/Plan/
|
|
67
|
-
import { default as Mt } from "./components/Plan/
|
|
68
|
-
import { default as Nt } from "./components/Plan/PlanSettings/
|
|
69
|
-
import { default as yt } from "./components/Plan/PlanSettings/
|
|
70
|
-
import { default as Et } from "./components/Plan/PlanSettings/
|
|
71
|
-
import { default as Ct } from "./components/Plan/PlanSettings/
|
|
72
|
-
import { default as Ut } from "./components/Plan/PlanSettings/
|
|
73
|
-
import { default as Ht } from "./components/Plan/PlanSettings/
|
|
74
|
-
import { default as jt } from "./components/Plan/PlanSettings/
|
|
75
|
-
import { default as Jt } from "./components/Plan/PlanSettings/
|
|
76
|
-
import { default as Ot } from "./components/Plan/PlanSettings/
|
|
77
|
-
import { default as Xt } from "./components/Plan/
|
|
78
|
-
import { default as Zt } from "./components/Plan/
|
|
79
|
-
import { default as $t } from "./components/Plan/
|
|
80
|
-
import { default as ta } from "./components/Plan/
|
|
81
|
-
import { default as oa } from "./components/Plan/
|
|
82
|
-
import { default as fa } from "./components/Plan/
|
|
83
|
-
import { default as la } from "./components/Plan/
|
|
84
|
-
import { default as da } from "./components/Plan/Mirrors/
|
|
85
|
-
import { default as ma } from "./components/Plan/
|
|
86
|
-
import { default as ia } from "./components/Plan/
|
|
87
|
-
import { default as Sa } from "./components/
|
|
88
|
-
import { default as
|
|
89
|
-
import { default as va } from "./components/Restore/
|
|
90
|
-
import { default as Ia } from "./components/Restore/
|
|
91
|
-
import { default as
|
|
92
|
-
import { default as ka } from "./components/Restore/RestoreWizard/
|
|
93
|
-
import { default as ha } from "./components/Restore/RestoreWizard/
|
|
94
|
-
import { default as Ma } from "./components/Restore/RestoreWizard/
|
|
95
|
-
import { default as Na } from "./components/
|
|
96
|
-
import { default as ya } from "./components/
|
|
97
|
-
import { default as Ea } from "./components/Settings/
|
|
98
|
-
import { default as Ca } from "./components/Settings/
|
|
99
|
-
import { default as Ua } from "./components/Settings/IntegrationSettings/
|
|
100
|
-
import { default as Ha } from "./components/Settings/IntegrationSettings/
|
|
101
|
-
import { default as ja } from "./components/Settings/
|
|
102
|
-
import { default as Ja } from "./components/
|
|
103
|
-
import { default as Oa } from "./components/
|
|
104
|
-
import { default as Xa } from "./components/
|
|
105
|
-
import { default as Za } from "./components/Storage/
|
|
106
|
-
import { default as $a } from "./components/Storage/
|
|
107
|
-
import { default as to } from "./components/Storage/
|
|
108
|
-
import { default as oo } from "./components/
|
|
109
|
-
import { default as fo } from "./components/
|
|
110
|
-
import { default as lo } from "./components/common/SnapshotBrowser/
|
|
111
|
-
import { default as uo } from "./components/common/SnapshotBrowser/
|
|
112
|
-
import { default as xo } from "./components/common/SnapshotBrowser/
|
|
113
|
-
import {
|
|
114
|
-
import {
|
|
115
|
-
import {
|
|
23
|
+
import { default as K } from "./components/Plan/FilterPlans/FilterPlans.js";
|
|
24
|
+
import { default as Q } from "./components/common/StatusLabel/StatusLabel.js";
|
|
25
|
+
import { Tab as Y, TabList as Z, TabPanel as _, default as $ } from "./components/common/Tabs/Tabs.js";
|
|
26
|
+
import { default as te } from "./components/common/TagsFilter/TagsFilter.js";
|
|
27
|
+
import { default as oe } from "./components/common/form/FormField/FormField.js";
|
|
28
|
+
import { default as fe } from "./components/common/form/Input/Input.js";
|
|
29
|
+
import { default as le } from "./components/common/form/IntervalField/IntervalField.js";
|
|
30
|
+
import { default as de } from "./components/common/form/MultiSelect/MultiSelect.js";
|
|
31
|
+
import { default as me } from "./components/common/form/NumberInput/NumberInput.js";
|
|
32
|
+
import { default as ie } from "./components/common/form/PasswordField/PasswordField.js";
|
|
33
|
+
import { default as Se } from "./components/common/form/RadioIconSelect/RadioIconSelect.js";
|
|
34
|
+
import { default as Pe } from "./components/common/form/Select/Select.js";
|
|
35
|
+
import { default as ve } from "./components/common/form/SizePicker/SizePicker.js";
|
|
36
|
+
import { default as Ie } from "./components/common/form/StoragePicker/StoragePicker.js";
|
|
37
|
+
import { default as we } from "./components/common/form/TagsInput/TagsInput.js";
|
|
38
|
+
import { default as ke } from "./components/common/form/TimePicker/TimePicker.js";
|
|
39
|
+
import { default as he } from "./components/common/form/Toggle/Toggle.js";
|
|
40
|
+
import { default as Me } from "./components/common/form/Tristate/Tristate.js";
|
|
41
|
+
import { default as Ne } from "./components/Device/DeviceBackups/DeviceBackups.js";
|
|
42
|
+
import { default as ye } from "./components/Device/DeviceCPU/DeviceCPU.js";
|
|
43
|
+
import { default as Ee } from "./components/Device/DeviceInfo/DeviceInfo.js";
|
|
44
|
+
import { default as Ce } from "./components/Device/DeviceItem/DeviceItem.js";
|
|
45
|
+
import { default as Ue } from "./components/Device/DeviceMemory/DeviceMemory.js";
|
|
46
|
+
import { default as He } from "./components/Device/DeviceNetworks/DeviceNetworks.js";
|
|
47
|
+
import { default as je } from "./components/Device/DeviceRcloneSettings/DeviceRcloneSettings.js";
|
|
48
|
+
import { default as Je } from "./components/Device/DeviceResticSettings/DeviceResticSettings.js";
|
|
49
|
+
import { default as Oe } from "./components/Device/DeviceStorageDisks/DeviceStorageDisks.js";
|
|
50
|
+
import { default as Xe } from "./components/Device/DeviceStorageDrives/DeviceStorageDrives.js";
|
|
51
|
+
import { default as Ze } from "./components/Device/DeviceSystem/DeviceSystem.js";
|
|
52
|
+
import { default as $e } from "./components/Device/EditDevice/EditDevice.js";
|
|
53
|
+
import { default as tt } from "./components/Plan/AddPlan/AddPlan.js";
|
|
54
|
+
import { default as ot } from "./components/Plan/BackupEvents/BackupEvents.js";
|
|
55
|
+
import { default as ft } from "./components/Plan/BackupProgress/BackupProgress.js";
|
|
56
|
+
import { default as lt } from "./components/Plan/Backups/Backups.js";
|
|
57
|
+
import { default as dt } from "./components/Plan/EditPlan/EditPlan.js";
|
|
58
|
+
import { default as mt } from "./components/Plan/PlanBackups/PlanBackups.js";
|
|
59
|
+
import { default as it } from "./components/Plan/PlanForm/PlanForm.js";
|
|
60
|
+
import { default as St } from "./components/Plan/PlanForm/PlanFormNav.js";
|
|
61
|
+
import { default as Pt } from "./components/Plan/PlanHistory/PlanHistory.js";
|
|
62
|
+
import { default as vt } from "./components/Plan/PlanItems/PlanItem.js";
|
|
63
|
+
import { default as It } from "./components/Plan/PlanLogs/PlanLogs.js";
|
|
64
|
+
import { default as wt } from "./components/Plan/PlanPendingBackup/PlanPendingBackup.js";
|
|
65
|
+
import { default as kt } from "./components/Plan/PlanProgress/PlanProgress.js";
|
|
66
|
+
import { default as ht } from "./components/Plan/PlanPruneModal/PlanPruneModal.js";
|
|
67
|
+
import { default as Mt } from "./components/Plan/PlanRemoveModal/PlanRemoveModal.js";
|
|
68
|
+
import { default as Nt } from "./components/Plan/PlanSettings/PlanAdvancedSettings.js";
|
|
69
|
+
import { default as yt } from "./components/Plan/PlanSettings/PlanGeneralSettings.js";
|
|
70
|
+
import { default as Et } from "./components/Plan/PlanSettings/PlanNotificationSettings.js";
|
|
71
|
+
import { default as Ct } from "./components/Plan/PlanSettings/PlanNotificationSettingsTester.js";
|
|
72
|
+
import { default as Ut } from "./components/Plan/PlanSettings/PlanPerformanceSettings.js";
|
|
73
|
+
import { default as Ht } from "./components/Plan/PlanSettings/PlanPruneSettings.js";
|
|
74
|
+
import { default as jt } from "./components/Plan/PlanSettings/PlanScriptsSettings.js";
|
|
75
|
+
import { default as Jt } from "./components/Plan/PlanSettings/PlanSourceSettings.js";
|
|
76
|
+
import { default as Ot } from "./components/Plan/PlanSettings/PlanStrategySettings.js";
|
|
77
|
+
import { default as Xt } from "./components/Plan/PlanSettings/PlanTypeSettings.js";
|
|
78
|
+
import { default as Zt } from "./components/Plan/PlanStats/PlanStats.js";
|
|
79
|
+
import { default as $t } from "./components/Plan/PlanUnlockModal/PlanUnlockModal.js";
|
|
80
|
+
import { default as ta } from "./components/Plan/PlanIntegrity/PlanIntegrity.js";
|
|
81
|
+
import { default as oa } from "./components/Plan/PlanRepair/PlanRepair.js";
|
|
82
|
+
import { default as fa } from "./components/Plan/SnapshotViewer/SnapshotViewer.js";
|
|
83
|
+
import { default as la } from "./components/Plan/SnapshotViewer/SnapshotViewerFile.js";
|
|
84
|
+
import { default as da } from "./components/Plan/Mirrors/MirrorStatusBadge.js";
|
|
85
|
+
import { default as ma } from "./components/Plan/Mirrors/MirrorStorageSelector.js";
|
|
86
|
+
import { default as ia } from "./components/Plan/Mirrors/MirrorStorageSelectorModal.js";
|
|
87
|
+
import { default as Sa } from "./components/Plan/PlanSettings/PlanReplicationSettings.js";
|
|
88
|
+
import { default as Pa } from "./components/Plan/Restores/Restores.js";
|
|
89
|
+
import { default as va } from "./components/Restore/RestoreChangeViewer/RestoreChangeViewer.js";
|
|
90
|
+
import { default as Ia } from "./components/Restore/RestoredFileBrowser/RestoredFileBrowser.js";
|
|
91
|
+
import { default as wa } from "./components/Restore/RestoreFileSelector/RestoreFileSelector.js";
|
|
92
|
+
import { default as ka } from "./components/Restore/RestoreWizard/RestoreConfirmStep.js";
|
|
93
|
+
import { default as ha } from "./components/Restore/RestoreWizard/RestoreFileSelectorStep.js";
|
|
94
|
+
import { default as Ma } from "./components/Restore/RestoreWizard/RestorePreviewStep.js";
|
|
95
|
+
import { default as Na } from "./components/Restore/RestoreWizard/RestoreSettingsStep.js";
|
|
96
|
+
import { default as ya } from "./components/Restore/RestoreWizard/RestoreWizard.js";
|
|
97
|
+
import { default as Ea } from "./components/Settings/AppLogs/AppLogs.js";
|
|
98
|
+
import { default as Ca } from "./components/Settings/GeneralSettings/GeneralSettings.js";
|
|
99
|
+
import { default as Ua } from "./components/Settings/IntegrationSettings/IntegrationSettings.js";
|
|
100
|
+
import { default as Ha } from "./components/Settings/IntegrationSettings/SMTPSettings.js";
|
|
101
|
+
import { default as ja } from "./components/Settings/IntegrationSettings/NtfySettings.js";
|
|
102
|
+
import { default as Ja } from "./components/Settings/IntegrationSettings/ValidateEmailIntegration.js";
|
|
103
|
+
import { default as Oa } from "./components/Settings/TwoFactorSetup/TwoFactorSetup.js";
|
|
104
|
+
import { default as Xa } from "./components/Skeleton/SkeletonItems.js";
|
|
105
|
+
import { default as Za } from "./components/Storage/AddStorage/AddStorage.js";
|
|
106
|
+
import { default as $a } from "./components/Storage/EditStorage/EditStorage.js";
|
|
107
|
+
import { default as to } from "./components/Storage/StorageAuthSettings/StorageAuthSettings.js";
|
|
108
|
+
import { default as oo } from "./components/Storage/StorageItem/StorageItem.js";
|
|
109
|
+
import { default as fo } from "./components/Storage/StorageSettings/StorageSettings.js";
|
|
110
|
+
import { default as lo } from "./components/common/SnapshotBrowser/SnapshotBrowserToolbar.js";
|
|
111
|
+
import { default as uo } from "./components/common/SnapshotBrowser/SnapshotBrowserDirectories.js";
|
|
112
|
+
import { default as xo } from "./components/common/SnapshotBrowser/SnapshotBrowserFileList.js";
|
|
113
|
+
import { default as no } from "./components/common/SnapshotBrowser/SnapshotBrowserFileRow.js";
|
|
114
|
+
import { default as go } from "./components/common/SnapshotBrowser/SnapshotBrowserGoUpRow.js";
|
|
115
|
+
import { useSnapshotSort as co } from "./components/common/SnapshotBrowser/hooks/useSnapshotSort.js";
|
|
116
|
+
import { useSnapshotNavigation as Fo } from "./components/common/SnapshotBrowser/hooks/useSnapshotNavigation.js";
|
|
117
|
+
import { useSnapshotDatabase as Ro } from "./components/common/SnapshotBrowser/hooks/useSnapshotDatabase.js";
|
|
116
118
|
export {
|
|
117
119
|
x as ActionModal,
|
|
118
|
-
|
|
119
|
-
|
|
120
|
+
tt as AddPlan,
|
|
121
|
+
Za as AddStorage,
|
|
120
122
|
n as AnimatedWrapper,
|
|
121
123
|
a as App,
|
|
122
124
|
r as AppContent,
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
125
|
+
Ea as AppLogs,
|
|
126
|
+
ot as BackupEvents,
|
|
127
|
+
ft as BackupProgress,
|
|
128
|
+
lt as Backups,
|
|
127
129
|
g as Button,
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
130
|
+
Ne as DeviceBackups,
|
|
131
|
+
ye as DeviceCPU,
|
|
132
|
+
Ee as DeviceInfo,
|
|
133
|
+
Ce as DeviceItem,
|
|
134
|
+
Ue as DeviceMemory,
|
|
135
|
+
He as DeviceNetworks,
|
|
136
|
+
je as DeviceRcloneSettings,
|
|
137
|
+
Je as DeviceResticSettings,
|
|
138
|
+
Oe as DeviceStorageDisks,
|
|
139
|
+
Xe as DeviceStorageDrives,
|
|
140
|
+
Ze as DeviceSystem,
|
|
141
|
+
$e as EditDevice,
|
|
142
|
+
dt as EditPlan,
|
|
143
|
+
$a as EditStorage,
|
|
144
|
+
c as FileIcon,
|
|
143
145
|
F as FileManager,
|
|
144
|
-
|
|
146
|
+
K as FilterPlans,
|
|
147
|
+
R as FolderPicker,
|
|
145
148
|
s as Footer,
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
149
|
+
oe as FormField,
|
|
150
|
+
Ca as GeneralSettings,
|
|
151
|
+
D as Icon,
|
|
152
|
+
fe as Input,
|
|
153
|
+
Ua as IntegrationSettings,
|
|
154
|
+
le as IntervalField,
|
|
152
155
|
T as ItemsLayout,
|
|
153
156
|
A as LogViewer,
|
|
154
157
|
B as Logo,
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
+
da as MirrorStatusBadge,
|
|
159
|
+
ma as MirrorStorageSelector,
|
|
160
|
+
ia as MirrorStorageSelectorModal,
|
|
158
161
|
b as Modal,
|
|
159
|
-
|
|
162
|
+
de as MultiSelect,
|
|
160
163
|
L as NotFound,
|
|
161
|
-
|
|
162
|
-
|
|
164
|
+
ja as NtfySettings,
|
|
165
|
+
me as NumberInput,
|
|
163
166
|
V as PageHeader,
|
|
164
167
|
p as PageTitle,
|
|
165
|
-
|
|
168
|
+
ie as PasswordField,
|
|
166
169
|
G as PathPicker,
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
jt as
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
Ot as
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
170
|
+
Nt as PlanAdvancedSettings,
|
|
171
|
+
mt as PlanBackups,
|
|
172
|
+
it as PlanForm,
|
|
173
|
+
St as PlanFormNav,
|
|
174
|
+
yt as PlanGeneralSettings,
|
|
175
|
+
Pt as PlanHistory,
|
|
176
|
+
ta as PlanIntegrity,
|
|
177
|
+
vt as PlanItem,
|
|
178
|
+
It as PlanLogs,
|
|
179
|
+
Et as PlanNotificationSettings,
|
|
180
|
+
Ct as PlanNotificationSettingsTester,
|
|
181
|
+
wt as PlanPendingBackup,
|
|
182
|
+
Ut as PlanPerformanceSettings,
|
|
183
|
+
kt as PlanProgress,
|
|
184
|
+
ht as PlanPruneModal,
|
|
185
|
+
Ht as PlanPruneSettings,
|
|
186
|
+
Mt as PlanRemoveModal,
|
|
187
|
+
oa as PlanRepair,
|
|
188
|
+
Sa as PlanReplicationSettings,
|
|
189
|
+
Pa as PlanRestores,
|
|
190
|
+
jt as PlanScriptsSettings,
|
|
191
|
+
Jt as PlanSourceSettings,
|
|
192
|
+
Zt as PlanStats,
|
|
193
|
+
Ot as PlanStrategySettings,
|
|
194
|
+
Xt as PlanTypeSettings,
|
|
195
|
+
$t as PlanUnlockModal,
|
|
196
|
+
Se as RadioIconSelect,
|
|
197
|
+
va as RestoreChangeViewer,
|
|
198
|
+
ka as RestoreConfirmStep,
|
|
199
|
+
wa as RestoreFileSelector,
|
|
200
|
+
ha as RestoreFileSelectorStep,
|
|
201
|
+
Ma as RestorePreviewStep,
|
|
202
|
+
Na as RestoreSettingsStep,
|
|
203
|
+
ya as RestoreWizard,
|
|
204
|
+
Ia as RestoredFileBrowser,
|
|
205
|
+
Ha as SMTPSettings,
|
|
202
206
|
z as SearchItems,
|
|
203
|
-
|
|
207
|
+
Pe as Select,
|
|
204
208
|
u as SideNav,
|
|
205
209
|
W as SidePanel,
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
210
|
+
ve as SizePicker,
|
|
211
|
+
Xa as SkeletonItems,
|
|
212
|
+
uo as SnapshotBrowserDirectories,
|
|
213
|
+
xo as SnapshotBrowserFileList,
|
|
214
|
+
no as SnapshotBrowserFileRow,
|
|
215
|
+
go as SnapshotBrowserGoUpRow,
|
|
216
|
+
lo as SnapshotBrowserToolbar,
|
|
217
|
+
fa as SnapshotViewer,
|
|
218
|
+
la as SnapshotViewerFile,
|
|
215
219
|
q as SortItems,
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
220
|
+
Q as StatusLabel,
|
|
221
|
+
to as StorageAuthSettings,
|
|
222
|
+
oo as StorageItem,
|
|
223
|
+
Ie as StoragePicker,
|
|
224
|
+
fo as StorageSettings,
|
|
225
|
+
Y as Tab,
|
|
226
|
+
Z as TabList,
|
|
227
|
+
_ as TabPanel,
|
|
228
|
+
$ as Tabs,
|
|
229
|
+
te as TagsFilter,
|
|
230
|
+
we as TagsInput,
|
|
231
|
+
ke as TimePicker,
|
|
232
|
+
he as Toggle,
|
|
233
|
+
Me as Tristate,
|
|
234
|
+
Oa as TwoFactorSetup,
|
|
235
|
+
Ja as ValidateEmailIntegration,
|
|
236
|
+
Ro as useSnapshotDatabase,
|
|
237
|
+
Fo as useSnapshotNavigation,
|
|
238
|
+
co as useSnapshotSort
|
|
235
239
|
};
|
|
236
240
|
//# sourceMappingURL=components.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"components.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePlanSingleActions.d.ts","sourceRoot":"","sources":["../../src/hooks/usePlanSingleActions.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,eAAO,MAAM,oBAAoB,QAAO;IACrC,eAAe,EAAE,OAAO,CAAC;IACzB,kBAAkB,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5C,aAAa,EAAE,OAAO,CAAC;IACvB,gBAAgB,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC1C,cAAc,EAAE,OAAO,CAAC;IACxB,iBAAiB,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC3C,aAAa,EAAE,OAAO,CAAC;IACvB,gBAAgB,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC1C,eAAe,EAAE,OAAO,CAAC;IACzB,kBAAkB,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5C,IAAI,EAAE,IAAI,CAAC;IACX,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,cAAc,EAAE,WAAW,EAAE,CAAC;IAC9B,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAg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AAC;IACf,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,SAAS,EAAE,MAAM,IAAI,CAAC;CA+HxB,CAAC"}
|
|
@@ -55,26 +55,29 @@ const O = () => {
|
|
|
55
55
|
if (l)
|
|
56
56
|
return;
|
|
57
57
|
const e = t.loading(`Starting ${o ? "Sync" : "Backup"}...`);
|
|
58
|
-
a.mutate(
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
58
|
+
a.mutate(
|
|
59
|
+
{ id: n.id },
|
|
60
|
+
{
|
|
61
|
+
onSuccess: (s) => {
|
|
62
|
+
const C = (s == null ? void 0 : s.message) || `${o ? "Sync" : "Backup"} initiated successfully! 🚀`, f = !o && (s == null ? void 0 : s.message) && (s == null ? void 0 : s.message.includes("reached the concurrency limit"));
|
|
63
|
+
t.update(e, {
|
|
64
|
+
render: o ? C : f ? s == null ? void 0 : s.message : "Backup initiated successfully!",
|
|
65
|
+
type: "success",
|
|
66
|
+
isLoading: !1,
|
|
67
|
+
autoClose: 3e3
|
|
68
|
+
}), !o && !f && R(`/plan/${n.id}?pendingbackup=1`);
|
|
69
|
+
},
|
|
70
|
+
onError: (s) => {
|
|
71
|
+
t.update(e, {
|
|
72
|
+
render: `${o ? "Sync" : "Backup"} failed to start. ${(s == null ? void 0 : s.message) || "Unknown Error."}`,
|
|
73
|
+
type: "error",
|
|
74
|
+
isLoading: !1,
|
|
75
|
+
autoClose: !1,
|
|
76
|
+
closeButton: !0
|
|
77
|
+
});
|
|
78
|
+
}
|
|
76
79
|
}
|
|
77
|
-
|
|
80
|
+
);
|
|
78
81
|
}
|
|
79
82
|
};
|
|
80
83
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePlanSingleActions.js","sources":["../../src/hooks/usePlanSingleActions.tsx"],"sourcesContent":["import { useState } from 'react';\r\nimport { useNavigate, useParams } from 'react-router';\r\nimport { toast } from 'react-toastify';\r\nimport { useGetPlan, usePausePlan, usePerformBackup, useResumePlan } from '../services/plans';\r\nimport { Plan } from '../@types/plans';\r\nimport { Backup } from '../@types/backups';\r\nimport { RestoreSlim } from '../@types/restores';\r\n\r\nexport const usePlanSingleActions = (): {\r\n showDeleteModal: boolean;\r\n setShowDeleteModal: (show: boolean) => void;\r\n showEditModal: boolean;\r\n setShowEditModal: (show: boolean) => void;\r\n showPruneModal: boolean;\r\n setShowPruneModal: (show: boolean) => void;\r\n showLogsModal: boolean;\r\n setShowLogsModal: (show: boolean) => void;\r\n showUnlockModal: boolean;\r\n setShowUnlockModal: (show: boolean) => void;\r\n plan: Plan;\r\n isLoading: boolean;\r\n refetchPlan: () => void;\r\n sortedHistory: Backup[];\r\n activeBackups: Backup[];\r\n activeRestores: RestoreSlim[];\r\n lastBackupItem: Backup;\r\n actionInProgress: boolean;\r\n taskPending: boolean;\r\n planError: any;\r\n changeStatus: () => void;\r\n backupNow: () => void;\r\n} => {\r\n const [showDeleteModal, setShowDeleteModal] = useState(false);\r\n const [showEditModal, setShowEditModal] = useState(false);\r\n const [showUnlockModal, setShowUnlockModal] = useState(false);\r\n const [showPruneModal, setShowPruneModal] = useState(false);\r\n const [showLogsModal, setShowLogsModal] = useState(false);\r\n\r\n const { id } = useParams();\r\n const navigate = useNavigate();\r\n\r\n const performBackupMutation = usePerformBackup();\r\n const pauseMutation = usePausePlan();\r\n const resumeMutation = useResumePlan();\r\n\r\n const { data, isLoading, refetch: refetchPlan, error: planError } = useGetPlan(id as string);\r\n const plan: Plan = data?.result || {};\r\n\r\n const isSync = plan.method === 'sync';\r\n\r\n const sortedHistory = [...(plan.backups || [])].sort((a, b) => b.started - a.started);\r\n const activeBackups = sortedHistory.filter((s) => s.inProgress);\r\n const activeRestores = (plan.restores || []).filter((s) => s.inProgress);\r\n const lastBackupItem = isSync ? sortedHistory.filter((s) => s.status === 'completed')[0] : sortedHistory[0];\r\n const actionInProgress = activeBackups.length > 0 || activeRestores.length > 0;\r\n const taskPending = pauseMutation.isPending || resumeMutation.isPending || performBackupMutation.isPending;\r\n\r\n const changeStatus = () => {\r\n if (activeBackups.length > 0) {\r\n return toast.error(`Can't pause a Plan while a Backup is in progress.`);\r\n }\r\n if (plan.inProgress || taskPending) {\r\n return;\r\n }\r\n // isActive, set it to false, else true\r\n // When the action is being performed, the item should grey out and stay inaccessible.\r\n if (plan.isActive) {\r\n toast.promise(pauseMutation.mutateAsync(plan.id), {\r\n pending: 'Pausing backup Plan...',\r\n success: 'Backup Plan Paused',\r\n error: {\r\n render({ data }: any) {\r\n return `Failed to Pause Backup Plan. ${data?.message || 'Unknown Error.'}`;\r\n },\r\n },\r\n });\r\n } else {\r\n toast.promise(resumeMutation.mutateAsync(plan.id), {\r\n pending: 'Resuming backup Plan...',\r\n success: 'Backup Plan Resumed',\r\n error: {\r\n render({ data }: any) {\r\n return `Failed to Resume Backup Plan. ${data?.message || 'Unknown Error.'}`;\r\n },\r\n },\r\n });\r\n }\r\n };\r\n\r\n const backupNow = () => {\r\n if (actionInProgress) {\r\n return toast.error('A Backup/Restore Process is in Progress.');\r\n }\r\n if (taskPending) {\r\n return;\r\n }\r\n\r\n const toastId = toast.loading(`Starting ${isSync ? 'Sync' : 'Backup'}...`);\r\n\r\n performBackupMutation.mutate(plan.id
|
|
1
|
+
{"version":3,"file":"usePlanSingleActions.js","sources":["../../src/hooks/usePlanSingleActions.tsx"],"sourcesContent":["import { useState } from 'react';\r\nimport { useNavigate, useParams } from 'react-router';\r\nimport { toast } from 'react-toastify';\r\nimport { useGetPlan, usePausePlan, usePerformBackup, useResumePlan } from '../services/plans';\r\nimport { Plan } from '../@types/plans';\r\nimport { Backup } from '../@types/backups';\r\nimport { RestoreSlim } from '../@types/restores';\r\n\r\nexport const usePlanSingleActions = (): {\r\n showDeleteModal: boolean;\r\n setShowDeleteModal: (show: boolean) => void;\r\n showEditModal: boolean;\r\n setShowEditModal: (show: boolean) => void;\r\n showPruneModal: boolean;\r\n setShowPruneModal: (show: boolean) => void;\r\n showLogsModal: boolean;\r\n setShowLogsModal: (show: boolean) => void;\r\n showUnlockModal: boolean;\r\n setShowUnlockModal: (show: boolean) => void;\r\n plan: Plan;\r\n isLoading: boolean;\r\n refetchPlan: () => void;\r\n sortedHistory: Backup[];\r\n activeBackups: Backup[];\r\n activeRestores: RestoreSlim[];\r\n lastBackupItem: Backup;\r\n actionInProgress: boolean;\r\n taskPending: boolean;\r\n planError: any;\r\n changeStatus: () => void;\r\n backupNow: () => void;\r\n} => {\r\n const [showDeleteModal, setShowDeleteModal] = useState(false);\r\n const [showEditModal, setShowEditModal] = useState(false);\r\n const [showUnlockModal, setShowUnlockModal] = useState(false);\r\n const [showPruneModal, setShowPruneModal] = useState(false);\r\n const [showLogsModal, setShowLogsModal] = useState(false);\r\n\r\n const { id } = useParams();\r\n const navigate = useNavigate();\r\n\r\n const performBackupMutation = usePerformBackup();\r\n const pauseMutation = usePausePlan();\r\n const resumeMutation = useResumePlan();\r\n\r\n const { data, isLoading, refetch: refetchPlan, error: planError } = useGetPlan(id as string);\r\n const plan: Plan = data?.result || {};\r\n\r\n const isSync = plan.method === 'sync';\r\n\r\n const sortedHistory = [...(plan.backups || [])].sort((a, b) => b.started - a.started);\r\n const activeBackups = sortedHistory.filter((s) => s.inProgress);\r\n const activeRestores = (plan.restores || []).filter((s) => s.inProgress);\r\n const lastBackupItem = isSync ? sortedHistory.filter((s) => s.status === 'completed')[0] : sortedHistory[0];\r\n const actionInProgress = activeBackups.length > 0 || activeRestores.length > 0;\r\n const taskPending = pauseMutation.isPending || resumeMutation.isPending || performBackupMutation.isPending;\r\n\r\n const changeStatus = () => {\r\n if (activeBackups.length > 0) {\r\n return toast.error(`Can't pause a Plan while a Backup is in progress.`);\r\n }\r\n if (plan.inProgress || taskPending) {\r\n return;\r\n }\r\n // isActive, set it to false, else true\r\n // When the action is being performed, the item should grey out and stay inaccessible.\r\n if (plan.isActive) {\r\n toast.promise(pauseMutation.mutateAsync(plan.id), {\r\n pending: 'Pausing backup Plan...',\r\n success: 'Backup Plan Paused',\r\n error: {\r\n render({ data }: any) {\r\n return `Failed to Pause Backup Plan. ${data?.message || 'Unknown Error.'}`;\r\n },\r\n },\r\n });\r\n } else {\r\n toast.promise(resumeMutation.mutateAsync(plan.id), {\r\n pending: 'Resuming backup Plan...',\r\n success: 'Backup Plan Resumed',\r\n error: {\r\n render({ data }: any) {\r\n return `Failed to Resume Backup Plan. ${data?.message || 'Unknown Error.'}`;\r\n },\r\n },\r\n });\r\n }\r\n };\r\n\r\n const backupNow = () => {\r\n if (actionInProgress) {\r\n return toast.error('A Backup/Restore Process is in Progress.');\r\n }\r\n if (taskPending) {\r\n return;\r\n }\r\n\r\n const toastId = toast.loading(`Starting ${isSync ? 'Sync' : 'Backup'}...`);\r\n\r\n performBackupMutation.mutate(\r\n { id: plan.id },\r\n {\r\n onSuccess: (data) => {\r\n const msg = data?.message || `${isSync ? 'Sync' : 'Backup'} initiated successfully! 🚀`;\r\n const notStarted = !isSync && data?.message && data?.message.includes('reached the concurrency limit');\r\n toast.update(toastId, {\r\n render: isSync ? msg : notStarted ? data?.message : 'Backup initiated successfully!',\r\n type: 'success',\r\n isLoading: false,\r\n autoClose: 3000,\r\n });\r\n if (!isSync && !notStarted) {\r\n navigate(`/plan/${plan.id}?pendingbackup=1`);\r\n }\r\n },\r\n onError: (error: any) => {\r\n toast.update(toastId, {\r\n render: `${isSync ? 'Sync' : 'Backup'} failed to start. ${error?.message || 'Unknown Error.'}`,\r\n type: 'error',\r\n isLoading: false,\r\n autoClose: false,\r\n closeButton: true,\r\n });\r\n },\r\n },\r\n );\r\n };\r\n\r\n return {\r\n // State\r\n showDeleteModal,\r\n setShowDeleteModal,\r\n showEditModal,\r\n setShowEditModal,\r\n showPruneModal,\r\n setShowPruneModal,\r\n showLogsModal,\r\n setShowLogsModal,\r\n showUnlockModal,\r\n setShowUnlockModal,\r\n\r\n // Data\r\n plan,\r\n isLoading,\r\n refetchPlan,\r\n sortedHistory,\r\n activeBackups,\r\n activeRestores,\r\n lastBackupItem,\r\n actionInProgress,\r\n taskPending,\r\n planError,\r\n\r\n // Actions\r\n changeStatus,\r\n backupNow,\r\n };\r\n};\r\n"],"names":["usePlanSingleActions","showDeleteModal","setShowDeleteModal","useState","showEditModal","setShowEditModal","showUnlockModal","setShowUnlockModal","showPruneModal","setShowPruneModal","showLogsModal","setShowLogsModal","id","useParams","navigate","useNavigate","performBackupMutation","usePerformBackup","pauseMutation","usePausePlan","resumeMutation","useResumePlan","data","isLoading","refetchPlan","planError","useGetPlan","plan","isSync","sortedHistory","a","b","activeBackups","s","activeRestores","lastBackupItem","actionInProgress","taskPending","toast","toastId","msg","notStarted","error"],"mappings":";;;;AAQO,MAAMA,IAAuB,MAuB/B;AACF,QAAM,CAACC,GAAiBC,CAAkB,IAAIC,EAAS,EAAK,GACtD,CAACC,GAAeC,CAAgB,IAAIF,EAAS,EAAK,GAClD,CAACG,GAAiBC,CAAkB,IAAIJ,EAAS,EAAK,GACtD,CAACK,GAAgBC,CAAiB,IAAIN,EAAS,EAAK,GACpD,CAACO,GAAeC,CAAgB,IAAIR,EAAS,EAAK,GAElD,EAAE,IAAAS,EAAA,IAAOC,EAAA,GACTC,IAAWC,EAAA,GAEXC,IAAwBC,EAAA,GACxBC,IAAgBC,EAAA,GAChBC,IAAiBC,EAAA,GAEjB,EAAE,MAAAC,GAAM,WAAAC,GAAW,SAASC,GAAa,OAAOC,EAAA,IAAcC,EAAWd,CAAY,GACrFe,KAAaL,KAAA,gBAAAA,EAAM,WAAU,CAAA,GAE7BM,IAASD,EAAK,WAAW,QAEzBE,IAAgB,CAAC,GAAIF,EAAK,WAAW,CAAA,CAAG,EAAE,KAAK,CAACG,GAAGC,MAAMA,EAAE,UAAUD,EAAE,OAAO,GAC9EE,IAAg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