fix: 单集群详情样式优化

This commit is contained in:
GraceWalk
2022-09-13 14:46:29 +08:00
parent 584b626d93
commit 5efb837ee8
4 changed files with 5 additions and 40 deletions

View File

@@ -7,6 +7,7 @@ import moment from 'moment';
import { timeFormat } from '../../constants/common';
import { DownOutlined } from '@ant-design/icons';
import { renderToolTipValue } from './config';
import RenderEmpty from '@src/components/RenderEmpty';
const { Panel } = Collapse;
@@ -51,17 +52,6 @@ const ChangeLog = () => {
);
}, []);
const renderEmpty = () => {
return (
<>
<div className="empty-panel">
<div className="img" />
<div className="text"></div>
</div>
</>
);
};
const getHref = (item: any) => {
if (item.resTypeName.toLowerCase().includes('topic')) return `/cluster/${clusterId}/topic/list#topicName=${item.resName}`;
if (item.resTypeName.toLowerCase().includes('broker')) return `/cluster/${clusterId}/broker/list#brokerId=${item.resName}`;
@@ -73,7 +63,7 @@ const ChangeLog = () => {
<div className="change-log-panel">
<div className="title"></div>
{!loading && !data.length ? (
renderEmpty()
<RenderEmpty message="暂无配置记录" />
) : (
<div id="changelog-scroll-box">
<Spin spinning={loading} style={{ paddingLeft: '42%', marginTop: 100 }} />