@elice/material-runbox 1.260825.0-runboxusability.2 → 1.260825.0-runboxusability.3

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.
Files changed (73) hide show
  1. package/cjs/_virtual/_rollupPluginBabelHelpers.js +114 -0
  2. package/cjs/components/material-runbox/MaterialRunboxContent.js +7 -0
  3. package/cjs/components/material-runbox/MaterialRunboxHeader.js +21 -18
  4. package/cjs/components/material-runbox/disk/MaterialRunboxDiskUsageAlert.d.ts +11 -0
  5. package/cjs/components/material-runbox/disk/MaterialRunboxDiskUsageAlert.js +69 -0
  6. package/cjs/components/material-runbox/disk/MaterialRunboxDiskUsageDialog.d.ts +10 -0
  7. package/cjs/components/material-runbox/disk/MaterialRunboxDiskUsageDialog.js +98 -0
  8. package/cjs/components/material-runbox/disk/MaterialRunboxEnvResetButton.d.ts +16 -0
  9. package/cjs/components/material-runbox/disk/MaterialRunboxEnvResetButton.js +72 -0
  10. package/cjs/components/material-runbox/disk/MaterialRunboxEnvResetDialog.d.ts +14 -0
  11. package/cjs/components/material-runbox/disk/MaterialRunboxEnvResetDialog.js +103 -0
  12. package/cjs/components/material-runbox/disk/index.d.ts +8 -1
  13. package/cjs/components/material-runbox/disk/index.js +8 -2
  14. package/cjs/components/material-runbox/hooks/index.d.ts +2 -0
  15. package/cjs/components/material-runbox/hooks/index.js +6 -0
  16. package/cjs/components/material-runbox/hooks/useRunboxDiskUsage.d.ts +16 -0
  17. package/cjs/components/material-runbox/hooks/useRunboxDiskUsage.js +50 -0
  18. package/cjs/components/material-runbox/hooks/useRunboxEnvReset.d.ts +23 -0
  19. package/cjs/components/material-runbox/hooks/useRunboxEnvReset.js +132 -0
  20. package/cjs/components/material-runbox/locales/en.json.js +1 -1
  21. package/cjs/components/material-runbox/locales/ja.json.js +1 -1
  22. package/cjs/components/material-runbox/locales/ko.json.js +1 -1
  23. package/cjs/components/material-runbox/locales/th.json.js +1 -1
  24. package/cjs/components/material-runbox/runtime/Runtime.js +4 -2
  25. package/cjs/components/material-runbox/runtime/RuntimeOverlayTerminated.d.ts +2 -0
  26. package/cjs/components/material-runbox/runtime/RuntimeOverlayTerminated.js +14 -4
  27. package/cjs/components/material-runbox/status/MaterialRunboxStatusButton.d.ts +2 -7
  28. package/cjs/components/material-runbox/status/MaterialRunboxStatusButton.js +41 -15
  29. package/cjs/components/material-runbox/status/MaterialRunboxStatusPopover.d.ts +2 -7
  30. package/cjs/components/material-runbox/status/MaterialRunboxStatusPopover.js +14 -3
  31. package/cjs/utils/index.d.ts +1 -0
  32. package/cjs/utils/index.js +3 -0
  33. package/cjs/utils/polling.d.ts +56 -0
  34. package/cjs/utils/polling.js +108 -0
  35. package/es/_virtual/_rollupPluginBabelHelpers.js +99 -1
  36. package/es/components/material-runbox/MaterialRunboxContent.js +7 -0
  37. package/es/components/material-runbox/MaterialRunboxHeader.js +21 -18
  38. package/es/components/material-runbox/disk/MaterialRunboxDiskUsageAlert.d.ts +11 -0
  39. package/es/components/material-runbox/disk/MaterialRunboxDiskUsageAlert.js +65 -0
  40. package/es/components/material-runbox/disk/MaterialRunboxDiskUsageDialog.d.ts +10 -0
  41. package/es/components/material-runbox/disk/MaterialRunboxDiskUsageDialog.js +94 -0
  42. package/es/components/material-runbox/disk/MaterialRunboxEnvResetButton.d.ts +16 -0
  43. package/es/components/material-runbox/disk/MaterialRunboxEnvResetButton.js +64 -0
  44. package/es/components/material-runbox/disk/MaterialRunboxEnvResetDialog.d.ts +14 -0
  45. package/es/components/material-runbox/disk/MaterialRunboxEnvResetDialog.js +95 -0
  46. package/es/components/material-runbox/disk/index.d.ts +8 -1
  47. package/es/components/material-runbox/disk/index.js +4 -1
  48. package/es/components/material-runbox/hooks/index.d.ts +2 -0
  49. package/es/components/material-runbox/hooks/index.js +2 -0
  50. package/es/components/material-runbox/hooks/useRunboxDiskUsage.d.ts +16 -0
  51. package/es/components/material-runbox/hooks/useRunboxDiskUsage.js +42 -0
  52. package/es/components/material-runbox/hooks/useRunboxEnvReset.d.ts +23 -0
  53. package/es/components/material-runbox/hooks/useRunboxEnvReset.js +126 -0
  54. package/es/components/material-runbox/locales/en.json.js +1 -1
  55. package/es/components/material-runbox/locales/ja.json.js +1 -1
  56. package/es/components/material-runbox/locales/ko.json.js +1 -1
  57. package/es/components/material-runbox/locales/th.json.js +1 -1
  58. package/es/components/material-runbox/runtime/Runtime.js +4 -2
  59. package/es/components/material-runbox/runtime/RuntimeOverlayTerminated.d.ts +2 -0
  60. package/es/components/material-runbox/runtime/RuntimeOverlayTerminated.js +16 -6
  61. package/es/components/material-runbox/status/MaterialRunboxStatusButton.d.ts +2 -7
  62. package/es/components/material-runbox/status/MaterialRunboxStatusButton.js +44 -18
  63. package/es/components/material-runbox/status/MaterialRunboxStatusPopover.d.ts +2 -7
  64. package/es/components/material-runbox/status/MaterialRunboxStatusPopover.js +15 -4
  65. package/es/utils/index.d.ts +1 -0
  66. package/es/utils/index.js +1 -0
  67. package/es/utils/polling.d.ts +56 -0
  68. package/es/utils/polling.js +105 -0
  69. package/package.json +6 -6
  70. package/cjs/components/material-runbox/disk/MaterialRunboxDiskAlmostFullSnackbar.d.ts +0 -5
  71. package/cjs/components/material-runbox/disk/MaterialRunboxDiskAlmostFullSnackbar.js +0 -98
  72. package/es/components/material-runbox/disk/MaterialRunboxDiskAlmostFullSnackbar.d.ts +0 -5
  73. package/es/components/material-runbox/disk/MaterialRunboxDiskAlmostFullSnackbar.js +0 -94
