|
|
|
|
@ -274,7 +274,7 @@ var jsx_runtime = __webpack_require__(37712);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var Navigation = function Navigation(_ref) {
|
|
|
|
|
var _deviceData$category_4, _deviceData$category_5, _deviceData$category_6, _deviceData$category_7, _deviceData$use_statu, _deviceData$use_statu2, _deviceData$use_statu3, _deviceInfo$disk, _deviceInfo$memo;
|
|
|
|
|
var _deviceData$category_4, _deviceData$category_5, _deviceData$category_6, _deviceData$category_7, _deviceData$use_statu, _deviceData$use_statu2, _deviceData$use_statu3, _deviceInfo$cpu3, _deviceInfo$load3, _deviceInfo$disk, _deviceInfo$memo, _deviceInfo$memo2;
|
|
|
|
|
var loading = _ref.loading,
|
|
|
|
|
dispatch = _ref.dispatch;
|
|
|
|
|
var _useState = (0,_react_17_0_2_react.useState)({}),
|
|
|
|
|
@ -466,12 +466,12 @@ var Navigation = function Navigation(_ref) {
|
|
|
|
|
itemStyle: {
|
|
|
|
|
normal: {
|
|
|
|
|
color: function color(colors) {
|
|
|
|
|
var colorList = ['#08D4FE', '#1890FF', '#EE5D5D'];
|
|
|
|
|
var colorList = deviceData !== null && deviceData !== void 0 && deviceData.category_statistics ? ['#08D4FE', '#1890FF', '#EE5D5D'] : ['#1c2967'];
|
|
|
|
|
return colorList[colors.dataIndex];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
data: [{
|
|
|
|
|
data: deviceData !== null && deviceData !== void 0 && deviceData.category_statistics ? [{
|
|
|
|
|
value: deviceData === null || deviceData === void 0 || (_deviceData$category_ = deviceData.category_statistics) === null || _deviceData$category_ === void 0 ? void 0 : _deviceData$category_.virtual,
|
|
|
|
|
name: '虚拟机'
|
|
|
|
|
}, {
|
|
|
|
|
@ -480,12 +480,15 @@ var Navigation = function Navigation(_ref) {
|
|
|
|
|
}, {
|
|
|
|
|
value: deviceData === null || deviceData === void 0 || (_deviceData$category_3 = deviceData.category_statistics) === null || _deviceData$category_3 === void 0 ? void 0 : _deviceData$category_3.scrapped,
|
|
|
|
|
name: '报废'
|
|
|
|
|
}] : [{
|
|
|
|
|
value: 0,
|
|
|
|
|
name: '总设备数'
|
|
|
|
|
}]
|
|
|
|
|
}]
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
var getOptionCPU = function getOptionCPU() {
|
|
|
|
|
var _deviceInfo$cpu, _deviceInfo$cpu2, _deviceInfo$cpu3, _deviceInfo$cpu4;
|
|
|
|
|
var _deviceInfo$cpu, _deviceInfo$cpu2;
|
|
|
|
|
return {
|
|
|
|
|
grid: {
|
|
|
|
|
//位置
|
|
|
|
|
@ -497,9 +500,9 @@ var Navigation = function Navigation(_ref) {
|
|
|
|
|
},
|
|
|
|
|
xAxis: {
|
|
|
|
|
type: 'category',
|
|
|
|
|
data: (deviceInfo === null || deviceInfo === void 0 || (_deviceInfo$cpu = deviceInfo.cpu) === null || _deviceInfo$cpu === void 0 || (_deviceInfo$cpu = _deviceInfo$cpu.time_stamps) === null || _deviceInfo$cpu === void 0 ? void 0 : _deviceInfo$cpu.length) > 0 ? deviceInfo === null || deviceInfo === void 0 || (_deviceInfo$cpu2 = deviceInfo.cpu) === null || _deviceInfo$cpu2 === void 0 || (_deviceInfo$cpu2 = _deviceInfo$cpu2.time_stamps) === null || _deviceInfo$cpu2 === void 0 ? void 0 : _deviceInfo$cpu2.map(function (item) {
|
|
|
|
|
data: deviceInfo === null || deviceInfo === void 0 || (_deviceInfo$cpu = deviceInfo.cpu) === null || _deviceInfo$cpu === void 0 || (_deviceInfo$cpu = _deviceInfo$cpu.time_stamps) === null || _deviceInfo$cpu === void 0 ? void 0 : _deviceInfo$cpu.map(function (item) {
|
|
|
|
|
return dayjs_min_default()(item).format('YYYY-MM-DD HH:mm:ss');
|
|
|
|
|
}) : ['00.00', '24.00'],
|
|
|
|
|
}),
|
|
|
|
|
boundaryGap: false,
|
|
|
|
|
axisLabel: {
|
|
|
|
|
//坐标轴刻度标签
|
|
|
|
|
@ -534,7 +537,7 @@ var Navigation = function Navigation(_ref) {
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
series: [{
|
|
|
|
|
data: (deviceInfo === null || deviceInfo === void 0 || (_deviceInfo$cpu3 = deviceInfo.cpu) === null || _deviceInfo$cpu3 === void 0 || (_deviceInfo$cpu3 = _deviceInfo$cpu3.values) === null || _deviceInfo$cpu3 === void 0 ? void 0 : _deviceInfo$cpu3.length) > 0 ? deviceInfo === null || deviceInfo === void 0 || (_deviceInfo$cpu4 = deviceInfo.cpu) === null || _deviceInfo$cpu4 === void 0 ? void 0 : _deviceInfo$cpu4.values : [0, 0],
|
|
|
|
|
data: deviceInfo === null || deviceInfo === void 0 || (_deviceInfo$cpu2 = deviceInfo.cpu) === null || _deviceInfo$cpu2 === void 0 ? void 0 : _deviceInfo$cpu2.values,
|
|
|
|
|
type: 'line',
|
|
|
|
|
smooth: true,
|
|
|
|
|
//是否平滑曲线
|
|
|
|
|
@ -552,7 +555,7 @@ var Navigation = function Navigation(_ref) {
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
var getOptionPJFZ = function getOptionPJFZ() {
|
|
|
|
|
var _deviceInfo$load, _deviceInfo$load2, _deviceInfo$load3, _deviceInfo$load4;
|
|
|
|
|
var _deviceInfo$load, _deviceInfo$load2;
|
|
|
|
|
return {
|
|
|
|
|
grid: {
|
|
|
|
|
//位置
|
|
|
|
|
@ -564,9 +567,9 @@ var Navigation = function Navigation(_ref) {
|
|
|
|
|
},
|
|
|
|
|
xAxis: {
|
|
|
|
|
type: 'category',
|
|
|
|
|
data: (deviceInfo === null || deviceInfo === void 0 || (_deviceInfo$load = deviceInfo.load) === null || _deviceInfo$load === void 0 || (_deviceInfo$load = _deviceInfo$load.time_stamps) === null || _deviceInfo$load === void 0 ? void 0 : _deviceInfo$load.length) > 0 ? deviceInfo === null || deviceInfo === void 0 || (_deviceInfo$load2 = deviceInfo.load) === null || _deviceInfo$load2 === void 0 || (_deviceInfo$load2 = _deviceInfo$load2.time_stamps) === null || _deviceInfo$load2 === void 0 ? void 0 : _deviceInfo$load2.map(function (item) {
|
|
|
|
|
data: deviceInfo === null || deviceInfo === void 0 || (_deviceInfo$load = deviceInfo.load) === null || _deviceInfo$load === void 0 || (_deviceInfo$load = _deviceInfo$load.time_stamps) === null || _deviceInfo$load === void 0 ? void 0 : _deviceInfo$load.map(function (item) {
|
|
|
|
|
return dayjs_min_default()(item).format('YYYY-MM-DD HH:mm:ss');
|
|
|
|
|
}) : ['00.00', '24.00'],
|
|
|
|
|
}),
|
|
|
|
|
boundaryGap: false,
|
|
|
|
|
axisLabel: {
|
|
|
|
|
//坐标轴刻度标签
|
|
|
|
|
@ -601,7 +604,7 @@ var Navigation = function Navigation(_ref) {
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
series: [{
|
|
|
|
|
data: (deviceInfo === null || deviceInfo === void 0 || (_deviceInfo$load3 = deviceInfo.load) === null || _deviceInfo$load3 === void 0 || (_deviceInfo$load3 = _deviceInfo$load3.values) === null || _deviceInfo$load3 === void 0 ? void 0 : _deviceInfo$load3.length) > 0 ? deviceInfo === null || deviceInfo === void 0 || (_deviceInfo$load4 = deviceInfo.load) === null || _deviceInfo$load4 === void 0 ? void 0 : _deviceInfo$load4.values : [0, 0],
|
|
|
|
|
data: deviceInfo === null || deviceInfo === void 0 || (_deviceInfo$load2 = deviceInfo.load) === null || _deviceInfo$load2 === void 0 ? void 0 : _deviceInfo$load2.values,
|
|
|
|
|
type: 'line',
|
|
|
|
|
smooth: true,
|
|
|
|
|
//是否平滑曲线
|
|
|
|
|
@ -714,7 +717,7 @@ var Navigation = function Navigation(_ref) {
|
|
|
|
|
color: '#FFFFFF',
|
|
|
|
|
fontWeight: "bold"
|
|
|
|
|
},
|
|
|
|
|
children: deviceData === null || deviceData === void 0 || (_deviceData$category_4 = deviceData.category_statistics) === null || _deviceData$category_4 === void 0 ? void 0 : _deviceData$category_4.total
|
|
|
|
|
children: (deviceData === null || deviceData === void 0 || (_deviceData$category_4 = deviceData.category_statistics) === null || _deviceData$category_4 === void 0 ? void 0 : _deviceData$category_4.total) || 0
|
|
|
|
|
})]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
style: {
|
|
|
|
|
@ -740,7 +743,7 @@ var Navigation = function Navigation(_ref) {
|
|
|
|
|
color: '#00E9F9',
|
|
|
|
|
fontWeight: "bold"
|
|
|
|
|
},
|
|
|
|
|
children: deviceData === null || deviceData === void 0 || (_deviceData$category_5 = deviceData.category_statistics) === null || _deviceData$category_5 === void 0 ? void 0 : _deviceData$category_5.virtual
|
|
|
|
|
children: (deviceData === null || deviceData === void 0 || (_deviceData$category_5 = deviceData.category_statistics) === null || _deviceData$category_5 === void 0 ? void 0 : _deviceData$category_5.virtual) || 0
|
|
|
|
|
})]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
style: {
|
|
|
|
|
@ -766,7 +769,7 @@ var Navigation = function Navigation(_ref) {
|
|
|
|
|
color: '#68B7FF',
|
|
|
|
|
fontWeight: "bold"
|
|
|
|
|
},
|
|
|
|
|
children: deviceData === null || deviceData === void 0 || (_deviceData$category_6 = deviceData.category_statistics) === null || _deviceData$category_6 === void 0 ? void 0 : _deviceData$category_6.physical
|
|
|
|
|
children: (deviceData === null || deviceData === void 0 || (_deviceData$category_6 = deviceData.category_statistics) === null || _deviceData$category_6 === void 0 ? void 0 : _deviceData$category_6.physical) || 0
|
|
|
|
|
})]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
style: {
|
|
|
|
|
@ -792,7 +795,7 @@ var Navigation = function Navigation(_ref) {
|
|
|
|
|
color: '#EE5D5D',
|
|
|
|
|
fontWeight: "bold"
|
|
|
|
|
},
|
|
|
|
|
children: deviceData === null || deviceData === void 0 || (_deviceData$category_7 = deviceData.category_statistics) === null || _deviceData$category_7 === void 0 ? void 0 : _deviceData$category_7.scrapped
|
|
|
|
|
children: (deviceData === null || deviceData === void 0 || (_deviceData$category_7 = deviceData.category_statistics) === null || _deviceData$category_7 === void 0 ? void 0 : _deviceData$category_7.scrapped) || 0
|
|
|
|
|
})]
|
|
|
|
|
})]
|
|
|
|
|
})]
|
|
|
|
|
@ -886,6 +889,9 @@ var Navigation = function Navigation(_ref) {
|
|
|
|
|
})]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
className: Workingmodules.sbyctx_box,
|
|
|
|
|
style: {
|
|
|
|
|
alignContent: (messageList === null || messageList === void 0 ? void 0 : messageList.length) > 0 ? '' : 'center'
|
|
|
|
|
},
|
|
|
|
|
children: (messageList === null || messageList === void 0 ? void 0 : messageList.length) > 0 ? messageList === null || messageList === void 0 ? void 0 : messageList.map(function (item, index) {
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
style: {
|
|
|
|
|
@ -919,8 +925,7 @@ var Navigation = function Navigation(_ref) {
|
|
|
|
|
src: nodataimg_namespaceObject,
|
|
|
|
|
style: {
|
|
|
|
|
width: '15rem',
|
|
|
|
|
height: '10rem',
|
|
|
|
|
marginTop: "1rem"
|
|
|
|
|
height: '10rem'
|
|
|
|
|
}
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
style: {
|
|
|
|
|
@ -1067,6 +1072,9 @@ var Navigation = function Navigation(_ref) {
|
|
|
|
|
})]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
className: Workingmodules.sys_list,
|
|
|
|
|
style: {
|
|
|
|
|
alignContent: (tableData === null || tableData === void 0 ? void 0 : tableData.length) > 0 ? '' : 'center'
|
|
|
|
|
},
|
|
|
|
|
children: (tableData === null || tableData === void 0 ? void 0 : tableData.length) > 0 ? tableData === null || tableData === void 0 ? void 0 : tableData.map(function (item, index) {
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
className: Workingmodules.sys_item,
|
|
|
|
|
@ -1151,8 +1159,7 @@ var Navigation = function Navigation(_ref) {
|
|
|
|
|
src: nodataimg_namespaceObject,
|
|
|
|
|
style: {
|
|
|
|
|
width: '15rem',
|
|
|
|
|
height: '10rem',
|
|
|
|
|
marginTop: "1rem"
|
|
|
|
|
height: '10rem'
|
|
|
|
|
}
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
style: {
|
|
|
|
|
@ -1242,12 +1249,21 @@ var Navigation = function Navigation(_ref) {
|
|
|
|
|
color: "#E99237"
|
|
|
|
|
},
|
|
|
|
|
children: "cpu\u4F7F\u7528\u7387"
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(lib/* default */.Z, {
|
|
|
|
|
}), (deviceInfo === null || deviceInfo === void 0 || (_deviceInfo$cpu3 = deviceInfo.cpu) === null || _deviceInfo$cpu3 === void 0 || (_deviceInfo$cpu3 = _deviceInfo$cpu3.time_stamps) === null || _deviceInfo$cpu3 === void 0 ? void 0 : _deviceInfo$cpu3.length) > 0 ? /*#__PURE__*/(0,jsx_runtime.jsx)(lib/* default */.Z, {
|
|
|
|
|
style: {
|
|
|
|
|
width: '100%',
|
|
|
|
|
height: '10vh'
|
|
|
|
|
},
|
|
|
|
|
option: getOptionCPU()
|
|
|
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
style: {
|
|
|
|
|
width: '96%',
|
|
|
|
|
height: '1px',
|
|
|
|
|
background: '#463E59',
|
|
|
|
|
position: 'absolute',
|
|
|
|
|
bottom: '1rem',
|
|
|
|
|
left: '2%'
|
|
|
|
|
}
|
|
|
|
|
})]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
className: Workingmodules.pjfz_style,
|
|
|
|
|
@ -1257,12 +1273,21 @@ var Navigation = function Navigation(_ref) {
|
|
|
|
|
color: "#3061D0"
|
|
|
|
|
},
|
|
|
|
|
children: "\u5E73\u5747\u8D1F\u8F7D"
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(lib/* default */.Z, {
|
|
|
|
|
}), (deviceInfo === null || deviceInfo === void 0 || (_deviceInfo$load3 = deviceInfo.load) === null || _deviceInfo$load3 === void 0 || (_deviceInfo$load3 = _deviceInfo$load3.time_stamps) === null || _deviceInfo$load3 === void 0 ? void 0 : _deviceInfo$load3.length) > 0 ? /*#__PURE__*/(0,jsx_runtime.jsx)(lib/* default */.Z, {
|
|
|
|
|
style: {
|
|
|
|
|
width: '100%',
|
|
|
|
|
height: '10vh'
|
|
|
|
|
},
|
|
|
|
|
option: getOptionPJFZ()
|
|
|
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
style: {
|
|
|
|
|
width: '96%',
|
|
|
|
|
height: '1px',
|
|
|
|
|
background: '#463E59',
|
|
|
|
|
position: 'absolute',
|
|
|
|
|
bottom: '1rem',
|
|
|
|
|
left: '2%'
|
|
|
|
|
}
|
|
|
|
|
})]
|
|
|
|
|
})]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
@ -1344,7 +1369,7 @@ var Navigation = function Navigation(_ref) {
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(GaugeChart/* default */.Z, {
|
|
|
|
|
indexKey: 3,
|
|
|
|
|
value: deviceInfo === null || deviceInfo === void 0 || (_deviceInfo$memo = deviceInfo.memo) === null || _deviceInfo$memo === void 0 || (_deviceInfo$memo = _deviceInfo$memo.values) === null || _deviceInfo$memo === void 0 ? void 0 : _deviceInfo$memo[0],
|
|
|
|
|
colors: ['#2a55bb', '#DAE7EC'],
|
|
|
|
|
colors: ['#2a55bb', deviceInfo !== null && deviceInfo !== void 0 && (_deviceInfo$memo2 = deviceInfo.memo) !== null && _deviceInfo$memo2 !== void 0 && (_deviceInfo$memo2 = _deviceInfo$memo2.values) !== null && _deviceInfo$memo2 !== void 0 && _deviceInfo$memo2[0] ? '#DAE7EC' : '#1c2967'],
|
|
|
|
|
position: ['65%', '80%']
|
|
|
|
|
})]
|
|
|
|
|
})]
|