wenlele
2 years ago
7 changed files with 303 additions and 22 deletions
@ -1,6 +1,8 @@ |
|||||
'use strict'; |
'use strict'; |
||||
import Coming from './coming' |
import Coming from './coming' |
||||
|
import { SkeletonScreen } from './skeletonScreen' |
||||
|
|
||||
export { |
export { |
||||
Coming |
Coming, |
||||
|
SkeletonScreen |
||||
}; |
}; |
||||
|
@ -0,0 +1,18 @@ |
|||||
|
import React, { useState, useEffect } from "react"; |
||||
|
import { Skeleton } from "@douyinfe/semi-ui"; |
||||
|
|
||||
|
|
||||
|
export function SkeletonScreen () { |
||||
|
return <> |
||||
|
<Skeleton.Title style={{ width: "95%", height: 24, margin: "8px 20px" }} /> |
||||
|
<Skeleton.Title style={{ width: "80%", height: 28, margin: "16px 20px" }} /> |
||||
|
<Skeleton.Title style={{ width: "50%", height: 28, margin: "16px 20px" }} /> |
||||
|
<Skeleton.Title style={{ width: "60%", height: 28, margin: "16px 20px" }} /> |
||||
|
<Skeleton.Title style={{ width: "90%", height: 28, margin: "16px 20px" }} /> |
||||
|
<Skeleton.Title style={{ width: "70%", height: 28, margin: "16px 20px" }} /> |
||||
|
<Skeleton.Title style={{ width: "50%", height: 28, margin: "16px 20px" }} /> |
||||
|
<Skeleton.Title style={{ width: "40%", height: 28, margin: "16px 20px" }} /> |
||||
|
<Skeleton.Title style={{ width: "60%", height: 28, margin: "16px 20px" }} /> |
||||
|
<Skeleton.Title style={{ width: "40%", height: 28, margin: "16px 20px" }} /> |
||||
|
</> |
||||
|
} |
@ -0,0 +1,33 @@ |
|||||
|
import React, { useEffect, useRef, useState } from 'react'; |
||||
|
import moment from 'moment'; |
||||
|
import { connect } from "react-redux"; |
||||
|
import { Select, Modal, Form, Button } from "@douyinfe/semi-ui"; |
||||
|
|
||||
|
const GatewayEditModal = (props) => { |
||||
|
const { dispatch, actions, user, onCancel, dataToModal } = props; |
||||
|
const { edition } = actions; |
||||
|
|
||||
|
//初始化 |
||||
|
useEffect(() => { |
||||
|
|
||||
|
}, []); |
||||
|
|
||||
|
return ( |
||||
|
<Modal title={dataToModal.name} |
||||
|
visible={true} destroyOnClose onCancel={onCancel} |
||||
|
footer={[<Button onClick={onCancel}>关闭</Button>]}> |
||||
|
<div></div> |
||||
|
</Modal> |
||||
|
) |
||||
|
} |
||||
|
|
||||
|
function mapStateToProps(state) { |
||||
|
const { auth, global } = state; |
||||
|
return { |
||||
|
user: auth.user, |
||||
|
error: auth.error, |
||||
|
actions: global.actions, |
||||
|
}; |
||||
|
} |
||||
|
|
||||
|
export default connect(mapStateToProps)(GatewayEditModal); |
@ -0,0 +1,53 @@ |
|||||
|
import React, { useEffect, useRef, useState } from 'react'; |
||||
|
import { connect } from "react-redux"; |
||||
|
import { Select, Modal, Form, Button } from "@douyinfe/semi-ui"; |
||||
|
|
||||
|
const GatewayStatusModal = (props) => { |
||||
|
const { dispatch, actions, user, onCancel, dataToModal } = props; |
||||
|
const { edition } = actions; |
||||
|
const [listData, setListData] = useState(null); |
||||
|
//初始化 |
||||
|
useEffect(() => { |
||||
|
dispatch(edition.getGatewayStatus(dataToModal.id)).then(res => {//查询网关状态指标 |
||||
|
if (res.success) { |
||||
|
setListData(res.payload.data) |
||||
|
} |
||||
|
}) |
||||
|
}, []); |
||||
|
|
||||
|
const statusKeys = { |
||||
|
status: '状态', |
||||
|
streamIn: '流入', |
||||
|
streamOut: '流出', |
||||
|
memUsedPercent: '内存使用', |
||||
|
diskPercent: '磁盘使用', |
||||
|
timeDiff: '时间偏差(最新心跳 服务器时间-设备时间)', |
||||
|
uptime: '本次在线时常',//??? |
||||
|
sysVersion: '系统', |
||||
|
status: '软件信息',//??? |
||||
|
status: '配置版本',//??? |
||||
|
acqConfVersion: '采集参数版本',//??? |
||||
|
pluginVersion: '插件版本', |
||||
|
load1: 'Load1', |
||||
|
load5: 'Load5', |
||||
|
load15: 'Load15', |
||||
|
} |
||||
|
return ( |
||||
|
<Modal title={dataToModal.name} |
||||
|
visible={true} destroyOnClose onCancel={onCancel} |
||||
|
footer={[<Button onClick={onCancel}>关闭</Button>]}> |
||||
|
<div></div> |
||||
|
</Modal> |
||||
|
) |
||||
|
} |
||||
|
|
||||
|
function mapStateToProps(state) { |
||||
|
const { auth, global } = state; |
||||
|
return { |
||||
|
user: auth.user, |
||||
|
error: auth.error, |
||||
|
actions: global.actions, |
||||
|
}; |
||||
|
} |
||||
|
|
||||
|
export default connect(mapStateToProps)(GatewayStatusModal); |
Loading…
Reference in new issue