Admin: Auslastung der Docker-Hosts mit den laufenden Matches
Die Admin-Übersicht zeigt pro Docker-Host belegte und freie Plätze und die Matches, die dort laufen. Ohne konfigurierte Hosts bleibt die Karte aus.
This commit is contained in:
1 parent
c1c9250126
commit
91f979945e
6 files changed
+81
-1
No files matched your search
@@ -248,6 +248,14 @@ export class DockerHostPool {
|
||||
return free;
|
||||
}
|
||||
|
||||
/** Auslastung pro Host: Anzahl Port-Paare insgesamt und belegt. */
|
||||
hostStats() {
|
||||
return this.hosts.map((h) => {
|
||||
const total = Math.floor((h.portRangeEnd - h.portRangeStart + 1) / 2);
|
||||
return { name: h.name, publicHost: h.publicHost, total, used: total - this.freeSlots(h) };
|
||||
});
|
||||
}
|
||||
|
||||
getUsedPorts(publicHost) {
|
||||
return this.depsGetUsedPorts?.(publicHost) ?? new Set();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user