X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=contrib%2Flog.php;h=b2ca9ed6cde69f7cd88386b6851ba249532b7bf2;hb=9d510d2c9b77bede694e7cec5b09eac6aeae8c98;hp=4188800aa3a9cbb603d3e51a3e7c8a929e7e80a9;hpb=d0c5f22c081c6dae30307684d6d816ebf602c656;p=oweals%2Fgnunet.git diff --git a/contrib/log.php b/contrib/log.php index 4188800aa..b2ca9ed6c 100644 --- a/contrib/log.php +++ b/contrib/log.php @@ -108,7 +108,8 @@ if ($start !== null || $stop !== null) { die(); } // echo $t1-$t0; - +ksort($peers); +ksort($comps); ?> @@ -195,16 +196,16 @@ if ($start !== null || $stop !== null) { -
+
$id): ?> - +
-
+
$one): ?> - + @@ -253,8 +254,11 @@ if ($start !== null || $stop !== null) { $(".btn-showlevel").removeClass("active"); $("#"+level).addClass("active"); for (var index = 0; index < types.length; ++index) { - $(".btn-showpeer.active").each(function(){ - $("."+types[index]+"."+this.id).show(); + $("#btn-showpeer > .btn-element.active").each(function(){ + var peer = this.id; + $("#btn-showcomp > .btn-element.active").each(function(){ + $("."+types[index]+"."+peer+"."+this.id).show(); + }); }); if (types[index] == level) return; @@ -275,12 +279,14 @@ if ($start !== null || $stop !== null) { { $("#"+peer).toggleClass("active"); if ($("#"+peer).hasClass("active")) { - for (var index = 0; index < types.length; ++index) { - var className = "." + types[index] + "." + peer; - $(className).show(); - if ($("#"+types[index]).hasClass("active")) - return; - } + $("#btn-showcomp > .btn-element.active").each(function(){ + for (var index = 0; index < types.length; ++index) { + var className = "." + types[index] + "." + peer + "." + this.id; + $(className).show(); + if ($("#"+types[index]).hasClass("active")) + return; + } + }); } else { $("."+peer).hide(); } @@ -290,12 +296,14 @@ if ($start !== null || $stop !== null) { { $("#"+comp).toggleClass("active"); if ($("#"+comp).hasClass("active")) { - for (var index = 0; index < types.length; ++index) { - var className = "." + types[index] + "." + comp; - $(className).show(); - if ($("#"+types[index]).hasClass("active")) - return; - } + $("#btn-showpeer > .btn-element.active").each(function(){ + for (var index = 0; index < types.length; ++index) { + var className = "." + types[index] + "." + comp + "." + this.id; + $(className).show(); + if ($("#"+types[index]).hasClass("active")) + return; + } + }); } else { $("."+comp).hide(); } @@ -338,10 +346,8 @@ if ($start !== null || $stop !== null) { var loc = $("#"+(first-1)); var trs = $(resp); for (var peer in peers) { - console.log (peer + "=>" + peers[peer]); trs.filter(".P-"+peer).removeClass('P-'+peer).addClass('P-'+peers[peer]).find("td.peer").html(peers[peer]); } - console.log (trs); if (loc.length > 0) loc.after(trs); else { @@ -363,8 +369,8 @@ if ($start !== null || $stop !== null) { $(".btn-showup").on ("click", function(){ load_debug(this, true) }); $(".btn-showdown").on ("click", function(){ load_debug(this, false) }); $(".btn-showlevel").on ("click", function(){ showlevel(this.id) }); - $(".btn-showpeer").on ("click", function(){ showpeer(this.id) }); - $(".btn-showcomp").on ("click", function(){ showcomp(this.id) }); + $("#btn-showpeer > .btn-element").on ("click", function(){ showpeer(this.id) }); + $("#btn-showcomp > .btn-element").on ("click", function(){ showcomp(this.id) }); $(".btn-showall").on ("click", function(){ showall(this) }); $(".btn-shownone").on ("click", function(){ shownone(this) }); });