Исправлена обработка зависания VLC.
[vpproxy.git] / plugins / stat_plugin.py
index 1cf9b5efeb2f979fd37d4a85b97a4fa8345f56c4..99e6e0a6ad6fb9316fbdca5f0ad6bc925ef91dea 100644 (file)
@@ -21,7 +21,12 @@ class Stat(VPProxyPlugin):
             '<html><body><h4>Connected clients: ' + str(self.stuff.clientcounter.total) + '</h4>')
         connection.wfile.write(
             '<h5>Concurrent connections limit: ' + str(self.config.maxconns) + '</h5>')
             '<html><body><h4>Connected clients: ' + str(self.stuff.clientcounter.total) + '</h4>')
         connection.wfile.write(
             '<h5>Concurrent connections limit: ' + str(self.config.maxconns) + '</h5>')
+        connection.wfile.write('<table border="1"><tr><th>url</th><th>count</th><th>clients</th></tr>')
         for i in self.stuff.clientcounter.clients:
         for i in self.stuff.clientcounter.clients:
-            connection.wfile.write(str(i) + ' : ' + str(self.stuff.clientcounter.clients[i][0]) + ' ' +
-                                   str(self.stuff.clientcounter.clients[i][1]) + '<br>')
+          connection.wfile.write('<tr>')
+          connection.wfile.write('<td>' + str(i) + ' </td><td> ' + str(self.stuff.clientcounter.clients[i][0]) + '</td><td>')
+          for client in self.stuff.clientcounter.clients[i][1]:
+            connection.wfile.write(str(client) + '<br>')
+          connection.wfile.write('</td></tr>')
+        connection.wfile.write('</table>')
         connection.wfile.write('</body></html>')
         connection.wfile.write('</body></html>')