Skip to content

Commit

Permalink
Merge pull request #76 from qfdk/container-list
Browse files Browse the repository at this point in the history
fix: add container status list
  • Loading branch information
qfdk authored Oct 7, 2024
2 parents 9285808 + f7741cf commit 9a8318e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
1 change: 1 addition & 0 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ app.use((req, res, next) => {
logger.info(`[${req.method}] ${req.originalUrl}`);
next();
});

app.use(publicRoute);
app.use(verifyToken);
app.use(privateRoute);
Expand Down
15 changes: 8 additions & 7 deletions routes/private/containers.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@ const returnContainersRouter = (io) => {
res.locals.formatName = (str) => {
return str[0].split('/')[1];
};
docker.listImages(null, (err, listImages) => {
res.render('containers',
{
containers: containers,
images: listImages
});
});
return res.json({success: true, data: containers});
// docker.listImages(null, (err, listImages) => {
// res.render('containers',
// {
// containers: containers,
// images: listImages
// });
// });
});
});

Expand Down
2 changes: 1 addition & 1 deletion web

0 comments on commit 9a8318e

Please sign in to comment.