[Bugfix]zookeeper页面leader节点显示异常(#873)

This commit is contained in:
erge
2023-02-20 15:26:26 +08:00
committed by lucasun
parent 7dc8f2dc48
commit fbe6945d3b
2 changed files with 30 additions and 14 deletions

View File

@@ -1,7 +1,7 @@
import React, { useState, useEffect } from 'react';
import { useParams } from 'react-router-dom';
import CardBar, { healthDataProps } from './index';
import { Utils } from 'knowdesign';
import { Tooltip, Utils } from 'knowdesign';
import api from '@src/api';
import { HealthStateEnum } from '../HealthState';
@@ -81,7 +81,22 @@ const ZookeeperCard = () => {
{
title: 'Leader',
value() {
return <span style={{ fontSize: 24 }}>{leaderNode || '-'}</span>;
return (
<Tooltip title={leaderNode}>
<span
style={{
fontSize: 24,
overflow: 'hidden',
display: 'block',
width: '100%',
whiteSpace: 'nowrap',
textOverflow: 'ellipsis',
}}
>
{leaderNode || '-'}
</span>
</Tooltip>
);
},
},
{

View File

@@ -89,6 +89,7 @@
margin-top: 5px;
.num {
font-family: DIDIFD-Medium;
overflow: hidden;
}
.sub-title {
font-family: @font-family;