update id to cluster_id

This commit is contained in:
medcl 2021-03-06 14:58:04 +08:00
parent 37e5d860be
commit 7a8651bf1e
2 changed files with 4 additions and 4 deletions

View File

@ -30,13 +30,13 @@ export default [
name: 'overview', name: 'overview',
component: './Cluster/Overview', component: './Cluster/Overview',
}, { }, {
path: '/cluster/overview/:elasticsearch', path: '/cluster/overview/:cluster_id',
name: 'overview', name: 'overview',
component: './Cluster/Overview', component: './Cluster/Overview',
hideInMenu: true, hideInMenu: true,
}, },
{ {
path: '/cluster/monitoring/:name', path: '/cluster/monitoring/:cluster_id',
name: 'cluster', name: 'cluster',
component: './Cluster/ClusterMonitor', component: './Cluster/ClusterMonitor',
hideInMenu: true, hideInMenu: true,
@ -45,7 +45,7 @@ export default [
name: 'monitoring', name: 'monitoring',
component: './Cluster/Metrics', component: './Cluster/Metrics',
}, { }, {
path: '/cluster/metrics/:elasticsearch', path: '/cluster/metrics/:cluster_id',
name: 'monitoring', name: 'monitoring',
component: './Cluster/Metrics', component: './Cluster/Metrics',
hideInMenu: true, hideInMenu: true,

View File

@ -243,7 +243,7 @@ class ClusterMonitor extends PureComponent {
componentDidMount() { componentDidMount() {
const {match, location} = this.props; const {match, location} = this.props;
const queryESID=this.props.match.params.elasticsearch; const queryESID=this.props.match.params.cluster_id;
if (queryESID !== null&&queryESID !== undefined){ if (queryESID !== null&&queryESID !== undefined){
this.state.clusterID=queryESID this.state.clusterID=queryESID