@elice/material-runbox 1.250821.0 → 1.250828.0
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/actions/MaterialRunboxActionDisconnect.js +5 -2
- package/cjs/components/material-runbox/contexts/MaterialRunboxCommandContext.js +26 -21
- package/es/components/material-runbox/actions/MaterialRunboxActionDisconnect.js +5 -2
- package/es/components/material-runbox/contexts/MaterialRunboxCommandContext.js +26 -21
- package/package.json +4 -4
|
@@ -14,12 +14,15 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
14
14
|
|
|
15
15
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
16
16
|
|
|
17
|
+
//
|
|
18
|
+
//
|
|
19
|
+
//
|
|
17
20
|
var MaterialRunboxActionDisconnect = function MaterialRunboxActionDisconnect(_ref) {
|
|
18
21
|
var stopRuntime = _ref.stopRuntime;
|
|
19
22
|
var intl$1 = intl.useRawEliceIntl();
|
|
20
23
|
var _useEliceRunboxRunnin = runboxClient.useEliceRunboxRunning(),
|
|
21
24
|
status = _useEliceRunboxRunnin.status;
|
|
22
|
-
var
|
|
25
|
+
var isRunboxTerminated = status === 'terminated';
|
|
23
26
|
var _React$useState = React__default.default.useState(false),
|
|
24
27
|
_React$useState2 = _rollupPluginBabelHelpers.slicedToArray(_React$useState, 2),
|
|
25
28
|
isDisconnectDialogOpen = _React$useState2[0],
|
|
@@ -42,7 +45,7 @@ var MaterialRunboxActionDisconnect = function MaterialRunboxActionDisconnect(_re
|
|
|
42
45
|
*/
|
|
43
46
|
var renderActionButton = function renderActionButton() {
|
|
44
47
|
return jsxRuntime.jsx(material.Button, {
|
|
45
|
-
disabled:
|
|
48
|
+
disabled: isRunboxTerminated,
|
|
46
49
|
variant: "contained",
|
|
47
50
|
color: "inherit",
|
|
48
51
|
size: "small",
|
|
@@ -50,27 +50,32 @@ var MaterialRunboxCommandContextProvider = function MaterialRunboxCommandContext
|
|
|
50
50
|
lastCommand = _React$useState4[0],
|
|
51
51
|
setLastCommand = _React$useState4[1];
|
|
52
52
|
//
|
|
53
|
-
// check
|
|
54
|
-
//
|
|
55
|
-
//
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
//
|
|
73
|
-
|
|
53
|
+
// Do not run CMD check on mount, due to Changhyun KIM 김창현's request
|
|
54
|
+
// //
|
|
55
|
+
// // check whether running command exists or not on mount,
|
|
56
|
+
// // if running command exists, set `pcmdId` to start pinging
|
|
57
|
+
// //
|
|
58
|
+
// React.useEffect(
|
|
59
|
+
// () => {
|
|
60
|
+
// if (!runtimeId) {
|
|
61
|
+
// return;
|
|
62
|
+
// }
|
|
63
|
+
// materialRunboxApi.runtime
|
|
64
|
+
// .runtimeRuntimeIdCommandGet({
|
|
65
|
+
// runtimeId,
|
|
66
|
+
// eliceCourseId: courseId,
|
|
67
|
+
// })
|
|
68
|
+
// .then(res => {
|
|
69
|
+
// if (res.status !== CommandStatus.Terminated) {
|
|
70
|
+
// setLastCommand(res);
|
|
71
|
+
// setPcmdId(res.runboxCommandId);
|
|
72
|
+
// }
|
|
73
|
+
// })
|
|
74
|
+
// .catch(() => void 0);
|
|
75
|
+
// },
|
|
76
|
+
// // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
77
|
+
// [runtimeId, courseId]
|
|
78
|
+
// );
|
|
74
79
|
//
|
|
75
80
|
// ping command
|
|
76
81
|
//
|
|
@@ -6,12 +6,15 @@ import { useEliceRunboxRunning } from '@elice/runbox-client';
|
|
|
6
6
|
import { Button } from '@mui/material';
|
|
7
7
|
import MaterialRunboxActionDisconnectDialog from './MaterialRunboxActionDisconnectDialog.js';
|
|
8
8
|
|
|
9
|
+
//
|
|
10
|
+
//
|
|
11
|
+
//
|
|
9
12
|
var MaterialRunboxActionDisconnect = function MaterialRunboxActionDisconnect(_ref) {
|
|
10
13
|
var stopRuntime = _ref.stopRuntime;
|
|
11
14
|
var intl = useRawEliceIntl();
|
|
12
15
|
var _useEliceRunboxRunnin = useEliceRunboxRunning(),
|
|
13
16
|
status = _useEliceRunboxRunnin.status;
|
|
14
|
-
var
|
|
17
|
+
var isRunboxTerminated = status === 'terminated';
|
|
15
18
|
var _React$useState = React.useState(false),
|
|
16
19
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
17
20
|
isDisconnectDialogOpen = _React$useState2[0],
|
|
@@ -34,7 +37,7 @@ var MaterialRunboxActionDisconnect = function MaterialRunboxActionDisconnect(_re
|
|
|
34
37
|
*/
|
|
35
38
|
var renderActionButton = function renderActionButton() {
|
|
36
39
|
return jsx(Button, {
|
|
37
|
-
disabled:
|
|
40
|
+
disabled: isRunboxTerminated,
|
|
38
41
|
variant: "contained",
|
|
39
42
|
color: "inherit",
|
|
40
43
|
size: "small",
|
|
@@ -42,27 +42,32 @@ var MaterialRunboxCommandContextProvider = function MaterialRunboxCommandContext
|
|
|
42
42
|
lastCommand = _React$useState4[0],
|
|
43
43
|
setLastCommand = _React$useState4[1];
|
|
44
44
|
//
|
|
45
|
-
// check
|
|
46
|
-
//
|
|
47
|
-
//
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
//
|
|
65
|
-
|
|
45
|
+
// Do not run CMD check on mount, due to Changhyun KIM 김창현's request
|
|
46
|
+
// //
|
|
47
|
+
// // check whether running command exists or not on mount,
|
|
48
|
+
// // if running command exists, set `pcmdId` to start pinging
|
|
49
|
+
// //
|
|
50
|
+
// React.useEffect(
|
|
51
|
+
// () => {
|
|
52
|
+
// if (!runtimeId) {
|
|
53
|
+
// return;
|
|
54
|
+
// }
|
|
55
|
+
// materialRunboxApi.runtime
|
|
56
|
+
// .runtimeRuntimeIdCommandGet({
|
|
57
|
+
// runtimeId,
|
|
58
|
+
// eliceCourseId: courseId,
|
|
59
|
+
// })
|
|
60
|
+
// .then(res => {
|
|
61
|
+
// if (res.status !== CommandStatus.Terminated) {
|
|
62
|
+
// setLastCommand(res);
|
|
63
|
+
// setPcmdId(res.runboxCommandId);
|
|
64
|
+
// }
|
|
65
|
+
// })
|
|
66
|
+
// .catch(() => void 0);
|
|
67
|
+
// },
|
|
68
|
+
// // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
69
|
+
// [runtimeId, courseId]
|
|
70
|
+
// );
|
|
66
71
|
//
|
|
67
72
|
// ping command
|
|
68
73
|
//
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elice/material-runbox",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.250828.0",
|
|
4
4
|
"description": "User view and editing components of Elice material runbox",
|
|
5
5
|
"repository": "https://git.elicer.io/elice/frontend/library/elice-material",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -55,12 +55,12 @@
|
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@elice/api-client": "^1.250702.0",
|
|
57
57
|
"@elice/intl": "0.241127.0",
|
|
58
|
-
"@elice/material-shared-types": "1.
|
|
59
|
-
"@elice/material-shared-utils": "1.
|
|
58
|
+
"@elice/material-shared-types": "1.250828.0",
|
|
59
|
+
"@elice/material-shared-utils": "1.250828.0",
|
|
60
60
|
"@elice/mui-elements": "^5.250108.0-controllabel.0",
|
|
61
61
|
"@elice/mui-system": "^5.250108.0-controllabel.0",
|
|
62
62
|
"@elice/mui-x-snackbar": "^5.250108.0-controllabel.0",
|
|
63
|
-
"@elice/runbox-client": "^1.
|
|
63
|
+
"@elice/runbox-client": "^1.250828.0",
|
|
64
64
|
"@elice/openapi-client-material-runbox": "1.250821.0",
|
|
65
65
|
"@elice/types": "^1.250612.0-teamleaderboard.1",
|
|
66
66
|
"@emotion/react": "^11.10.5",
|