mirror of
https://github.com/didi/KnowStreaming.git
synced 2026-01-07 23:28:24 +08:00
fix: Broker 列表标识当前 Controller
This commit is contained in:
@@ -14,6 +14,7 @@ export const getBrokerListColumns = (arg?: any) => {
|
|||||||
// eslint-disable-next-line react/display-name
|
// eslint-disable-next-line react/display-name
|
||||||
render: (t: number, r: any) => {
|
render: (t: number, r: any) => {
|
||||||
return r?.alive ? (
|
return r?.alive ? (
|
||||||
|
<>
|
||||||
<a
|
<a
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
window.location.hash = `brokerId=${t || t === 0 ? t : ''}&host=${r.host || ''}`;
|
window.location.hash = `brokerId=${t || t === 0 ? t : ''}&host=${r.host || ''}`;
|
||||||
@@ -21,12 +22,41 @@ export const getBrokerListColumns = (arg?: any) => {
|
|||||||
>
|
>
|
||||||
{t}
|
{t}
|
||||||
</a>
|
</a>
|
||||||
|
{r?.kafkaRoleList?.includes('controller') && (
|
||||||
|
<Tag
|
||||||
|
style={{
|
||||||
|
color: '#556EE6',
|
||||||
|
padding: '2px 5px',
|
||||||
|
background: '#eff1fd',
|
||||||
|
marginLeft: '4px',
|
||||||
|
transform: 'scale(0.83,0.83)',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Controller
|
||||||
|
</Tag>
|
||||||
|
)}
|
||||||
|
</>
|
||||||
) : (
|
) : (
|
||||||
|
<>
|
||||||
<span>{t}</span>
|
<span>{t}</span>
|
||||||
|
{r?.kafkaRoleList?.includes('controller') && (
|
||||||
|
<Tag
|
||||||
|
style={{
|
||||||
|
color: '#556EE6',
|
||||||
|
padding: '2px 5px',
|
||||||
|
background: '#eff1fd',
|
||||||
|
marginLeft: '4px',
|
||||||
|
transform: 'scale(0.83,0.83)',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Controller
|
||||||
|
</Tag>
|
||||||
|
)}
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
fixed: 'left',
|
fixed: 'left',
|
||||||
width: 120,
|
width: 150,
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
// title: 'Rack',
|
// title: 'Rack',
|
||||||
|
|||||||
Reference in New Issue
Block a user