add fe page

This commit is contained in:
孙超
2021-01-25 15:34:07 +08:00
parent 850d43df63
commit 7f115c1b3e
35 changed files with 329 additions and 225 deletions

View File

@@ -31,11 +31,11 @@ export class ClusterOverview extends React.Component<IOverview> {
const content = this.props.basicInfo as IBasicInfo;
const clusterContent = [{
value: content.clusterName,
label: '集群中文名称',
label: '集群名称',
},
{
value: content.clusterName,
label: '集群英文名称',
value: content.clusterIdentification,
label: '集群标识',
},
{
value: clusterTypeMap[content.mode],
@@ -44,8 +44,8 @@ export class ClusterOverview extends React.Component<IOverview> {
value: moment(content.gmtCreate).format(timeFormat),
label: '接入时间',
}, {
value: content.physicalClusterId,
label: '物理集群ID',
value: content.clusterId,
label: '集群ID',
}];
const clusterInfo = [{
value: content.clusterVersion,

View File

@@ -13,32 +13,14 @@ const { confirm } = Modal;
export const getClusterColumns = (urlPrefix: string) => {
return [
{
title: '逻辑集群ID',
title: '集群ID',
dataIndex: 'clusterId',
key: 'clusterId',
width: '9%',
sorter: (a: IClusterData, b: IClusterData) => b.clusterId - a.clusterId,
},
{
title: '逻辑集群中文名称',
dataIndex: 'clusterName',
key: 'clusterName',
width: '13%',
onCell: () => ({
style: {
maxWidth: 120,
...cellStyle,
},
}),
sorter: (a: IClusterData, b: IClusterData) => a.clusterName.charCodeAt(0) - b.clusterName.charCodeAt(0),
render: (text: string, record: IClusterData) => (
<Tooltip placement="bottomLeft" title={text} >
<a href={`${urlPrefix}/cluster/cluster-detail?clusterId=${record.clusterId}`}> {text} </a>
</Tooltip>
),
},
{
title: '逻辑集群英文名称',
title: '集群名称',
dataIndex: 'clusterName',
key: 'clusterName',
width: '13%',
@@ -55,6 +37,24 @@ export const getClusterColumns = (urlPrefix: string) => {
</Tooltip>
),
},
// {
// title: '逻辑集群英文名称',
// dataIndex: 'clusterName',
// key: 'clusterName',
// width: '13%',
// onCell: () => ({
// style: {
// maxWidth: 120,
// ...cellStyle,
// },
// }),
// sorter: (a: IClusterData, b: IClusterData) => a.clusterName.charCodeAt(0) - b.clusterName.charCodeAt(0),
// render: (text: string, record: IClusterData) => (
// <Tooltip placement="bottomLeft" title={text} >
// <a href={`${urlPrefix}/cluster/cluster-detail?clusterId=${record.clusterId}`}> {text} </a>
// </Tooltip>
// ),
// },
{
title: 'Topic数量',
dataIndex: 'topicNum',

View File

@@ -78,7 +78,7 @@ export class MyCluster extends SearchAndFilterContainer {
rules: [
{
required: true,
pattern: /^.{5,}.$/,
pattern: /^.{4,}.$/,
message: '请输入至少5个字符',
},
],
@@ -160,7 +160,7 @@ export class MyCluster extends SearchAndFilterContainer {
data = searchKey ? origin.filter((item: IClusterData) =>
(item.clusterName !== undefined && item.clusterName !== null) && item.clusterName.toLowerCase().includes(searchKey as string),
) : origin ;
) : origin;
return data;
}