@@ -0,0 +1,10 @@
1
+ import type React from 'react';
2
+ export interface MaterialRunboxDiskUsageDialogProps {
3
+ runboxId: string;
4
+ }
5
+ /**
6
+ * Notice shown once per severity per runbox for the browser session. The reset
7
+ * CTA lives in the alert bar, so this only has to be acknowledged.
8
+ */
9
+ declare const MaterialRunboxDiskUsageDialog: React.FC<MaterialRunboxDiskUsageDialogProps>;
10
+ export default MaterialRunboxDiskUsageDialog;
@@ -0,0 +1,94 @@
1
+ import { slicedToArray as _slicedToArray, defineProperty as _defineProperty, toConsumableArray as _toConsumableArray } from '../../../_virtual/_rollupPluginBabelHelpers.js';
2
+ import { jsxs, jsx } from 'react/jsx-runtime';
3
+ import { useSessionStorage } from 'react-use';
4
+ import { useRawEliceIntl } from '@elice/intl';
5
+ import { EliceIcon } from '@elice/mui-elements';
6
+ import { faCircleExclamation, faTriangleExclamation } from '@fortawesome/pro-solid-svg-icons';
7
+ import { Dialog, DialogTitle, Stack, DialogContent, DialogContentText, DialogActions, Button } from '@mui/material';
8
+ import { useRunboxDiskUsage } from '../hooks/useRunboxDiskUsage.js';
9
+
10
+ //
11
+ //
12
+ //
13
+ var SEEN_STORAGE_KEY = 'MaterialRunboxDiskUsage.seenNotice';
14
+ //
15
+ //
16
+ //
17
+ /**
18
+ * Notice shown once per severity per runbox for the browser session. The reset
19
+ * CTA lives in the alert bar, so this only has to be acknowledged.
20
+ */
21
+ var MaterialRunboxDiskUsageDialog = function MaterialRunboxDiskUsageDialog(_ref) {
22
+ var runboxId = _ref.runboxId;
23
+ var _a;
24
+ var intl = useRawEliceIntl();
25
+ var _useRunboxDiskUsage = useRunboxDiskUsage(),
26
+ severity = _useRunboxDiskUsage.severity,
27
+ diskCurrent = _useRunboxDiskUsage.diskCurrent,
28
+ diskTotal = _useRunboxDiskUsage.diskTotal;
29
+ var _useSessionStorage = useSessionStorage(SEEN_STORAGE_KEY, {}),
30
+ _useSessionStorage2 = _slicedToArray(_useSessionStorage, 2),
31
+ seen = _useSessionStorage2[0],
32
+ setSeen = _useSessionStorage2[1];
33
+ var seenSeverities = (_a = seen === null || seen === void 0 ? void 0 : seen[runboxId]) !== null && _a !== void 0 ? _a : [];
34
+ /**
35
+ *
36
+ */
37
+ var handleClose = function handleClose() {
38
+ if (!severity) {
39
+ return;
40
+ }
41
+ setSeen(Object.assign(Object.assign({}, seen), _defineProperty({}, runboxId, [].concat(_toConsumableArray(seenSeverities), [severity]))));
42
+ };
43
+ //
44
+ //
45
+ //
46
+ if (!severity) {
47
+ return null;
48
+ }
49
+ return jsxs(Dialog, {
50
+ fullWidth: true,
51
+ open: !seenSeverities.includes(severity),
52
+ maxWidth: "xs",
53
+ onClose: handleClose,
54
+ children: [jsx(DialogTitle, {
55
+ children: jsxs(Stack, {
56
+ direction: "row",
57
+ alignItems: "center",
58
+ gap: "0.5rem",
59
+ children: [jsx(EliceIcon, {
60
+ icon: severity === 'error' ? faCircleExclamation : faTriangleExclamation,
61
+ color: severity
62
+ }), intl.formatMessage({
63
+ id: 'runbox.disk.usage.dialog.title'
64
+ })]
65
+ })
66
+ }), jsx(DialogContent, {
67
+ children: jsx(DialogContentText, {
68
+ whiteSpace: "pre-line",
69
+ children: intl.formatMessage({
70
+ id: "runbox.disk.usage.dialog.description.".concat(severity)
71
+ }, {
72
+ used: intl.formatDataSize(diskCurrent, {
73
+ unitSystem: 'iec',
74
+ maximumFractionDigits: 2
75
+ }),
76
+ total: intl.formatDataSize(diskTotal, {
77
+ unitSystem: 'iec',
78
+ maximumFractionDigits: 2
79
+ })
80
+ })
81
+ })
82
+ }), jsx(DialogActions, {
83
+ children: jsx(Button, {
84
+ color: "inherit",
85
+ onClick: handleClose,
86
+ children: intl.formatMessage({
87
+ id: 'runbox.disk.usage.dialog.actions.close'
88
+ })
89
+ })
90
+ })]
91
+ });
92
+ };
93
+
94
+ export { MaterialRunboxDiskUsageDialog as default };
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import type { ButtonProps } from '@mui/material';
3
+ export interface MaterialRunboxEnvResetButtonProps extends Omit<ButtonProps, 'onClick'> {
4
+ runboxId: string;
5
+ courseId: number;
6
+ /** User ID for tutoring. */
7
+ userId?: number;
8
+ /** Called once the clear has finished. */
9
+ onSuccess?: () => void;
10
+ }
11
+ /**
12
+ * Shared "실습 환경 초기화" CTA: owns the confirm dialog and the clear request,
13
+ * and leaves the appearance to whoever renders it.
14
+ */
15
+ declare const MaterialRunboxEnvResetButton: React.FC<MaterialRunboxEnvResetButtonProps>;
16
+ export default MaterialRunboxEnvResetButton;
@@ -0,0 +1,64 @@
1
+ import { slicedToArray as _slicedToArray } from '../../../_virtual/_rollupPluginBabelHelpers.js';
2
+ import { __rest } from 'tslib';
3
+ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
4
+ import React from 'react';
5
+ import { useRawEliceIntl } from '@elice/intl';
6
+ import { Button } from '@mui/material';
7
+ import MaterialRunboxEnvResetDialog from './MaterialRunboxEnvResetDialog.js';
8
+ import { useRunboxEnvReset } from '../hooks/useRunboxEnvReset.js';
9
+
10
+ //
11
+ //
12
+ //
13
+ /**
14
+ * Shared "실습 환경 초기화" CTA: owns the confirm dialog and the clear request,
15
+ * and leaves the appearance to whoever renders it.
16
+ */
17
+ var MaterialRunboxEnvResetButton = function MaterialRunboxEnvResetButton(_a) {
18
+ var runboxId = _a.runboxId,
19
+ courseId = _a.courseId,
20
+ userId = _a.userId,
21
+ _onSuccess = _a.onSuccess,
22
+ props = __rest(_a, ["runboxId", "courseId", "userId", "onSuccess"]);
23
+ var intl = useRawEliceIntl();
24
+ var _React$useState = React.useState(false),
25
+ _React$useState2 = _slicedToArray(_React$useState, 2),
26
+ isDialogOpened = _React$useState2[0],
27
+ setDialogOpened = _React$useState2[1];
28
+ var _useRunboxEnvReset = useRunboxEnvReset({
29
+ onSuccess: function onSuccess() {
30
+ setDialogOpened(false);
31
+ _onSuccess === null || _onSuccess === void 0 ? void 0 : _onSuccess();
32
+ }
33
+ }),
34
+ reset = _useRunboxEnvReset.reset,
35
+ isResetting = _useRunboxEnvReset.isResetting;
36
+ //
37
+ //
38
+ //
39
+ return jsxs(Fragment, {
40
+ children: [jsx(Button, Object.assign({}, props, {
41
+ onClick: function onClick() {
42
+ return setDialogOpened(true);
43
+ },
44
+ children: intl.formatMessage({
45
+ id: 'runbox.disk.env_reset.title'
46
+ })
47
+ })), jsx(MaterialRunboxEnvResetDialog, {
48
+ open: isDialogOpened,
49
+ isResetting: isResetting,
50
+ onClose: function onClose() {
51
+ return setDialogOpened(false);
52
+ },
53
+ onConfirm: function onConfirm() {
54
+ return void reset({
55
+ runboxId: runboxId,
56
+ courseId: courseId,
57
+ userId: userId
58
+ });
59
+ }
60
+ })]
61
+ });
62
+ };
63
+
64
+ export { MaterialRunboxEnvResetButton as default };
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ export interface MaterialRunboxEnvResetDialogProps {
3
+ open: boolean;
4
+ isResetting?: boolean;
5
+ onClose: () => void;
6
+ onConfirm: () => void;
7
+ }
8
+ /**
9
+ * Confirms clearing the practice environment. The checkbox is the explicit
10
+ * acknowledgement `[R-3]` asks for: the delete action stays disabled until it
11
+ * is ticked.
12
+ */
13
+ declare const MaterialRunboxEnvResetDialog: React.FC<MaterialRunboxEnvResetDialogProps>;
14
+ export default MaterialRunboxEnvResetDialog;
@@ -0,0 +1,95 @@
1
+ import { slicedToArray as _slicedToArray } from '../../../_virtual/_rollupPluginBabelHelpers.js';
2
+ import { jsxs, jsx } from 'react/jsx-runtime';
3
+ import React from 'react';
4
+ import { useRawEliceIntl } from '@elice/intl';
5
+ import { EliceIcon } from '@elice/mui-elements';
6
+ import { faCircleExclamation } from '@fortawesome/pro-solid-svg-icons';
7
+ import { LoadingButton } from '@mui/lab';
8
+ import { Dialog, DialogTitle, Stack, DialogContent, DialogContentText, FormControlLabel, Checkbox, DialogActions, Button } from '@mui/material';
9
+
10
+ //
11
+ //
12
+ //
13
+ /**
14
+ * Confirms clearing the practice environment. The checkbox is the explicit
15
+ * acknowledgement `[R-3]` asks for: the delete action stays disabled until it
16
+ * is ticked.
17
+ */
18
+ var MaterialRunboxEnvResetDialog = function MaterialRunboxEnvResetDialog(_ref) {
19
+ var open = _ref.open,
20
+ _ref$isResetting = _ref.isResetting,
21
+ isResetting = _ref$isResetting === void 0 ? false : _ref$isResetting,
22
+ onClose = _ref.onClose,
23
+ onConfirm = _ref.onConfirm;
24
+ var intl = useRawEliceIntl();
25
+ var _React$useState = React.useState(false),
26
+ _React$useState2 = _slicedToArray(_React$useState, 2),
27
+ isAcknowledged = _React$useState2[0],
28
+ setAcknowledged = _React$useState2[1];
29
+ React.useEffect(function () {
30
+ if (!open) {
31
+ setAcknowledged(false);
32
+ }
33
+ }, [open]);
34
+ //
35
+ //
36
+ //
37
+ return jsxs(Dialog, {
38
+ fullWidth: true,
39
+ open: open,
40
+ maxWidth: "xs",
41
+ onClose: onClose,
42
+ children: [jsx(DialogTitle, {
43
+ children: jsxs(Stack, {
44
+ direction: "row",
45
+ alignItems: "center",
46
+ gap: "0.5rem",
47
+ children: [jsx(EliceIcon, {
48
+ icon: faCircleExclamation,
49
+ color: "error"
50
+ }), intl.formatMessage({
51
+ id: 'runbox.disk.env_reset.dialog.title'
52
+ })]
53
+ })
54
+ }), jsxs(DialogContent, {
55
+ children: [jsx(DialogContentText, {
56
+ whiteSpace: "pre-line",
57
+ children: intl.formatMessage({
58
+ id: 'runbox.disk.env_reset.dialog.description'
59
+ })
60
+ }), jsx(FormControlLabel, {
61
+ sx: {
62
+ marginTop: '1rem'
63
+ },
64
+ control: jsx(Checkbox, {
65
+ checked: isAcknowledged,
66
+ onChange: function onChange(e) {
67
+ return setAcknowledged(e.target.checked);
68
+ }
69
+ }),
70
+ label: intl.formatMessage({
71
+ id: 'runbox.disk.env_reset.dialog.acknowledge'
72
+ })
73
+ })]
74
+ }), jsxs(DialogActions, {
75
+ children: [jsx(Button, {
76
+ color: "inherit",
77
+ disabled: isResetting,
78
+ onClick: onClose,
79
+ children: intl.formatMessage({
80
+ id: 'runbox.disk.env_reset.dialog.actions.cancel'
81
+ })
82
+ }), jsx(LoadingButton, {
83
+ color: "error",
84
+ loading: isResetting,
85
+ disabled: !isAcknowledged,
86
+ onClick: onConfirm,
87
+ children: intl.formatMessage({
88
+ id: 'runbox.disk.env_reset.dialog.actions.confirm'
89
+ })
90
+ })]
91
+ })]
92
+ });
93
+ };
94
+
95
+ export { MaterialRunboxEnvResetDialog as default };
@@ -1 +1,8 @@
1
- export { default as MaterialRunboxDiskAlmostFullSnackbar } from './MaterialRunboxDiskAlmostFullSnackbar';
1
+ export { default as MaterialRunboxDiskUsageAlert } from './MaterialRunboxDiskUsageAlert';
2
+ export { default as MaterialRunboxDiskUsageDialog } from './MaterialRunboxDiskUsageDialog';
3
+ export { default as MaterialRunboxEnvResetButton } from './MaterialRunboxEnvResetButton';
4
+ export { default as MaterialRunboxEnvResetDialog } from './MaterialRunboxEnvResetDialog';
5
+ export type { MaterialRunboxDiskUsageAlertProps } from './MaterialRunboxDiskUsageAlert';
6
+ export type { MaterialRunboxDiskUsageDialogProps } from './MaterialRunboxDiskUsageDialog';
7
+ export type { MaterialRunboxEnvResetButtonProps } from './MaterialRunboxEnvResetButton';
8
+ export type { MaterialRunboxEnvResetDialogProps } from './MaterialRunboxEnvResetDialog';
@@ -1 +1,4 @@
1
- export { default as MaterialRunboxDiskAlmostFullSnackbar } from './MaterialRunboxDiskAlmostFullSnackbar.js';
1
+ export { default as MaterialRunboxDiskUsageAlert } from './MaterialRunboxDiskUsageAlert.js';
2
+ export { default as MaterialRunboxDiskUsageDialog } from './MaterialRunboxDiskUsageDialog.js';
3
+ export { default as MaterialRunboxEnvResetButton } from './MaterialRunboxEnvResetButton.js';
4
+ export { default as MaterialRunboxEnvResetDialog } from './MaterialRunboxEnvResetDialog.js';
@@ -4,3 +4,5 @@ export * from './useRunboxTimer';
4
4
  export * from './useInfiniteRunboxRunboxIdGrade';
