Commit 3bbf7302 authored by xuezj's avatar xuezj

非base服务增加tag

parent 6db94cea
......@@ -24,16 +24,16 @@ router.get('/', async (ctx) => {
const data = await ctx.cluster.service_list(ctx.query.namespace)
const getDetail = async (item) => {
let resData = await ctx.cluster.service_get(item.serviceName, ctx.query.namespace)
item.portMappings = resData.service.portMappings
item.image = resData.service.containers[0].image
item.wanIp = wanIp
if (item.userLabels.type === 'base') {
item.portMappings = resData.service.portMappings
item.wanIp = wanIp
}
return
}
const task = []
for (let i = 0; i < data.services.length; i += 1) {
if (data.services[i].userLabels.type === 'base') {
task.push(getDetail(data.services[i]))
}
task.push(getDetail(data.services[i]))
}
await Promise.all(task)
ctx.body = ctx.ok(data)
......
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