@elice/material-runbox 1.240718.0-trasncript.2 → 1.240718.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/assets/queue.gif.js +2 -1
- package/cjs/assets/runbox_logo.png.js +2 -1
- package/cjs/assets/terminated.png.js +2 -1
- package/cjs/components/material-runbox/MaterialRunbox.js +20 -24
- package/cjs/components/material-runbox/MaterialRunboxBody.js +4 -10
- package/cjs/components/material-runbox/MaterialRunboxContent.js +103 -132
- package/cjs/components/material-runbox/MaterialRunboxFooter.js +18 -27
- package/cjs/components/material-runbox/MaterialRunboxHeader.js +87 -103
- package/cjs/components/material-runbox/actions/MaterialRunboxActionAutoShutdown.js +27 -31
- package/cjs/components/material-runbox/actions/MaterialRunboxActionGrade.js +159 -242
- package/cjs/components/material-runbox/actions/MaterialRunboxActionMenu.js +28 -32
- package/cjs/components/material-runbox/actions/MaterialRunboxActionReset.js +76 -125
- package/cjs/components/material-runbox/actions/MaterialRunboxActionRestart.js +53 -84
- package/cjs/components/material-runbox/actions/MaterialRunboxActionShare.js +28 -40
- package/cjs/components/material-runbox/contexts/MaterialRunboxApiContext.js +15 -27
- package/cjs/components/material-runbox/contexts/MaterialRunboxCommandContext.js +36 -52
- package/cjs/components/material-runbox/contexts/MaterialRunboxContext.js +8 -11
- package/cjs/components/material-runbox/hooks/useRunboxControl.js +38 -62
- package/cjs/components/material-runbox/runtime/Runtime.js +17 -25
- package/cjs/components/material-runbox/runtime/RuntimeOverlayAssigned.js +29 -33
- package/cjs/components/material-runbox/runtime/RuntimeOverlayQueued.js +39 -40
- package/cjs/components/material-runbox/runtime/RuntimeOverlayTerminated.js +57 -72
- package/es/assets/queue.gif.js +2 -1
- package/es/assets/runbox_logo.png.js +2 -1
- package/es/assets/terminated.png.js +2 -1
- package/es/components/material-runbox/MaterialRunbox.js +20 -24
- package/es/components/material-runbox/MaterialRunboxBody.js +4 -6
- package/es/components/material-runbox/MaterialRunboxContent.js +103 -128
- package/es/components/material-runbox/MaterialRunboxFooter.js +18 -23
- package/es/components/material-runbox/MaterialRunboxHeader.js +88 -99
- package/es/components/material-runbox/actions/MaterialRunboxActionAutoShutdown.js +27 -27
- package/es/components/material-runbox/actions/MaterialRunboxActionGrade.js +159 -237
- package/es/components/material-runbox/actions/MaterialRunboxActionMenu.js +28 -28
- package/es/components/material-runbox/actions/MaterialRunboxActionReset.js +76 -121
- package/es/components/material-runbox/actions/MaterialRunboxActionRestart.js +53 -80
- package/es/components/material-runbox/actions/MaterialRunboxActionShare.js +28 -36
- package/es/components/material-runbox/contexts/MaterialRunboxApiContext.js +14 -22
- package/es/components/material-runbox/contexts/MaterialRunboxCommandContext.js +35 -47
- package/es/components/material-runbox/contexts/MaterialRunboxContext.js +7 -6
- package/es/components/material-runbox/hooks/useRunboxControl.js +38 -62
- package/es/components/material-runbox/runtime/Runtime.js +17 -21
- package/es/components/material-runbox/runtime/RuntimeOverlayAssigned.js +30 -34
- package/es/components/material-runbox/runtime/RuntimeOverlayQueued.js +40 -41
- package/es/components/material-runbox/runtime/RuntimeOverlayTerminated.js +58 -69
- package/package.json +11 -8
- package/cjs/_virtual/_rollupPluginBabelHelpers.js +0 -386
- package/cjs/components/material-runbox/contexts/index.js +0 -17
- package/cjs/components/material-runbox/hooks/index.js +0 -7
- package/cjs/components/material-runbox/index.js +0 -7
- package/cjs/components/material-runbox/locales/index.js +0 -13
- package/es/_virtual/_rollupPluginBabelHelpers.js +0 -377
- package/es/components/material-runbox/contexts/index.js +0 -3
- package/es/components/material-runbox/hooks/index.js +0 -1
- package/es/components/material-runbox/index.js +0 -1
- package/es/components/material-runbox/locales/index.js +0 -4
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { slicedToArray as _slicedToArray } from '../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
-
import { jsx } from 'react/jsx-runtime';
|
|
3
1
|
import React from 'react';
|
|
4
2
|
import { useRawEliceIntl } from '@elice/intl';
|
|
5
3
|
import { useSnackbar } from '@elice/mui-x-snackbar';
|
|
@@ -11,88 +9,78 @@ import { useMaterialRunboxApiContext } from './MaterialRunboxApiContext.js';
|
|
|
11
9
|
//
|
|
12
10
|
//
|
|
13
11
|
//
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
const PING_INTERVAL = 2000;
|
|
13
|
+
const PING_MAX_TRY_SECOND = 3 * 60; // 3min (ref: https://teams.microsoft.com/l/message/19:aa082e4a9f6f456fbea872be532123d4@thread.tacv2/1689228421341?tenantId=5bb6f1f4-0b48-4496-9baf-f9fb7da5d352&groupId=27480e72-5fcb-4ac9-b4e7-5b92abb31a95&parentMessageId=1689217573531&teamName=div-CTO&channelName=issue-report&createdTime=1689228421341&allowXTenantAccess=false)
|
|
14
|
+
const PING_MAX_TRY_COUNT = PING_MAX_TRY_SECOND * 1000 / PING_INTERVAL;
|
|
17
15
|
//
|
|
18
16
|
//
|
|
19
17
|
//
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
const MaterialRunboxCommandContext = React.createContext({});
|
|
19
|
+
const useMaterialRunboxCommandContext = () => {
|
|
22
20
|
return React.useContext(MaterialRunboxCommandContext);
|
|
23
21
|
};
|
|
24
22
|
//
|
|
25
23
|
//
|
|
26
24
|
//
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
var _React$useState3 = React.useState(null),
|
|
41
|
-
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
42
|
-
lastCommand = _React$useState4[0],
|
|
43
|
-
setLastCommand = _React$useState4[1];
|
|
25
|
+
const MaterialRunboxCommandContextProvider = ({
|
|
26
|
+
children,
|
|
27
|
+
runtime,
|
|
28
|
+
courseId
|
|
29
|
+
}) => {
|
|
30
|
+
const intl = useRawEliceIntl();
|
|
31
|
+
const {
|
|
32
|
+
enqueueSnackbar
|
|
33
|
+
} = useSnackbar();
|
|
34
|
+
const runtimeId = runtime === null || runtime === void 0 ? void 0 : runtime.id;
|
|
35
|
+
const materialRunboxApi = useMaterialRunboxApiContext();
|
|
36
|
+
const [pcmdId, setPcmdId] = React.useState(null); // Ping Command ID
|
|
37
|
+
const [lastCommand, setLastCommand] = React.useState(null);
|
|
44
38
|
//
|
|
45
39
|
// check whether running command exists or not on mount,
|
|
46
40
|
// if running command exists, set `pcmdId` to start pinging
|
|
47
41
|
//
|
|
48
|
-
React.useEffect(
|
|
42
|
+
React.useEffect(() => {
|
|
49
43
|
if (!runtimeId) {
|
|
50
44
|
return;
|
|
51
45
|
}
|
|
52
46
|
materialRunboxApi.runtime.runtimeRuntimeIdCommandGet({
|
|
53
|
-
runtimeId
|
|
47
|
+
runtimeId,
|
|
54
48
|
eliceCourseId: courseId
|
|
55
|
-
}).then(
|
|
49
|
+
}).then(res => {
|
|
56
50
|
if (res.status !== CommandStatus.Terminated) {
|
|
57
51
|
setLastCommand(res);
|
|
58
52
|
setPcmdId(res.runboxCommandId);
|
|
59
53
|
}
|
|
60
|
-
}).catch(
|
|
61
|
-
return void 0;
|
|
62
|
-
});
|
|
54
|
+
}).catch(() => void 0);
|
|
63
55
|
},
|
|
64
56
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
65
57
|
[runtimeId, courseId]);
|
|
66
58
|
//
|
|
67
59
|
// ping command
|
|
68
60
|
//
|
|
69
|
-
React.useEffect(
|
|
61
|
+
React.useEffect(() => {
|
|
70
62
|
if (!pcmdId || !runtimeId) {
|
|
71
63
|
return;
|
|
72
64
|
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}), takeWhile(function (res) {
|
|
80
|
-
return res.status !== CommandStatus.Terminated;
|
|
81
|
-
}, true)).subscribe({
|
|
82
|
-
next: function next(res) {
|
|
65
|
+
const _pingobj = {};
|
|
66
|
+
const subscription = timer(0, PING_INTERVAL).pipe(take(PING_MAX_TRY_COUNT), switchMap(() => materialRunboxApi.runtime.runtimeRuntimeIdCommandGet({
|
|
67
|
+
runtimeId,
|
|
68
|
+
eliceCourseId: courseId
|
|
69
|
+
})), takeWhile(res => res.status !== CommandStatus.Terminated, true)).subscribe({
|
|
70
|
+
next: res => {
|
|
83
71
|
_pingobj.res = res;
|
|
84
72
|
setLastCommand(res);
|
|
85
73
|
},
|
|
86
|
-
error:
|
|
74
|
+
error: () => {
|
|
87
75
|
enqueueSnackbar(intl.formatMessage({
|
|
88
76
|
id: 'runbox.context.command.ping.error'
|
|
89
77
|
}), {
|
|
90
78
|
variant: 'error'
|
|
91
79
|
});
|
|
92
80
|
},
|
|
93
|
-
complete:
|
|
81
|
+
complete: () => {
|
|
94
82
|
setPcmdId(null); // empty `pcmdId` to stop pinging
|
|
95
|
-
|
|
83
|
+
const hasError = !_pingobj.res ||
|
|
96
84
|
// max try count reached, but command is still running
|
|
97
85
|
_pingobj.res.status !== CommandStatus.Terminated;
|
|
98
86
|
if (hasError) {
|
|
@@ -105,7 +93,7 @@ var MaterialRunboxCommandContextProvider = function MaterialRunboxCommandContext
|
|
|
105
93
|
}
|
|
106
94
|
}
|
|
107
95
|
});
|
|
108
|
-
return
|
|
96
|
+
return () => {
|
|
109
97
|
subscription.unsubscribe();
|
|
110
98
|
};
|
|
111
99
|
},
|
|
@@ -114,10 +102,10 @@ var MaterialRunboxCommandContextProvider = function MaterialRunboxCommandContext
|
|
|
114
102
|
//
|
|
115
103
|
//
|
|
116
104
|
//
|
|
117
|
-
return
|
|
105
|
+
return React.createElement(MaterialRunboxCommandContext.Provider, {
|
|
118
106
|
children: children,
|
|
119
107
|
value: {
|
|
120
|
-
lastCommand
|
|
108
|
+
lastCommand,
|
|
121
109
|
isLastCommandRunning: Boolean((lastCommand === null || lastCommand === void 0 ? void 0 : lastCommand.status) === CommandStatus.Queued || (lastCommand === null || lastCommand === void 0 ? void 0 : lastCommand.status) === CommandStatus.Started),
|
|
122
110
|
setCommandIdToPing: setPcmdId
|
|
123
111
|
}
|
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import { __rest } from 'tslib';
|
|
2
|
-
import { jsx } from 'react/jsx-runtime';
|
|
3
2
|
import React from 'react';
|
|
4
3
|
|
|
5
4
|
//
|
|
6
5
|
//
|
|
7
6
|
//
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
const MaterialRunboxContext = React.createContext({});
|
|
8
|
+
const useMaterialRunboxContext = () => {
|
|
10
9
|
return React.useContext(MaterialRunboxContext);
|
|
11
10
|
};
|
|
12
11
|
//
|
|
13
12
|
//
|
|
14
13
|
//
|
|
15
|
-
|
|
16
|
-
var
|
|
14
|
+
const MaterialRunboxContextProvider = _a => {
|
|
15
|
+
var {
|
|
16
|
+
children
|
|
17
|
+
} = _a,
|
|
17
18
|
props = __rest(_a, ["children"]);
|
|
18
|
-
return
|
|
19
|
+
return React.createElement(MaterialRunboxContext.Provider, {
|
|
19
20
|
children: children,
|
|
20
21
|
value: props
|
|
21
22
|
});
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { asyncToGenerator as _asyncToGenerator, regeneratorRuntime as _regeneratorRuntime } from '../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
1
|
import { useRef, useCallback } from 'react';
|
|
3
2
|
import { useRawEliceIntl } from '@elice/intl';
|
|
4
3
|
import { useSnackbar } from '@elice/mui-x-snackbar';
|
|
@@ -13,76 +12,53 @@ import '../contexts/MaterialRunboxContext.js';
|
|
|
13
12
|
/**
|
|
14
13
|
* Hook for runbox control and status.
|
|
15
14
|
*/
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
enqueueSnackbar
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
15
|
+
const useRunboxControl = props => {
|
|
16
|
+
const _return = useRef({});
|
|
17
|
+
const intl = useRawEliceIntl();
|
|
18
|
+
const {
|
|
19
|
+
enqueueSnackbar
|
|
20
|
+
} = useSnackbar();
|
|
21
|
+
const materialRunboxApi = useMaterialRunboxApiContext();
|
|
22
|
+
const {
|
|
23
|
+
start: runboxStart,
|
|
24
|
+
stop: runboxStop
|
|
25
|
+
} = useEliceRunboxRunning();
|
|
25
26
|
/**
|
|
26
27
|
* Start project.
|
|
27
28
|
*/
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
});
|
|
42
|
-
}, force).then(function () {
|
|
43
|
-
return void props.refetch();
|
|
44
|
-
}).catch(function (err) {
|
|
45
|
-
if (err.name !== 'AbortError') {
|
|
46
|
-
enqueueSnackbar(intl.formatMessage({
|
|
47
|
-
id: 'runbox.runtime.message.startError'
|
|
48
|
-
}), {
|
|
49
|
-
variant: 'error'
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
}));
|
|
53
|
-
case 2:
|
|
54
|
-
case "end":
|
|
55
|
-
return _context.stop();
|
|
29
|
+
const start = useCallback(async (force = false) => {
|
|
30
|
+
return runboxStart(signal => materialRunboxApi.runbox.runboxRunboxIdStartPost({
|
|
31
|
+
runboxId: props.runbox.id,
|
|
32
|
+
eliceCourseId: props.courseId
|
|
33
|
+
}, {
|
|
34
|
+
signal
|
|
35
|
+
}), force).then(() => void props.refetch()).catch(err => {
|
|
36
|
+
if (err.name !== 'AbortError') {
|
|
37
|
+
enqueueSnackbar(intl.formatMessage({
|
|
38
|
+
id: 'runbox.runtime.message.startError'
|
|
39
|
+
}), {
|
|
40
|
+
variant: 'error'
|
|
41
|
+
});
|
|
56
42
|
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
43
|
+
});
|
|
44
|
+
},
|
|
59
45
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
60
46
|
[props.runbox.id, props.courseId, runboxStart]);
|
|
61
47
|
/**
|
|
62
48
|
* Stop project.
|
|
63
49
|
*/
|
|
64
|
-
|
|
65
|
-
return
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
//
|
|
77
|
-
}).catch(function (err) {
|
|
78
|
-
if (err.name !== 'AbortError') ;
|
|
79
|
-
}));
|
|
80
|
-
case 1:
|
|
81
|
-
case "end":
|
|
82
|
-
return _context2.stop();
|
|
83
|
-
}
|
|
84
|
-
}, _callee2);
|
|
85
|
-
})),
|
|
50
|
+
const stop = useCallback(async () => {
|
|
51
|
+
return runboxStop(signal => materialRunboxApi.runbox.runboxRunboxIdStopPost({
|
|
52
|
+
runboxId: props.runbox.id,
|
|
53
|
+
eliceCourseId: props.courseId
|
|
54
|
+
}, {
|
|
55
|
+
signal
|
|
56
|
+
})).then(() => {
|
|
57
|
+
//
|
|
58
|
+
}).catch(err => {
|
|
59
|
+
if (err.name !== 'AbortError') ;
|
|
60
|
+
});
|
|
61
|
+
},
|
|
86
62
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
87
63
|
[props.runbox.id, props.courseId, runboxStop]);
|
|
88
64
|
//
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { slicedToArray as _slicedToArray } from '../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
-
import { jsx } from 'react/jsx-runtime';
|
|
3
1
|
import React from 'react';
|
|
4
2
|
import { CommandType } from '@elice/openapi-client-material-runbox';
|
|
5
3
|
import { EliceRunboxView } from '@elice/runbox-client';
|
|
@@ -14,20 +12,19 @@ import RuntimeOverlayTerminated from './RuntimeOverlayTerminated.js';
|
|
|
14
12
|
//
|
|
15
13
|
//
|
|
16
14
|
//
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
isLastCommandRunning
|
|
20
|
-
lastCommand
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
setViewRefreshTrigger = _React$useState2[1];
|
|
15
|
+
const Runtime = props => {
|
|
16
|
+
const {
|
|
17
|
+
isLastCommandRunning,
|
|
18
|
+
lastCommand
|
|
19
|
+
} = useMaterialRunboxCommandContext();
|
|
20
|
+
const {
|
|
21
|
+
start: startRuntime
|
|
22
|
+
} = useRunboxControl(props);
|
|
23
|
+
const [viewRefreshTrigger, setViewRefreshTrigger] = React.useState(0);
|
|
27
24
|
//
|
|
28
25
|
//
|
|
29
26
|
//
|
|
30
|
-
React.useEffect(
|
|
27
|
+
React.useEffect(() => {
|
|
31
28
|
if (!props.runbox.id) {
|
|
32
29
|
return;
|
|
33
30
|
}
|
|
@@ -48,7 +45,7 @@ var Runtime = function Runtime(props) {
|
|
|
48
45
|
//
|
|
49
46
|
// refresh view when `ProjectFileReset` command done.
|
|
50
47
|
//
|
|
51
|
-
React.useEffect(
|
|
48
|
+
React.useEffect(() => {
|
|
52
49
|
if (isLastCommandRunning || !lastCommand) {
|
|
53
50
|
return;
|
|
54
51
|
}
|
|
@@ -64,15 +61,14 @@ var Runtime = function Runtime(props) {
|
|
|
64
61
|
//
|
|
65
62
|
//
|
|
66
63
|
//
|
|
67
|
-
return
|
|
64
|
+
return React.createElement(EliceRunboxView, {
|
|
65
|
+
key: viewRefreshTrigger,
|
|
68
66
|
OverlayAssigned: RuntimeOverlayAssigned,
|
|
69
67
|
OverlayQueued: RuntimeOverlayQueued,
|
|
70
|
-
OverlayTerminated:
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}
|
|
75
|
-
}, viewRefreshTrigger);
|
|
68
|
+
OverlayTerminated: props => React.createElement(RuntimeOverlayTerminated, Object.assign({}, props, {
|
|
69
|
+
startRuntime: startRuntime
|
|
70
|
+
}))
|
|
71
|
+
});
|
|
76
72
|
};
|
|
77
73
|
|
|
78
74
|
export { Runtime as default };
|
|
@@ -1,28 +1,26 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
1
|
+
import React from 'react';
|
|
3
2
|
import { useTimeout } from 'react-use';
|
|
4
3
|
import { IntlComponentBuilder } from '@elice/intl';
|
|
5
4
|
import { Stack, Box, Typography } from '@mui/material';
|
|
6
5
|
import messageEn from '../locales/en.json.js';
|
|
7
6
|
import messageKo from '../locales/ko.json.js';
|
|
8
|
-
import
|
|
7
|
+
import queueAnimationImage from '../../../assets/queue.gif.js';
|
|
9
8
|
|
|
10
9
|
//
|
|
11
10
|
//
|
|
12
11
|
//
|
|
13
|
-
|
|
12
|
+
const ASSIGNED_NORMAL_TIMEOUT = 30 * 1e3; // 30 sec
|
|
14
13
|
//
|
|
15
14
|
//
|
|
16
15
|
//
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
timeout = _useTimeout2[0];
|
|
16
|
+
const RuntimeOverlayAssigned = ({
|
|
17
|
+
__intl: intl
|
|
18
|
+
}) => {
|
|
19
|
+
const [timeout] = useTimeout(ASSIGNED_NORMAL_TIMEOUT);
|
|
22
20
|
//
|
|
23
21
|
//
|
|
24
22
|
//
|
|
25
|
-
return
|
|
23
|
+
return React.createElement(Stack, {
|
|
26
24
|
gap: "1.5rem",
|
|
27
25
|
sx: {
|
|
28
26
|
display: 'flex',
|
|
@@ -30,30 +28,28 @@ var RuntimeOverlayAssigned = function RuntimeOverlayAssigned(_ref) {
|
|
|
30
28
|
alignItems: 'center',
|
|
31
29
|
width: '100%',
|
|
32
30
|
height: '100%'
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
})]
|
|
56
|
-
});
|
|
31
|
+
}
|
|
32
|
+
}, React.createElement(Box, {
|
|
33
|
+
component: "img",
|
|
34
|
+
src: queueAnimationImage,
|
|
35
|
+
alt: "queue",
|
|
36
|
+
sx: {
|
|
37
|
+
width: '100%',
|
|
38
|
+
height: 'auto',
|
|
39
|
+
maxWidth: '13.375rem'
|
|
40
|
+
}
|
|
41
|
+
}), React.createElement(Typography, {
|
|
42
|
+
variant: "subtitle2",
|
|
43
|
+
color: "text:secondary",
|
|
44
|
+
sx: {
|
|
45
|
+
whiteSpace: 'pre-wrap',
|
|
46
|
+
textAlign: 'center'
|
|
47
|
+
}
|
|
48
|
+
}, timeout() ? intl.formatMessage({
|
|
49
|
+
id: 'runbox.runtime.overlay.assigned.description_timeout'
|
|
50
|
+
}) : intl.formatMessage({
|
|
51
|
+
id: 'runbox.runtime.overlay.assigned.description'
|
|
52
|
+
})));
|
|
57
53
|
};
|
|
58
54
|
var RuntimeOverlayAssigned$1 = new IntlComponentBuilder(RuntimeOverlayAssigned).add('en', messageEn).add('ko', messageKo).addAsync('th', import('../locales/th.json.js')).addAsync('ja', import('../locales/ja.json.js')).build();
|
|
59
55
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { IntlComponentBuilder } from '@elice/intl';
|
|
3
3
|
import { QuestionAnswer } from '@mui/icons-material';
|
|
4
4
|
import { Stack, Box, Typography, Button } from '@mui/material';
|
|
@@ -7,20 +7,22 @@ import '../contexts/MaterialRunboxCommandContext.js';
|
|
|
7
7
|
import { useMaterialRunboxContext } from '../contexts/MaterialRunboxContext.js';
|
|
8
8
|
import messageEn from '../locales/en.json.js';
|
|
9
9
|
import messageKo from '../locales/ko.json.js';
|
|
10
|
-
import
|
|
10
|
+
import queueAnimationImage from '../../../assets/queue.gif.js';
|
|
11
11
|
|
|
12
12
|
//
|
|
13
13
|
//
|
|
14
14
|
//
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
const RuntimeOverlayQueued = ({
|
|
16
|
+
__intl: intl,
|
|
17
|
+
numWaiters
|
|
18
|
+
}) => {
|
|
19
|
+
const {
|
|
20
|
+
showMessenger
|
|
21
|
+
} = useMaterialRunboxContext();
|
|
20
22
|
//
|
|
21
23
|
//
|
|
22
24
|
//
|
|
23
|
-
return
|
|
25
|
+
return React.createElement(Stack, {
|
|
24
26
|
gap: "1.5rem",
|
|
25
27
|
sx: {
|
|
26
28
|
display: 'flex',
|
|
@@ -28,39 +30,36 @@ var RuntimeOverlayQueued = function RuntimeOverlayQueued(_ref) {
|
|
|
28
30
|
alignItems: 'center',
|
|
29
31
|
width: '100%',
|
|
30
32
|
height: '100%'
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
})
|
|
62
|
-
}) : null]
|
|
63
|
-
});
|
|
33
|
+
}
|
|
34
|
+
}, React.createElement(Box, {
|
|
35
|
+
component: "img",
|
|
36
|
+
src: queueAnimationImage,
|
|
37
|
+
alt: "queue",
|
|
38
|
+
sx: {
|
|
39
|
+
width: '100%',
|
|
40
|
+
height: 'auto',
|
|
41
|
+
maxWidth: '13.375rem'
|
|
42
|
+
}
|
|
43
|
+
}), React.createElement(Typography, {
|
|
44
|
+
variant: "subtitle2",
|
|
45
|
+
color: "text:secondary",
|
|
46
|
+
sx: {
|
|
47
|
+
whiteSpace: 'pre-wrap',
|
|
48
|
+
textAlign: 'center'
|
|
49
|
+
}
|
|
50
|
+
}, numWaiters > 0 ? intl.formatMessage({
|
|
51
|
+
id: 'runbox.runtime.overlay.queued.description'
|
|
52
|
+
}, {
|
|
53
|
+
waiters: numWaiters
|
|
54
|
+
}) : intl.formatMessage({
|
|
55
|
+
id: 'runbox.runtime.overlay.queued.description_zero'
|
|
56
|
+
})), typeof showMessenger === 'function' ? React.createElement(Button, {
|
|
57
|
+
variant: "outlined",
|
|
58
|
+
startIcon: React.createElement(QuestionAnswer, null),
|
|
59
|
+
onClick: showMessenger
|
|
60
|
+
}, intl.formatMessage({
|
|
61
|
+
id: 'runbox.common.support'
|
|
62
|
+
})) : null);
|
|
64
63
|
};
|
|
65
64
|
var RuntimeOverlayQueued$1 = new IntlComponentBuilder(RuntimeOverlayQueued).add('en', messageEn).add('ko', messageKo).addAsync('th', import('../locales/th.json.js')).addAsync('ja', import('../locales/ja.json.js')).build();
|
|
66
65
|
|