From a2d7dede737947d7c6afa20a88e1f0c64e0eb96c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 10 Aug 2023 11:18:52 +0200 Subject: Merging upstream version 1.42.0. Signed-off-by: Daniel Baumann --- web/gui/v2/index.html | 159 ++++++++++++++++++++------------------------------ 1 file changed, 63 insertions(+), 96 deletions(-) (limited to 'web/gui/v2/index.html') diff --git a/web/gui/v2/index.html b/web/gui/v2/index.html index 84c97d7f3..d59760b79 100644 --- a/web/gui/v2/index.html +++ b/web/gui/v2/index.html @@ -1,42 +1,43 @@ -Netdata Agent Console

Welcome to Netdata

Loading latest Netdata Cloud UI...

We couldn't load the latest Netdata Cloud UI. You can try again
Or you can load the old single node dashboard or a local copy of Netdata Cloud UI

Welcome to Netdata

Loading latest Netdata UI...

We couldn't load the latest Netdata UI. You can try again
Or you can load the old single node dashboard or a local copy of Netdata UI
\ No newline at end of file + + envSettings.tracking = window.localNetdataRegistry.anonymousStatistics + + let withoutNodes = btoa(JSON.stringify({ + registry: data.registry, + machine_guid: data.machine_guid, + hostname: data.hostname, + agent: data.agent, + nodes: [] + })) + let iframe = document.createElement('iframe'); + iframe.src = data.registry + "/registry-access.html?x=" + withoutNodes + "&originUrl=" + window.envSettings.agentApiUrl; + iframe.style = { position: "absolute", left: "-99999999px" }; + iframe.width = 0 ; + iframe.height = 0; + iframe.tabindex = -1; + iframe.title = "empty"; + iframe.classList.add("hidden"); + document.body.appendChild(iframe); + + setTimeout(function () { + document.title = data.hostname + ': Netdata Agent Console'; + iframe.contentWindow.postMessage(["netdata-registry", window.envSettings.agentApiUrl, data], "*") + }, 300); + + window.addEventListener('message', function(event) { + if (event.source !== iframe.contentWindow) return; + + if (event.data.status === "disabled") console.error("Your netdata registry is disabled! Check your configuration.") + }); + }) \ No newline at end of file -- cgit v1.2.3