diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2019-03-16 07:50:45 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2019-03-16 07:50:45 +0000 |
commit | 87cce1817d03daca8c31be82d781ec47a4560087 (patch) | |
tree | 06cb3e407ea32dcc385cbe4fb77e251e34bc1e68 /web/gui/main.js | |
parent | Releasing debian version 1.12.2-2. (diff) | |
download | netdata-87cce1817d03daca8c31be82d781ec47a4560087.tar.xz netdata-87cce1817d03daca8c31be82d781ec47a4560087.zip |
Merging upstream version 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); } |