modify alert bug

This commit is contained in:
silenceqi 2021-09-07 10:03:40 +08:00
parent 13ce75d197
commit e01c081ed1
3 changed files with 6 additions and 5 deletions

View File

@ -68,7 +68,7 @@ export const RequestStatusBar: FunctionComponent<Props> = ({
let content: React.ReactNode = null; let content: React.ReactNode = null;
const clusterContent = (<EuiFlexItem grow={false} style={{marginRight:'auto'}}> const clusterContent = (<EuiFlexItem grow={false} style={{marginRight:'auto'}}>
<EuiBadge> <EuiBadge>
{selectedCluster.endpoint}&nbsp;-&nbsp;{selectedCluster.version} {selectedCluster.host}&nbsp;-&nbsp;{selectedCluster.version}
</EuiBadge> </EuiBadge>
</EuiFlexItem>); </EuiFlexItem>);

View File

@ -58,6 +58,7 @@ export default {
name: item.name, name: item.name,
id: item.id, id: item.id,
endpoint: item.endpoint, endpoint: item.endpoint,
host: item.host,
version: item.version, version: item.version,
}; };
}) })
@ -131,10 +132,10 @@ export default {
if(pathname && global.selectedClusterID){ if(pathname && global.selectedClusterID){
const newPart = `/elasticsearch/${global.selectedClusterID}/`; const newPart = `/elasticsearch/${global.selectedClusterID}/`;
if(!pathname.includes('elasticsearch')){ if(!pathname.includes('elasticsearch')){
history.replace(pathname+newPart+search) history.replace(pathname+newPart+ (search || ''))
}else{ }else{
const newPath = pathname.replace(/\/elasticsearch\/(\w+)\/?/, newPart); const newPath = pathname.replace(/\/elasticsearch\/(\w+)\/?/, newPart);
history.replace(newPath+search) history.replace(newPath+(search || ''))
} }
} }
}, },

View File

@ -93,8 +93,8 @@ class Index extends React.Component {
} }
},{ },{
title: '集群地址', title: '集群地址',
dataIndex: 'endpoint', dataIndex: 'host',
key: 'endpoint', key: 'host',
}, },
{ {
title: '监控启用状态', title: '监控启用状态',