From 309cfd67d9f9847fccd2751a2df3c4bfe8057fef Mon Sep 17 00:00:00 2001 From: Steffen Neubauer Date: Wed, 12 Jul 2023 12:32:21 +0200 Subject: [PATCH] ui: only set query url to localhost if config option is falsy The `THANOS_QUERY_URL` constant is already assigned to `{{ .queryURL }}` in `public/index.html`. Remove this comparison, as it causes the `--alert.query-url` command line option to have no effect whatsoever. Fixes #6370 Signed-off-by: Steffen Neubauer --- pkg/ui/react-app/src/thanos/config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/ui/react-app/src/thanos/config.ts b/pkg/ui/react-app/src/thanos/config.ts index 0e45cb1688..a2e5dfdc91 100644 --- a/pkg/ui/react-app/src/thanos/config.ts +++ b/pkg/ui/react-app/src/thanos/config.ts @@ -1,6 +1,6 @@ declare const THANOS_QUERY_URL: string; export let queryURL = THANOS_QUERY_URL; -if (queryURL === '' || queryURL === '{{ .queryURL }}') { +if (!queryURL) { queryURL = 'http://localhost:10902'; }