@elice/material-runbox 1.260825.0-runboxusability.2 → 1.260825.0-runboxusability.4
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/cjs/_virtual/_rollupPluginBabelHelpers.js +16 -0
- package/cjs/components/material-runbox/MaterialRunboxContent.js +8 -0
- package/cjs/components/material-runbox/MaterialRunboxHeader.js +22 -18
- package/cjs/components/material-runbox/disk/MaterialRunboxDiskUsageAlert.d.ts +13 -0
- package/cjs/components/material-runbox/disk/MaterialRunboxDiskUsageAlert.js +71 -0
- package/cjs/components/material-runbox/disk/MaterialRunboxDiskUsageDialog.d.ts +10 -0
- package/cjs/components/material-runbox/disk/MaterialRunboxDiskUsageDialog.js +98 -0
- package/cjs/components/material-runbox/disk/MaterialRunboxEnvResetButton.d.ts +10 -0
- package/cjs/components/material-runbox/disk/MaterialRunboxEnvResetButton.js +68 -0
- package/cjs/components/material-runbox/disk/MaterialRunboxEnvResetDialog.d.ts +14 -0
- package/cjs/components/material-runbox/disk/MaterialRunboxEnvResetDialog.js +103 -0
- package/cjs/components/material-runbox/disk/index.d.ts +8 -1
- package/cjs/components/material-runbox/disk/index.js +8 -2
- package/cjs/components/material-runbox/hooks/index.d.ts +2 -0
- package/cjs/components/material-runbox/hooks/index.js +6 -0
- package/cjs/components/material-runbox/hooks/useRunboxDiskUsage.d.ts +16 -0
- package/cjs/components/material-runbox/hooks/useRunboxDiskUsage.js +50 -0
- package/cjs/components/material-runbox/hooks/useRunboxEnvReset.d.ts +16 -0
- package/cjs/components/material-runbox/hooks/useRunboxEnvReset.js +95 -0
- package/cjs/components/material-runbox/locales/en.json.js +1 -1
- package/cjs/components/material-runbox/locales/ja.json.js +1 -1
- package/cjs/components/material-runbox/locales/ko.json.js +1 -1
- package/cjs/components/material-runbox/locales/th.json.js +1 -1
- package/cjs/components/material-runbox/runtime/Runtime.js +5 -2
- package/cjs/components/material-runbox/runtime/RuntimeOverlayTerminated.d.ts +4 -0
- package/cjs/components/material-runbox/runtime/RuntimeOverlayTerminated.js +16 -4
- package/cjs/components/material-runbox/status/MaterialRunboxStatusButton.d.ts +4 -7
- package/cjs/components/material-runbox/status/MaterialRunboxStatusButton.js +43 -15
- package/cjs/components/material-runbox/status/MaterialRunboxStatusPopover.d.ts +4 -7
- package/cjs/components/material-runbox/status/MaterialRunboxStatusPopover.js +16 -3
- package/es/_virtual/_rollupPluginBabelHelpers.js +13 -1
- package/es/components/material-runbox/MaterialRunboxContent.js +8 -0
- package/es/components/material-runbox/MaterialRunboxHeader.js +22 -18
- package/es/components/material-runbox/disk/MaterialRunboxDiskUsageAlert.d.ts +13 -0
- package/es/components/material-runbox/disk/MaterialRunboxDiskUsageAlert.js +67 -0
- package/es/components/material-runbox/disk/MaterialRunboxDiskUsageDialog.d.ts +10 -0
- package/es/components/material-runbox/disk/MaterialRunboxDiskUsageDialog.js +94 -0
- package/es/components/material-runbox/disk/MaterialRunboxEnvResetButton.d.ts +10 -0
- package/es/components/material-runbox/disk/MaterialRunboxEnvResetButton.js +60 -0
- package/es/components/material-runbox/disk/MaterialRunboxEnvResetDialog.d.ts +14 -0
- package/es/components/material-runbox/disk/MaterialRunboxEnvResetDialog.js +95 -0
- package/es/components/material-runbox/disk/index.d.ts +8 -1
- package/es/components/material-runbox/disk/index.js +4 -1
- package/es/components/material-runbox/hooks/index.d.ts +2 -0
- package/es/components/material-runbox/hooks/index.js +2 -0
- package/es/components/material-runbox/hooks/useRunboxDiskUsage.d.ts +16 -0
- package/es/components/material-runbox/hooks/useRunboxDiskUsage.js +42 -0
- package/es/components/material-runbox/hooks/useRunboxEnvReset.d.ts +16 -0
- package/es/components/material-runbox/hooks/useRunboxEnvReset.js +89 -0
- package/es/components/material-runbox/locales/en.json.js +1 -1
- package/es/components/material-runbox/locales/ja.json.js +1 -1
- package/es/components/material-runbox/locales/ko.json.js +1 -1
- package/es/components/material-runbox/locales/th.json.js +1 -1
- package/es/components/material-runbox/runtime/Runtime.js +5 -2
- package/es/components/material-runbox/runtime/RuntimeOverlayTerminated.d.ts +4 -0
- package/es/components/material-runbox/runtime/RuntimeOverlayTerminated.js +18 -6
- package/es/components/material-runbox/status/MaterialRunboxStatusButton.d.ts +4 -7
- package/es/components/material-runbox/status/MaterialRunboxStatusButton.js +46 -18
- package/es/components/material-runbox/status/MaterialRunboxStatusPopover.d.ts +4 -7
- package/es/components/material-runbox/status/MaterialRunboxStatusPopover.js +17 -4
- package/package.json +6 -6
- package/cjs/components/material-runbox/disk/MaterialRunboxDiskAlmostFullSnackbar.d.ts +0 -5
- package/cjs/components/material-runbox/disk/MaterialRunboxDiskAlmostFullSnackbar.js +0 -98
- package/es/components/material-runbox/disk/MaterialRunboxDiskAlmostFullSnackbar.d.ts +0 -5
- package/es/components/material-runbox/disk/MaterialRunboxDiskAlmostFullSnackbar.js +0 -94
|
@@ -4,11 +4,12 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
|
4
4
|
import { useRawEliceIntl } from '@elice/intl';
|
|
5
5
|
import { EliceIcon } from '@elice/mui-elements';
|
|
6
6
|
import { useEliceRunboxRunning, useEliceRunboxContainerStats } from '@elice/runbox-client';
|
|
7
|
-
import { faWifi, faWifiFair, faLinkSimple, faLinkSimpleSlash, faMicrochip, faMemory, faArrowUpRight, faArrowDownLeft, faDiscDrive, faWifiSlash } from '@fortawesome/pro-solid-svg-icons';
|
|
7
|
+
import { faWifi, faWifiFair, faLinkSimple, faLinkSimpleSlash, faMicrochip, faMemory, faArrowUpRight, faArrowDownLeft, faDiscDrive, faArrowsRotate, faWifiSlash } from '@fortawesome/pro-solid-svg-icons';
|
|
8
8
|
import { Popover, Fade, Stack, CircularProgress, Divider } from '@mui/material';
|
|
9
9
|
import MaterialRunboxStatusConnectionItem from './MaterialRunboxStatusConnectionItem.js';
|
|
10
10
|
import MaterialRunboxStatusResourceItem from './MaterialRunboxStatusResourceItem.js';
|
|
11
11
|
import { RunboxNetworkStatus, useRunboxNetworkStatus } from '../hooks/useRunboxNetworkStatus.js';
|
|
12
|
+
import MaterialRunboxEnvResetButton from '../disk/MaterialRunboxEnvResetButton.js';
|
|
12
13
|
|
|
13
14
|
//
|
|
14
15
|
//
|
|
@@ -22,8 +23,10 @@ var NETWORK_COLOR = Object.freeze(_defineProperty(_defineProperty(_definePropert
|
|
|
22
23
|
var MaterialRunboxStatusPopover = function MaterialRunboxStatusPopover(_a) {
|
|
23
24
|
var open = _a.open,
|
|
24
25
|
onClose = _a.onClose,
|
|
25
|
-
|
|
26
|
-
|
|
26
|
+
runtimeTemplateId = _a.runtimeTemplateId,
|
|
27
|
+
courseId = _a.courseId,
|
|
28
|
+
userId = _a.userId,
|
|
29
|
+
props = __rest(_a, ["open", "onClose", "runtimeTemplateId", "courseId", "userId"]);
|
|
27
30
|
var intl = useRawEliceIntl();
|
|
28
31
|
var _useEliceRunboxRunnin = useEliceRunboxRunning(),
|
|
29
32
|
status = _useEliceRunboxRunnin.status;
|
|
@@ -130,7 +133,17 @@ var MaterialRunboxStatusPopover = function MaterialRunboxStatusPopover(_a) {
|
|
|
130
133
|
}))
|
|
131
134
|
})]
|
|
132
135
|
})]
|
|
133
|
-
}) : null,
|
|
136
|
+
}) : null, jsx(MaterialRunboxEnvResetButton, {
|
|
137
|
+
fullWidth: true,
|
|
138
|
+
variant: "contained",
|
|
139
|
+
color: "error",
|
|
140
|
+
startIcon: jsx(EliceIcon, {
|
|
141
|
+
icon: faArrowsRotate
|
|
142
|
+
}),
|
|
143
|
+
runtimeTemplateId: runtimeTemplateId,
|
|
144
|
+
courseId: courseId,
|
|
145
|
+
userId: userId
|
|
146
|
+
})]
|
|
134
147
|
})
|
|
135
148
|
}));
|
|
136
149
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elice/material-runbox",
|
|
3
|
-
"version": "1.260825.0-runboxusability.
|
|
3
|
+
"version": "1.260825.0-runboxusability.4",
|
|
4
4
|
"description": "User view and editing components of Elice material runbox",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"peerDependencies": {
|
|
21
21
|
"@elice/api-client": "^1",
|
|
22
22
|
"@elice/intl": "^0",
|
|
23
|
-
"@elice/material-shared-types": "1.260825.0-runboxusability.
|
|
24
|
-
"@elice/material-shared-utils": "1.260825.0-runboxusability.
|
|
23
|
+
"@elice/material-shared-types": "1.260825.0-runboxusability.4",
|
|
24
|
+
"@elice/material-shared-utils": "1.260825.0-runboxusability.4",
|
|
25
25
|
"@elice/mui-elements": "^5",
|
|
26
26
|
"@elice/mui-system": "^5",
|
|
27
27
|
"@elice/mui-x-snackbar": "^5",
|
|
@@ -51,12 +51,12 @@
|
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@elice/api-client": "1.260529.0",
|
|
53
53
|
"@elice/intl": "0.260526.0",
|
|
54
|
-
"@elice/material-shared-types": "1.260825.0-runboxusability.
|
|
55
|
-
"@elice/material-shared-utils": "1.260825.0-runboxusability.
|
|
54
|
+
"@elice/material-shared-types": "1.260825.0-runboxusability.4",
|
|
55
|
+
"@elice/material-shared-utils": "1.260825.0-runboxusability.4",
|
|
56
56
|
"@elice/mui-elements": "5.251204.0",
|
|
57
57
|
"@elice/mui-system": "5.251204.0",
|
|
58
58
|
"@elice/mui-x-snackbar": "^5.250108.0-controllabel.0",
|
|
59
|
-
"@elice/openapi-client-material-runbox": "1.
|
|
59
|
+
"@elice/openapi-client-material-runbox": "1.260826.0-improverunboxusability.0",
|
|
60
60
|
"@elice/rollup-config": "^1.260406.0",
|
|
61
61
|
"@elice/runbox-client": "^1.250828.0",
|
|
62
62
|
"@elice/types": "1.260608.0",
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
-
var intl = require('@elice/intl');
|
|
7
|
-
var muiElements = require('@elice/mui-elements');
|
|
8
|
-
var runboxClient = require('@elice/runbox-client');
|
|
9
|
-
var proSolidSvgIcons = require('@fortawesome/pro-solid-svg-icons');
|
|
10
|
-
var material = require('@mui/material');
|
|
11
|
-
var MaterialRunboxSnackbar = require('../../shared/material-runbox-snackbar/MaterialRunboxSnackbar.js');
|
|
12
|
-
|
|
13
|
-
//
|
|
14
|
-
//
|
|
15
|
-
//
|
|
16
|
-
var DISK_ALMOST_FULL_BYTES = 2 * 1024 * 1024 * 1024; // 2GiB (iec)
|
|
17
|
-
//
|
|
18
|
-
//
|
|
19
|
-
//
|
|
20
|
-
var MaterialRunboxDiskAlmostFullSnackbar = function MaterialRunboxDiskAlmostFullSnackbar(_ref) {
|
|
21
|
-
var runboxId = _ref.runboxId;
|
|
22
|
-
var intl$1 = intl.useRawEliceIntl();
|
|
23
|
-
var contStats = runboxClient.useEliceRunboxContainerStats();
|
|
24
|
-
var stats = contStats ? contStats[contStats.length - 1] : null;
|
|
25
|
-
if (!stats) {
|
|
26
|
-
return null;
|
|
27
|
-
}
|
|
28
|
-
var diskCurrent = stats.diskCurrent,
|
|
29
|
-
diskTotal = stats.diskTotal;
|
|
30
|
-
var diskRemaining = diskTotal - diskCurrent;
|
|
31
|
-
var renderMessage = function renderMessage() {
|
|
32
|
-
var diskRemainingString = intl$1.formatDataSize(diskRemaining, {
|
|
33
|
-
unitSystem: 'iec',
|
|
34
|
-
maximumFractionDigits: 2
|
|
35
|
-
});
|
|
36
|
-
return jsxRuntime.jsx(material.Typography, {
|
|
37
|
-
variant: "body2",
|
|
38
|
-
whiteSpace: "pre-line",
|
|
39
|
-
children: intl$1.formatMessage({
|
|
40
|
-
id: 'runbox.disk.almost_full.snackbar.almost_full'
|
|
41
|
-
}, {
|
|
42
|
-
capacity: diskRemainingString
|
|
43
|
-
})
|
|
44
|
-
});
|
|
45
|
-
};
|
|
46
|
-
var renderUsage = function renderUsage() {
|
|
47
|
-
var diskCurrentString = intl$1.formatDataSize(diskCurrent, {
|
|
48
|
-
unitSystem: 'iec',
|
|
49
|
-
maximumFractionDigits: 2
|
|
50
|
-
});
|
|
51
|
-
var diskTotalString = intl$1.formatDataSize(diskTotal, {
|
|
52
|
-
unitSystem: 'iec',
|
|
53
|
-
maximumFractionDigits: 2
|
|
54
|
-
});
|
|
55
|
-
var percentage = Math.round(diskCurrent / diskTotal * 100);
|
|
56
|
-
return jsxRuntime.jsxs(material.Stack, {
|
|
57
|
-
direction: "column",
|
|
58
|
-
gap: "0.5rem",
|
|
59
|
-
width: "100%",
|
|
60
|
-
children: [jsxRuntime.jsxs(material.Stack, {
|
|
61
|
-
direction: "row",
|
|
62
|
-
alignItems: "center",
|
|
63
|
-
children: [jsxRuntime.jsx(muiElements.EliceIcon, {
|
|
64
|
-
icon: proSolidSvgIcons.faDiscDrive,
|
|
65
|
-
fontSize: "small"
|
|
66
|
-
}), jsxRuntime.jsxs(material.Typography, {
|
|
67
|
-
variant: "caption",
|
|
68
|
-
children: ["DISK ", diskCurrentString, " / ", diskTotalString]
|
|
69
|
-
})]
|
|
70
|
-
}), jsxRuntime.jsx(material.LinearProgress, {
|
|
71
|
-
variant: "determinate",
|
|
72
|
-
color: "warning",
|
|
73
|
-
value: percentage,
|
|
74
|
-
sx: {
|
|
75
|
-
width: '100%'
|
|
76
|
-
}
|
|
77
|
-
})]
|
|
78
|
-
});
|
|
79
|
-
};
|
|
80
|
-
return jsxRuntime.jsx(MaterialRunboxSnackbar.default, {
|
|
81
|
-
once: true,
|
|
82
|
-
snackbarKey: "diskAlmostFull",
|
|
83
|
-
runboxId: runboxId,
|
|
84
|
-
open: diskRemaining <= DISK_ALMOST_FULL_BYTES,
|
|
85
|
-
sx: {
|
|
86
|
-
alignItems: 'flex-start'
|
|
87
|
-
},
|
|
88
|
-
message: jsxRuntime.jsxs(material.Stack, {
|
|
89
|
-
direction: "column",
|
|
90
|
-
alignItems: "flex-start",
|
|
91
|
-
gap: "0.75rem",
|
|
92
|
-
width: "100%",
|
|
93
|
-
children: [renderMessage(), renderUsage()]
|
|
94
|
-
})
|
|
95
|
-
});
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
exports.default = MaterialRunboxDiskAlmostFullSnackbar;
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
-
import { useRawEliceIntl } from '@elice/intl';
|
|
3
|
-
import { EliceIcon } from '@elice/mui-elements';
|
|
4
|
-
import { useEliceRunboxContainerStats } from '@elice/runbox-client';
|
|
5
|
-
import { faDiscDrive } from '@fortawesome/pro-solid-svg-icons';
|
|
6
|
-
import { Stack, Typography, LinearProgress } from '@mui/material';
|
|
7
|
-
import MaterialRunboxSnackbar from '../../shared/material-runbox-snackbar/MaterialRunboxSnackbar.js';
|
|
8
|
-
|
|
9
|
-
//
|
|
10
|
-
//
|
|
11
|
-
//
|
|
12
|
-
var DISK_ALMOST_FULL_BYTES = 2 * 1024 * 1024 * 1024; // 2GiB (iec)
|
|
13
|
-
//
|
|
14
|
-
//
|
|
15
|
-
//
|
|
16
|
-
var MaterialRunboxDiskAlmostFullSnackbar = function MaterialRunboxDiskAlmostFullSnackbar(_ref) {
|
|
17
|
-
var runboxId = _ref.runboxId;
|
|
18
|
-
var intl = useRawEliceIntl();
|
|
19
|
-
var contStats = useEliceRunboxContainerStats();
|
|
20
|
-
var stats = contStats ? contStats[contStats.length - 1] : null;
|
|
21
|
-
if (!stats) {
|
|
22
|
-
return null;
|
|
23
|
-
}
|
|
24
|
-
var diskCurrent = stats.diskCurrent,
|
|
25
|
-
diskTotal = stats.diskTotal;
|
|
26
|
-
var diskRemaining = diskTotal - diskCurrent;
|
|
27
|
-
var renderMessage = function renderMessage() {
|
|
28
|
-
var diskRemainingString = intl.formatDataSize(diskRemaining, {
|
|
29
|
-
unitSystem: 'iec',
|
|
30
|
-
maximumFractionDigits: 2
|
|
31
|
-
});
|
|
32
|
-
return jsx(Typography, {
|
|
33
|
-
variant: "body2",
|
|
34
|
-
whiteSpace: "pre-line",
|
|
35
|
-
children: intl.formatMessage({
|
|
36
|
-
id: 'runbox.disk.almost_full.snackbar.almost_full'
|
|
37
|
-
}, {
|
|
38
|
-
capacity: diskRemainingString
|
|
39
|
-
})
|
|
40
|
-
});
|
|
41
|
-
};
|
|
42
|
-
var renderUsage = function renderUsage() {
|
|
43
|
-
var diskCurrentString = intl.formatDataSize(diskCurrent, {
|
|
44
|
-
unitSystem: 'iec',
|
|
45
|
-
maximumFractionDigits: 2
|
|
46
|
-
});
|
|
47
|
-
var diskTotalString = intl.formatDataSize(diskTotal, {
|
|
48
|
-
unitSystem: 'iec',
|
|
49
|
-
maximumFractionDigits: 2
|
|
50
|
-
});
|
|
51
|
-
var percentage = Math.round(diskCurrent / diskTotal * 100);
|
|
52
|
-
return jsxs(Stack, {
|
|
53
|
-
direction: "column",
|
|
54
|
-
gap: "0.5rem",
|
|
55
|
-
width: "100%",
|
|
56
|
-
children: [jsxs(Stack, {
|
|
57
|
-
direction: "row",
|
|
58
|
-
alignItems: "center",
|
|
59
|
-
children: [jsx(EliceIcon, {
|
|
60
|
-
icon: faDiscDrive,
|
|
61
|
-
fontSize: "small"
|
|
62
|
-
}), jsxs(Typography, {
|
|
63
|
-
variant: "caption",
|
|
64
|
-
children: ["DISK ", diskCurrentString, " / ", diskTotalString]
|
|
65
|
-
})]
|
|
66
|
-
}), jsx(LinearProgress, {
|
|
67
|
-
variant: "determinate",
|
|
68
|
-
color: "warning",
|
|
69
|
-
value: percentage,
|
|
70
|
-
sx: {
|
|
71
|
-
width: '100%'
|
|
72
|
-
}
|
|
73
|
-
})]
|
|
74
|
-
});
|
|
75
|
-
};
|
|
76
|
-
return jsx(MaterialRunboxSnackbar, {
|
|
77
|
-
once: true,
|
|
78
|
-
snackbarKey: "diskAlmostFull",
|
|
79
|
-
runboxId: runboxId,
|
|
80
|
-
open: diskRemaining <= DISK_ALMOST_FULL_BYTES,
|
|
81
|
-
sx: {
|
|
82
|
-
alignItems: 'flex-start'
|
|
83
|
-
},
|
|
84
|
-
message: jsxs(Stack, {
|
|
85
|
-
direction: "column",
|
|
86
|
-
alignItems: "flex-start",
|
|
87
|
-
gap: "0.75rem",
|
|
88
|
-
width: "100%",
|
|
89
|
-
children: [renderMessage(), renderUsage()]
|
|
90
|
-
})
|
|
91
|
-
});
|
|
92
|
-
};
|
|
93
|
-
|
|
94
|
-
export { MaterialRunboxDiskAlmostFullSnackbar as default };
|