5
5
  export * from './useMaterialRunboxRunboxIdStarterGet';
6
6
  export * from './useRunboxNetworkStatus';
7
+ export * from './useRunboxDiskUsage';
8
+ export * from './useRunboxEnvReset';
@@ -4,3 +4,5 @@ export { useRunboxTimer } from './useRunboxTimer.js';
4
4
  export { useInfiniteRunboxRunboxIdGrade } from './useInfiniteRunboxRunboxIdGrade.js';
5
5
  export { useMaterialRunboxRunboxIdStarterGet } from './useMaterialRunboxRunboxIdStarterGet.js';
6
6
  export { RunboxNetworkStatus, useRunboxNetworkStatus } from './useRunboxNetworkStatus.js';
7
+ export { DISK_USAGE_ERROR_RATIO, DISK_USAGE_WARNING_RATIO, useRunboxDiskUsage } from './useRunboxDiskUsage.js';
8
+ export { useRunboxEnvReset } from './useRunboxEnvReset.js';
@@ -0,0 +1,16 @@
1
+ /** Matches MUI's `Alert` severity, which is where this value ends up. */
2
+ export type RunboxDiskUsageSeverity = 'warning' | 'error';
3
+ interface UseRunboxDiskUsageReturn {
4
+ /** `null` below the first threshold, or while the container reports no stats. */
5
+ severity: RunboxDiskUsageSeverity | null;
6
+ diskCurrent: number;
7
+ diskTotal: number;
8
+ }
9
+ export declare const DISK_USAGE_WARNING_RATIO = 0.8;
10
+ export declare const DISK_USAGE_ERROR_RATIO = 0.9;
11
+ /**
12
+ * Disk usage against the 80% / 90% thresholds. The numbers come from the
13
+ * container stats stream, so they are only available while the runtime is up.
14
+ */
15
+ export declare const useRunboxDiskUsage: () => UseRunboxDiskUsageReturn;
16
+ export {};
@@ -0,0 +1,42 @@
1
+ import React from 'react';
2
+ import { useEliceRunboxContainerStats } from '@elice/runbox-client';
3
+
4
+ //
5
+ //
6
+ //
7
+ var DISK_USAGE_WARNING_RATIO = 0.8;
8
+ var DISK_USAGE_ERROR_RATIO = 0.9;
9
+ //
10
+ //
11
+ //
12
+ /**
13
+ * Disk usage against the 80% / 90% thresholds. The numbers come from the
14
+ * container stats stream, so they are only available while the runtime is up.
15
+ */
16
+ var useRunboxDiskUsage = function useRunboxDiskUsage() {
17
+ var _a, _b;
18
+ var contStats = useEliceRunboxContainerStats();
19
+ var stats = contStats ? contStats[contStats.length - 1] : null;
20
+ var diskCurrent = (_a = stats === null || stats === void 0 ? void 0 : stats.diskCurrent) !== null && _a !== void 0 ? _a : 0;
21
+ var diskTotal = (_b = stats === null || stats === void 0 ? void 0 : stats.diskTotal) !== null && _b !== void 0 ? _b : 0;
22
+ var severity = React.useMemo(function () {
23
+ if (!stats || diskTotal <= 0) {
24
+ return null;
25
+ }
26
+ var ratio = diskCurrent / diskTotal;
27
+ if (ratio >= DISK_USAGE_ERROR_RATIO) {
28
+ return 'error';
29
+ }
30
+ if (ratio >= DISK_USAGE_WARNING_RATIO) {
31
+ return 'warning';
32
+ }
33
+ return null;
34
+ }, [stats, diskCurrent, diskTotal]);
35
+ return {
36
+ severity: severity,
37
+ diskCurrent: diskCurrent,
38
+ diskTotal: diskTotal
39
+ };
40
+ };
41
+
42
+ export { DISK_USAGE_ERROR_RATIO, DISK_USAGE_WARNING_RATIO, useRunboxDiskUsage };
@@ -0,0 +1,23 @@
1
+ import { CommandStatus } from '@elice/openapi-client-material-runbox';
2
+ interface RunboxEnvResetParams {
3
+ runboxId: string;
4
+ courseId: number;
5
+ /** User ID for tutoring. */
6
+ userId?: number;
7
+ }
8
+ interface UseRunboxEnvResetParams {
9
+ /** Called once the clear has finished. */
10
+ onSuccess?: () => void;
11
+ }
12
+ interface UseRunboxEnvResetReturn {
13
+ reset: (params: RunboxEnvResetParams) => Promise<void>;
14
+ isResetting: boolean;
15
+ status: CommandStatus | null;
16
+ }
17
+ /**
18
+ * Clears a runbox's data from the disk, then polls until the server reports it
19
+ * finished. The runtime has to be stopped — the server rejects a running one
20
+ * with `running_runtime`.
21
+ */
22
+ export declare const useRunboxEnvReset: ({ onSuccess, }?: UseRunboxEnvResetParams) => UseRunboxEnvResetReturn;
23
+ export {};
@@ -0,0 +1,126 @@
1
+ import { slicedToArray as _slicedToArray, asyncToGenerator as _asyncToGenerator, regenerator as _regenerator } from '../../../_virtual/_rollupPluginBabelHelpers.js';
2
+ import React from 'react';
3
+ import { useRawEliceIntl } from '@elice/intl';
4
+ import { useSnackbar } from '@elice/mui-x-snackbar';
5
+ import { CommandStatus } from '@elice/openapi-client-material-runbox';
6
+ import { useMaterialRunboxApiContext } from '../contexts/MaterialRunboxApiContext.js';
7
+ import { PollingAbortError, polling } from '../../../utils/polling.js';
8
+
9
+ //
10
+ //
11
+ //
12
+ var PING_INTERVAL = 2000;
13
+ var PING_MAX_ATTEMPTS = 90; // 3min, as for container commands
14
+ //
15
+ //
16
+ //
17
+ /**
18
+ * Clears a runbox's data from the disk, then polls until the server reports it
19
+ * finished. The runtime has to be stopped — the server rejects a running one
20
+ * with `running_runtime`.
21
+ */
22
+ var useRunboxEnvReset = function useRunboxEnvReset() {
23
+ var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
24
+ onSuccess = _ref.onSuccess;
25
+ var intl = useRawEliceIntl();
26
+ var _useSnackbar = useSnackbar(),
27
+ enqueueSnackbar = _useSnackbar.enqueueSnackbar;
28
+ var materialRunboxApi = useMaterialRunboxApiContext();
29
+ var _React$useState = React.useState(false),
30
+ _React$useState2 = _slicedToArray(_React$useState, 2),
31
+ isResetting = _React$useState2[0],
32
+ setResetting = _React$useState2[1];
33
+ var _React$useState3 = React.useState(null),
34
+ _React$useState4 = _slicedToArray(_React$useState3, 2),
35
+ status = _React$useState4[0],
36
+ setStatus = _React$useState4[1];
37
+ var abortCtrlRef = React.useRef(null);
38
+ React.useEffect(function () {
39
+ return function () {
40
+ var _a;
41
+ return (_a = abortCtrlRef.current) === null || _a === void 0 ? void 0 : _a.abort();
42
+ };
43
+ }, []);
44
+ var reset = /*#__PURE__*/function () {
45
+ var _ref3 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(_ref2) {
46
+ var runboxId, courseId, userId, _a, signal, _t;
47
+ return _regenerator().w(function (_context) {
48
+ while (1) switch (_context.p = _context.n) {
49
+ case 0:
50
+ runboxId = _ref2.runboxId, courseId = _ref2.courseId, userId = _ref2.userId;
51
+ setResetting(true);
52
+ setStatus(null);
53
+ (_a = abortCtrlRef.current) === null || _a === void 0 ? void 0 : _a.abort();
54
+ abortCtrlRef.current = new AbortController();
55
+ signal = abortCtrlRef.current.signal;
56
+ _context.p = 1;
57
+ _context.n = 2;
58
+ return materialRunboxApi.runbox.runboxRunboxIdDiskClearPost({
59
+ runboxId: runboxId,
60
+ eliceCourseId: courseId,
61
+ runboxDiskClearPostRequest: {
62
+ userId: userId
63
+ }
64
+ });
65
+ case 2:
66
+ _context.n = 3;
67
+ return polling({
68
+ signal: signal,
69
+ interval: PING_INTERVAL,
70
+ maxAttempts: PING_MAX_ATTEMPTS,
71
+ pollingFn: function pollingFn(_ref4) {
72
+ var pollSignal = _ref4.signal;
73
+ return materialRunboxApi.runbox.runboxRunboxIdDiskClearGet({
74
+ runboxId: runboxId,
75
+ userId: userId,
76
+ eliceCourseId: courseId
77
+ }, {
78
+ signal: pollSignal
79
+ });
80
+ },
81
+ onPoll: function onPoll(res) {
82
+ return setStatus(res.status);
83
+ },
84
+ until: function until(res) {
85
+ return res.status === CommandStatus.Terminated;
86
+ }
87
+ });
88
+ case 3:
89
+ onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess();
90
+ _context.n = 6;
91
+ break;
92
+ case 4:
93
+ _context.p = 4;
94
+ _t = _context.v;
95
+ if (!(_t instanceof PollingAbortError)) {
96
+ _context.n = 5;
97
+ break;
98
+ }
99
+ return _context.a(2);
100
+ case 5:
101
+ enqueueSnackbar(intl.formatMessage({
102
+ id: 'runbox.disk.env_reset.noti.error'
103
+ }), {
104
+ variant: 'error'
105
+ });
106
+ case 6:
107
+ _context.p = 6;
108
+ setResetting(false);
109
+ return _context.f(6);
110
+ case 7:
111
+ return _context.a(2);
112
+ }
113
+ }, _callee, null, [[1, 4, 6, 7]]);
114
+ }));
115
+ return function reset(_x) {
116
+ return _ref3.apply(this, arguments);
117
+ };
118
+ }();
119
+ return {
120
+ reset: reset,
121
+ isResetting: isResetting,
122
+ status: status
123
+ };
124
+ };
125
+
126
+ export { useRunboxEnvReset };
@@ -1,3 +1,3 @@
1
- var messageEn = {"common.cancel":"Cancel","material.tutoring.runbox_confirm_dialog.action.confirm":"Proceed","material.tutoring.runbox_confirm_dialog.content":"The Runbox environment is currently running for the {_termCourseRoleStudent}. If you connect, the remaining total runtime usage time will decrease. Do you want to proceed?","material.tutoring.runbox_confirm_dialog.title":"Running Runbox","runbox.action.autoShutdown.title":"Always on","runbox.action.autoShutdown.tooltip":"This feature is not available for this session, as it's set to automatically shut down upon departure.","runbox.action.grade.dialog.description.error":"There is a problem with the code or submission file.\nPlease check the error message below and verify that the submission format meets the requirements. Then, submit again.","runbox.action.grade.dialog.description.success":"Grading completed successfully.","runbox.action.grade.dialog.title":"Grading result","runbox.action.grade.noti.error":"An error occurred while grading the code.","runbox.action.grade.title":"Submit","runbox.action.grade.tooltip.onProgress":"Grading is in progress. Please wait for a moment. Depending on the {_termLibraryLecturePage}, grading may take up to 3 minutes.","runbox.action.reset.dialog.actions.confirm":"Reset","runbox.action.reset.dialog.isolated.description":"Are you sure you want to reset the runbox code? Your codes will be overwritten to default code of {_termLibraryLecturePage}.\nAfter reset, the runbox session will be refreshed.","runbox.action.reset.dialog.shared.description":"Do you want to reset the Runbox code? If you reset, the code written by team members will also be overwritten with the default code. The Runbox session will be refreshed after resetting.","runbox.action.reset.noti.error":"An error occurred while initializing the runbox code.","runbox.action.reset.title":"Reset code","runbox.action.restart.dialog.actions.confirm":"Restart","runbox.action.restart.dialog.isolated.description":"Are you sure you want to restart the runbox?","runbox.action.restart.dialog.shared.description":"The Runbox will also restart on your teammates' screens. Do you want to restart the Runbox?","runbox.action.restart.title":"Restart runbox","runbox.action.share.snackbar.copied.fail":"Copying the runbox URL failed, please try again","runbox.action.share.snackbar.copied.success":"The runbox URL was copied successfully.","runbox.action.share.title":"Share runbox URL","runbox.action.submitCountInfo.dialog.description":"You have exceeded the submission count limit","runbox.action.submitCountInfo.dialog.title":"Limit the number of submissions","runbox.action.submitCountInfo.tooltip.disabled":"The submission count has been used up","runbox.action.submitLog.dialog.download.tooltip":"Download submitted file","runbox.action.submitLog.dialog.title":"Submission History","runbox.action.submitLog.empty":"No submission history exists.","runbox.action.submitLog.title":"Runbox Submission History","runbox.action.disconnect.dialog.title":"Disconnect Runbox","runbox.action.disconnect.dialog.description":"You are currently in a practice session. Do you want to disconnect Runbox?\nIf you have any unsaved work, please save it first.","runbox.action.disconnect.dialog.disconnect":"Disconnect","runbox.action.disconnect.title":"Disconnect","runbox.action.menu.title":"More","runbox.alert.title":"You are connected to the student's currently running environment, and the total runtime usage time is being deducted. Please note that even if the student exits Runbox, time will continue to be deducted as long as tutoring continues.","runbox.common.close":"Close","runbox.common.retry":"Retry","runbox.common.score":"{score} points","runbox.common.support":"Support","runbox.common.connect":"Connect","runbox.context.command.ping.error":"An error occurred while processing task.","runbox.header.submitInfo":"{isIndividual, select, true {} other {Team}} submission count | {remainCount}/{totalCount} times left {isDailyLimitEnabled, select, true {today} other {}}","runbox.timer.title":"Remaining Time","runbox.timer.unlimited":"Unlimited","runbox.timer.tooltip.title":"View time information","runbox.timer.popover.title":"Runbox Usage Time Guide","runbox.timer.popover.description":"This is the total Runbox usage time for {user}.\nTime continues to decrease while connected. Disconnect or leave the course to stop the deduction.","runbox.timer.popover.quota.title":"Total Available Time","runbox.timer.popover.quota_per_session.title":"Time Available for This Connection","runbox.timer.popover.quota_per_session.description":"Each connection can last up to {time}. If total available time remains, you can reconnect and continue practicing.","runbox.timer.popover.quota.disconnect":"Disconnect","runbox.timer.popover.do_not_open":"Don't show this popup when starting a session","runbox.timer.almost_end.dialog.quota.title":"{time} of total available time remaining.","runbox.timer.almost_end.dialog.quota.description":"When the total available time runs out, the practice session ends and you cannot reconnect.\nPlease save your work before it ends. Unsaved work may be lost.","runbox.timer.almost_end.dialog.quota_per_session.title":"{time} remaining in this connection.","runbox.timer.almost_end.dialog.quota_per_session.description":"When the connection time runs out, you will be disconnected. If total available time remains, you can reconnect and continue practicing.\nPlease save your work before it ends. Saved files are kept when you reconnect, but unsaved work may be lost.","runbox.timer.almost_end.dialog.confirm":"Continue","runbox.disk.almost_full.snackbar.almost_full":"The remaining disk space is {capacity}. If the space runs out, the session will end, so please save your ongoing work now.","runbox.runtime.message.lxp_plan_required":"Your institution currently does not support Runbox course materials.\nPlease contact your institution administrator for more details.","runbox.runtime.message.runbox_unavailable":"Runbox Unavailable","runbox.runtime.message.startError":"There was an error starting the runbox.","runbox.runtime.overlay.assigned.description":"(3 of 3)\nRunbox is running.\nPlease wait!","runbox.runtime.overlay.assigned.description_timeout":"(3 of 3)\nRunning the runbox is taking longer than we expected.\nPlease wait a little longer without refreshing!","runbox.runtime.overlay.queued.description":"(2 of 3)\nCurrently queued {waiters} times...","runbox.runtime.overlay.queued.description_zero":"(2 of 3)\nRunbox will run soon","runbox.runtime.overlay.terminated.description.default":"To continue your Runbox practice session, please click the Connect button.","runbox.runtime.overlay.terminated.description.os_disk_is_full":"The disk space has been completely used up, and the practice session has ended.","runbox.runtime.overlay.terminated.description.quota_exceeded":"The runtime has been terminated because the usage time has expired.","runbox.runtime.overlay.terminated.description.quota_per_session_exceeded":"The runtime has been terminated because the per-session usage time has expired.\nTo reconnect to Runbox, please click the button below.","runbox.runtime.overlay.terminated.title":"Runtime disconnected","runbox.runtime.overlay.terminated.connect":"Connect","runbox.runtime.overlay.terminated.unlimited":"Unlimited","runbox.runtime.overlay.terminated.contact":"Contact Customer Service","runbox.runtime.overlay.terminated.quota.total":"Total Available Time","runbox.runtime.overlay.terminated.quota.used":"Total Time Used","runbox.runtime.overlay.terminated.disk.total":"Total Disk","runbox.runtime.overlay.terminated.disk.used":"Total Disk Used","runbox.runtime.overlay.conflicted.description":"Connecting to this Runbox exercise will terminate the Runbox in another course material.\nPlease save any unsaved work first.","runbox.runtime.overlay.conflicted.title":"A Runbox is currently connected to another course material","runbox.runtime.dialog.change_material.title":"Notice of Runbox Connection Change","runbox.runtime.dialog.change_material.description":"Connecting to this Runbox exercise will terminate the Runbox in another course material. Do you want to continue?","runbox.status.button.title":"Connection & resources","runbox.status.network":"Network status","runbox.status.runtime.connected":"Runtime connected","runbox.status.runtime.connecting":"Runtime connecting","runbox.status.runtime.disconnected":"Runtime disconnected"};
1
+ var messageEn = {"common.cancel":"Cancel","material.tutoring.runbox_confirm_dialog.action.confirm":"Proceed","material.tutoring.runbox_confirm_dialog.content":"The Runbox environment is currently running for the {_termCourseRoleStudent}. If you connect, the remaining total runtime usage time will decrease. Do you want to proceed?","material.tutoring.runbox_confirm_dialog.title":"Running Runbox","runbox.action.autoShutdown.title":"Always on","runbox.action.autoShutdown.tooltip":"This feature is not available for this session, as it's set to automatically shut down upon departure.","runbox.action.grade.dialog.description.error":"There is a problem with the code or submission file.\nPlease check the error message below and verify that the submission format meets the requirements. Then, submit again.","runbox.action.grade.dialog.description.success":"Grading completed successfully.","runbox.action.grade.dialog.title":"Grading result","runbox.action.grade.noti.error":"An error occurred while grading the code.","runbox.action.grade.title":"Submit","runbox.action.grade.tooltip.onProgress":"Grading is in progress. Please wait for a moment. Depending on the {_termLibraryLecturePage}, grading may take up to 3 minutes.","runbox.action.reset.dialog.actions.confirm":"Reset","runbox.action.reset.dialog.isolated.description":"Are you sure you want to reset the runbox code? Your codes will be overwritten to default code of {_termLibraryLecturePage}.\nAfter reset, the runbox session will be refreshed.","runbox.action.reset.dialog.shared.description":"Do you want to reset the Runbox code? If you reset, the code written by team members will also be overwritten with the default code. The Runbox session will be refreshed after resetting.","runbox.action.reset.noti.error":"An error occurred while initializing the runbox code.","runbox.action.reset.title":"Reset code","runbox.action.restart.dialog.actions.confirm":"Restart","runbox.action.restart.dialog.isolated.description":"Are you sure you want to restart the runbox?","runbox.action.restart.dialog.shared.description":"The Runbox will also restart on your teammates' screens. Do you want to restart the Runbox?","runbox.action.restart.title":"Restart runbox","runbox.action.share.snackbar.copied.fail":"Copying the runbox URL failed, please try again","runbox.action.share.snackbar.copied.success":"The runbox URL was copied successfully.","runbox.action.share.title":"Share runbox URL","runbox.action.submitCountInfo.dialog.description":"You have exceeded the submission count limit","runbox.action.submitCountInfo.dialog.title":"Limit the number of submissions","runbox.action.submitCountInfo.tooltip.disabled":"The submission count has been used up","runbox.action.submitLog.dialog.download.tooltip":"Download submitted file","runbox.action.submitLog.dialog.title":"Submission History","runbox.action.submitLog.empty":"No submission history exists.","runbox.action.submitLog.title":"Runbox Submission History","runbox.action.disconnect.dialog.title":"Disconnect Runbox","runbox.action.disconnect.dialog.description":"You are currently in a practice session. Do you want to disconnect Runbox?\nIf you have any unsaved work, please save it first.","runbox.action.disconnect.dialog.disconnect":"Disconnect","runbox.action.disconnect.title":"Disconnect","runbox.action.menu.title":"More","runbox.alert.title":"You are connected to the student's currently running environment, and the total runtime usage time is being deducted. Please note that even if the student exits Runbox, time will continue to be deducted as long as tutoring continues.","runbox.common.close":"Close","runbox.common.retry":"Retry","runbox.common.score":"{score} points","runbox.common.support":"Support","runbox.common.connect":"Connect","runbox.context.command.ping.error":"An error occurred while processing task.","runbox.header.submitInfo":"{isIndividual, select, true {} other {Team}} submission count | {remainCount}/{totalCount} times left {isDailyLimitEnabled, select, true {today} other {}}","runbox.timer.title":"Remaining Time","runbox.timer.unlimited":"Unlimited","runbox.timer.tooltip.title":"View time information","runbox.timer.popover.title":"Runbox Usage Time Guide","runbox.timer.popover.description":"This is the total Runbox usage time for {user}.\nTime continues to decrease while connected. Disconnect or leave the course to stop the deduction.","runbox.timer.popover.quota.title":"Total Available Time","runbox.timer.popover.quota_per_session.title":"Time Available for This Connection","runbox.timer.popover.quota_per_session.description":"Each connection can last up to {time}. If total available time remains, you can reconnect and continue practicing.","runbox.timer.popover.quota.disconnect":"Disconnect","runbox.timer.popover.do_not_open":"Don't show this popup when starting a session","runbox.timer.almost_end.dialog.quota.title":"{time} of total available time remaining.","runbox.timer.almost_end.dialog.quota.description":"When the total available time runs out, the practice session ends and you cannot reconnect.\nPlease save your work before it ends. Unsaved work may be lost.","runbox.timer.almost_end.dialog.quota_per_session.title":"{time} remaining in this connection.","runbox.timer.almost_end.dialog.quota_per_session.description":"When the connection time runs out, you will be disconnected. If total available time remains, you can reconnect and continue practicing.\nPlease save your work before it ends. Saved files are kept when you reconnect, but unsaved work may be lost.","runbox.timer.almost_end.dialog.confirm":"Continue","runbox.runtime.message.lxp_plan_required":"Your institution currently does not support Runbox course materials.\nPlease contact your institution administrator for more details.","runbox.runtime.message.runbox_unavailable":"Runbox Unavailable","runbox.runtime.message.startError":"There was an error starting the runbox.","runbox.runtime.overlay.assigned.description":"(3 of 3)\nRunbox is running.\nPlease wait!","runbox.runtime.overlay.assigned.description_timeout":"(3 of 3)\nRunning the runbox is taking longer than we expected.\nPlease wait a little longer without refreshing!","runbox.runtime.overlay.queued.description":"(2 of 3)\nCurrently queued {waiters} times...","runbox.runtime.overlay.queued.description_zero":"(2 of 3)\nRunbox will run soon","runbox.runtime.overlay.terminated.description.default":"To continue your Runbox practice session, please click the Connect button.","runbox.runtime.overlay.terminated.description.os_disk_is_full":"Storage has been completely used up, and the practice session has ended.\nReset the practice environment and start again.","runbox.runtime.overlay.terminated.description.quota_exceeded":"The runtime has been terminated because the usage time has expired.","runbox.runtime.overlay.terminated.description.quota_per_session_exceeded":"The runtime has been terminated because the per-session usage time has expired.\nTo reconnect to Runbox, please click the button below.","runbox.runtime.overlay.terminated.title":"Runtime disconnected","runbox.runtime.overlay.terminated.connect":"Connect","runbox.runtime.overlay.terminated.unlimited":"Unlimited","runbox.runtime.overlay.terminated.contact":"Contact Customer Service","runbox.runtime.overlay.terminated.quota.total":"Total Available Time","runbox.runtime.overlay.terminated.quota.used":"Total Time Used","runbox.runtime.overlay.terminated.disk.total":"Total Disk","runbox.runtime.overlay.terminated.disk.used":"Total Disk Used","runbox.runtime.overlay.conflicted.description":"Connecting to this Runbox exercise will terminate the Runbox in another course material.\nPlease save any unsaved work first.","runbox.runtime.overlay.conflicted.title":"A Runbox is currently connected to another course material","runbox.runtime.dialog.change_material.title":"Notice of Runbox Connection Change","runbox.runtime.dialog.change_material.description":"Connecting to this Runbox exercise will terminate the Runbox in another course material. Do you want to continue?","runbox.status.button.title":"Connection & resources","runbox.status.network":"Network status","runbox.status.runtime.connected":"Runtime connected","runbox.status.runtime.connecting":"Runtime connecting","runbox.status.runtime.disconnected":"Runtime disconnected","runbox.disk.usage.dialog.title":"Storage almost full","runbox.disk.usage.dialog.description.warning":"You have used more than 80% of your storage. ({used} / {total})\nIf storage runs out, your practice session may be interrupted. Please clean up files you no longer need.","runbox.disk.usage.dialog.description.error":"You have used more than 90% of your storage. ({used} / {total})\nDelete files you no longer need, or reset the practice environment to free up space.","runbox.disk.usage.dialog.actions.close":"Close","runbox.disk.usage.alert.warning":"You have used more than 80% of your storage. ({used} / {total}) If storage runs out, your practice session may be interrupted. Please clean up files you no longer need.","runbox.disk.usage.alert.error":"You have used more than 90% of your storage. ({used} / {total}) If storage runs out, your practice session may be interrupted. Clean up files you no longer need, or reset the practice environment.","runbox.disk.env_reset.title":"Reset practice environment","runbox.disk.env_reset.dialog.title":"Reset practice environment","runbox.disk.env_reset.dialog.description":"To free up storage, the runbox is reset to the state it was in when first started. Files you created or saved during practice are all deleted and cannot be recovered.","runbox.disk.env_reset.dialog.acknowledge":"I understand that saved files cannot be recovered after the reset.","runbox.disk.env_reset.dialog.actions.cancel":"Cancel","runbox.disk.env_reset.dialog.actions.confirm":"Delete","runbox.disk.env_reset.noti.error":"An error occurred while resetting the practice environment.","runbox.runtime.overlay.terminated.title.os_disk_is_full":"Storage is full and\nthe practice session has ended."};
2
2
 
