@@ -3,7 +3,7 @@ const got = require("got");
3
3
4
4
const DOCKER_SOCK = process . env . REACT_APP_DOCKER_SOCK ;
5
5
6
- const CONTAINERS = `${ DOCKER_SOCK } /containers/json?all=true` ;
6
+ const CONTAINERS = `${ DOCKER_SOCK } /containers/json?all=true&size=true ` ;
7
7
const CONTAINER_STOP = id => `${ DOCKER_SOCK } /containers/${ id } /stop` ;
8
8
const CONTAINER_PRUNE = `${ DOCKER_SOCK } /containers/prune` ;
9
9
const CONTAINER = id =>
@@ -32,7 +32,6 @@ router.post("/stop", async (req, res) => {
32
32
33
33
try {
34
34
const data = await got . post ( CONTAINER_STOP ( req . body . containerId ) ) ;
35
- console . log ( await data . statusCode ) ;
36
35
res . sendStatus ( await data . statusCode ) ;
37
36
} catch ( error ) {
38
37
res . sendStatus ( error . statusCode ) ;
@@ -46,7 +45,6 @@ router.post("/prune", async (req, res) => {
46
45
47
46
try {
48
47
const data = await got . post ( CONTAINER_PRUNE ) ;
49
- console . log ( await data . body ) ;
50
48
res . send ( await data . body ) ;
51
49
} catch ( error ) {
52
50
res . sendStatus ( error . statusCode ) ;
@@ -59,7 +57,6 @@ router.get("/:containerId", async (req, res) => {
59
57
60
58
try {
61
59
const data = await got ( CONTAINER ( req . params . containerId ) ) ;
62
- console . log ( data . body ) ;
63
60
res . send ( data . body ) ;
64
61
} catch ( error ) {
65
62
console . error ( error ) ;
@@ -71,7 +68,6 @@ router.delete("/:containerId", async (req, res) => {
71
68
72
69
try {
73
70
const data = await got . delete ( CONTAINER_REMOVE ( req . params . containerId ) ) ;
74
- console . log ( await data . statusCode ) ;
75
71
res . sendStatus ( await data . statusCode ) ;
76
72
} catch ( error ) {
77
73
res . sendStatus ( error . statusCode ) ;
@@ -84,7 +80,6 @@ router.post("/:containerId", async (req, res) => {
84
80
85
81
try {
86
82
const data = await got . post ( CONTAINER_START ( req . params . containerId ) ) ;
87
- console . log ( await data . statusCode ) ;
88
83
res . sendStatus ( await data . statusCode ) ;
89
84
} catch ( error ) {
90
85
res . sendStatus ( error . statusCode ) ;
@@ -97,7 +92,6 @@ router.post("/:containerId/restart", async (req, res) => {
97
92
98
93
try {
99
94
const data = await got . post ( CONTAINER_RESTART ( req . params . containerId ) ) ;
100
- console . log ( await data . statusCode ) ;
101
95
res . sendStatus ( await data . statusCode ) ;
102
96
} catch ( error ) {
103
97
res . sendStatus ( error . statusCode ) ;
@@ -112,7 +106,6 @@ router.post("/:containerId/rename", async (req, res) => {
112
106
const data = await got . post (
113
107
CONTAINER_RENAME ( req . params . containerId , req . query . name )
114
108
) ;
115
- console . log ( await data . statusCode ) ;
116
109
res . sendStatus ( await data . statusCode ) ;
117
110
} catch ( error ) {
118
111
res . sendStatus ( error . statusCode ) ;
@@ -125,7 +118,6 @@ router.post("/:containerId/pause", async (req, res) => {
125
118
126
119
try {
127
120
const data = await got . post ( CONTAINER_PAUSE ( req . params . containerId ) ) ;
128
- console . log ( await data . statusCode ) ;
129
121
res . sendStatus ( await data . statusCode ) ;
130
122
} catch ( error ) {
131
123
res . sendStatus ( error . statusCode ) ;
@@ -138,7 +130,6 @@ router.post("/:containerId/unpause", async (req, res) => {
138
130
139
131
try {
140
132
const data = await got . post ( CONTAINER_UNPAUSE ( req . params . containerId ) ) ;
141
- console . log ( await data . statusCode ) ;
142
133
res . sendStatus ( await data . statusCode ) ;
143
134
} catch ( error ) {
144
135
res . sendStatus ( error . statusCode ) ;
0 commit comments