Add agent support for image and volume

This commit is contained in:
cuigh
2021-12-20 14:28:43 +08:00
parent cb2cb4ab86
commit dfe15524a2
25 changed files with 253 additions and 139 deletions

View File

@@ -33,6 +33,17 @@ func nodeList(nb biz.NodeBiz) web.HandlerFunc {
return err
}
if ctx.Query("agent") == "true" {
i := 0
for j := 0; j < len(nodes); j++ {
if nodes[j].Agent != "" {
nodes[i] = nodes[j]
i++
}
}
nodes = nodes[:i]
}
return success(ctx, nodes)
}
}