@@ -30,6 +30,7 @@ public class NetDbHelper extends FormHandler {
30
30
private long _date ;
31
31
private int _limit = DEFAULT_LIMIT ;
32
32
private boolean _lease ;
33
+ private boolean _clientOnly ;
33
34
private boolean _debug ;
34
35
private boolean _graphical ;
35
36
private SigType _type ;
@@ -70,7 +71,7 @@ public class NetDbHelper extends FormHandler {
70
71
"" , // 9
71
72
"?f=5" , // 10
72
73
"?f=6" , // 11
73
- "?l=3 " , // 12
74
+ "?l=7 " , // 12
74
75
};
75
76
76
77
@@ -205,6 +206,7 @@ public void setFull(String f) {
205
206
}
206
207
207
208
public void setLease (String l ) {
209
+ _clientOnly = "7" .equals (l );
208
210
_debug = "2" .equals (l );
209
211
_lease = _debug || "1" .equals (l );
210
212
}
@@ -246,6 +248,14 @@ public void setIntros(String f) {
246
248
_icount = Integer .parseInt (f );
247
249
} catch (NumberFormatException nfe ) {}
248
250
}
251
+
252
+ public void setClientPage (String f ) {
253
+ try {
254
+
255
+ } catch (Exception e ){
256
+ //if (_log.shouldLog)
257
+ }
258
+ }
249
259
250
260
/**
251
261
* call for non-text-mode browsers
@@ -333,7 +343,7 @@ public String getNetDbSummary(String client, boolean clientOnly) {
333
343
_family , _caps , _ip , _sybil , _port , _highPort , _type , _etype ,
334
344
_mtu , _ipv6 , _ssucaps , _transport , _cost , _icount , client , clientOnly );
335
345
} else if (_lease ) {
336
- renderer .renderLeaseSetHTML (_out , _debug , client , clientOnly );
346
+ renderer .renderLeaseSetHTML (_out , _debug , client , _clientOnly );
337
347
} else if (_hostname != null ) {
338
348
renderer .renderLeaseSet (_out , _hostname , true );
339
349
} else if (_full == 3 ) {
@@ -344,6 +354,14 @@ else if ((_mode == 13 || _mode == 16) && !_postOK)
344
354
(new SybilRenderer (_context )).getNetDbSummary (_out , _newNonce , _mode , _date );
345
355
} else if (_full == 4 ) {
346
356
renderLookupForm ();
357
+ } else if (_full == 5 ) {
358
+ renderer .renderStatusHTML (_out , _limit , _page , _full , null , true );
359
+ } else if (_full == 6 ) {
360
+ renderer .renderStatusHTML (_out , _limit , _page , _full , null , true );
361
+ } else if (_clientOnly && client == null ) {
362
+ for (String _client : _context .netDb ().getClients ()) {
363
+ renderer .renderLeaseSetHTML (_out , _debug , _client , _clientOnly );
364
+ }
347
365
} else {
348
366
if (_full == 0 && _sort != null )
349
367
_full = 3 ;
@@ -355,16 +373,6 @@ else if ((_mode == 13 || _mode == 16) && !_postOK)
355
373
return "" ;
356
374
}
357
375
358
- public String getClientNetDbSummaries () {
359
- String rv = "" ;
360
- for (String client : _context .netDb ().getClients ()){
361
- rv += "<div id=\" " + client + "\" >\n " ;
362
- rv += getClientNetDbSummary (client ) + "\n " ;
363
- rv += "</div>\n " ;
364
- }
365
- return rv ;
366
- }
367
-
368
376
public String getClientNetDbSummary (String client ) {
369
377
return getNetDbSummary (client , true );
370
378
}
@@ -394,6 +402,12 @@ private int getTab() {
394
402
return 8 ;
395
403
if (_hostname != null )
396
404
return 9 ;
405
+ if (_full == 5 )
406
+ return 10 ;
407
+ if (_full == 6 )
408
+ return 11 ;
409
+ if (_clientOnly )
410
+ return 12 ;
397
411
return 0 ;
398
412
}
399
413
@@ -425,9 +439,9 @@ private void renderNavBar() throws IOException {
425
439
buf .append ("<span class=\" tab\" >" );
426
440
buf .append ("<a href=\" netdb" ).append (links [i ]).append ("\" >" ).append (_t (titles [i ])).append ("</a>" );
427
441
}
428
- if (span )
442
+ if (span ) {
429
443
buf .append ("</span>\n " );
430
- else if (i != titles .length - 1 )
444
+ } else if (i != titles .length - 1 )
431
445
buf .append (" \n " );
432
446
}
433
447
if (!span )
0 commit comments