Commit 9f8264d2 authored by 智勇's avatar 智勇

修复

parent 10509027
......@@ -109,8 +109,8 @@ router.post('/details', async (ctx) => {
// const res = await ctx.cluster.node_list()
// const lanIp = _.get(res, 'nodes[0].lanIp', '')
const podData = await podGet(ctx.query.namespace)
const lanIp = podData.body.items.filter(i => i.metadata.name.indexOf(ctx.query.serviceName) !== -1)[0].status.hostIP
const podData = await podGet(ctx.request.body.namespace)
const lanIp = podData.body.items.filter(i => i.metadata.name.indexOf(ctx.request.body.serviceName) !== -1)[0].status.hostIP
const data = await ctx.cluster.service_get(ctx.request.body.serviceName, ctx.request.body.namespace)
ctx.body = ctx.ok(Object.assign({}, data, { lanIp }))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment