@plutonhq/core-frontend 0.1.33 → 0.1.34
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/Device/DeviceResticSettings/DeviceResticSettings.js +4 -4
- package/dist-lib/components/Device/DeviceResticSettings/DeviceResticSettings.js.map +1 -1
- package/dist-lib/components/Plan/PlanSettings/PlanPerformanceSettings.js +2 -2
- package/dist-lib/components/Plan/PlanSettings/PlanPerformanceSettings.js.map +1 -1
- package/dist-lib/components/Plan/PlanSizeChart/PlanSizeChart.d.ts.map +1 -1
- package/dist-lib/components/Plan/PlanSizeChart/PlanSizeChart.js +47 -47
- package/dist-lib/components/Plan/PlanSizeChart/PlanSizeChart.js.map +1 -1
- package/dist-lib/components/Plan/PlanSizeChart/PlanSizeChart.module.scss.js +6 -6
- package/dist-lib/components/common/FileManager/FileManager.module.scss.js +18 -16
- package/dist-lib/components/common/FileManager/FileManager.module.scss.js.map +1 -1
- package/dist-lib/styles/core-frontend.css +1 -1
- package/package.json +1 -1
- package/src/components/Device/DeviceResticSettings/DeviceResticSettings.tsx +2 -2
- package/src/components/Plan/PlanSettings/PlanPerformanceSettings.tsx +2 -2
- package/src/components/Plan/PlanSizeChart/PlanSizeChart.module.scss +1 -1
- package/src/components/Plan/PlanSizeChart/PlanSizeChart.tsx +11 -8
- package/src/components/common/FileManager/FileManager.module.scss +7 -0
package/package.json
CHANGED
|
@@ -44,8 +44,8 @@ const DeviceResticSettings = ({ settings = {}, onUpdate }: DeviceResticSettingsP
|
|
|
44
44
|
<div className={classes.field}>
|
|
45
45
|
<NumberInput
|
|
46
46
|
label="Packet Size (MB)"
|
|
47
|
-
fieldValue={settings?.packSize ? parseInt(settings.packSize
|
|
48
|
-
onUpdate={(val) => onUpdate({ ...settings, packSize: val ? val
|
|
47
|
+
fieldValue={settings?.packSize ? parseInt(settings.packSize, 10) : ''}
|
|
48
|
+
onUpdate={(val) => onUpdate({ ...settings, packSize: val ? val.toString() : '' })}
|
|
49
49
|
min={0}
|
|
50
50
|
max={4000}
|
|
51
51
|
hint="Packs are blobs of data, which are encrypted and stored in the repository. Increasing the pack size requires more disk space for temporary pack files to be created before uploading."
|
|
@@ -34,8 +34,8 @@ const PlanPerformanceSettings = ({ plan, onUpdate }: PlanPerformanceSettingsProp
|
|
|
34
34
|
<div className={classes.field}>
|
|
35
35
|
<NumberInput
|
|
36
36
|
label="Packet Size (MB)"
|
|
37
|
-
fieldValue={perfSettings?.packSize ? parseInt(perfSettings.packSize
|
|
38
|
-
onUpdate={(val) => onUpdate({ ...perfSettings, packSize: val
|
|
37
|
+
fieldValue={perfSettings?.packSize ? parseInt(perfSettings.packSize, 10) : ''}
|
|
38
|
+
onUpdate={(val) => onUpdate({ ...perfSettings, packSize: val ? val.toString() : '' })}
|
|
39
39
|
min={0}
|
|
40
40
|
max={4000}
|
|
41
41
|
/>
|
|
@@ -10,12 +10,12 @@ ChartJS.register(CategoryScale, LinearScale, PointElement, LineElement, Filler,
|
|
|
10
10
|
|
|
11
11
|
type RangeKey = '7d' | '14d' | '1m' | '3m' | '6m';
|
|
12
12
|
|
|
13
|
-
const RANGE_OPTIONS: { key: RangeKey; label: string; days: number }[] = [
|
|
14
|
-
{ key: '7d', label: '7d', days: 7 },
|
|
15
|
-
{ key: '14d', label: '14d', days: 14 },
|
|
16
|
-
{ key: '1m', label: '1m', days: 30 },
|
|
17
|
-
{ key: '3m', label: '3m', days: 90 },
|
|
18
|
-
{ key: '6m', label: '6m', days: 180 },
|
|
13
|
+
const RANGE_OPTIONS: { key: RangeKey; label: string; labelFull: string; days: number }[] = [
|
|
14
|
+
{ key: '7d', label: '7d', labelFull: '7 days', days: 7 },
|
|
15
|
+
{ key: '14d', label: '14d', labelFull: '14 days', days: 14 },
|
|
16
|
+
{ key: '1m', label: '1m', labelFull: '1 month', days: 30 },
|
|
17
|
+
{ key: '3m', label: '3m', labelFull: '3 months', days: 90 },
|
|
18
|
+
{ key: '6m', label: '6m', labelFull: '6 months', days: 180 },
|
|
19
19
|
];
|
|
20
20
|
|
|
21
21
|
interface PlanSizeChartProps {
|
|
@@ -42,7 +42,10 @@ const PlanSizeChart = ({ backups }: PlanSizeChartProps) => {
|
|
|
42
42
|
|
|
43
43
|
const filtered = useMemo(() => {
|
|
44
44
|
const cutoff = Date.now() - activeRange.days * 24 * 60 * 60 * 1000;
|
|
45
|
-
|
|
45
|
+
// if there is only one backup duplicate the first backup to make 2 items
|
|
46
|
+
// so that the graph is never empty and shows the size even if there is only one backup in the selected range
|
|
47
|
+
const theBackups = backups && backups.length === 1 ? [backups[0], backups[0]] : backups || [];
|
|
48
|
+
return [...theBackups]
|
|
46
49
|
.filter((b) => {
|
|
47
50
|
const t = new Date(b.started).getTime();
|
|
48
51
|
return !isNaN(t) && t >= cutoff;
|
|
@@ -141,7 +144,7 @@ const PlanSizeChart = ({ backups }: PlanSizeChartProps) => {
|
|
|
141
144
|
setOpen(false);
|
|
142
145
|
}}
|
|
143
146
|
>
|
|
144
|
-
{opt.
|
|
147
|
+
{opt.labelFull}
|
|
145
148
|
</li>
|
|
146
149
|
))}
|
|
147
150
|
</ul>
|