|
|
@ -13,11 +13,13 @@ import {
|
|
|
|
} from '@mui/material';
|
|
|
|
} from '@mui/material';
|
|
|
|
import _uniq from 'lodash/uniq';
|
|
|
|
import _uniq from 'lodash/uniq';
|
|
|
|
import { ChipItems } from '../../components/ChipItems';
|
|
|
|
import { ChipItems } from '../../components/ChipItems';
|
|
|
|
|
|
|
|
import { useTranslate } from 'react-admin';
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Tailchat 网络状态
|
|
|
|
* Tailchat 网络状态
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
export const TailchatNetwork: React.FC = React.memo(() => {
|
|
|
|
export const TailchatNetwork: React.FC = React.memo(() => {
|
|
|
|
|
|
|
|
const translate = useTranslate();
|
|
|
|
const { data, loading } = useRequest(async () => {
|
|
|
|
const { data, loading } = useRequest(async () => {
|
|
|
|
const { data } = await request('/network/all');
|
|
|
|
const { data } = await request('/network/all');
|
|
|
|
|
|
|
|
|
|
|
@ -37,16 +39,16 @@ export const TailchatNetwork: React.FC = React.memo(() => {
|
|
|
|
}}
|
|
|
|
}}
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<Typography variant="h6" gutterBottom>
|
|
|
|
<Typography variant="h6" gutterBottom>
|
|
|
|
节点列表
|
|
|
|
{translate('custom.network.nodeList')}
|
|
|
|
</Typography>
|
|
|
|
</Typography>
|
|
|
|
<Table sx={{ minWidth: 650 }} aria-label="simple table">
|
|
|
|
<Table sx={{ minWidth: 650 }} aria-label="simple table">
|
|
|
|
<TableHead>
|
|
|
|
<TableHead>
|
|
|
|
<TableRow>
|
|
|
|
<TableRow>
|
|
|
|
<TableCell>ID</TableCell>
|
|
|
|
<TableCell>{translate('custom.network.id')}</TableCell>
|
|
|
|
<TableCell>主机名</TableCell>
|
|
|
|
<TableCell>{translate('custom.network.hostname')}</TableCell>
|
|
|
|
<TableCell>CPU占用</TableCell>
|
|
|
|
<TableCell>{translate('custom.network.cpuUsage')}</TableCell>
|
|
|
|
<TableCell>IP地址列表</TableCell>
|
|
|
|
<TableCell>{translate('custom.network.ipList')}</TableCell>
|
|
|
|
<TableCell>SDK版本</TableCell>
|
|
|
|
<TableCell>{translate('custom.network.sdkVersion')}</TableCell>
|
|
|
|
</TableRow>
|
|
|
|
</TableRow>
|
|
|
|
</TableHead>
|
|
|
|
</TableHead>
|
|
|
|
<TableBody>
|
|
|
|
<TableBody>
|
|
|
@ -71,21 +73,21 @@ export const TailchatNetwork: React.FC = React.memo(() => {
|
|
|
|
</Table>
|
|
|
|
</Table>
|
|
|
|
|
|
|
|
|
|
|
|
<Typography variant="h6" gutterBottom>
|
|
|
|
<Typography variant="h6" gutterBottom>
|
|
|
|
服务列表
|
|
|
|
{translate('custom.network.serviceList')}
|
|
|
|
</Typography>
|
|
|
|
</Typography>
|
|
|
|
<Box flexWrap="wrap" overflow="hidden">
|
|
|
|
<Box flexWrap="wrap" overflow="hidden">
|
|
|
|
<ChipItems items={_uniq<string>(data.services ?? [])} />
|
|
|
|
<ChipItems items={_uniq<string>(data.services ?? [])} />
|
|
|
|
</Box>
|
|
|
|
</Box>
|
|
|
|
|
|
|
|
|
|
|
|
<Typography variant="h6" gutterBottom>
|
|
|
|
<Typography variant="h6" gutterBottom>
|
|
|
|
操作列表
|
|
|
|
{translate('custom.network.actionList')}
|
|
|
|
</Typography>
|
|
|
|
</Typography>
|
|
|
|
<Box flexWrap="wrap" overflow="hidden">
|
|
|
|
<Box flexWrap="wrap" overflow="hidden">
|
|
|
|
<ChipItems items={_uniq<string>(data.actions ?? [])} />
|
|
|
|
<ChipItems items={_uniq<string>(data.actions ?? [])} />
|
|
|
|
</Box>
|
|
|
|
</Box>
|
|
|
|
|
|
|
|
|
|
|
|
<Typography variant="h6" gutterBottom>
|
|
|
|
<Typography variant="h6" gutterBottom>
|
|
|
|
事件列表
|
|
|
|
{translate('custom.network.eventList')}
|
|
|
|
</Typography>
|
|
|
|
</Typography>
|
|
|
|
<Box flexWrap="wrap" overflow="hidden">
|
|
|
|
<Box flexWrap="wrap" overflow="hidden">
|
|
|
|
<ChipItems items={_uniq<string>(data.events ?? [])} />
|
|
|
|
<ChipItems items={_uniq<string>(data.events ?? [])} />
|
|
|
|