summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main/java/org/openslx/dnbd3/status/StatisticsGenerator.java4
-rw-r--r--static/table.html2
2 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/org/openslx/dnbd3/status/StatisticsGenerator.java b/src/main/java/org/openslx/dnbd3/status/StatisticsGenerator.java
index ba0440c..c9e50e4 100644
--- a/src/main/java/org/openslx/dnbd3/status/StatisticsGenerator.java
+++ b/src/main/java/org/openslx/dnbd3/status/StatisticsGenerator.java
@@ -104,6 +104,10 @@ public class StatisticsGenerator
srv = srv.clone();
srv.images = status.getImages();
srv.clients = status.getClients();
+ if (srv.clientCount == 0 && srv.serverCount == 0) {
+ // For older dnbd3-server
+ srv.clientCount = srv.clients.size();
+ }
newOutput.servers.add( srv );
}
newOutput.timestamp = output.timestamp = System.currentTimeMillis();
diff --git a/static/table.html b/static/table.html
index 84dc81d..5f1b074 100644
--- a/static/table.html
+++ b/static/table.html
@@ -115,7 +115,7 @@ var app = new Vue({
const servers = Object.values(this.serverMap)
servers.sort(this.compareObjectIps)
servers.forEach(server => {
- if (this.rawData.timestamp - server.timestamp > 6000) server.offline = true
+ server.offline = (this.rawData.timestamp - server.timestamp) > 6000
const clients = Object.values(server.clientMap)
if (this.peak) {
server.clients = clients.filter(client => client.peakUploadSpeed > 0)