From a8b52abb55fecdd514eed3d9a834a5596e73be9b Mon Sep 17 00:00:00 2001 From: Vanshika Date: Wed, 13 Dec 2023 16:55:05 +0530 Subject: [PATCH 1/5] Use Partial Response enabled by default Signed-off-by: Vanshika --- pkg/ui/react-app/src/pages/graph/Panel.test.tsx | 1 + pkg/ui/react-app/src/pages/graph/Panel.tsx | 3 ++- pkg/ui/react-app/src/pages/graph/PanelList.tsx | 5 +++++ 3 files changed, 8 insertions(+), 1 deletion(-) 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 993c60b1a49..a3eaf24aa1d 100644 --- a/pkg/ui/react-app/src/pages/graph/Panel.test.tsx +++ b/pkg/ui/react-app/src/pages/graph/Panel.test.tsx @@ -47,6 +47,7 @@ const defaultProps: PanelProps = { enableHighlighting: true, enableLinter: true, defaultEngine: 'prometheus', + usePartialResponse: true, }; describe('Panel', () => { diff --git a/pkg/ui/react-app/src/pages/graph/Panel.tsx b/pkg/ui/react-app/src/pages/graph/Panel.tsx index fb2bd59b75d..68147bb6bbe 100644 --- a/pkg/ui/react-app/src/pages/graph/Panel.tsx +++ b/pkg/ui/react-app/src/pages/graph/Panel.tsx @@ -43,6 +43,7 @@ export interface PanelProps { stores: Store[]; enableAutocomplete: boolean; enableHighlighting: boolean; + usePartialResponse: boolean; enableLinter: boolean; defaultStep: string; defaultEngine: string; @@ -93,7 +94,7 @@ export const PanelDefaultOptions: PanelOptions = { maxSourceResolution: '0s', useDeduplication: true, forceTracing: false, - usePartialResponse: false, + usePartialResponse: true, storeMatches: [], engine: '', analyze: false, diff --git a/pkg/ui/react-app/src/pages/graph/PanelList.tsx b/pkg/ui/react-app/src/pages/graph/PanelList.tsx index 1cc66ddbdd0..b44fbe413df 100644 --- a/pkg/ui/react-app/src/pages/graph/PanelList.tsx +++ b/pkg/ui/react-app/src/pages/graph/PanelList.tsx @@ -31,6 +31,7 @@ interface PanelListProps extends PathPrefixProps, RouteComponentProps { enableLinter: boolean; defaultStep: string; defaultEngine: string; + usePartialResponse: boolean; } export const PanelListContent: FC = ({ @@ -44,6 +45,7 @@ export const PanelListContent: FC = ({ enableLinter, defaultStep, defaultEngine, + usePartialResponse, ...rest }) => { const [panels, setPanels] = useState(rest.panels); @@ -128,6 +130,7 @@ export const PanelListContent: FC = ({ defaultEngine={defaultEngine} enableLinter={enableLinter} defaultStep={defaultStep} + usePartialResponse={usePartialResponse} /> ))}