diff options
-rw-r--r-- | src/main/java/org/openslx/dnbd3/status/StatisticsGenerator.java | 4 | ||||
-rw-r--r-- | src/main/java/org/openslx/dnbd3/status/output/ServerStats.java | 1 | ||||
l---------[-rw-r--r--] | static/index.html | 8 | ||||
-rw-r--r-- | static/legacy.html | 7 |
4 files changed, 13 insertions, 7 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/src/main/java/org/openslx/dnbd3/status/output/ServerStats.java b/src/main/java/org/openslx/dnbd3/status/output/ServerStats.java index 97a8ea8..d464695 100644 --- a/src/main/java/org/openslx/dnbd3/status/output/ServerStats.java +++ b/src/main/java/org/openslx/dnbd3/status/output/ServerStats.java @@ -36,6 +36,7 @@ public class ServerStats implements Cloneable ServerStats n = new ServerStats(); n.address = this.address; n.clientCount = this.clientCount; + n.serverCount = this.serverCount; n.uptime = this.uptime; n.bytesSent = this.bytesSent; n.bytesReceived = this.bytesReceived; diff --git a/static/index.html b/static/index.html index 60053af..4f7c9d1 100644..120000 --- a/static/index.html +++ b/static/index.html @@ -1,7 +1 @@ -<html><body style="padding:0;margin:0;overflow:hidden"><img alt="" src="image.png" id="sasa" style="padding:0;margin:0"> -<script type="text/javascript"> -setInterval(function() { - document.getElementById("sasa").src = '/image.png?a=' + Math.random(); -}, 2000); -</script> -</body></html> +table.html
\ No newline at end of file diff --git a/static/legacy.html b/static/legacy.html new file mode 100644 index 0000000..60053af --- /dev/null +++ b/static/legacy.html @@ -0,0 +1,7 @@ +<html><body style="padding:0;margin:0;overflow:hidden"><img alt="" src="image.png" id="sasa" style="padding:0;margin:0"> +<script type="text/javascript"> +setInterval(function() { + document.getElementById("sasa").src = '/image.png?a=' + Math.random(); +}, 2000); +</script> +</body></html> |