summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--web/gui/index.html2
-rw-r--r--web/gui/main.js6
2 files changed, 5 insertions, 3 deletions
diff --git a/web/gui/index.html b/web/gui/index.html
index faee5ba910..08bd863d04 100644
--- a/web/gui/index.html
+++ b/web/gui/index.html
@@ -58,7 +58,7 @@
<meta name="twitter:description" content="Unparalleled insights, in real-time, of everything happening on your Linux systems and applications, with stunning, interactive web dashboards and powerful performance and health alarms." />
<meta name="twitter:image" content="https://cloud.githubusercontent.com/assets/2662304/14092712/93b039ea-f551-11e5-822c-beadbf2b2a2e.gif" />
- <script src="main.js?v=4"></script>
+ <script src="main.js?v=5"></script>
</head>
<body data-spy="scroll" data-target="#sidebar" data-offset="100">
diff --git a/web/gui/main.js b/web/gui/main.js
index c5f4eb50bc..c6a2bac135 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?id=${NETDATA.registry.machine_guid}&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);
}