+ {isExplorerOptionHidden && (
+ <>
+ {isQueryUpdated && (
+
+
+ }
+ />
+
+
+ }
+ />
+
+
+ )}
+
+ >
+ )}
+
+ );
+}
+
+ExplorerOptionsHideArea.defaultProps = {
+ isExplorerOptionHidden: undefined,
+ setIsExplorerOptionHidden: undefined,
+};
+
+export default ExplorerOptionsHideArea;
diff --git a/frontend/src/container/ExplorerOptions/utils.ts b/frontend/src/container/ExplorerOptions/utils.ts
index e3ac710609..d94e64161e 100644
--- a/frontend/src/container/ExplorerOptions/utils.ts
+++ b/frontend/src/container/ExplorerOptions/utils.ts
@@ -1,5 +1,6 @@
import { Color } from '@signozhq/design-tokens';
import { showErrorNotification } from 'components/ExplorerCard/utils';
+import { LOCALSTORAGE } from 'constants/localStorage';
import { QueryParams } from 'constants/query';
import ROUTES from 'constants/routes';
import { mapQueryDataFromApi } from 'lib/newQueryBuilder/queryBuilderMappers/mapQueryDataFromApi';
@@ -67,3 +68,54 @@ export const generateRGBAFromHex = (hex: string, opacity: number): string =>
hex.slice(3, 5),
16,
)}, ${parseInt(hex.slice(5, 7), 16)}, ${opacity})`;
+
+export const getExplorerToolBarVisibility = (dataSource: string): boolean => {
+ try {
+ const showExplorerToolbar = localStorage.getItem(
+ LOCALSTORAGE.SHOW_EXPLORER_TOOLBAR,
+ );
+ if (showExplorerToolbar === null) {
+ const parsedShowExplorerToolbar: {
+ [DataSource.LOGS]: boolean;
+ [DataSource.TRACES]: boolean;
+ [DataSource.METRICS]: boolean;
+ } = {
+ [DataSource.METRICS]: true,
+ [DataSource.TRACES]: true,
+ [DataSource.LOGS]: true,
+ };
+ localStorage.setItem(
+ LOCALSTORAGE.SHOW_EXPLORER_TOOLBAR,
+ JSON.stringify(parsedShowExplorerToolbar),
+ );
+ return true;
+ }
+ const parsedShowExplorerToolbar = JSON.parse(showExplorerToolbar || '{}');
+ return parsedShowExplorerToolbar[dataSource];
+ } catch (error) {
+ console.error(error);
+ return false;
+ }
+};
+
+export const setExplorerToolBarVisibility = (
+ value: boolean,
+ dataSource: string,
+): void => {
+ try {
+ const showExplorerToolbar = localStorage.getItem(
+ LOCALSTORAGE.SHOW_EXPLORER_TOOLBAR,
+ );
+ if (showExplorerToolbar) {
+ const parsedShowExplorerToolbar = JSON.parse(showExplorerToolbar);
+ parsedShowExplorerToolbar[dataSource] = value;
+ localStorage.setItem(
+ LOCALSTORAGE.SHOW_EXPLORER_TOOLBAR,
+ JSON.stringify(parsedShowExplorerToolbar),
+ );
+ return;
+ }
+ } catch (error) {
+ console.error(error);
+ }
+};
diff --git a/frontend/src/container/LogsExplorerViews/index.tsx b/frontend/src/container/LogsExplorerViews/index.tsx
index e07450229a..c814ac8cb6 100644
--- a/frontend/src/container/LogsExplorerViews/index.tsx
+++ b/frontend/src/container/LogsExplorerViews/index.tsx
@@ -15,7 +15,7 @@ import {
} from 'constants/queryBuilder';
import { DEFAULT_PER_PAGE_VALUE } from 'container/Controls/config';
import Download from 'container/DownloadV2/DownloadV2';
-import ExplorerOptions from 'container/ExplorerOptions/ExplorerOptions';
+import ExplorerOptionWrapper from 'container/ExplorerOptions/ExplorerOptionWrapper';
import GoToTop from 'container/GoToTop';
import LogsExplorerChart from 'container/LogsExplorerChart';
import LogsExplorerList from 'container/LogsExplorerList';
@@ -659,7 +659,7 @@ function LogsExplorerViews({