Fix incorrect icon for streaming master #5560 (#5561)
* Pass additional details to be used in the authorization form. * Fix incorrect marking of streaming master #5560
George Moschovitis committed
Mar 7, 2019 at 19:12 UTC
3da66e687403a7ab94a25e95134c49f38c857fcf
2 files changed
+5
-3
web/gui/index.html
+1
-1
@@ -58,7 +58,7 @@
58
<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." />
59
<meta name="twitter:image" content="https://cloud.githubusercontent.com/assets/2662304/14092712/93b039ea-f551-11e5-822c-beadbf2b2a2e.gif" />
60
61
- <script src="main.js?v=4"></script>
61
+ <script src="main.js?v=5"></script>
62
</head>
63
64
<body data-spy="scroll" data-target="#sidebar" data-offset="100">
web/gui/main.js
+4
-2
@@ -495,7 +495,9 @@ function renderStreamedHosts(options) {
495
}
496
497
var master = options.hosts[0].hostname;
498
- var sorted = options.hosts.sort(function (a, b) {
498
+ // We sort a clone of options.hosts, to keep the master as the first element
499
+ // for future calls.
500
+ var sorted = options.hosts.slice(0).sort(function (a, b) {
501
if (a.hostname === master) {
502
return -1;
503
}
@@ -4744,7 +4746,7 @@ function clearCloudLocalStorageItems() {
4746
}
4747
4748
function signIn() {
4747
- const url = `${NETDATA.registry.cloudBaseURL}/account/sign-in-agent?id=${NETDATA.registry.machine_guid}&origin=${encodeURIComponent(window.location.origin + "/")}`;
4749
+ const url = `${NETDATA.registry.cloudBaseURL}/account/sign-in-agent?id=${NETDATA.registry.machine_guid}&name=${encodeURIComponent(NETDATA.registry.hostname)}&origin=${encodeURIComponent(window.location.origin + "/")}`;
4750
window.open(url);
4751
}
4752