提交 5efb837e 编写于 作者: G GraceWalk

fix: 单集群详情样式优化

上级 584b626d
...@@ -7,6 +7,7 @@ import moment from 'moment'; ...@@ -7,6 +7,7 @@ import moment from 'moment';
import { timeFormat } from '../../constants/common'; import { timeFormat } from '../../constants/common';
import { DownOutlined } from '@ant-design/icons'; import { DownOutlined } from '@ant-design/icons';
import { renderToolTipValue } from './config'; import { renderToolTipValue } from './config';
import RenderEmpty from '@src/components/RenderEmpty';
const { Panel } = Collapse; const { Panel } = Collapse;
...@@ -51,17 +52,6 @@ const ChangeLog = () => { ...@@ -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) => { const getHref = (item: any) => {
if (item.resTypeName.toLowerCase().includes('topic')) return `/cluster/${clusterId}/topic/list#topicName=${item.resName}`; 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}`; if (item.resTypeName.toLowerCase().includes('broker')) return `/cluster/${clusterId}/broker/list#brokerId=${item.resName}`;
...@@ -73,7 +63,7 @@ const ChangeLog = () => { ...@@ -73,7 +63,7 @@ const ChangeLog = () => {
<div className="change-log-panel"> <div className="change-log-panel">
<div className="title">历史变更记录</div> <div className="title">历史变更记录</div>
{!loading && !data.length ? ( {!loading && !data.length ? (
renderEmpty() <RenderEmpty message="暂无配置记录" />
) : ( ) : (
<div id="changelog-scroll-box"> <div id="changelog-scroll-box">
<Spin spinning={loading} style={{ paddingLeft: '42%', marginTop: 100 }} /> <Spin spinning={loading} style={{ paddingLeft: '42%', marginTop: 100 }} />
......
/* eslint-disable react/display-name */ /* eslint-disable react/display-name */
import { Drawer, Form, Spin, Table, Utils } from 'knowdesign'; import { Drawer, Spin, Table, Utils } from 'knowdesign';
import React, { useEffect, useState, forwardRef, useImperativeHandle } from 'react'; import React, { useEffect, useState, forwardRef, useImperativeHandle } from 'react';
import { useIntl } from 'react-intl';
import { getDetailColumn } from './config'; import { getDetailColumn } from './config';
import API from '../../api'; import API from '../../api';
import { useParams } from 'react-router-dom'; import { useParams } from 'react-router-dom';
const CheckDetail = forwardRef((props: any, ref): JSX.Element => { const CheckDetail = forwardRef((props: any, ref): JSX.Element => {
const intl = useIntl();
const [form] = Form.useForm();
const [visible, setVisible] = useState(false); const [visible, setVisible] = useState(false);
const [loading, setLoading] = useState(false); const [loading, setLoading] = useState(false);
const [data, setData] = useState([]); const [data, setData] = useState([]);
...@@ -28,7 +25,6 @@ const CheckDetail = forwardRef((props: any, ref): JSX.Element => { ...@@ -28,7 +25,6 @@ const CheckDetail = forwardRef((props: any, ref): JSX.Element => {
}; };
const onCancel = () => { const onCancel = () => {
form.resetFields();
setVisible(false); setVisible(false);
}; };
......
...@@ -153,7 +153,7 @@ const LeftSider = () => { ...@@ -153,7 +153,7 @@ const LeftSider = () => {
<Divider /> <Divider />
<div className="title"> <div className="title">
<div className="name">{renderToolTipValue(clusterInfo?.name, 35)}</div> <div className="name">{renderToolTipValue(clusterInfo?.name, 35)}</div>
{global.hasPermission && global.hasPermission(ClustersPermissionMap.CLUSTER_CHANGE_INFO) ? ( {!loading && global.hasPermission && global.hasPermission(ClustersPermissionMap.CLUSTER_CHANGE_INFO) ? (
<div className="edit-icon-box" onClick={() => setVisible(true)}> <div className="edit-icon-box" onClick={() => setVisible(true)}>
<IconFont className="edit-icon" type="icon-bianji2" /> <IconFont className="edit-icon" type="icon-bianji2" />
</div> </div>
...@@ -239,8 +239,7 @@ const LeftSider = () => { ...@@ -239,8 +239,7 @@ const LeftSider = () => {
<AccessClusters <AccessClusters
visible={visible} visible={visible}
setVisible={setVisible} setVisible={setVisible}
title={'edit.cluster'} title="edit.cluster"
infoLoading={loading}
afterSubmitSuccess={getPhyClusterInfo} afterSubmitSuccess={getPhyClusterInfo}
clusterInfo={clusterInfo} clusterInfo={clusterInfo}
kafkaVersion={Object.keys(kafkaVersion)} kafkaVersion={Object.keys(kafkaVersion)}
......
...@@ -377,26 +377,6 @@ ...@@ -377,26 +377,6 @@
} }
} }
} }
.empty-panel {
margin-top: 96px;
text-align: center;
.img {
width: 51px;
height: 34px;
margin-left: 80px;
margin-bottom: 7px;
background-size: cover;
background-image: url('../../assets/empty.png');
}
.text {
font-size: 10px;
color: #919aac;
line-height: 20px;
}
}
} }
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册