feat: add image volume controller

Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
2019-08-01 17:22:37 +08:00
parent 28d541b26f
commit f0810cc9d9
15 changed files with 196 additions and 28 deletions

View File

@@ -19,12 +19,18 @@ class DashboardController {
let networks = await docker.network.list();
let nodes = await docker.node.list();
let tasks = await docker.task.list();
let containers = await docker.container.list();
let images = await docker.image.list();
let volumes = await docker.volume.list();
return {
nodes: nodes.map(n => n.Description.Hostname),
tasks: tasks.map(t => t.ID),
stacks: Array.from(new Set(stacks)),
services,
networks: networks.map(n => n.Name)
networks: networks.map(n => n.Name),
containers: containers.map(c => c.Names),
images: images.map(i => i.Id),
volumes: volumes.Volumes.map(v => v.Name)
}
}
}