@abtnode/ux 1.16.13-beta-0656f92f → 1.16.13-beta-2eb54cbc
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/lib/{monitor → analytics}/card.js +8 -11
- package/lib/{monitor/cpu.js → analytics/chart.js} +43 -44
- package/lib/analytics/cpu.js +44 -0
- package/lib/analytics/memory.js +80 -0
- package/lib/{blocklet/monitor.js → analytics/runtime.js} +20 -22
- package/lib/analytics/traffic.js +269 -0
- package/lib/blocklet/component/index.js +4 -3
- package/lib/blocklet/overview.js +3 -2
- package/lib/blocklet/runtime-info.js +4 -6
- package/lib/blocklet/storage/backups.js +18 -30
- package/lib/blocklet/storage/connected.js +8 -0
- package/lib/blocklet/storage/disconnect.js +29 -15
- package/lib/blocklet/transfer-owner.js +2 -4
- package/lib/certificate.js +4 -3
- package/lib/hooks/blocklet.js +25 -8
- package/lib/invitation/invitation-receive.js +1 -1
- package/lib/locales/en.js +21 -3
- package/lib/locales/zh.js +21 -3
- package/lib/logs/download.js +1 -1
- package/lib/relative-time.js +2 -2
- package/lib/subscription.js +1 -1
- package/lib/team/members/invite-member.js +3 -2
- package/lib/team/members/member.js +4 -3
- package/lib/team/members/passport-issuances.js +3 -2
- package/lib/team/members/transfer-node.js +2 -4
- package/lib/util/index.js +12 -40
- package/package.json +16 -15
- package/lib/monitor/memory.js +0 -144
- /package/lib/{monitor → analytics}/disk.js +0 -0
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default =
|
|
6
|
+
exports.default = InsightCard;
|
|
7
7
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
8
8
|
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
9
9
|
var _Card = _interopRequireDefault(require("@mui/material/Card"));
|
|
@@ -19,14 +19,13 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
19
19
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
20
20
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
21
21
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
22
|
-
function
|
|
22
|
+
function InsightCard(_ref) {
|
|
23
23
|
let {
|
|
24
24
|
style,
|
|
25
25
|
title,
|
|
26
26
|
value,
|
|
27
27
|
graph,
|
|
28
|
-
description
|
|
29
|
-
hideDescription
|
|
28
|
+
description
|
|
30
29
|
} = _ref;
|
|
31
30
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledCard, {
|
|
32
31
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CardContent.default, {
|
|
@@ -42,7 +41,7 @@ function MonitCard(_ref) {
|
|
|
42
41
|
component: "div",
|
|
43
42
|
mt: 1,
|
|
44
43
|
children: value
|
|
45
|
-
}), graph,
|
|
44
|
+
}), graph, !!description && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
|
|
46
45
|
display: "flex",
|
|
47
46
|
sx: {
|
|
48
47
|
fontSize: 12,
|
|
@@ -54,20 +53,18 @@ function MonitCard(_ref) {
|
|
|
54
53
|
})
|
|
55
54
|
});
|
|
56
55
|
}
|
|
57
|
-
|
|
56
|
+
InsightCard.propTypes = {
|
|
58
57
|
style: _propTypes.default.object,
|
|
59
58
|
title: _propTypes.default.node,
|
|
60
59
|
value: _propTypes.default.node,
|
|
61
60
|
graph: _propTypes.default.node,
|
|
62
|
-
description: _propTypes.default.
|
|
63
|
-
hideDescription: _propTypes.default.bool
|
|
61
|
+
description: _propTypes.default.any
|
|
64
62
|
};
|
|
65
|
-
|
|
63
|
+
InsightCard.defaultProps = {
|
|
66
64
|
style: {},
|
|
67
65
|
title: null,
|
|
68
66
|
value: null,
|
|
69
67
|
graph: null,
|
|
70
|
-
description: null
|
|
71
|
-
hideDescription: false
|
|
68
|
+
description: null
|
|
72
69
|
};
|
|
73
70
|
const StyledCard = (0, _styled.default)(_Card.default)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .card-content {\n height: 150px;\n }\n\n .card-sparkline {\n flex: 2;\n display: flex;\n position: relative;\n *[hidden] {\n display: none;\n }\n }\n .sparkline {\n stroke: ", ";\n fill: ", "1A;\n }\n .tooltip {\n position: absolute;\n background: rgba(0, 0, 0, 0.7);\n color: #fff;\n padding: 2px 5px;\n font-size: 12px;\n white-space: nowrap;\n z-index: 9999;\n }\n .sparkline--cursor {\n stroke: orange;\n }\n\n .sparkline--spot {\n fill: red;\n stroke: red;\n }\n"])), props => props.theme.palette.primary.main, props => props.theme.palette.primary.main);
|
|
@@ -3,32 +3,31 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default =
|
|
7
|
-
var _react = require("react");
|
|
6
|
+
exports.default = InsightChart;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
9
|
var _ahooks = require("ahooks");
|
|
10
|
-
var _context = require("@arcblock/ux/lib/Locale/context");
|
|
11
10
|
var _Sparkline = _interopRequireDefault(require("@arcblock/ux/lib/Sparkline"));
|
|
12
11
|
var _card = _interopRequireDefault(require("./card"));
|
|
13
|
-
var _util = require("../util");
|
|
14
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
15
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
16
16
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
17
17
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
18
18
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
19
19
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
20
20
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
21
|
-
|
|
22
|
-
function CpuMonitor(_ref) {
|
|
21
|
+
function InsightChart(_ref) {
|
|
23
22
|
let {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
id,
|
|
24
|
+
title,
|
|
25
|
+
current,
|
|
26
|
+
description,
|
|
27
|
+
data,
|
|
28
|
+
dateFn,
|
|
29
|
+
valueFn
|
|
28
30
|
} = _ref;
|
|
29
|
-
const {
|
|
30
|
-
t
|
|
31
|
-
} = (0, _react.useContext)(_context.LocaleContext);
|
|
32
31
|
const svgRef = (0, _react.useRef)(null);
|
|
33
32
|
const tooltipRef = (0, _react.useRef)(null);
|
|
34
33
|
const tooltipState = (0, _ahooks.useReactive)({
|
|
@@ -39,15 +38,17 @@ function CpuMonitor(_ref) {
|
|
|
39
38
|
hidden: true,
|
|
40
39
|
textContent: ''
|
|
41
40
|
});
|
|
42
|
-
const [
|
|
43
|
-
const size = (0, _ahooks.useSize)(
|
|
41
|
+
const [container, setContainer] = (0, _react.useState)(null);
|
|
42
|
+
const size = (0, _ahooks.useSize)(container);
|
|
44
43
|
const sparklineOptions = {
|
|
45
|
-
onmousemove(
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
tooltipState.
|
|
44
|
+
onmousemove(e, dataPoint) {
|
|
45
|
+
const {
|
|
46
|
+
date,
|
|
47
|
+
value
|
|
48
|
+
} = dataPoint;
|
|
49
|
+
tooltipState.textContent = "".concat(dateFn(date), ": ").concat(valueFn(value));
|
|
50
|
+
tooltipState.style.top = -30;
|
|
51
|
+
tooltipState.style.left = 80;
|
|
51
52
|
tooltipState.hidden = false;
|
|
52
53
|
},
|
|
53
54
|
onmouseout() {
|
|
@@ -55,32 +56,28 @@ function CpuMonitor(_ref) {
|
|
|
55
56
|
}
|
|
56
57
|
};
|
|
57
58
|
(0, _react.useEffect)(() => {
|
|
58
|
-
// if (!loading) {
|
|
59
|
-
// // see: https://github.com/alibaba/hooks/issues/838
|
|
60
|
-
// }
|
|
61
59
|
setTimeout(() => {
|
|
62
|
-
|
|
60
|
+
setContainer(document.querySelector(".".concat(id)));
|
|
63
61
|
setTimeout(() => {
|
|
64
62
|
if (svgRef.current) {
|
|
65
|
-
|
|
66
|
-
(0, _Sparkline.default)(svgRef.current, history || [], sparklineOptions);
|
|
63
|
+
(0, _Sparkline.default)(svgRef.current, data || [], sparklineOptions);
|
|
67
64
|
}
|
|
68
65
|
}, 400);
|
|
69
66
|
});
|
|
70
|
-
}, [
|
|
67
|
+
}, [data]); // eslint-disable-line react-hooks/exhaustive-deps
|
|
71
68
|
|
|
72
69
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_card.default, {
|
|
73
|
-
title:
|
|
74
|
-
value:
|
|
70
|
+
title: title,
|
|
71
|
+
value: current,
|
|
75
72
|
graph: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
76
|
-
className: "card-sparkline
|
|
73
|
+
className: "card-sparkline ".concat(id),
|
|
77
74
|
style: {
|
|
78
75
|
marginTop: 16
|
|
79
76
|
},
|
|
80
77
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("svg", {
|
|
81
78
|
ref: svgRef,
|
|
82
79
|
className: "sparkline",
|
|
83
|
-
width: size.width || 100,
|
|
80
|
+
width: (size === null || size === void 0 ? void 0 : size.width) || 100,
|
|
84
81
|
height: 30,
|
|
85
82
|
strokeWidth: "2"
|
|
86
83
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
@@ -91,19 +88,21 @@ function CpuMonitor(_ref) {
|
|
|
91
88
|
children: tooltipState.textContent
|
|
92
89
|
})]
|
|
93
90
|
}),
|
|
94
|
-
description:
|
|
95
|
-
hideDescription: hideDescription
|
|
91
|
+
description: description
|
|
96
92
|
});
|
|
97
93
|
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
94
|
+
InsightChart.propTypes = {
|
|
95
|
+
id: _propTypes.default.string.isRequired,
|
|
96
|
+
title: _propTypes.default.string.isRequired,
|
|
97
|
+
current: _propTypes.default.any.isRequired,
|
|
98
|
+
description: _propTypes.default.any,
|
|
99
|
+
data: _propTypes.default.array,
|
|
100
|
+
dateFn: _propTypes.default.func,
|
|
101
|
+
valueFn: _propTypes.default.func
|
|
103
102
|
};
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
103
|
+
InsightChart.defaultProps = {
|
|
104
|
+
description: null,
|
|
105
|
+
data: [],
|
|
106
|
+
dateFn: x => x,
|
|
107
|
+
valueFn: x => x
|
|
109
108
|
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = CpuMonitor;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
var _context = require("@arcblock/ux/lib/Locale/context");
|
|
10
|
+
var _chart = _interopRequireDefault(require("./chart"));
|
|
11
|
+
var _util = require("../util");
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
+
const formatNumber = x => "".concat(x, "%");
|
|
15
|
+
function CpuMonitor(_ref) {
|
|
16
|
+
let {
|
|
17
|
+
cpus,
|
|
18
|
+
currentLoad,
|
|
19
|
+
history
|
|
20
|
+
} = _ref;
|
|
21
|
+
const {
|
|
22
|
+
t,
|
|
23
|
+
locale
|
|
24
|
+
} = (0, _react.useContext)(_context.LocaleContext);
|
|
25
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_chart.default, {
|
|
26
|
+
id: "cpu-sparkline",
|
|
27
|
+
title: t('common.cpu'),
|
|
28
|
+
current: "".concat(Math.floor(currentLoad || 0), "%"),
|
|
29
|
+
data: history,
|
|
30
|
+
description: "".concat(t('system.cores'), ": ").concat((cpus === null || cpus === void 0 ? void 0 : cpus.length) || 0),
|
|
31
|
+
dateFn: v => (0, _util.formatTime)(v, 'HH:mm', locale),
|
|
32
|
+
valueFn: formatNumber
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
CpuMonitor.propTypes = {
|
|
36
|
+
cpus: _propTypes.default.array,
|
|
37
|
+
currentLoad: _propTypes.default.number,
|
|
38
|
+
history: _propTypes.default.array
|
|
39
|
+
};
|
|
40
|
+
CpuMonitor.defaultProps = {
|
|
41
|
+
cpus: [],
|
|
42
|
+
currentLoad: 0,
|
|
43
|
+
history: []
|
|
44
|
+
};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = MemoryMonitor;
|
|
7
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
8
|
+
var _filesize = _interopRequireDefault(require("filesize"));
|
|
9
|
+
var _Box = _interopRequireDefault(require("@mui/material/Box"));
|
|
10
|
+
var _context = require("@arcblock/ux/lib/Locale/context");
|
|
11
|
+
var _chart = _interopRequireDefault(require("./chart"));
|
|
12
|
+
var _util = require("../util");
|
|
13
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
/* eslint-disable react/jsx-one-expression-per-line */
|
|
16
|
+
|
|
17
|
+
function MemoryMonitor(_ref) {
|
|
18
|
+
let {
|
|
19
|
+
instanceCount,
|
|
20
|
+
title,
|
|
21
|
+
total,
|
|
22
|
+
used,
|
|
23
|
+
history
|
|
24
|
+
} = _ref;
|
|
25
|
+
const {
|
|
26
|
+
t,
|
|
27
|
+
locale
|
|
28
|
+
} = (0, _context.useLocaleContext)();
|
|
29
|
+
const showPercent = !!total;
|
|
30
|
+
const available = total - used;
|
|
31
|
+
const memoryPercent = showPercent ? "(".concat(Math.floor(used / total * 100), "%)") : '';
|
|
32
|
+
const memoryList = [];
|
|
33
|
+
if (instanceCount) {
|
|
34
|
+
memoryList.push({
|
|
35
|
+
title: t('system.instances'),
|
|
36
|
+
metric: instanceCount
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
memoryList.push({
|
|
40
|
+
title: t('system.used'),
|
|
41
|
+
metric: (0, _filesize.default)(used)
|
|
42
|
+
});
|
|
43
|
+
if (showPercent) {
|
|
44
|
+
memoryList.push({
|
|
45
|
+
title: t('system.free'),
|
|
46
|
+
metric: (0, _filesize.default)(available)
|
|
47
|
+
}, {
|
|
48
|
+
title: t('system.total'),
|
|
49
|
+
metric: (0, _filesize.default)(total)
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_chart.default, {
|
|
53
|
+
id: "mem-sparkline",
|
|
54
|
+
title: title || t('common.memory'),
|
|
55
|
+
current: "".concat((0, _filesize.default)(Math.floor(used || 0)), " ").concat(memoryPercent),
|
|
56
|
+
data: history,
|
|
57
|
+
description: memoryList.map((x, index) => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
|
|
58
|
+
sx: {
|
|
59
|
+
marginLeft: index === 0 ? 0 : 2
|
|
60
|
+
},
|
|
61
|
+
children: [x.title, ": ", x.metric]
|
|
62
|
+
}, x.title)),
|
|
63
|
+
dateFn: v => (0, _util.formatTime)(v, 'HH:mm', locale),
|
|
64
|
+
valueFn: _filesize.default
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
MemoryMonitor.propTypes = {
|
|
68
|
+
title: _propTypes.default.string,
|
|
69
|
+
instanceCount: _propTypes.default.number,
|
|
70
|
+
total: _propTypes.default.number,
|
|
71
|
+
used: _propTypes.default.number,
|
|
72
|
+
history: _propTypes.default.array
|
|
73
|
+
};
|
|
74
|
+
MemoryMonitor.defaultProps = {
|
|
75
|
+
title: '',
|
|
76
|
+
instanceCount: null,
|
|
77
|
+
total: null,
|
|
78
|
+
used: null,
|
|
79
|
+
history: []
|
|
80
|
+
};
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default =
|
|
7
|
-
var _react = require("react");
|
|
6
|
+
exports.default = RuntimeInsight;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
9
9
|
var _filesize = _interopRequireDefault(require("filesize"));
|
|
10
10
|
var _prettyMsI18n = _interopRequireDefault(require("pretty-ms-i18n"));
|
|
@@ -15,14 +15,15 @@ var _util = require("@blocklet/meta/lib/util");
|
|
|
15
15
|
var _context = require("@arcblock/ux/lib/Locale/context");
|
|
16
16
|
var _blocklet = require("../contexts/blocklet");
|
|
17
17
|
var _util2 = require("../util");
|
|
18
|
-
var _runtimeInfo = _interopRequireDefault(require("
|
|
19
|
-
var
|
|
20
|
-
var _bundleAvatar = _interopRequireDefault(require("./bundle-avatar"));
|
|
18
|
+
var _runtimeInfo = _interopRequireDefault(require("../blocklet/runtime-info"));
|
|
19
|
+
var _bundleAvatar = _interopRequireDefault(require("../blocklet/bundle-avatar"));
|
|
21
20
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
22
21
|
var _templateObject;
|
|
23
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
24
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
24
25
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
25
|
-
function
|
|
26
|
+
function RuntimeInsight() {
|
|
26
27
|
const {
|
|
27
28
|
t,
|
|
28
29
|
locale
|
|
@@ -140,14 +141,16 @@ function BlockletMonitor() {
|
|
|
140
141
|
}];
|
|
141
142
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Div, {
|
|
142
143
|
component: "div",
|
|
143
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
}
|
|
144
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
|
|
145
|
+
component: "h3",
|
|
146
|
+
variant: "h5",
|
|
147
|
+
color: "textPrimary",
|
|
148
|
+
style: {
|
|
149
|
+
fontSize: 18,
|
|
150
|
+
fontWeight: 'bold'
|
|
151
|
+
},
|
|
152
|
+
mb: 2,
|
|
153
|
+
children: t('analytics.trend')
|
|
151
154
|
}), blocklet.status === 'running' ? [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
|
|
152
155
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_runtimeInfo.default, {
|
|
153
156
|
blocklet: blocklet,
|
|
@@ -157,11 +160,11 @@ function BlockletMonitor() {
|
|
|
157
160
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
|
|
158
161
|
mt: 3,
|
|
159
162
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Datatable.default, {
|
|
163
|
+
title: t('analytics.detail'),
|
|
160
164
|
className: "monitor-table",
|
|
161
165
|
locale: locale,
|
|
162
166
|
data: monitList,
|
|
163
167
|
columns: monitorColumns,
|
|
164
|
-
title: "",
|
|
165
168
|
options: {
|
|
166
169
|
search: false,
|
|
167
170
|
download: false,
|
|
@@ -174,13 +177,8 @@ function BlockletMonitor() {
|
|
|
174
177
|
})
|
|
175
178
|
})] : /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
|
|
176
179
|
children: t('blocklet.runtimeInfo.noRunning')
|
|
177
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
178
|
-
className: "title",
|
|
179
|
-
children: t('common.dataStorage')
|
|
180
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_diskInfo.default, {
|
|
181
|
-
blocklet: blocklet
|
|
182
180
|
})]
|
|
183
181
|
});
|
|
184
182
|
}
|
|
185
|
-
|
|
186
|
-
const Div = (0, _styled.default)(_Typography.default)(_templateObject || (_templateObject = _taggedTemplateLiteral(["
|
|
183
|
+
RuntimeInsight.propTypes = {};
|
|
184
|
+
const Div = (0, _styled.default)(_Typography.default)(_templateObject || (_templateObject = _taggedTemplateLiteral([""])));
|