3
3
  export { messageEn as default };
@@ -1,3 +1,3 @@
1
- var ja = {"common.cancel":"キャンセル","material.tutoring.runbox_confirm_dialog.action.confirm":"進行","material.tutoring.runbox_confirm_dialog.content":"現在、{_termCourseRoleStudent} が実行中のランボックス環境です。接続すると、残りのランタイム使用時間が減少します。続行しますか?","material.tutoring.runbox_confirm_dialog.title":"実行中のランボックス","runbox.action.autoShutdown.title":"常にオン","runbox.action.autoShutdown.tooltip":"現在のセッションは離脱時に自動終了するため、この機能は使用できません。","runbox.action.grade.dialog.description.error":"コードまたは提出ファイルに問題があります。\n以下のエラーメッセージを確認し、提出形式が要件を満たしていることを確認してください。その後、再度提出してください。","runbox.action.grade.dialog.description.success":"成績評価が成功裏に完了しました。","runbox.action.grade.dialog.title":"成績結果","runbox.action.grade.noti.error":"コードの採点中にエラーが発生しました。","runbox.action.grade.title":"提出","runbox.action.grade.tooltip.onProgress":"採点中です。しばらくお待ちください。{_termLibraryLecturePage}によって、採点には最大3分かかる場合があります。","runbox.action.reset.dialog.actions.confirm":"リセット","runbox.action.reset.dialog.isolated.description":"ランボックスのコードをリセットしてもよろしいですか? あなたのコードは {_termLibraryLecturePage} のデフォルトコードに上書きされます。\nリセット後、ランボックスのセッションがリフレッシュされます。","runbox.action.reset.dialog.shared.description":"Runboxのコードを初期化しますか?初期化すると、チームメンバーの画面でもコードがデフォルトに上書きされます。初期化後、Runboxセッションがリフレッシュされます。","runbox.action.reset.noti.error":"ランボックスコードの初期化中にエラーが発生しました。","runbox.action.reset.title":"リセットコード","runbox.action.restart.dialog.actions.confirm":"再起動","runbox.action.restart.dialog.isolated.description":"再起動してもよろしいですか?","runbox.action.restart.dialog.shared.description":"チームメンバーの画面でもRunboxが再起動されます。Runboxを再起動しますか?","runbox.action.restart.title":"ランボックスを再起動してください","runbox.action.share.snackbar.copied.fail":"ランボックスのURLをコピーすることに失敗しました。もう一度お試しください。","runbox.action.share.snackbar.copied.success":"ランボックスのURLが正常にコピーされました。","runbox.action.share.title":"ランボックスのURLを共有してください。","runbox.action.submitCountInfo.dialog.description":"提出回数の制限を超えています","runbox.action.submitCountInfo.dialog.title":"投稿の数を制限してください。","runbox.action.submitCountInfo.tooltip.disabled":"提出回数が使い果たされました。","runbox.action.submitLog.dialog.download.tooltip":"提出ファイルをダウンロード","runbox.action.submitLog.dialog.title":"提出履歴","runbox.action.submitLog.empty":"提出履歴が存在しません。","runbox.action.submitLog.title":"ランボックス提出履歴","runbox.action.disconnect.dialog.title":"Runboxの接続を解除","runbox.action.disconnect.dialog.description":"現在、実習を進行中です。Runboxの接続を解除しますか?\n保存していない内容がある場合は、先に保存してください。","runbox.action.disconnect.dialog.disconnect":"接続解除","runbox.action.disconnect.title":"接続解除","runbox.action.menu.title":"その他","runbox.alert.title":"現在、学生が実行中の環境に接続しているため、ランタイムの全使用時間が減少しています。学生がランボックスを終了しても、チュータリングを続ける限り、時間が引き続き減少するのでご注意ください。","runbox.common.close":"閉じる","runbox.common.retry":"リトライ","runbox.common.score":"{score}点","runbox.common.support":"サポート","runbox.common.connect":"接続する","runbox.context.command.ping.error":"タスクの処理中にエラーが発生しました。","runbox.header.submitInfo":"{isIndividual, select, true {個人} other {チーム}}の提出回数 | {remainCount}/{totalCount} 回残っています {isDailyLimitEnabled, select, true {今日} other {}}","runbox.timer.title":"残り時間","runbox.timer.unlimited":"無制限","runbox.timer.tooltip.title":"時間の案内を見る","runbox.timer.popover.title":"ランボックス使用時間の案内","runbox.timer.popover.description":"{user}のランボックス総使用時間です。\n接続中は時間が減り続けます。接続を解除するか授業を退出すると減少が止まります。","runbox.timer.popover.quota.title":"総使用可能時間","runbox.timer.popover.quota_per_session.title":"今回の接続で使用できる時間","runbox.timer.popover.quota_per_session.description":"一度接続すると最大{time}まで使用できます。総利用可能時間が残っていれば、再接続して実習を続けられます。","runbox.timer.popover.quota.disconnect":"接続を解除","runbox.timer.popover.do_not_open":"ランボックス実習時にこのポップアップを表示しない","runbox.timer.almost_end.dialog.quota.title":"総利用可能時間が残り{time}です。","runbox.timer.almost_end.dialog.quota.description":"総利用可能時間をすべて使い切ると実習が終了し、再接続できなくなります。\n作業中の内容は保存してから終了してください。保存していない内容は失われる可能性があります。","runbox.timer.almost_end.dialog.quota_per_session.title":"今回の接続時間が残り{time}です。","runbox.timer.almost_end.dialog.quota_per_session.description":"接続時間が終了すると接続が切断されます。総利用可能時間が残っていれば、再接続して実習を続けられます。\n作業中の内容は保存してから終了してください。保存したファイルは再接続後も維持されますが、保存していない内容は失われる可能性があります。","runbox.timer.almost_end.dialog.confirm":"続ける","runbox.disk.almost_full.snackbar.almost_full":"ディスクの残り容量は {capacity} です。容量がすべてなくなると実習は終了しますので、進行中の作業を今すぐ保存してください。","runbox.runtime.message.lxp_plan_required":"現在、所属機関ではRunboxの学習資料を利用できません。\n詳細については機関の管理者にお問い合わせください。","runbox.runtime.message.runbox_unavailable":"Runboxは利用できません","runbox.runtime.message.startError":"ランボックスの起動中にエラーが発生しました。","runbox.runtime.overlay.assigned.description":"Runbox が実行中です。\nお待ちください!","runbox.runtime.overlay.assigned.description_timeout":"ランボックスを実行する時間が私たちの予想よりも長くかかっています。\n更新せずにもう少し待ってください!","runbox.runtime.overlay.queued.description":"現在{waiters}回待機中...","runbox.runtime.overlay.queued.description_zero":"Runboxはもうすぐ実行されます。","runbox.runtime.overlay.terminated.description.default":"Runboxの実習を続けるには、「接続」ボタンをクリックしてください。","runbox.runtime.overlay.terminated.description.os_disk_is_full":"ディスク容量をすべて使い切ったため、実習は終了しました。","runbox.runtime.overlay.terminated.description.quota_exceeded":"ランタイムの利用時間が終了したため、ランタイムは停止されました。","runbox.runtime.overlay.terminated.description.quota_per_session_exceeded":"Runboxセッションごとの利用時間が終了したため、ランタイムは停止されました。\nRunboxに再接続するには、下のボタンをクリックしてください。","runbox.runtime.overlay.terminated.title":"接続解除","runbox.runtime.overlay.terminated.connect":"接続","runbox.runtime.overlay.terminated.unlimited":"無制限","runbox.runtime.overlay.terminated.contact":"カスタマーサービスにお問い合わせ","runbox.runtime.overlay.terminated.quota.total":"利用可能時間の合計","runbox.runtime.overlay.terminated.quota.used":"総利用時間","runbox.runtime.overlay.terminated.disk.total":"ディスク合計","runbox.runtime.overlay.terminated.disk.used":"使用済みディスク合計","runbox.runtime.overlay.conflicted.description":"このランボックス演習に接続すると、他の教材のランボックスは終了します。\n保存していない内容がある場合は、先に保存してください。","runbox.runtime.overlay.conflicted.title":"現在、他の教材にランボックスが接続されています","runbox.runtime.dialog.change_material.title":"ランボックス接続変更のお知らせ","runbox.runtime.dialog.change_material.description":"このランボックス演習に接続すると、他の教材のランボックスは終了します。続行しますか?","runbox.status.button.title":"接続状態とリソース","runbox.status.network":"ネットワーク状態","runbox.status.runtime.connected":"ランタイム接続済み","runbox.status.runtime.connecting":"ランタイム接続中","runbox.status.runtime.disconnected":"ランタイム未接続"};
1
+ var ja = {"common.cancel":"キャンセル","material.tutoring.runbox_confirm_dialog.action.confirm":"進行","material.tutoring.runbox_confirm_dialog.content":"現在、{_termCourseRoleStudent} が実行中のランボックス環境です。接続すると、残りのランタイム使用時間が減少します。続行しますか?","material.tutoring.runbox_confirm_dialog.title":"実行中のランボックス","runbox.action.autoShutdown.title":"常にオン","runbox.action.autoShutdown.tooltip":"現在のセッションは離脱時に自動終了するため、この機能は使用できません。","runbox.action.grade.dialog.description.error":"コードまたは提出ファイルに問題があります。\n以下のエラーメッセージを確認し、提出形式が要件を満たしていることを確認してください。その後、再度提出してください。","runbox.action.grade.dialog.description.success":"成績評価が成功裏に完了しました。","runbox.action.grade.dialog.title":"成績結果","runbox.action.grade.noti.error":"コードの採点中にエラーが発生しました。","runbox.action.grade.title":"提出","runbox.action.grade.tooltip.onProgress":"採点中です。しばらくお待ちください。{_termLibraryLecturePage}によって、採点には最大3分かかる場合があります。","runbox.action.reset.dialog.actions.confirm":"リセット","runbox.action.reset.dialog.isolated.description":"ランボックスのコードをリセットしてもよろしいですか? あなたのコードは {_termLibraryLecturePage} のデフォルトコードに上書きされます。\nリセット後、ランボックスのセッションがリフレッシュされます。","runbox.action.reset.dialog.shared.description":"Runboxのコードを初期化しますか?初期化すると、チームメンバーの画面でもコードがデフォルトに上書きされます。初期化後、Runboxセッションがリフレッシュされます。","runbox.action.reset.noti.error":"ランボックスコードの初期化中にエラーが発生しました。","runbox.action.reset.title":"リセットコード","runbox.action.restart.dialog.actions.confirm":"再起動","runbox.action.restart.dialog.isolated.description":"再起動してもよろしいですか?","runbox.action.restart.dialog.shared.description":"チームメンバーの画面でもRunboxが再起動されます。Runboxを再起動しますか?","runbox.action.restart.title":"ランボックスを再起動してください","runbox.action.share.snackbar.copied.fail":"ランボックスのURLをコピーすることに失敗しました。もう一度お試しください。","runbox.action.share.snackbar.copied.success":"ランボックスのURLが正常にコピーされました。","runbox.action.share.title":"ランボックスのURLを共有してください。","runbox.action.submitCountInfo.dialog.description":"提出回数の制限を超えています","runbox.action.submitCountInfo.dialog.title":"投稿の数を制限してください。","runbox.action.submitCountInfo.tooltip.disabled":"提出回数が使い果たされました。","runbox.action.submitLog.dialog.download.tooltip":"提出ファイルをダウンロード","runbox.action.submitLog.dialog.title":"提出履歴","runbox.action.submitLog.empty":"提出履歴が存在しません。","runbox.action.submitLog.title":"ランボックス提出履歴","runbox.action.disconnect.dialog.title":"Runboxの接続を解除","runbox.action.disconnect.dialog.description":"現在、実習を進行中です。Runboxの接続を解除しますか?\n保存していない内容がある場合は、先に保存してください。","runbox.action.disconnect.dialog.disconnect":"接続解除","runbox.action.disconnect.title":"接続解除","runbox.action.menu.title":"その他","runbox.alert.title":"現在、学生が実行中の環境に接続しているため、ランタイムの全使用時間が減少しています。学生がランボックスを終了しても、チュータリングを続ける限り、時間が引き続き減少するのでご注意ください。","runbox.common.close":"閉じる","runbox.common.retry":"リトライ","runbox.common.score":"{score}点","runbox.common.support":"サポート","runbox.common.connect":"接続する","runbox.context.command.ping.error":"タスクの処理中にエラーが発生しました。","runbox.header.submitInfo":"{isIndividual, select, true {個人} other {チーム}}の提出回数 | {remainCount}/{totalCount} 回残っています {isDailyLimitEnabled, select, true {今日} other {}}","runbox.timer.title":"残り時間","runbox.timer.unlimited":"無制限","runbox.timer.tooltip.title":"時間の案内を見る","runbox.timer.popover.title":"ランボックス使用時間の案内","runbox.timer.popover.description":"{user}のランボックス総使用時間です。\n接続中は時間が減り続けます。接続を解除するか授業を退出すると減少が止まります。","runbox.timer.popover.quota.title":"総使用可能時間","runbox.timer.popover.quota_per_session.title":"今回の接続で使用できる時間","runbox.timer.popover.quota_per_session.description":"一度接続すると最大{time}まで使用できます。総利用可能時間が残っていれば、再接続して実習を続けられます。","runbox.timer.popover.quota.disconnect":"接続を解除","runbox.timer.popover.do_not_open":"ランボックス実習時にこのポップアップを表示しない","runbox.timer.almost_end.dialog.quota.title":"総利用可能時間が残り{time}です。","runbox.timer.almost_end.dialog.quota.description":"総利用可能時間をすべて使い切ると実習が終了し、再接続できなくなります。\n作業中の内容は保存してから終了してください。保存していない内容は失われる可能性があります。","runbox.timer.almost_end.dialog.quota_per_session.title":"今回の接続時間が残り{time}です。","runbox.timer.almost_end.dialog.quota_per_session.description":"接続時間が終了すると接続が切断されます。総利用可能時間が残っていれば、再接続して実習を続けられます。\n作業中の内容は保存してから終了してください。保存したファイルは再接続後も維持されますが、保存していない内容は失われる可能性があります。","runbox.timer.almost_end.dialog.confirm":"続ける","runbox.runtime.message.lxp_plan_required":"現在、所属機関ではRunboxの学習資料を利用できません。\n詳細については機関の管理者にお問い合わせください。","runbox.runtime.message.runbox_unavailable":"Runboxは利用できません","runbox.runtime.message.startError":"ランボックスの起動中にエラーが発生しました。","runbox.runtime.overlay.assigned.description":"Runbox が実行中です。\nお待ちください!","runbox.runtime.overlay.assigned.description_timeout":"ランボックスを実行する時間が私たちの予想よりも長くかかっています。\n更新せずにもう少し待ってください!","runbox.runtime.overlay.queued.description":"現在{waiters}回待機中...","runbox.runtime.overlay.queued.description_zero":"Runboxはもうすぐ実行されます。","runbox.runtime.overlay.terminated.description.default":"Runboxの実習を続けるには、「接続」ボタンをクリックしてください。","runbox.runtime.overlay.terminated.description.os_disk_is_full":"ストレージをすべて使い切ったため、実習が終了しました。\n実習環境を初期化してから、もう一度開始してください。","runbox.runtime.overlay.terminated.description.quota_exceeded":"ランタイムの利用時間が終了したため、ランタイムは停止されました。","runbox.runtime.overlay.terminated.description.quota_per_session_exceeded":"Runboxセッションごとの利用時間が終了したため、ランタイムは停止されました。\nRunboxに再接続するには、下のボタンをクリックしてください。","runbox.runtime.overlay.terminated.title":"接続解除","runbox.runtime.overlay.terminated.connect":"接続","runbox.runtime.overlay.terminated.unlimited":"無制限","runbox.runtime.overlay.terminated.contact":"カスタマーサービスにお問い合わせ","runbox.runtime.overlay.terminated.quota.total":"利用可能時間の合計","runbox.runtime.overlay.terminated.quota.used":"総利用時間","runbox.runtime.overlay.terminated.disk.total":"ディスク合計","runbox.runtime.overlay.terminated.disk.used":"使用済みディスク合計","runbox.runtime.overlay.conflicted.description":"このランボックス演習に接続すると、他の教材のランボックスは終了します。\n保存していない内容がある場合は、先に保存してください。","runbox.runtime.overlay.conflicted.title":"現在、他の教材にランボックスが接続されています","runbox.runtime.dialog.change_material.title":"ランボックス接続変更のお知らせ","runbox.runtime.dialog.change_material.description":"このランボックス演習に接続すると、他の教材のランボックスは終了します。続行しますか?","runbox.status.button.title":"接続状態とリソース","runbox.status.network":"ネットワーク状態","runbox.status.runtime.connected":"ランタイム接続済み","runbox.status.runtime.connecting":"ランタイム接続中","runbox.status.runtime.disconnected":"ランタイム未接続","runbox.disk.usage.dialog.title":"ストレージ容量のお知らせ","runbox.disk.usage.dialog.description.warning":"ストレージの80%以上を使用しています。({used} / {total})\nストレージが不足すると実習が中断される場合があります。使用していないファイルを整理してください。","runbox.disk.usage.dialog.description.error":"ストレージの90%以上を使用しています。({used} / {total})\n使用していないファイルを削除するか、必要な場合は実習環境を初期化してストレージを確保してください。","runbox.disk.usage.dialog.actions.close":"閉じる","runbox.disk.usage.alert.warning":"ストレージの80%以上を使用しています。({used} / {total}) ストレージが不足すると実習が中断される場合があります。使用していないファイルを事前に整理してください。","runbox.disk.usage.alert.error":"ストレージの90%以上を使用しています。({used} / {total}) ストレージが不足すると実習が中断される場合があります。使用していないファイルを整理するか、実習環境を初期化してください。","runbox.disk.env_reset.title":"実習環境の初期化","runbox.disk.env_reset.dialog.title":"実習環境の初期化","runbox.disk.env_reset.dialog.description":"ストレージを確保するため、ランボックスを初回起動時の状態に初期化します。実習中に作成または保存したファイルはすべて削除され、復元できません。","runbox.disk.env_reset.dialog.acknowledge":"初期化後、保存したファイルを復元できないことを確認しました。","runbox.disk.env_reset.dialog.actions.cancel":"キャンセル","runbox.disk.env_reset.dialog.actions.confirm":"削除","runbox.disk.env_reset.noti.error":"実習環境の初期化中にエラーが発生しました。","runbox.runtime.overlay.terminated.title.os_disk_is_full":"ストレージが満杯になり\n実習が終了しました。"};
2
2
 
3
3
  export { ja as default };