mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 17:12:13 -06:00
http rtt in serverinfo panel
This commit is contained in:
parent
910797ccb6
commit
d27f110498
|
@ -124,9 +124,7 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{%- if srv_info %}
|
|
||||||
<div id="srv_info"><span>{{ srv_info }}</span></div>
|
<div id="srv_info"><span>{{ srv_info }}</span></div>
|
||||||
{%- endif %}
|
|
||||||
|
|
||||||
<div id="widget"></div>
|
<div id="widget"></div>
|
||||||
|
|
||||||
|
|
|
@ -2220,6 +2220,7 @@ var ACtx = !IPHONE && (window.AudioContext || window.webkitAudioContext),
|
||||||
hash0 = location.hash,
|
hash0 = location.hash,
|
||||||
sloc0 = '' + location,
|
sloc0 = '' + location,
|
||||||
noih = /[?&]v\b/.exec(sloc0),
|
noih = /[?&]v\b/.exec(sloc0),
|
||||||
|
rtt = null,
|
||||||
ldks = [],
|
ldks = [],
|
||||||
dks = {},
|
dks = {},
|
||||||
dk, mp;
|
dk, mp;
|
||||||
|
@ -7698,6 +7699,8 @@ var treectl = (function () {
|
||||||
if (!xhrchk(this, L.fl_xe1, L.fl_xe2))
|
if (!xhrchk(this, L.fl_xe1, L.fl_xe2))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
rtt = Date.now() - this.ts;
|
||||||
|
|
||||||
r.nextdir = null;
|
r.nextdir = null;
|
||||||
var cdir = get_evpath(),
|
var cdir = get_evpath(),
|
||||||
lfiles = ebi('files'),
|
lfiles = ebi('files'),
|
||||||
|
@ -7741,10 +7744,12 @@ var treectl = (function () {
|
||||||
dk = res.dk;
|
dk = res.dk;
|
||||||
|
|
||||||
srvinf = res.srvinf;
|
srvinf = res.srvinf;
|
||||||
try {
|
if (rtt !== null)
|
||||||
ebi('srv_info').innerHTML = ebi('srv_info2').innerHTML = '<span>' + res.srvinf + '</span>';
|
srvinf += (srvinf ? '</span> // <span>rtt: ' : 'rtt: ') + rtt;
|
||||||
}
|
|
||||||
catch (ex) { }
|
var o = ebi('srv_info2');
|
||||||
|
if (o)
|
||||||
|
o.innerHTML = ebi('srv_info').innerHTML = '<span>' + srvinf + '</span>';
|
||||||
|
|
||||||
if (this.hpush && !showfile.active())
|
if (this.hpush && !showfile.active())
|
||||||
hist_push(this.top + (dk ? '?k=' + dk : ''));
|
hist_push(this.top + (dk ? '?k=' + dk : ''));
|
||||||
|
|
Loading…
Reference in a new issue