diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2019-03-16 07:50:20 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2019-03-16 07:50:20 +0000 |
commit | b26be28df9fd4db2106cc2a557966c9d2a7345d9 (patch) | |
tree | 437e6106c0aa2e73f2dd68d0551545ae503f60d7 /web/gui/main.js | |
parent | Adding upstream version 1.12.2. (diff) | |
download | netdata-b26be28df9fd4db2106cc2a557966c9d2a7345d9.tar.xz netdata-b26be28df9fd4db2106cc2a557966c9d2a7345d9.zip |
Adding upstream version 1.13.0.upstream/1.13.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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 8ea33e540..c6a2bac13 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); } |