diff options
Diffstat (limited to 'web/gui/main.js')
-rw-r--r-- | web/gui/main.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/web/gui/main.js b/web/gui/main.js index 8ea33e54..c6a2bac1 100644 --- a/web/gui/main.js +++ b/web/gui/main.js @@ -495,7 +495,9 @@ function renderStreamedHosts(options) { } var master = options.hosts[0].hostname; - var sorted = options.hosts.sort(function (a, b) { + // We sort a clone of options.hosts, to keep the master as the first element + // for future calls. + var sorted = options.hosts.slice(0).sort(function (a, b) { if (a.hostname === master) { return -1; } @@ -4744,7 +4746,7 @@ function clearCloudLocalStorageItems() { } function signIn() { - const url = `${NETDATA.registry.cloudBaseURL}/account/sign-in-agent?origin=${encodeURIComponent(window.location.origin + "/")}`; + const url = `${NETDATA.registry.cloudBaseURL}/account/sign-in-agent?id=${NETDATA.registry.machine_guid}&name=${encodeURIComponent(NETDATA.registry.hostname)}&origin=${encodeURIComponent(window.location.origin + "/")}`; window.open(url); } |