diff --git a/src/api/cluster.js b/src/api/cluster.js index 5c65b2e5..d079ffbe 100644 --- a/src/api/cluster.js +++ b/src/api/cluster.js @@ -3,8 +3,7 @@ import http from '@/common/http' // 加载节点 export const loadNodes = async () => { const res = await http.get('/nodes') - const nodes = res.map(($) => $.node) - return nodes + return res } // 加载集群信息 diff --git a/src/views/Settings/ClusterSettings.vue b/src/views/Settings/ClusterSettings.vue index 45642f70..357b5f84 100644 --- a/src/views/Settings/ClusterSettings.vue +++ b/src/views/Settings/ClusterSettings.vue @@ -256,7 +256,7 @@ export default { getNodes(currentNodes) { const runningReg = /running/i return currentNodes.map((item) => { - return { name: item.node, isRunning: runningReg.test(item.status) } + return { name: item.node, isRunning: runningReg.test(item.node_status) } }) }, },