diff options
author | Bart Polot <bart@net.in.tum.de> | 2014-03-06 01:36:12 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2014-03-06 01:36:12 +0000 |
commit | 121e38c60f40238777e5704aa4aea2ca423a34fd (patch) | |
tree | 049f6339f7778f76c3cb13c8f4459bbef51cb632 /contrib/log.php | |
parent | 721e6b63714c90bb1de9c5bb4e6c62ef6fe5bb04 (diff) | |
download | gnunet-121e38c60f40238777e5704aa4aea2ca423a34fd.tar.gz gnunet-121e38c60f40238777e5704aa4aea2ca423a34fd.zip |
- filter peers and components aware of each other
Diffstat (limited to 'contrib/log.php')
-rw-r--r-- | contrib/log.php | 41 |
1 files changed, 23 insertions, 18 deletions
diff --git a/contrib/log.php b/contrib/log.php index a54052d3c..210047270 100644 --- a/contrib/log.php +++ b/contrib/log.php | |||
@@ -196,16 +196,16 @@ ksort($comps); | |||
196 | <button id="INFO" class="btn btn-default btn-showlevel active"><span class="glyphicon glyphicon glyphicon-info-sign"></span> Info</button> | 196 | <button id="INFO" class="btn btn-default btn-showlevel active"><span class="glyphicon glyphicon glyphicon-info-sign"></span> Info</button> |
197 | <button id="DEBUG" class="btn btn-primary btn-showlevel"><span class="glyphicon glyphicon glyphicon-wrench"></span> Debug</button> | 197 | <button id="DEBUG" class="btn btn-primary btn-showlevel"><span class="glyphicon glyphicon glyphicon-wrench"></span> Debug</button> |
198 | </div> | 198 | </div> |
199 | <div class="btn-group"> | 199 | <div id="btn-showpeer" class="btn-group"> |
200 | <?php foreach($peers as $pid=>$id): ?> | 200 | <?php foreach($peers as $pid=>$id): ?> |
201 | <button id="P-<?php echo $id ?>" class="btn btn-default btn-element btn-showpeer active"><?php echo $id ?></button> | 201 | <button id="P-<?php echo $id ?>" class="btn btn-default btn-element active"><?php echo $id ?></button> |
202 | <?php endforeach ?> | 202 | <?php endforeach ?> |
203 | <button class="btn btn-default btn-showall">All</button> | 203 | <button class="btn btn-default btn-showall">All</button> |
204 | <button class="btn btn-default btn-shownone">None</button> | 204 | <button class="btn btn-default btn-shownone">None</button> |
205 | </div> | 205 | </div> |
206 | <div class="btn-group"> | 206 | <div id="btn-showcomp" class="btn-group"> |
207 | <?php foreach($comps as $c=>$one): ?> | 207 | <?php foreach($comps as $c=>$one): ?> |
208 | <button id="C-<?php echo $c ?>" class="btn btn-default btn-element btn-showcomp active"><?php echo $c ?></button> | 208 | <button id="C-<?php echo $c ?>" class="btn btn-default btn-element active"><?php echo $c ?></button> |
209 | <?php endforeach ?> | 209 | <?php endforeach ?> |
210 | <button class="btn btn-default btn-showall">All</button> | 210 | <button class="btn btn-default btn-showall">All</button> |
211 | <button class="btn btn-default btn-shownone">None</button> | 211 | <button class="btn btn-default btn-shownone">None</button> |
@@ -276,12 +276,14 @@ ksort($comps); | |||
276 | { | 276 | { |
277 | $("#"+peer).toggleClass("active"); | 277 | $("#"+peer).toggleClass("active"); |
278 | if ($("#"+peer).hasClass("active")) { | 278 | if ($("#"+peer).hasClass("active")) { |
279 | for (var index = 0; index < types.length; ++index) { | 279 | $("#btn-showcomp > .btn-element.active").each(function(){ |
280 | var className = "." + types[index] + "." + peer; | 280 | for (var index = 0; index < types.length; ++index) { |
281 | $(className).show(); | 281 | var className = "." + types[index] + "." + peer + "." + this.id; |
282 | if ($("#"+types[index]).hasClass("active")) | 282 | $(className).show(); |
283 | return; | 283 | if ($("#"+types[index]).hasClass("active")) |
284 | } | 284 | return; |
285 | } | ||
286 | }); | ||
285 | } else { | 287 | } else { |
286 | $("."+peer).hide(); | 288 | $("."+peer).hide(); |
287 | } | 289 | } |
@@ -291,12 +293,15 @@ ksort($comps); | |||
291 | { | 293 | { |
292 | $("#"+comp).toggleClass("active"); | 294 | $("#"+comp).toggleClass("active"); |
293 | if ($("#"+comp).hasClass("active")) { | 295 | if ($("#"+comp).hasClass("active")) { |
294 | for (var index = 0; index < types.length; ++index) { | 296 | $("#btn-showpeer > .btn-element.active").each(function(){ |
295 | var className = "." + types[index] + "." + comp; | 297 | for (var index = 0; index < types.length; ++index) { |
296 | $(className).show(); | 298 | var className = "." + types[index] + "." + comp + "." + this.id; |
297 | if ($("#"+types[index]).hasClass("active")) | 299 | console.log (className); |
298 | return; | 300 | $(className).show(); |
299 | } | 301 | if ($("#"+types[index]).hasClass("active")) |
302 | return; | ||
303 | } | ||
304 | }); | ||
300 | } else { | 305 | } else { |
301 | $("."+comp).hide(); | 306 | $("."+comp).hide(); |
302 | } | 307 | } |
@@ -364,8 +369,8 @@ ksort($comps); | |||
364 | $(".btn-showup").on ("click", function(){ load_debug(this, true) }); | 369 | $(".btn-showup").on ("click", function(){ load_debug(this, true) }); |
365 | $(".btn-showdown").on ("click", function(){ load_debug(this, false) }); | 370 | $(".btn-showdown").on ("click", function(){ load_debug(this, false) }); |
366 | $(".btn-showlevel").on ("click", function(){ showlevel(this.id) }); | 371 | $(".btn-showlevel").on ("click", function(){ showlevel(this.id) }); |
367 | $(".btn-showpeer").on ("click", function(){ showpeer(this.id) }); | 372 | $("#btn-showpeer > .btn-element").on ("click", function(){ showpeer(this.id) }); |
368 | $(".btn-showcomp").on ("click", function(){ showcomp(this.id) }); | 373 | $("#btn-showcomp > .btn-element").on ("click", function(){ showcomp(this.id) }); |
369 | $(".btn-showall").on ("click", function(){ showall(this) }); | 374 | $(".btn-showall").on ("click", function(){ showall(this) }); |
370 | $(".btn-shownone").on ("click", function(){ shownone(this) }); | 375 | $(".btn-shownone").on ("click", function(){ shownone(this) }); |
371 | }); | 376 | }); |