From 517a443636daa1e8085cb4e5325524a54e8a8fd7 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Tue, 17 Oct 2023 11:30:23 +0200 Subject: Merging upstream version 1.43.0. Signed-off-by: Daniel Baumann --- web/gui/v2/registry-access.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'web/gui/v2/registry-access.html') diff --git a/web/gui/v2/registry-access.html b/web/gui/v2/registry-access.html index ffa008a98..4eb327255 100644 --- a/web/gui/v2/registry-access.html +++ b/web/gui/v2/registry-access.html @@ -14,7 +14,7 @@ var nodes = helloData.nodes || [] var doAccess = function(mg, nm, token) { - fetch(helloData.registry + '/api/v1/registry?action=access&machine=' + (mg || helloData.machine_guid) + '&name=' + encodeURIComponent(nm || helloData.hostname) + '&url=' + encodeURIComponent(originUrl) + '&agent=' + (helloData.agent ? helloData.agent.machine_guid : ""), { cache: "no-cache", credentials: "include", headers: { Authorization: 'Bearer ' + (token || localStorage.getItem("registry-netdata-token")) } }) + fetch(helloData.registry + '/api/v1/registry?action=access&machine=' + (mg || helloData.machine_guid) + '&name=' + encodeURIComponent(nm || helloData.hostname) + '&url=' + encodeURIComponent(originUrl) + '&agent=' + (helloData.agent ? helloData.agent.machine_guid : ""), { cache: "no-cache", credentials: "include", headers: { ["X-Netdata-Auth"]: 'Bearer ' + (token || localStorage.getItem("registry-netdata-token")) } }) .then(function(response) { return response.json() }) .then(function(data) { var token = data.person_guid @@ -39,7 +39,7 @@ }) } doAccess(helloData.machine_guid, helloData.hostname) - }) + }).catch(() => {}) } try { -- cgit v1.2.3