Commit dc2fd6c1 authored by 智勇's avatar 智勇

details 增加 lanIp

parent 60892067
......@@ -78,8 +78,11 @@ router.post('/details', async (ctx) => {
namespace: ctx.Joi.string().required(),
}))
const res = await ctx.cluster.node_list()
const lanIp = _.get(res, 'nodes[0].lanIp', '')
const data = await ctx.cluster.service_get(ctx.request.body.serviceName, ctx.request.body.namespace)
ctx.body = ctx.ok(data)
ctx.body = ctx.ok(Object.assign({}, data, { lanIp }))
})
router.post('/delete', async (ctx) => {
await ctx.cluster.service_delete(ctx.request.body.serviceName, ctx.request.body.namespace)
......
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