@elice/material-runbox 1.240401.0 → 1.240508.0-globalization.1
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/components/material-runbox/MaterialRunbox.d.ts +3 -2
- package/cjs/components/material-runbox/MaterialRunbox.js +10 -11
- package/cjs/components/material-runbox/MaterialRunboxContent.js +8 -7
- package/cjs/components/material-runbox/MaterialRunboxHeader.js +9 -9
- package/cjs/components/material-runbox/actions/MaterialRunboxActionAutoShutdown.js +5 -5
- package/cjs/components/material-runbox/actions/MaterialRunboxActionGrade.js +21 -21
- package/cjs/components/material-runbox/actions/MaterialRunboxActionReset.js +13 -13
- package/cjs/components/material-runbox/actions/MaterialRunboxActionRestart.js +12 -11
- package/cjs/components/material-runbox/actions/MaterialRunboxActionShare.js +6 -6
- package/cjs/components/material-runbox/contexts/MaterialRunboxCommandContext.js +4 -4
- package/cjs/components/material-runbox/hooks/useRunboxControl.js +3 -3
- package/cjs/components/material-runbox/locales/en.json.js +2 -2
- package/cjs/components/material-runbox/locales/index.d.ts +3 -2
- package/cjs/components/material-runbox/locales/ko.json.js +2 -2
- package/cjs/components/material-runbox/locales/th.json.js +7 -0
- package/cjs/components/material-runbox/runtime/RuntimeOverlayAssigned.js +6 -5
- package/cjs/components/material-runbox/runtime/RuntimeOverlayQueued.js +10 -10
- package/cjs/components/material-runbox/runtime/RuntimeOverlayTerminated.js +15 -15
- package/es/components/material-runbox/MaterialRunbox.d.ts +3 -2
- package/es/components/material-runbox/MaterialRunbox.js +10 -11
- package/es/components/material-runbox/MaterialRunboxContent.js +8 -7
- package/es/components/material-runbox/MaterialRunboxHeader.js +9 -9
- package/es/components/material-runbox/actions/MaterialRunboxActionAutoShutdown.js +2 -2
- package/es/components/material-runbox/actions/MaterialRunboxActionGrade.js +18 -18
- package/es/components/material-runbox/actions/MaterialRunboxActionReset.js +12 -12
- package/es/components/material-runbox/actions/MaterialRunboxActionRestart.js +12 -11
- package/es/components/material-runbox/actions/MaterialRunboxActionShare.js +4 -4
- package/es/components/material-runbox/contexts/MaterialRunboxCommandContext.js +2 -2
- package/es/components/material-runbox/hooks/useRunboxControl.js +2 -2
- package/es/components/material-runbox/locales/en.json.js +2 -2
- package/es/components/material-runbox/locales/index.d.ts +3 -2
- package/es/components/material-runbox/locales/ko.json.js +2 -2
- package/es/components/material-runbox/locales/th.json.js +3 -0
- package/es/components/material-runbox/runtime/RuntimeOverlayAssigned.js +6 -5
- package/es/components/material-runbox/runtime/RuntimeOverlayQueued.js +10 -10
- package/es/components/material-runbox/runtime/RuntimeOverlayTerminated.js +8 -8
- package/package.json +7 -7
- package/cjs/components/material-runbox/locales/index.js +0 -9
- package/es/components/material-runbox/locales/index.js +0 -2
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
|
-
var reactIntl = require('react-intl');
|
|
7
6
|
var reactUse = require('react-use');
|
|
7
|
+
var intl = require('@elice/intl');
|
|
8
8
|
var material = require('@mui/material');
|
|
9
9
|
var queue = require('../../../assets/queue.gif.js');
|
|
10
10
|
|
|
@@ -16,6 +16,7 @@ const ASSIGNED_NORMAL_TIMEOUT = 30 * 1e3; // 30 sec
|
|
|
16
16
|
//
|
|
17
17
|
//
|
|
18
18
|
const RuntimeOverlayAssigned = () => {
|
|
19
|
+
const intl$1 = intl.useRawEliceIntl();
|
|
19
20
|
const [timeout] = reactUse.useTimeout(ASSIGNED_NORMAL_TIMEOUT);
|
|
20
21
|
//
|
|
21
22
|
//
|
|
@@ -45,10 +46,10 @@ const RuntimeOverlayAssigned = () => {
|
|
|
45
46
|
whiteSpace: 'pre-wrap',
|
|
46
47
|
textAlign: 'center'
|
|
47
48
|
}
|
|
48
|
-
}, timeout() ?
|
|
49
|
-
id:
|
|
50
|
-
}) :
|
|
51
|
-
id:
|
|
49
|
+
}, timeout() ? intl$1.formatMessage({
|
|
50
|
+
id: 'runbox.runtime.overlay.assigned.description_timeout'
|
|
51
|
+
}) : intl$1.formatMessage({
|
|
52
|
+
id: 'runbox.runtime.overlay.assigned.description'
|
|
52
53
|
})));
|
|
53
54
|
};
|
|
54
55
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
|
-
var
|
|
6
|
+
var intl = require('@elice/intl');
|
|
7
7
|
var iconsMaterial = require('@mui/icons-material');
|
|
8
8
|
var material = require('@mui/material');
|
|
9
9
|
require('../contexts/MaterialRunboxApiContext.js');
|
|
@@ -17,6 +17,7 @@ var queue = require('../../../assets/queue.gif.js');
|
|
|
17
17
|
const RuntimeOverlayQueued = ({
|
|
18
18
|
numWaiters
|
|
19
19
|
}) => {
|
|
20
|
+
const intl$1 = intl.useRawEliceIntl();
|
|
20
21
|
const {
|
|
21
22
|
showMessenger
|
|
22
23
|
} = MaterialRunboxContext.useMaterialRunboxContext();
|
|
@@ -48,19 +49,18 @@ const RuntimeOverlayQueued = ({
|
|
|
48
49
|
whiteSpace: 'pre-wrap',
|
|
49
50
|
textAlign: 'center'
|
|
50
51
|
}
|
|
51
|
-
}, numWaiters > 0 ?
|
|
52
|
-
id:
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
id: "runbox.runtime.overlay.queued.description_zero"
|
|
52
|
+
}, numWaiters > 0 ? intl$1.formatMessage({
|
|
53
|
+
id: 'runbox.runtime.overlay.queued.description'
|
|
54
|
+
}, {
|
|
55
|
+
waiters: numWaiters
|
|
56
|
+
}) : intl$1.formatMessage({
|
|
57
|
+
id: 'runbox.runtime.overlay.queued.description_zero'
|
|
58
58
|
})), typeof showMessenger === 'function' ? React.createElement(material.Button, {
|
|
59
59
|
variant: "outlined",
|
|
60
60
|
startIcon: React.createElement(iconsMaterial.QuestionAnswer, null),
|
|
61
61
|
onClick: showMessenger
|
|
62
|
-
},
|
|
63
|
-
id:
|
|
62
|
+
}, intl$1.formatMessage({
|
|
63
|
+
id: 'runbox.common.support'
|
|
64
64
|
})) : null);
|
|
65
65
|
};
|
|
66
66
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
|
-
var
|
|
6
|
+
var intl = require('@elice/intl');
|
|
7
7
|
var iconsMaterial = require('@mui/icons-material');
|
|
8
8
|
var lab = require('@mui/lab');
|
|
9
9
|
var material = require('@mui/material');
|
|
@@ -19,7 +19,7 @@ const RuntimeOverlayTerminated = ({
|
|
|
19
19
|
reason,
|
|
20
20
|
startRuntime
|
|
21
21
|
}) => {
|
|
22
|
-
const intl =
|
|
22
|
+
const intl$1 = intl.useRawEliceIntl();
|
|
23
23
|
const {
|
|
24
24
|
showMessenger
|
|
25
25
|
} = MaterialRunboxContext.useMaterialRunboxContext();
|
|
@@ -42,14 +42,14 @@ const RuntimeOverlayTerminated = ({
|
|
|
42
42
|
case 'stopped_by_user':
|
|
43
43
|
case 'auto_shutdown':
|
|
44
44
|
return {
|
|
45
|
-
description: intl.formatMessage({
|
|
45
|
+
description: intl$1.formatMessage({
|
|
46
46
|
id: 'runbox.runtime.overlay.terminated.description.general'
|
|
47
47
|
}),
|
|
48
48
|
unexpected: false
|
|
49
49
|
};
|
|
50
50
|
case 'quota_exceeded':
|
|
51
51
|
return {
|
|
52
|
-
description: intl.formatMessage({
|
|
52
|
+
description: intl$1.formatMessage({
|
|
53
53
|
id: 'runbox.runtime.overlay.terminated.description.quota_exceeded'
|
|
54
54
|
}),
|
|
55
55
|
unexpected: false
|
|
@@ -57,7 +57,7 @@ const RuntimeOverlayTerminated = ({
|
|
|
57
57
|
// quota exceeded
|
|
58
58
|
case 'quota_per_session_exceeded':
|
|
59
59
|
return {
|
|
60
|
-
description: intl.formatMessage({
|
|
60
|
+
description: intl$1.formatMessage({
|
|
61
61
|
id: 'runbox.runtime.overlay.terminated.description.quota_per_session_exceeded'
|
|
62
62
|
}),
|
|
63
63
|
unexpected: false
|
|
@@ -65,14 +65,14 @@ const RuntimeOverlayTerminated = ({
|
|
|
65
65
|
// disk full
|
|
66
66
|
case 'os_disk_is_full':
|
|
67
67
|
return {
|
|
68
|
-
description: intl.formatMessage({
|
|
68
|
+
description: intl$1.formatMessage({
|
|
69
69
|
id: 'runbox.runtime.overlay.terminated.description.os_disk_is_full'
|
|
70
70
|
}),
|
|
71
71
|
unexpected: true
|
|
72
72
|
};
|
|
73
73
|
default:
|
|
74
74
|
return {
|
|
75
|
-
description: intl.formatMessage({
|
|
75
|
+
description: intl$1.formatMessage({
|
|
76
76
|
id: 'runbox.runtime.overlay.terminated.description.default'
|
|
77
77
|
}),
|
|
78
78
|
unexpected: true
|
|
@@ -80,7 +80,7 @@ const RuntimeOverlayTerminated = ({
|
|
|
80
80
|
}
|
|
81
81
|
},
|
|
82
82
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
83
|
-
[reason, intl]);
|
|
83
|
+
[reason, intl$1]);
|
|
84
84
|
//
|
|
85
85
|
//
|
|
86
86
|
//
|
|
@@ -108,13 +108,13 @@ const RuntimeOverlayTerminated = ({
|
|
|
108
108
|
}, React.createElement(material.Typography, {
|
|
109
109
|
variant: "h6",
|
|
110
110
|
textAlign: "center"
|
|
111
|
-
},
|
|
112
|
-
id:
|
|
111
|
+
}, intl$1.formatMessage({
|
|
112
|
+
id: 'runbox.runtime.overlay.terminated.title'
|
|
113
113
|
})), React.createElement(material.Typography, {
|
|
114
114
|
variant: "body2",
|
|
115
115
|
textAlign: "center",
|
|
116
116
|
whiteSpace: "pre-line"
|
|
117
|
-
}, runtimeTerminatedAction.unexpected ? runtimeTerminatedAction.description.concat('\n', intl.formatMessage({
|
|
117
|
+
}, runtimeTerminatedAction.unexpected ? runtimeTerminatedAction.description.concat('\n', intl$1.formatMessage({
|
|
118
118
|
id: 'runbox.runtime.overlay.terminated.description.unexpected'
|
|
119
119
|
})) : runtimeTerminatedAction.description)), React.createElement(material.Stack, {
|
|
120
120
|
gap: "0.5rem",
|
|
@@ -127,13 +127,13 @@ const RuntimeOverlayTerminated = ({
|
|
|
127
127
|
loading: isRestarting,
|
|
128
128
|
startIcon: React.createElement(iconsMaterial.PlayArrow, null),
|
|
129
129
|
onClick: handleRestart
|
|
130
|
-
},
|
|
131
|
-
id:
|
|
130
|
+
}, intl$1.formatMessage({
|
|
131
|
+
id: 'runbox.runtime.overlay.terminated.restart'
|
|
132
132
|
})), runtimeTerminatedAction.unexpected && typeof showMessenger === 'function' ? React.createElement(material.Button, {
|
|
133
133
|
variant: "text",
|
|
134
134
|
onClick: showMessenger
|
|
135
|
-
},
|
|
136
|
-
id:
|
|
135
|
+
}, intl$1.formatMessage({
|
|
136
|
+
id: 'runbox.common.support'
|
|
137
137
|
})) : null)));
|
|
138
138
|
};
|
|
139
139
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { WithIntlComponentBuilderProps } from '@elice/intl';
|
|
2
3
|
import type { MaterialRunboxApiContextProps, MaterialRunboxContextProps } from './contexts';
|
|
3
4
|
import type { MaterialRunboxContentProps } from './MaterialRunboxContent';
|
|
4
5
|
export type MaterialRunboxProps = MaterialRunboxContentProps & Omit<MaterialRunboxApiContextProps, 'children'> & Omit<MaterialRunboxContextProps, 'children'>;
|
|
5
|
-
declare const
|
|
6
|
-
export default
|
|
6
|
+
declare const _default: React.ForwardRefExoticComponent<import("@elice/intl").IntlComponentExtraProps & Omit<WithIntlComponentBuilderProps<MaterialRunboxProps>, keyof import("@elice/intl").IntlComponentExtraProps | "__intl"> & React.RefAttributes<any>>;
|
|
7
|
+
export default _default;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { __rest } from 'tslib';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { IntlComponentBuilder, RawEliceIntlProvider } from '@elice/intl';
|
|
4
4
|
import MaterialRunboxApiContextProvider from './contexts/MaterialRunboxApiContext.js';
|
|
5
5
|
import './contexts/MaterialRunboxCommandContext.js';
|
|
6
6
|
import MaterialRunboxContextProvider from './contexts/MaterialRunboxContext.js';
|
|
7
|
-
import
|
|
7
|
+
import messageEn from './locales/en.json.js';
|
|
8
|
+
import messageKo from './locales/ko.json.js';
|
|
9
|
+
import messageTh from './locales/th.json.js';
|
|
8
10
|
import MaterialRunboxContent from './MaterialRunboxContent.js';
|
|
9
|
-
import en from './locales/en.json.js';
|
|
10
11
|
|
|
11
12
|
//
|
|
12
13
|
//
|
|
@@ -20,21 +21,19 @@ const MaterialRunbox = _a => {
|
|
|
20
21
|
enableUrlShare = false,
|
|
21
22
|
locale = 'ko',
|
|
22
23
|
showMessenger,
|
|
23
|
-
eliceMaterialRunboxApiConfiguration
|
|
24
|
+
eliceMaterialRunboxApiConfiguration,
|
|
25
|
+
__intl
|
|
24
26
|
} = _a,
|
|
25
|
-
contentProps = __rest(_a, ["enableAutoShutdownToggle", "enableUrlShare", "locale", "showMessenger", "eliceMaterialRunboxApiConfiguration"]);
|
|
26
|
-
return React.createElement(MaterialRunboxContextProvider, {
|
|
27
|
+
contentProps = __rest(_a, ["enableAutoShutdownToggle", "enableUrlShare", "locale", "showMessenger", "eliceMaterialRunboxApiConfiguration", "__intl"]);
|
|
28
|
+
return React.createElement(RawEliceIntlProvider, Object.assign({}, __intl), React.createElement(MaterialRunboxContextProvider, {
|
|
27
29
|
enableAutoShutdownToggle: enableAutoShutdownToggle,
|
|
28
30
|
enableUrlShare: enableUrlShare,
|
|
29
31
|
locale: locale,
|
|
30
32
|
showMessenger: showMessenger
|
|
31
33
|
}, React.createElement(MaterialRunboxApiContextProvider, {
|
|
32
34
|
eliceMaterialRunboxApiConfiguration: eliceMaterialRunboxApiConfiguration
|
|
33
|
-
}, React.createElement(IntlProvider, {
|
|
34
|
-
locale: locale,
|
|
35
|
-
defaultLocale: "en",
|
|
36
|
-
messages: locale in index ? index[locale] : en
|
|
37
35
|
}, React.createElement(MaterialRunboxContent, Object.assign({}, contentProps)))));
|
|
38
36
|
};
|
|
37
|
+
var MaterialRunbox$1 = new IntlComponentBuilder(MaterialRunbox).add('en', messageEn).add('ko', messageKo).add('th', messageTh).build();
|
|
39
38
|
|
|
40
|
-
export { MaterialRunbox as default };
|
|
39
|
+
export { MaterialRunbox$1 as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _styled from '@emotion/styled/base';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { FormattedMessage } from 'react-intl';
|
|
4
3
|
import { Spinner } from '@elice/blocks';
|
|
4
|
+
import { useRawEliceIntl } from '@elice/intl';
|
|
5
5
|
import { EliceRunboxProvider } from '@elice/runbox-client';
|
|
6
6
|
import { Refresh } from '@mui/icons-material';
|
|
7
7
|
import { Stack, Typography, Button } from '@mui/material';
|
|
@@ -38,6 +38,7 @@ const MaterialRunboxContent = ({
|
|
|
38
38
|
runboxId,
|
|
39
39
|
courseId
|
|
40
40
|
}) => {
|
|
41
|
+
const intl = useRawEliceIntl();
|
|
41
42
|
const {
|
|
42
43
|
locale,
|
|
43
44
|
showMessenger
|
|
@@ -99,20 +100,20 @@ const MaterialRunboxContent = ({
|
|
|
99
100
|
gap: "1.5rem"
|
|
100
101
|
}, React.createElement(Typography, {
|
|
101
102
|
variant: "h6"
|
|
102
|
-
},
|
|
103
|
-
id:
|
|
103
|
+
}, intl.formatMessage({
|
|
104
|
+
id: 'runbox.runtime.message.startError'
|
|
104
105
|
})), React.createElement(Stack, {
|
|
105
106
|
gap: "0.5rem"
|
|
106
107
|
}, React.createElement(Button, {
|
|
107
108
|
startIcon: React.createElement(Refresh, null),
|
|
108
109
|
onClick: () => refetch()
|
|
109
|
-
},
|
|
110
|
-
id:
|
|
110
|
+
}, intl.formatMessage({
|
|
111
|
+
id: 'runbox.common.retry'
|
|
111
112
|
})), typeof showMessenger === 'function' ? React.createElement(Button, {
|
|
112
113
|
variant: "outlined",
|
|
113
114
|
onClick: () => showMessenger()
|
|
114
|
-
},
|
|
115
|
-
id:
|
|
115
|
+
}, intl.formatMessage({
|
|
116
|
+
id: 'runbox.common.support'
|
|
116
117
|
})) : null)));
|
|
117
118
|
}
|
|
118
119
|
if (!runbox || !runtimeTemplate) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _styled from '@emotion/styled/base';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { useRawEliceIntl } from '@elice/intl';
|
|
4
4
|
import { Tag, EliceIcon } from '@elice/mui-elements';
|
|
5
5
|
import { useEliceRunboxRunning } from '@elice/runbox-client';
|
|
6
6
|
import { enums } from '@elice/types';
|
|
@@ -30,6 +30,7 @@ const MaterialRunboxHeader = ({
|
|
|
30
30
|
courseId,
|
|
31
31
|
refetch
|
|
32
32
|
}) => {
|
|
33
|
+
const intl = useRawEliceIntl();
|
|
33
34
|
const {
|
|
34
35
|
enableAutoShutdownToggle
|
|
35
36
|
} = useMaterialRunboxContext();
|
|
@@ -77,14 +78,13 @@ const MaterialRunboxHeader = ({
|
|
|
77
78
|
return null;
|
|
78
79
|
}
|
|
79
80
|
return React.createElement(Tag, {
|
|
80
|
-
label:
|
|
81
|
-
id:
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}
|
|
81
|
+
label: intl.formatMessage({
|
|
82
|
+
id: 'runbox.header.submitInfo'
|
|
83
|
+
}, {
|
|
84
|
+
remainCount: remainSubmitCount,
|
|
85
|
+
totalCount: totalSubmitCount,
|
|
86
|
+
isDailyLimitEnabled,
|
|
87
|
+
isIndividual: isIndividualTypeLeaderboard
|
|
88
88
|
}),
|
|
89
89
|
variant: "muted",
|
|
90
90
|
color: remainSubmitCount ? 'success' : 'secondary'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _styled from '@emotion/styled/base';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { useRawEliceIntl } from '@elice/intl';
|
|
4
4
|
import { FormControlLabel, Tooltip, Switch } from '@mui/material';
|
|
5
5
|
import { useMaterialRunboxApiContext } from '../contexts/MaterialRunboxApiContext.js';
|
|
6
6
|
import '../contexts/MaterialRunboxCommandContext.js';
|
|
@@ -30,7 +30,7 @@ const MaterialRunboxActionAutoShutdown = ({
|
|
|
30
30
|
refetch
|
|
31
31
|
}) => {
|
|
32
32
|
var _a;
|
|
33
|
-
const intl =
|
|
33
|
+
const intl = useRawEliceIntl();
|
|
34
34
|
const materialRunboxApi = useMaterialRunboxApiContext();
|
|
35
35
|
/**
|
|
36
36
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _styled from '@emotion/styled/base';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { useIntl, FormattedMessage } from 'react-intl';
|
|
4
3
|
import { Transition } from 'react-transition-group';
|
|
4
|
+
import { useRawEliceIntl } from '@elice/intl';
|
|
5
5
|
import { useSnackbar } from '@elice/mui-x-snackbar';
|
|
6
6
|
import { CommandType } from '@elice/openapi-client-material-runbox';
|
|
7
7
|
import { useEliceRunboxRunning } from '@elice/runbox-client';
|
|
@@ -70,7 +70,7 @@ const MaterialRunboxActionGrade = ({
|
|
|
70
70
|
courseId
|
|
71
71
|
}) => {
|
|
72
72
|
var _a;
|
|
73
|
-
const intl =
|
|
73
|
+
const intl = useRawEliceIntl();
|
|
74
74
|
const {
|
|
75
75
|
enqueueSnackbar
|
|
76
76
|
} = useSnackbar();
|
|
@@ -204,8 +204,8 @@ const MaterialRunboxActionGrade = ({
|
|
|
204
204
|
disabled: !isRunboxRunning || isLastCommandRunning || !isSubmitCountRemained,
|
|
205
205
|
size: "small",
|
|
206
206
|
onClick: handleAction
|
|
207
|
-
},
|
|
208
|
-
id:
|
|
207
|
+
}, intl.formatMessage({
|
|
208
|
+
id: 'runbox.action.grade.title'
|
|
209
209
|
})), isGradeDoneWithOutput ? React.createElement(Transition, {
|
|
210
210
|
in: isGradeDoneWithOutput,
|
|
211
211
|
timeout: 0,
|
|
@@ -236,18 +236,18 @@ const MaterialRunboxActionGrade = ({
|
|
|
236
236
|
maxWidth: "md",
|
|
237
237
|
fullWidth: true,
|
|
238
238
|
onClose: handleGradeResultDialogClose
|
|
239
|
-
}, React.createElement(DialogTitle, null,
|
|
240
|
-
id:
|
|
239
|
+
}, React.createElement(DialogTitle, null, intl.formatMessage({
|
|
240
|
+
id: 'runbox.action.grade.dialog.title'
|
|
241
241
|
})), React.createElement(DialogContent, null, React.createElement(Stack, {
|
|
242
242
|
gap: "0.75rem"
|
|
243
243
|
}, lastCommand.terminatedReason === 'done' ? React.createElement(Alert, {
|
|
244
244
|
severity: "success"
|
|
245
|
-
},
|
|
246
|
-
id:
|
|
245
|
+
}, intl.formatMessage({
|
|
246
|
+
id: 'runbox.action.grade.dialog.description.success'
|
|
247
247
|
})) : React.createElement(Alert, {
|
|
248
248
|
severity: "error"
|
|
249
|
-
},
|
|
250
|
-
id:
|
|
249
|
+
}, intl.formatMessage({
|
|
250
|
+
id: 'runbox.action.grade.dialog.description.error'
|
|
251
251
|
})), React.createElement(StyledTerminal, {
|
|
252
252
|
value: lastCommand.output,
|
|
253
253
|
readOnly: true,
|
|
@@ -256,8 +256,8 @@ const MaterialRunboxActionGrade = ({
|
|
|
256
256
|
color: "inherit",
|
|
257
257
|
disabled: isActionLoading,
|
|
258
258
|
onClick: handleGradeResultDialogClose
|
|
259
|
-
},
|
|
260
|
-
id:
|
|
259
|
+
}, intl.formatMessage({
|
|
260
|
+
id: 'runbox.common.close'
|
|
261
261
|
}))));
|
|
262
262
|
};
|
|
263
263
|
/**
|
|
@@ -269,15 +269,15 @@ const MaterialRunboxActionGrade = ({
|
|
|
269
269
|
maxWidth: "xs",
|
|
270
270
|
open: isSubmitCountInfoDialogOpen,
|
|
271
271
|
onClick: handleSubmitCountInfoDialogClose
|
|
272
|
-
}, React.createElement(DialogTitle, null,
|
|
273
|
-
id:
|
|
274
|
-
})), React.createElement(DialogContent, null, React.createElement(Typography, null,
|
|
275
|
-
id:
|
|
272
|
+
}, React.createElement(DialogTitle, null, intl.formatMessage({
|
|
273
|
+
id: 'runbtox.action.submitCountInfo.dialog.title'
|
|
274
|
+
})), React.createElement(DialogContent, null, React.createElement(Typography, null, intl.formatMessage({
|
|
275
|
+
id: 'runbox.action.submitCountInfo.dialog.description'
|
|
276
276
|
}))), React.createElement(DialogActions, null, React.createElement(Button, {
|
|
277
277
|
color: "inherit",
|
|
278
278
|
onClick: handleSubmitCountInfoDialogClose
|
|
279
|
-
},
|
|
280
|
-
id:
|
|
279
|
+
}, intl.formatMessage({
|
|
280
|
+
id: 'runbox.common.close'
|
|
281
281
|
}))));
|
|
282
282
|
};
|
|
283
283
|
//
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { useRawEliceIntl } from '@elice/intl';
|
|
3
3
|
import { EliceIcon } from '@elice/mui-elements';
|
|
4
4
|
import { useSnackbar } from '@elice/mui-x-snackbar';
|
|
5
5
|
import { CommandType } from '@elice/openapi-client-material-runbox';
|
|
@@ -18,7 +18,7 @@ const MaterialRunboxActionReset = ({
|
|
|
18
18
|
courseId,
|
|
19
19
|
handleMenuClose
|
|
20
20
|
}) => {
|
|
21
|
-
const intl =
|
|
21
|
+
const intl = useRawEliceIntl();
|
|
22
22
|
const {
|
|
23
23
|
enqueueSnackbar
|
|
24
24
|
} = useSnackbar();
|
|
@@ -72,8 +72,8 @@ const MaterialRunboxActionReset = ({
|
|
|
72
72
|
disabled: isLastCommandRunning
|
|
73
73
|
}, React.createElement(ListItemIcon, null, React.createElement(EliceIcon, {
|
|
74
74
|
icon: faRefresh
|
|
75
|
-
})), React.createElement(ListItemText, null,
|
|
76
|
-
id:
|
|
75
|
+
})), React.createElement(ListItemText, null, intl.formatMessage({
|
|
76
|
+
id: 'runbox.action.reset.title'
|
|
77
77
|
})));
|
|
78
78
|
};
|
|
79
79
|
/**
|
|
@@ -88,27 +88,27 @@ const MaterialRunboxActionReset = ({
|
|
|
88
88
|
maxWidth: "xs",
|
|
89
89
|
fullWidth: true,
|
|
90
90
|
onClose: handleDialogClose
|
|
91
|
-
}, React.createElement(DialogTitle, null,
|
|
92
|
-
id:
|
|
91
|
+
}, React.createElement(DialogTitle, null, intl.formatMessage({
|
|
92
|
+
id: 'runbox.action.reset.title'
|
|
93
93
|
})), React.createElement(DialogContent, null, React.createElement(DialogContentText, {
|
|
94
94
|
sx: {
|
|
95
95
|
whiteSpace: 'pre-line'
|
|
96
96
|
}
|
|
97
|
-
},
|
|
98
|
-
id:
|
|
97
|
+
}, intl.formatMessage({
|
|
98
|
+
id: 'runbox.action.reset.dialog.description'
|
|
99
99
|
}))), React.createElement(DialogActions, null, React.createElement(Button, {
|
|
100
100
|
color: "inherit",
|
|
101
101
|
disabled: isLoading,
|
|
102
102
|
onClick: handleDialogClose
|
|
103
|
-
},
|
|
104
|
-
id:
|
|
103
|
+
}, intl.formatMessage({
|
|
104
|
+
id: 'runbox.common.close'
|
|
105
105
|
})), React.createElement(LoadingButton, {
|
|
106
106
|
variant: "contained",
|
|
107
107
|
color: "warning",
|
|
108
108
|
loading: isLoading || isLastCommandRunning,
|
|
109
109
|
onClick: handleReset
|
|
110
|
-
},
|
|
111
|
-
id:
|
|
110
|
+
}, intl.formatMessage({
|
|
111
|
+
id: 'runbox.action.reset.dialog.actions.confirm'
|
|
112
112
|
}))));
|
|
113
113
|
};
|
|
114
114
|
//
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { useRawEliceIntl } from '@elice/intl';
|
|
3
3
|
import { EliceIcon } from '@elice/mui-elements';
|
|
4
4
|
import { faRotateRight } from '@fortawesome/pro-solid-svg-icons';
|
|
5
5
|
import { LoadingButton } from '@mui/lab';
|
|
@@ -15,6 +15,7 @@ const MaterialRunboxActionRestart = ({
|
|
|
15
15
|
refetch,
|
|
16
16
|
handleMenuClose
|
|
17
17
|
}) => {
|
|
18
|
+
const intl = useRawEliceIntl();
|
|
18
19
|
const [isLoading, setIsLoading] = React.useState(false);
|
|
19
20
|
const [isDialogOpened, setDialogOpened] = React.useState(false);
|
|
20
21
|
// restart
|
|
@@ -50,8 +51,8 @@ const MaterialRunboxActionRestart = ({
|
|
|
50
51
|
onClick: () => setDialogOpened(true)
|
|
51
52
|
}, React.createElement(ListItemIcon, null, React.createElement(EliceIcon, {
|
|
52
53
|
icon: faRotateRight
|
|
53
|
-
})), React.createElement(ListItemText, null,
|
|
54
|
-
id:
|
|
54
|
+
})), React.createElement(ListItemText, null, intl.formatMessage({
|
|
55
|
+
id: 'runbox.action.restart.title'
|
|
55
56
|
})));
|
|
56
57
|
};
|
|
57
58
|
/**
|
|
@@ -66,27 +67,27 @@ const MaterialRunboxActionRestart = ({
|
|
|
66
67
|
open: true,
|
|
67
68
|
fullWidth: true,
|
|
68
69
|
onClose: handleDialogClose
|
|
69
|
-
}, React.createElement(DialogTitle, null,
|
|
70
|
-
id:
|
|
70
|
+
}, React.createElement(DialogTitle, null, intl.formatMessage({
|
|
71
|
+
id: 'runbox.action.restart.title'
|
|
71
72
|
})), React.createElement(DialogContent, null, React.createElement(DialogContentText, {
|
|
72
73
|
sx: {
|
|
73
74
|
whiteSpace: 'pre-line'
|
|
74
75
|
}
|
|
75
|
-
},
|
|
76
|
-
id:
|
|
76
|
+
}, intl.formatMessage({
|
|
77
|
+
id: 'runbox.action.restart.dialog.description'
|
|
77
78
|
}))), React.createElement(DialogActions, null, React.createElement(Button, {
|
|
78
79
|
color: "inherit",
|
|
79
80
|
disabled: isLoading,
|
|
80
81
|
onClick: handleDialogClose
|
|
81
|
-
},
|
|
82
|
-
id:
|
|
82
|
+
}, intl.formatMessage({
|
|
83
|
+
id: 'runbox.common.close'
|
|
83
84
|
})), React.createElement(LoadingButton, {
|
|
84
85
|
variant: "contained",
|
|
85
86
|
color: "warning",
|
|
86
87
|
loading: isLoading,
|
|
87
88
|
onClick: handleRestartAction
|
|
88
|
-
},
|
|
89
|
-
id:
|
|
89
|
+
}, intl.formatMessage({
|
|
90
|
+
id: 'runbox.action.restart.dialog.actions.confirm'
|
|
90
91
|
}))));
|
|
91
92
|
};
|
|
92
93
|
//
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { useIntl, FormattedMessage } from 'react-intl';
|
|
3
2
|
import { useCopyToClipboard } from 'react-use';
|
|
3
|
+
import { useRawEliceIntl } from '@elice/intl';
|
|
4
4
|
import { EliceIcon } from '@elice/mui-elements';
|
|
5
5
|
import { useSnackbar } from '@elice/mui-x-snackbar';
|
|
6
6
|
import { useEliceRunboxRunning } from '@elice/runbox-client';
|
|
@@ -16,7 +16,7 @@ import { useMaterialRunboxContext } from '../contexts/MaterialRunboxContext.js';
|
|
|
16
16
|
const MaterialRunboxActionShare = ({
|
|
17
17
|
handleMenuClose
|
|
18
18
|
}) => {
|
|
19
|
-
const intl =
|
|
19
|
+
const intl = useRawEliceIntl();
|
|
20
20
|
const {
|
|
21
21
|
enqueueSnackbar
|
|
22
22
|
} = useSnackbar();
|
|
@@ -43,8 +43,8 @@ const MaterialRunboxActionShare = ({
|
|
|
43
43
|
onClick: handleShareAction
|
|
44
44
|
}, React.createElement(ListItemIcon, null, React.createElement(EliceIcon, {
|
|
45
45
|
icon: faLinkSimple
|
|
46
|
-
})), React.createElement(ListItemText, null,
|
|
47
|
-
id:
|
|
46
|
+
})), React.createElement(ListItemText, null, intl.formatMessage({
|
|
47
|
+
id: 'runbox.action.share.title'
|
|
48
48
|
})));
|
|
49
49
|
};
|
|
50
50
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { useRawEliceIntl } from '@elice/intl';
|
|
3
3
|
import { useSnackbar } from '@elice/mui-x-snackbar';
|
|
4
4
|
import { CommandStatus } from '@elice/openapi-client-material-runbox';
|
|
5
5
|
import { timer } from 'rxjs';
|
|
@@ -27,7 +27,7 @@ const MaterialRunboxCommandContextProvider = ({
|
|
|
27
27
|
runtime,
|
|
28
28
|
courseId
|
|
29
29
|
}) => {
|
|
30
|
-
const intl =
|
|
30
|
+
const intl = useRawEliceIntl();
|
|
31
31
|
const {
|
|
32
32
|
enqueueSnackbar
|
|
33
33
|
} = useSnackbar();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useRef, useCallback } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { useRawEliceIntl } from '@elice/intl';
|
|
3
3
|
import { useSnackbar } from '@elice/mui-x-snackbar';
|
|
4
4
|
import { useEliceRunboxRunning } from '@elice/runbox-client';
|
|
5
5
|
import { useMaterialRunboxApiContext } from '../contexts/MaterialRunboxApiContext.js';
|
|
@@ -14,7 +14,7 @@ import '../contexts/MaterialRunboxContext.js';
|
|
|
14
14
|
*/
|
|
15
15
|
const useRunboxControl = props => {
|
|
16
16
|
const _return = useRef({});
|
|
17
|
-
const intl =
|
|
17
|
+
const intl = useRawEliceIntl();
|
|
18
18
|
const {
|
|
19
19
|
enqueueSnackbar
|
|
20
20
|
} = useSnackbar();
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var
|
|
1
|
+
var messageEn = {"runbox.action.autoShutdown.title":"Always on","runbox.action.autoShutdown.tooltip.disabled":"This runtime automatically shuts down after {time}, which is set as the per-session usage time.","runbox.action.autoShutdown.tooltip.enabled":"If set to always on, the runtime will not shut down even if you leave the learning {_termLibraryLecturePage}. However, it will automatically shut down after {time}, which is set as the session-specific usage time of the runtime.","runbox.action.grade.dialog.description.error":"An error occurred while grading the code.","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.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.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.description":"Are you sure you want to restart the runbox?","runbox.action.restart.title":"Restart runbox","runbox.action.share.title":"Share runbox URL","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.submitCountInfo.dialog.title":"Limit the number of submissions","runbox.action.submitCountInfo.dialog.description":"You have exceeded the submission count limit","runbox.action.submitCountInfo.tooltip.disabled":"The submission count has been used up","runbox.common.close":"Close","runbox.common.retry":"Retry","runbox.common.support":"Support","runbox.context.command.ping.error":"An error occurred while processing task.","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":"The runtime terminated due to an unexpected problem.\nClick the button below to reconnect to the runbox.","runbox.runtime.overlay.terminated.description.general":"The runtime connected to the runbox has ended.\nTo reconnect to the runbox, click the button below.","runbox.runtime.overlay.terminated.description.os_disk_is_full":"Runtime has ended because the disk is full.\nIf you have recently deleted a runbox, it may take some time to reflect.","runbox.runtime.overlay.terminated.description.quota_exceeded":"The runtime has ended because the runtime has expired.","runbox.runtime.overlay.terminated.description.quota_per_session_exceeded":"Runbox has been running for 24 hours and the runtime has ended.\nTo reconnect to the runbox, click the button below.","runbox.runtime.overlay.terminated.description.unexpected":"If the problem persists, please contact customer service.","runbox.runtime.overlay.terminated.restart":"Reconnect","runbox.runtime.overlay.terminated.title":"Runtime disconnected","runbox.header.submitInfo":"{isIndividual, select, true {} other {Team}} submission count | {remainCount}/{totalCount} times left {isDailyLimitEnabled, select, true {today} other {}}"};
|
|
2
2
|
|
|
3
|
-
export {
|
|
3
|
+
export { messageEn as default };
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export { default as
|
|
2
|
-
export { default as
|
|
1
|
+
export { default as messageEn } from './en.json';
|
|
2
|
+
export { default as messageKo } from './ko.json';
|
|
3
|
+
export { default as messageTh } from './th.json';
|