mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-08-25 00:15:06 +03:00
Merge branch 'develop' of github.com:RiV-chain/RiV-mesh into develop
This commit is contained in:
commit
5abaab26b7
3 changed files with 14 additions and 10 deletions
|
@ -275,6 +275,9 @@ func run(args yggArgs, ctx context.Context) {
|
|||
}
|
||||
}
|
||||
|
||||
// Start HTTP server
|
||||
n.admin.StartHttpServer(args.useconffile, cfg)
|
||||
|
||||
// Setup the multicast module.
|
||||
{
|
||||
options := []multicast.SetupOption{}
|
||||
|
@ -317,8 +320,6 @@ func run(args yggArgs, ctx context.Context) {
|
|||
logger.Infof("Your public key is %s", hex.EncodeToString(public[:]))
|
||||
logger.Infof("Your IPv6 address is %s", address.String())
|
||||
logger.Infof("Your IPv6 subnet is %s", subnet.String())
|
||||
// Start HTTP server
|
||||
n.admin.StartHttpServer(args.useconffile, cfg)
|
||||
// Block until we are told to shut down.
|
||||
<-ctx.Done()
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"use strict";
|
||||
console.log("IE load fix");
|
||||
|
||||
var $ = function $(id) {
|
||||
return document.getElementById(id);
|
||||
|
@ -231,8 +232,9 @@ function togglePrivKeyVisibility() {
|
|||
}
|
||||
|
||||
function humanReadableSpeed(speed) {
|
||||
var i = speed == 0 ? 0 : Math.floor(Math.log(speed) / Math.log(1024));
|
||||
return (speed / Math.pow(1024, i)).toFixed(2) * 1 + ' ' + ['Bps', 'kBps', 'MBps', 'GBps', 'TBps'][i];
|
||||
if (speed < 0) return "? B/s";
|
||||
var i = speed < 1 ? 0 : Math.floor(Math.log(speed) / Math.log(1024));
|
||||
return (speed / Math.pow(1024, i)).toFixed(2) * 1 + ' ' + ['bps', 'kbps', 'Mbps', 'Gbps', 'Tbps'][i];
|
||||
}
|
||||
|
||||
var ui = ui || {
|
||||
|
@ -347,8 +349,8 @@ ui.updateSpeed = function (peers) {
|
|||
ui._rsbytes = rsbytes;
|
||||
} else {
|
||||
delete ui._rsbytes;
|
||||
$("dn_speed").innerText = "? Bs";
|
||||
$("up_speed").innerText = "? Bs";
|
||||
$("dn_speed").innerText = humanReadableSpeed(-1);
|
||||
$("up_speed").innerText = humanReadableSpeed(-1);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -225,8 +225,9 @@ function togglePrivKeyVisibility() {
|
|||
}
|
||||
|
||||
function humanReadableSpeed(speed) {
|
||||
var i = speed == 0 ? 0 : Math.floor(Math.log(speed) / Math.log(1024));
|
||||
return (speed / Math.pow(1024, i)).toFixed(2) * 1 + ' ' + ['Bps', 'kBps', 'MBps', 'GBps', 'TBps'][i];
|
||||
if (speed < 0) return "? B/s";
|
||||
var i = speed < 1 ? 0 : Math.floor(Math.log(speed) / Math.log(1024));
|
||||
return (speed / Math.pow(1024, i)).toFixed(2) * 1 + ' ' + ['bps', 'kbps', 'Mbps', 'Gbps', 'Tbps'][i];
|
||||
}
|
||||
|
||||
var ui = ui || {
|
||||
|
@ -327,8 +328,8 @@ ui.updateSpeed = peers => {
|
|||
ui._rsbytes = rsbytes;
|
||||
} else {
|
||||
delete ui._rsbytes;
|
||||
$("dn_speed").innerText = "? Bs";
|
||||
$("up_speed").innerText = "? Bs";
|
||||
$("dn_speed").innerText = humanReadableSpeed(-1);
|
||||
$("up_speed").innerText = humanReadableSpeed(-1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue