mirror of
https://github.com/louislam/dockge.git
synced 2026-05-21 14:02:17 +00:00
Add resource usage stats to the compose page (#700)
Co-authored-by: cmcooper1980 <31871143+cmcooper1980@users.noreply.github.com>
This commit is contained in:
@@ -240,6 +240,22 @@ export class DockerSocketHandler extends AgentSocketHandler {
|
||||
}
|
||||
});
|
||||
|
||||
// Docker stats
|
||||
agentSocket.on("dockerStats", async (callback) => {
|
||||
try {
|
||||
checkLogin(socket);
|
||||
|
||||
const dockerStats = Object.fromEntries(await server.getDockerStats());
|
||||
callbackResult({
|
||||
ok: true,
|
||||
dockerStats,
|
||||
}, callback);
|
||||
server.sendStackList();
|
||||
} catch (e) {
|
||||
callbackError(e, callback);
|
||||
}
|
||||
});
|
||||
|
||||
// Start a service
|
||||
agentSocket.on("startService", async (stackName: unknown, serviceName: unknown, callback) => {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user