mirror of
https://github.com/didi/KnowStreaming.git
synced 2026-01-03 11:28:12 +08:00
add fe page
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user