@elice/material-runbox 1.231227.0 → 1.231228.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/assets/queue.gif.js +1 -1
- package/cjs/assets/runbox_logo.png.js +1 -1
- package/cjs/assets/terminated.png.js +1 -1
- package/cjs/components/material-runbox/MaterialRunbox.js +17 -19
- package/cjs/components/material-runbox/MaterialRunboxBody.js +15 -12
- package/cjs/components/material-runbox/MaterialRunboxContent.js +94 -101
- package/cjs/components/material-runbox/MaterialRunboxFooter.js +17 -22
- package/cjs/components/material-runbox/MaterialRunboxHeader.d.ts +3 -0
- package/cjs/components/material-runbox/MaterialRunboxHeader.js +77 -81
- package/cjs/components/material-runbox/actions/MaterialRunboxActionAutoShutdown.js +26 -22
- package/cjs/components/material-runbox/actions/MaterialRunboxActionGrade.js +140 -180
- package/cjs/components/material-runbox/actions/MaterialRunboxActionMenu.d.ts +8 -0
- package/cjs/components/material-runbox/actions/MaterialRunboxActionMenu.js +65 -0
- package/cjs/components/material-runbox/actions/MaterialRunboxActionReset.d.ts +3 -1
- package/cjs/components/material-runbox/actions/MaterialRunboxActionReset.js +73 -110
- package/cjs/components/material-runbox/actions/MaterialRunboxActionRestart.d.ts +3 -1
- package/cjs/components/material-runbox/actions/MaterialRunboxActionRestart.js +54 -70
- package/cjs/components/material-runbox/actions/MaterialRunboxActionShare.d.ts +4 -1
- package/cjs/components/material-runbox/actions/MaterialRunboxActionShare.js +67 -41
- package/cjs/components/material-runbox/contexts/MaterialRunboxApiContext.js +16 -27
- package/cjs/components/material-runbox/contexts/MaterialRunboxCommandContext.js +38 -53
- package/cjs/components/material-runbox/contexts/MaterialRunboxContext.js +9 -11
- package/cjs/components/material-runbox/hooks/useRunboxControl.js +39 -65
- package/cjs/components/material-runbox/locales/en.json.js +2 -2
- package/cjs/components/material-runbox/locales/index.js +2 -4
- package/cjs/components/material-runbox/locales/ko.json.js +2 -2
- package/cjs/components/material-runbox/runtime/Runtime.js +18 -26
- package/cjs/components/material-runbox/runtime/RuntimeOverlayAssigned.js +10 -17
- package/cjs/components/material-runbox/runtime/RuntimeOverlayQueued.js +16 -18
- package/cjs/components/material-runbox/runtime/RuntimeOverlayTerminated.js +27 -33
- package/cjs/index.js +1 -3
- package/es/components/material-runbox/MaterialRunbox.js +11 -9
- package/es/components/material-runbox/MaterialRunboxBody.js +13 -5
- package/es/components/material-runbox/MaterialRunboxContent.js +80 -82
- package/es/components/material-runbox/MaterialRunboxFooter.js +11 -11
- package/es/components/material-runbox/MaterialRunboxHeader.d.ts +3 -0
- package/es/components/material-runbox/MaterialRunboxHeader.js +72 -71
- package/es/components/material-runbox/actions/MaterialRunboxActionAutoShutdown.js +22 -13
- package/es/components/material-runbox/actions/MaterialRunboxActionGrade.js +120 -155
- package/es/components/material-runbox/actions/MaterialRunboxActionMenu.d.ts +8 -0
- package/es/components/material-runbox/actions/MaterialRunboxActionMenu.js +61 -0
- package/es/components/material-runbox/actions/MaterialRunboxActionReset.d.ts +3 -1
- package/es/components/material-runbox/actions/MaterialRunboxActionReset.js +65 -98
- package/es/components/material-runbox/actions/MaterialRunboxActionRestart.d.ts +3 -1
- package/es/components/material-runbox/actions/MaterialRunboxActionRestart.js +47 -59
- package/es/components/material-runbox/actions/MaterialRunboxActionShare.d.ts +4 -1
- package/es/components/material-runbox/actions/MaterialRunboxActionShare.js +68 -38
- package/es/components/material-runbox/contexts/MaterialRunboxApiContext.js +13 -20
- package/es/components/material-runbox/contexts/MaterialRunboxCommandContext.js +35 -46
- package/es/components/material-runbox/contexts/MaterialRunboxContext.js +6 -4
- package/es/components/material-runbox/hooks/useRunboxControl.js +39 -63
- package/es/components/material-runbox/locales/en.json.js +1 -1
- package/es/components/material-runbox/locales/ko.json.js +1 -1
- package/es/components/material-runbox/runtime/Runtime.js +14 -18
- package/es/components/material-runbox/runtime/RuntimeOverlayAssigned.js +3 -6
- package/es/components/material-runbox/runtime/RuntimeOverlayQueued.js +6 -4
- package/es/components/material-runbox/runtime/RuntimeOverlayTerminated.js +12 -14
- package/package.json +13 -9
- package/cjs/_virtual/_rollupPluginBabelHelpers.js +0 -399
- package/es/_virtual/_rollupPluginBabelHelpers.js +0 -387
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var _rollupPluginBabelHelpers = require('../../../_virtual/_rollupPluginBabelHelpers.js');
|
|
6
5
|
var React = require('react');
|
|
7
6
|
var reactIntl = require('react-intl');
|
|
8
7
|
var iconsMaterial = require('@mui/icons-material');
|
|
@@ -13,36 +12,31 @@ require('../contexts/MaterialRunboxCommandContext.js');
|
|
|
13
12
|
var MaterialRunboxContext = require('../contexts/MaterialRunboxContext.js');
|
|
14
13
|
var terminated = require('../../../assets/terminated.png.js');
|
|
15
14
|
|
|
16
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
17
|
-
|
|
18
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
19
|
-
|
|
20
15
|
//
|
|
21
16
|
//
|
|
22
17
|
//
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
setRestarting = _React$useState2[1];
|
|
18
|
+
const RuntimeOverlayTerminated = ({
|
|
19
|
+
reason,
|
|
20
|
+
startRuntime
|
|
21
|
+
}) => {
|
|
22
|
+
const intl = reactIntl.useIntl();
|
|
23
|
+
const {
|
|
24
|
+
showMessenger
|
|
25
|
+
} = MaterialRunboxContext.useMaterialRunboxContext();
|
|
26
|
+
const [isRestarting, setRestarting] = React.useState(false);
|
|
33
27
|
/**
|
|
34
28
|
* Restart the project.
|
|
35
29
|
*/
|
|
36
|
-
|
|
30
|
+
const handleRestart = () => {
|
|
37
31
|
setRestarting(true);
|
|
38
|
-
startRuntime().finally(
|
|
32
|
+
startRuntime().finally(() => {
|
|
39
33
|
setRestarting(false);
|
|
40
34
|
});
|
|
41
35
|
};
|
|
42
36
|
/**
|
|
43
37
|
* Terminated description and action.
|
|
44
38
|
*/
|
|
45
|
-
|
|
39
|
+
const runtimeTerminatedAction = React.useMemo(() => {
|
|
46
40
|
switch (reason) {
|
|
47
41
|
// general shutdown
|
|
48
42
|
case 'stopped_by_user':
|
|
@@ -90,7 +84,7 @@ var RuntimeOverlayTerminated = function RuntimeOverlayTerminated(_ref) {
|
|
|
90
84
|
//
|
|
91
85
|
//
|
|
92
86
|
//
|
|
93
|
-
return
|
|
87
|
+
return React.createElement(material.Box, {
|
|
94
88
|
sx: {
|
|
95
89
|
display: 'flex',
|
|
96
90
|
justifyContent: 'center',
|
|
@@ -98,49 +92,49 @@ var RuntimeOverlayTerminated = function RuntimeOverlayTerminated(_ref) {
|
|
|
98
92
|
width: '100%',
|
|
99
93
|
height: '100%'
|
|
100
94
|
}
|
|
101
|
-
},
|
|
95
|
+
}, React.createElement(material.Stack, {
|
|
102
96
|
gap: "1.5rem",
|
|
103
97
|
alignItems: "center"
|
|
104
|
-
},
|
|
98
|
+
}, React.createElement(material.Box, {
|
|
105
99
|
component: "img",
|
|
106
|
-
src: terminated
|
|
100
|
+
src: terminated.default,
|
|
107
101
|
alt: "terminated",
|
|
108
102
|
sx: {
|
|
109
103
|
maxWidth: '10rem',
|
|
110
104
|
height: 'auto'
|
|
111
105
|
}
|
|
112
|
-
}),
|
|
106
|
+
}), React.createElement(material.Stack, {
|
|
113
107
|
gap: "0.5rem"
|
|
114
|
-
},
|
|
108
|
+
}, React.createElement(material.Typography, {
|
|
115
109
|
variant: "h6",
|
|
116
110
|
textAlign: "center"
|
|
117
|
-
},
|
|
111
|
+
}, React.createElement(reactIntl.FormattedMessage, {
|
|
118
112
|
id: "runbox.runtime.overlay.terminated.title"
|
|
119
|
-
})),
|
|
113
|
+
})), React.createElement(material.Typography, {
|
|
120
114
|
variant: "body2",
|
|
121
115
|
textAlign: "center",
|
|
122
116
|
whiteSpace: "pre-line"
|
|
123
117
|
}, runtimeTerminatedAction.unexpected ? runtimeTerminatedAction.description.concat('\n', intl.formatMessage({
|
|
124
118
|
id: 'runbox.runtime.overlay.terminated.description.unexpected'
|
|
125
|
-
})) : runtimeTerminatedAction.description)),
|
|
119
|
+
})) : runtimeTerminatedAction.description)), React.createElement(material.Stack, {
|
|
126
120
|
gap: "0.5rem",
|
|
127
121
|
sx: {
|
|
128
122
|
width: '100%',
|
|
129
123
|
maxWidth: '17rem'
|
|
130
124
|
}
|
|
131
|
-
},
|
|
125
|
+
}, React.createElement(lab.LoadingButton, {
|
|
132
126
|
variant: "contained",
|
|
133
127
|
loading: isRestarting,
|
|
134
|
-
startIcon:
|
|
128
|
+
startIcon: React.createElement(iconsMaterial.PlayArrow, null),
|
|
135
129
|
onClick: handleRestart
|
|
136
|
-
},
|
|
130
|
+
}, React.createElement(reactIntl.FormattedMessage, {
|
|
137
131
|
id: "runbox.runtime.overlay.terminated.restart"
|
|
138
|
-
})), runtimeTerminatedAction.unexpected && typeof showMessenger === 'function' ?
|
|
132
|
+
})), runtimeTerminatedAction.unexpected && typeof showMessenger === 'function' ? React.createElement(material.Button, {
|
|
139
133
|
variant: "text",
|
|
140
134
|
onClick: showMessenger
|
|
141
|
-
},
|
|
135
|
+
}, React.createElement(reactIntl.FormattedMessage, {
|
|
142
136
|
id: "runbox.common.support"
|
|
143
137
|
})) : null)));
|
|
144
138
|
};
|
|
145
139
|
|
|
146
|
-
exports
|
|
140
|
+
exports.default = RuntimeOverlayTerminated;
|
package/cjs/index.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var MaterialRunbox = require('./components/material-runbox/MaterialRunbox.js');
|
|
6
4
|
|
|
7
5
|
|
|
8
6
|
|
|
9
|
-
exports.MaterialRunbox = MaterialRunbox
|
|
7
|
+
exports.MaterialRunbox = MaterialRunbox.default;
|
|
@@ -11,15 +11,17 @@ import en from './locales/en.json.js';
|
|
|
11
11
|
//
|
|
12
12
|
//
|
|
13
13
|
//
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
14
|
+
const MaterialRunbox = _a => {
|
|
15
|
+
//
|
|
16
|
+
//
|
|
17
|
+
//
|
|
18
|
+
var {
|
|
19
|
+
enableAutoShutdownToggle = false,
|
|
20
|
+
enableUrlShare = false,
|
|
21
|
+
locale = 'ko',
|
|
22
|
+
showMessenger,
|
|
23
|
+
eliceMaterialRunboxApiConfiguration
|
|
24
|
+
} = _a,
|
|
23
25
|
contentProps = __rest(_a, ["enableAutoShutdownToggle", "enableUrlShare", "locale", "showMessenger", "eliceMaterialRunboxApiConfiguration"]);
|
|
24
26
|
return React.createElement(MaterialRunboxContextProvider, {
|
|
25
27
|
enableAutoShutdownToggle: enableAutoShutdownToggle,
|
|
@@ -1,17 +1,25 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _styled from '@emotion/styled/base';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import styled from '@emotion/styled';
|
|
4
3
|
import Runtime from './runtime/Runtime.js';
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
7
6
|
//
|
|
8
7
|
//
|
|
9
8
|
//
|
|
10
|
-
|
|
9
|
+
const StyledRunboxBody = /*#__PURE__*/_styled("div", {
|
|
10
|
+
target: "e9bwldp0"
|
|
11
|
+
})("production" === "production" ? {
|
|
12
|
+
name: "277wu0",
|
|
13
|
+
styles: "flex:1;width:100%"
|
|
14
|
+
} : {
|
|
15
|
+
name: "277wu0",
|
|
16
|
+
styles: "flex:1;width:100%",
|
|
17
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
18
|
+
});
|
|
11
19
|
//
|
|
12
20
|
//
|
|
13
21
|
//
|
|
14
|
-
|
|
22
|
+
const MaterialRunboxBody = props => {
|
|
15
23
|
return React.createElement(StyledRunboxBody, null, React.createElement(Runtime, Object.assign({}, props)));
|
|
16
24
|
};
|
|
17
25
|
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _styled from '@emotion/styled/base';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { FormattedMessage } from 'react-intl';
|
|
4
4
|
import { Spinner } from '@elice/blocks';
|
|
5
5
|
import { EliceRunboxProvider } from '@elice/runbox-client';
|
|
6
|
-
import styled from '@emotion/styled';
|
|
7
6
|
import { Refresh } from '@mui/icons-material';
|
|
8
7
|
import { Stack, Typography, Button } from '@mui/material';
|
|
9
8
|
import { useQuery } from '@tanstack/react-query';
|
|
@@ -14,77 +13,81 @@ import MaterialRunboxBody from './MaterialRunboxBody.js';
|
|
|
14
13
|
import MaterialRunboxFooter from './MaterialRunboxFooter.js';
|
|
15
14
|
import MaterialRunboxHeader from './MaterialRunboxHeader.js';
|
|
16
15
|
|
|
17
|
-
|
|
16
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
18
17
|
//
|
|
19
18
|
//
|
|
20
19
|
//
|
|
21
|
-
|
|
20
|
+
const DEFAULT_DATA = [null, null, null];
|
|
22
21
|
//
|
|
23
22
|
//
|
|
24
23
|
//
|
|
25
|
-
|
|
24
|
+
const StyledRunboxContainer = /*#__PURE__*/_styled("div", {
|
|
25
|
+
target: "eeh98mq0"
|
|
26
|
+
})("production" === "production" ? {
|
|
27
|
+
name: "t5t5sq",
|
|
28
|
+
styles: "display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;height:100%"
|
|
29
|
+
} : {
|
|
30
|
+
name: "t5t5sq",
|
|
31
|
+
styles: "display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;height:100%",
|
|
32
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
33
|
+
});
|
|
26
34
|
//
|
|
27
35
|
//
|
|
28
36
|
//
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
37
|
+
const MaterialRunboxContent = ({
|
|
38
|
+
runboxId,
|
|
39
|
+
courseId
|
|
40
|
+
}) => {
|
|
41
|
+
const {
|
|
42
|
+
locale,
|
|
43
|
+
showMessenger
|
|
44
|
+
} = useMaterialRunboxContext();
|
|
45
|
+
const materialRunboxApi = useMaterialRunboxApiContext();
|
|
36
46
|
//
|
|
37
47
|
//
|
|
38
48
|
//
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
eliceCourseId: courseId
|
|
70
|
-
}, {
|
|
71
|
-
signal: signal
|
|
72
|
-
})]);
|
|
73
|
-
});
|
|
74
|
-
},
|
|
75
|
-
cacheTime: 0,
|
|
76
|
-
keepPreviousData: true,
|
|
77
|
-
refetchOnWindowFocus: false
|
|
49
|
+
const {
|
|
50
|
+
data: [runbox, runtime, runtimeTemplate] = DEFAULT_DATA,
|
|
51
|
+
isInitialLoading,
|
|
52
|
+
isError,
|
|
53
|
+
refetch
|
|
54
|
+
} = useQuery({
|
|
55
|
+
enabled: Boolean(runboxId),
|
|
56
|
+
queryKey: ['eliceMaterialRunboxRunboxApi.runboxRunboxIdGet', 'eliceMaterialRunboxRuntimeTemplateApi.runtimeTemplateRuntimeTemplateIdGet', runboxId, courseId],
|
|
57
|
+
queryFn: ({
|
|
58
|
+
signal
|
|
59
|
+
}) => materialRunboxApi.runbox.runboxRunboxIdGet({
|
|
60
|
+
runboxId: runboxId,
|
|
61
|
+
eliceCourseId: courseId
|
|
62
|
+
}, {
|
|
63
|
+
signal
|
|
64
|
+
}).then(runbox => Promise.all([
|
|
65
|
+
// runbox
|
|
66
|
+
runbox,
|
|
67
|
+
// runtime
|
|
68
|
+
materialRunboxApi.runtime.runtimeGet({
|
|
69
|
+
filterImageId: runbox.imageId,
|
|
70
|
+
filterRuntimeTemplateId: runbox.runtimeTemplateId,
|
|
71
|
+
skip: 0,
|
|
72
|
+
count: 1,
|
|
73
|
+
eliceCourseId: courseId
|
|
74
|
+
}, {
|
|
75
|
+
signal
|
|
76
|
+
}).then(runtimes => {
|
|
77
|
+
var _a;
|
|
78
|
+
return (_a = runtimes[0]) !== null && _a !== void 0 ? _a : null;
|
|
78
79
|
}),
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
80
|
+
// runtimeTemplate
|
|
81
|
+
materialRunboxApi.runtimeTemplate.runtimeTemplateRuntimeTemplateIdGet({
|
|
82
|
+
runtimeTemplateId: runbox.runtimeTemplateId,
|
|
83
|
+
eliceCourseId: courseId
|
|
84
|
+
}, {
|
|
85
|
+
signal
|
|
86
|
+
})])),
|
|
87
|
+
cacheTime: 0,
|
|
88
|
+
keepPreviousData: true,
|
|
89
|
+
refetchOnWindowFocus: false
|
|
90
|
+
});
|
|
88
91
|
//
|
|
89
92
|
//
|
|
90
93
|
//
|
|
@@ -102,16 +105,12 @@ var MaterialRunboxContent = function MaterialRunboxContent(_ref) {
|
|
|
102
105
|
gap: "0.5rem"
|
|
103
106
|
}, React.createElement(Button, {
|
|
104
107
|
startIcon: React.createElement(Refresh, null),
|
|
105
|
-
onClick:
|
|
106
|
-
return refetch();
|
|
107
|
-
}
|
|
108
|
+
onClick: () => refetch()
|
|
108
109
|
}, React.createElement(FormattedMessage, {
|
|
109
110
|
id: "runbox.common.retry"
|
|
110
111
|
})), typeof showMessenger === 'function' ? React.createElement(Button, {
|
|
111
112
|
variant: "outlined",
|
|
112
|
-
onClick:
|
|
113
|
-
return showMessenger();
|
|
114
|
-
}
|
|
113
|
+
onClick: () => showMessenger()
|
|
115
114
|
}, React.createElement(FormattedMessage, {
|
|
116
115
|
id: "runbox.common.support"
|
|
117
116
|
})) : null)));
|
|
@@ -119,28 +118,27 @@ var MaterialRunboxContent = function MaterialRunboxContent(_ref) {
|
|
|
119
118
|
if (!runbox || !runtimeTemplate) {
|
|
120
119
|
return null;
|
|
121
120
|
}
|
|
122
|
-
|
|
123
|
-
runbox
|
|
124
|
-
runtime
|
|
125
|
-
runtimeTemplate
|
|
126
|
-
courseId
|
|
127
|
-
refetch
|
|
121
|
+
const props = {
|
|
122
|
+
runbox,
|
|
123
|
+
runtime,
|
|
124
|
+
runtimeTemplate,
|
|
125
|
+
courseId,
|
|
126
|
+
refetch
|
|
128
127
|
};
|
|
129
128
|
return React.createElement(MaterialRunboxCommandContextProvider, {
|
|
130
129
|
runtime: runtime,
|
|
131
130
|
courseId: courseId
|
|
132
131
|
}, React.createElement(EliceRunboxProvider, {
|
|
133
132
|
runboxId: runbox.id,
|
|
134
|
-
runboxApiHeartbeat:
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
},
|
|
133
|
+
runboxApiHeartbeat: ({
|
|
134
|
+
id,
|
|
135
|
+
signal
|
|
136
|
+
}) => materialRunboxApi.runbox.runboxRunboxIdHeartbeatPost({
|
|
137
|
+
runboxId: id,
|
|
138
|
+
eliceCourseId: courseId
|
|
139
|
+
}, {
|
|
140
|
+
signal
|
|
141
|
+
}),
|
|
144
142
|
locale: locale,
|
|
145
143
|
onRunboxRefetchRequest: refetch
|
|
146
144
|
}, React.createElement(StyledRunboxContainer, null, React.createElement(MaterialRunboxHeader, Object.assign({}, props)), React.createElement(MaterialRunboxBody, Object.assign({}, props)), React.createElement(MaterialRunboxFooter, Object.assign({}, props)))));
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _styled from '@emotion/styled/base';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { EliceRunboxResourceStat, EliceRunboxRemainingTimer, EliceRunboxNetworkStat, EliceRunboxRunningStatus } from '@elice/runbox-client';
|
|
4
|
-
import styled from '@emotion/styled';
|
|
5
4
|
import { Box, Stack, Divider } from '@mui/material';
|
|
6
5
|
|
|
7
|
-
var _templateObject;
|
|
8
6
|
//
|
|
9
7
|
//
|
|
10
8
|
//
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
const StyledFooter = /*#__PURE__*/_styled("div", {
|
|
10
|
+
target: "e9lbhtr0"
|
|
11
|
+
})("position:relative;flex:0 0 2rem;display:flex;justify-content:space-between;align-items:center;padding:0 1rem;width:100%;border-top:1px solid ", ({
|
|
12
|
+
theme
|
|
13
|
+
}) => theme.palette.divider, ";");
|
|
15
14
|
//
|
|
16
15
|
//
|
|
17
16
|
//
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
const MaterialRunboxFooter = ({
|
|
18
|
+
runtimeTemplate
|
|
19
|
+
}) => {
|
|
20
20
|
/**
|
|
21
21
|
* Resource stats
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
const renderFooterResourceStats = () => {
|
|
24
24
|
var _a, _b;
|
|
25
25
|
return React.createElement(Box, null, React.createElement(EliceRunboxResourceStat, {
|
|
26
26
|
gpu: ((_b = (_a = runtimeTemplate.gpus) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) > 0
|
|
@@ -29,7 +29,7 @@ var MaterialRunboxFooter = function MaterialRunboxFooter(_ref2) {
|
|
|
29
29
|
/**
|
|
30
30
|
* Status
|
|
31
31
|
*/
|
|
32
|
-
|
|
32
|
+
const renderFooterStatus = () => {
|
|
33
33
|
return React.createElement(Stack, {
|
|
34
34
|
direction: "row",
|
|
35
35
|
gap: "0.5rem",
|