From 04dd7bd8fb1b0ac2ee1c16df5311df7012ad8b18 Mon Sep 17 00:00:00 2001 From: Dzmitry Lazerka Date: Wed, 3 Apr 2024 16:53:05 +0200 Subject: [PATCH] Remove "/prometheus" from default serverUrl. --- app/vmui/packages/vmui/src/utils/default-server-url.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/vmui/packages/vmui/src/utils/default-server-url.ts b/app/vmui/packages/vmui/src/utils/default-server-url.ts index 8fd036803..fe19e9f57 100644 --- a/app/vmui/packages/vmui/src/utils/default-server-url.ts +++ b/app/vmui/packages/vmui/src/utils/default-server-url.ts @@ -8,7 +8,7 @@ export const getDefaultServer = (tenantId?: string): string => { const { serverURL } = getAppModeParams(); const storageURL = getFromStorage("SERVER_URL") as string; const logsURL = window.location.href.replace(/\/(select\/)?(vmui)\/.*/, ""); - const defaultURL = window.location.href.replace(/\/(?:prometheus\/)?(?:graph|vmui)\/.*/, "/prometheus"); + const defaultURL = window.location.href.replace(/\/(?:prometheus\/)?(?:graph|vmui)\/.*/, "/"); const url = serverURL || storageURL || defaultURL; if (REACT_APP_TYPE === AppType.logs) return logsURL; if (tenantId) return replaceTenantId(url, tenantId);