From e5ba5cc0d698794038d0738e50700f5d5b09179f Mon Sep 17 00:00:00 2001 From: Vanshika <102902652+Vanshikav123@users.noreply.github.com> Date: Tue, 3 Oct 2023 19:52:18 +0530 Subject: [PATCH 01/45] Target Ui: Fixed responsiveness of Search Bar (#6642) * Target Ui: Fixed responsiveness of Search Bar Signed-off-by: Vanshika * Rebuild Signed-off-by: Vanshika * Rebuild Signed-off-by: Vanshika --------- Signed-off-by: Vanshika --- pkg/ui/react-app/src/pages/targets/ScrapePoolList.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/ui/react-app/src/pages/targets/ScrapePoolList.tsx b/pkg/ui/react-app/src/pages/targets/ScrapePoolList.tsx index 9245777c25..65eeb8ceb1 100644 --- a/pkg/ui/react-app/src/pages/targets/ScrapePoolList.tsx +++ b/pkg/ui/react-app/src/pages/targets/ScrapePoolList.tsx @@ -81,11 +81,11 @@ export const ScrapePoolListContent: FC = ({ activeTargets } return ( <> - - + + - + From 02f0219be2211a447b720050167ce0a355423244 Mon Sep 17 00:00:00 2001 From: Vanshika <102902652+Vanshikav123@users.noreply.github.com> Date: Tue, 3 Oct 2023 20:03:36 +0530 Subject: [PATCH 02/45] Enabled Navbar to automatically close on navigation (#6656) * Enabled Navbar to automatically close on navigation Signed-off-by: Vanshika * Rebuild Signed-off-by: Vanshika --------- Signed-off-by: Vanshika --- pkg/ui/react-app/src/thanos/Navbar.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/ui/react-app/src/thanos/Navbar.tsx b/pkg/ui/react-app/src/thanos/Navbar.tsx index ef18bfc889..fd4f692c81 100644 --- a/pkg/ui/react-app/src/thanos/Navbar.tsx +++ b/pkg/ui/react-app/src/thanos/Navbar.tsx @@ -107,7 +107,7 @@ const Navigation: FC = ({ pathPrefix, thanosC if ('uri' in config) return ( - + {config.name} @@ -120,7 +120,7 @@ const Navigation: FC = ({ pathPrefix, thanosC {config.children.map((c) => ( - + {c.name} ))} From 5b7feeb26020e52619a03234c302e67094151709 Mon Sep 17 00:00:00 2001 From: Vanshika <102902652+Vanshikav123@users.noreply.github.com> Date: Wed, 4 Oct 2023 12:34:25 +0530 Subject: [PATCH 03/45] Force Tracing : checkbox in query frontend to force a trace to be collected (#6770) * force tracing Signed-off-by: Vanshika * force tracing Signed-off-by: Vanshika * Rebuild Signed-off-by: Vanshika * changes force Tracing Signed-off-by: Vanshika --------- Signed-off-by: Vanshika --- .../react-app/src/pages/graph/Panel.test.tsx | 2 ++ pkg/ui/react-app/src/pages/graph/Panel.tsx | 22 +++++++++++++++++++ pkg/ui/react-app/src/utils/utils.test.ts | 1 + 3 files changed, 25 insertions(+) diff --git a/pkg/ui/react-app/src/pages/graph/Panel.test.tsx b/pkg/ui/react-app/src/pages/graph/Panel.test.tsx index d723ed974c..2447b67107 100644 --- a/pkg/ui/react-app/src/pages/graph/Panel.test.tsx +++ b/pkg/ui/react-app/src/pages/graph/Panel.test.tsx @@ -19,6 +19,7 @@ const defaultProps: PanelProps = { stacked: false, maxSourceResolution: 'auto', useDeduplication: true, + forceTracing: false, usePartialResponse: false, storeMatches: [], engine: 'prometheus', @@ -94,6 +95,7 @@ describe('Panel', () => { stacked: false, maxSourceResolution: 'auto', useDeduplication: true, + forceTracing: false, usePartialResponse: false, storeMatches: [], engine: 'prometheus', diff --git a/pkg/ui/react-app/src/pages/graph/Panel.tsx b/pkg/ui/react-app/src/pages/graph/Panel.tsx index d5bbb54633..d63315db47 100644 --- a/pkg/ui/react-app/src/pages/graph/Panel.tsx +++ b/pkg/ui/react-app/src/pages/graph/Panel.tsx @@ -68,6 +68,7 @@ export interface PanelOptions { stacked: boolean; maxSourceResolution: string; useDeduplication: boolean; + forceTracing: boolean; usePartialResponse: boolean; storeMatches: Store[]; engine: string; @@ -89,6 +90,7 @@ export const PanelDefaultOptions: PanelOptions = { stacked: false, maxSourceResolution: '0s', useDeduplication: true, + forceTracing: false, usePartialResponse: false, storeMatches: [], engine: '', @@ -119,6 +121,7 @@ class Panel extends Component { this.handleEngine(this.props.options.engine); this.handleChangeDeduplication = this.handleChangeDeduplication.bind(this); + this.handleChangeForceTracing = this.handleChangeForceTracing.bind(this); //forceTracing this.handleChangePartialResponse = this.handleChangePartialResponse.bind(this); this.handleStoreMatchChange = this.handleStoreMatchChange.bind(this); this.handleChangeEngine = this.handleChangeEngine.bind(this); @@ -133,6 +136,7 @@ class Panel extends Component { type, maxSourceResolution, useDeduplication, + forceTracing, usePartialResponse, engine, explain, @@ -146,6 +150,7 @@ class Panel extends Component { prevOpts.maxSourceResolution !== maxSourceResolution || prevOpts.useDeduplication !== useDeduplication || prevOpts.usePartialResponse !== usePartialResponse || + prevOpts.forceTracing !== forceTracing || prevOpts.engine !== engine || prevOpts.explain !== explain // Check store matches @@ -218,6 +223,12 @@ class Panel extends Component { } fetch(`${this.props.pathPrefix}${path}?${params}`, { + method: 'GET', + headers: { + 'Content-Type': 'application/json', + // Conditionally add the header if the checkbox is enabled + ...(this.props.options.forceTracing ? { 'X-Thanos-Force-Tracing': 'true' } : {}), + }, cache: 'no-store', credentials: 'same-origin', signal: abortController.signal, @@ -315,6 +326,9 @@ class Panel extends Component { handleChangeDeduplication = (event: React.ChangeEvent): void => { this.setOptions({ useDeduplication: event.target.checked }); }; + handleChangeForceTracing = (event: React.ChangeEvent): void => { + this.setOptions({ forceTracing: event.target.checked }); + }; handleChangePartialResponse = (event: React.ChangeEvent): void => { this.setOptions({ usePartialResponse: event.target.checked }); @@ -406,6 +420,14 @@ class Panel extends Component { > Use Partial Response + + Force Tracing +