Skip to content

Commit

Permalink
fix: 添加container 状态列表
Browse files Browse the repository at this point in the history
  • Loading branch information
random committed Oct 7, 2024
1 parent 9285808 commit f7741cf
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 f7741cf

Please sign in to comment.