diff options
-rw-r--r-- | contrib/log.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/contrib/log.php b/contrib/log.php index ee6fc09eb..00f49f83b 100644 --- a/contrib/log.php +++ b/contrib/log.php | |||
@@ -201,6 +201,7 @@ if ($start !== null || $stop !== null) { | |||
201 | <script> | 201 | <script> |
202 | 202 | ||
203 | var types = ["ERROR", "WARNING", "INFO", "DEBUG"]; | 203 | var types = ["ERROR", "WARNING", "INFO", "DEBUG"]; |
204 | var peers = {<?php foreach($peers as $pid=>$id) echo "'$pid': '$id', "; ?>}; | ||
204 | var msg_timeout; | 205 | var msg_timeout; |
205 | 206 | ||
206 | function msg (content) | 207 | function msg (content) |
@@ -285,10 +286,16 @@ if ($start !== null || $stop !== null) { | |||
285 | data: { a: first, z: last } | 286 | data: { a: first, z: last } |
286 | }).done(function ( resp ) { | 287 | }).done(function ( resp ) { |
287 | var loc = $("#"+(first-1)); | 288 | var loc = $("#"+(first-1)); |
289 | var trs = $(resp); | ||
290 | for (var peer in peers) { | ||
291 | console.log (peer + "=>" + peers[peer]); | ||
292 | trs.filter("."+peer).removeClass(peer).addClass(peers[peer]).find("td.peer").html(peers[peer]); | ||
293 | } | ||
294 | console.log (trs); | ||
288 | if (loc.length > 0) | 295 | if (loc.length > 0) |
289 | loc.after(resp); | 296 | loc.after(trs); |
290 | else { | 297 | else { |
291 | $("#"+(last+1)).before(resp); | 298 | $("#"+(last+1)).before(trs); |
292 | } | 299 | } |
293 | msg("Done loading " + (last-first+1) + " lines."); | 300 | msg("Done loading " + (last-first+1) + " lines."); |
294 | }); | 301 | }); |