mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-12 07:19:00 +08:00
feat: add views tab to metrics explorer (#8091)
This commit is contained in:
parent
80ded899c7
commit
1d77780c70
@ -1,12 +0,0 @@
|
||||
import * as Sentry from '@sentry/react';
|
||||
import ErrorBoundaryFallback from 'pages/ErrorBoundaryFallback/ErrorBoundaryFallback';
|
||||
|
||||
function Views(): JSX.Element {
|
||||
return (
|
||||
<Sentry.ErrorBoundary fallback={<ErrorBoundaryFallback />}>
|
||||
Views
|
||||
</Sentry.ErrorBoundary>
|
||||
);
|
||||
}
|
||||
|
||||
export default Views;
|
@ -1,3 +0,0 @@
|
||||
import Views from './Views';
|
||||
|
||||
export default Views;
|
@ -5,12 +5,12 @@ import { TabRoutes } from 'components/RouteTab/types';
|
||||
import history from 'lib/history';
|
||||
import { useLocation } from 'react-use';
|
||||
|
||||
import { Explorer, Summary } from './constants';
|
||||
import { Explorer, Summary, Views } from './constants';
|
||||
|
||||
function MetricsExplorerPage(): JSX.Element {
|
||||
const { pathname } = useLocation();
|
||||
|
||||
const routes: TabRoutes[] = [Summary, Explorer];
|
||||
const routes: TabRoutes[] = [Summary, Explorer, Views];
|
||||
|
||||
return (
|
||||
<div className="metrics-explorer-page">
|
||||
|
@ -2,8 +2,8 @@ import { TabRoutes } from 'components/RouteTab/types';
|
||||
import ROUTES from 'constants/routes';
|
||||
import ExplorerPage from 'container/MetricsExplorer/Explorer';
|
||||
import SummaryPage from 'container/MetricsExplorer/Summary';
|
||||
import ViewsPage from 'container/MetricsExplorer/Views';
|
||||
import { BarChart2, Compass, TowerControl } from 'lucide-react';
|
||||
import SaveView from 'pages/SaveView';
|
||||
|
||||
export const Summary: TabRoutes = {
|
||||
Component: SummaryPage,
|
||||
@ -28,7 +28,7 @@ export const Explorer: TabRoutes = {
|
||||
};
|
||||
|
||||
export const Views: TabRoutes = {
|
||||
Component: ViewsPage,
|
||||
Component: SaveView,
|
||||
name: (
|
||||
<div className="tab-item">
|
||||
<TowerControl size={16} /> Views
|
||||
|
@ -5,6 +5,7 @@ export const SOURCEPAGE_VS_ROUTES: {
|
||||
} = {
|
||||
logs: ROUTES.LOGS_EXPLORER,
|
||||
traces: ROUTES.TRACES_EXPLORER,
|
||||
metrics: ROUTES.METRICS_EXPLORER_EXPLORER,
|
||||
} as const;
|
||||
|
||||
export const ROUTES_VS_SOURCEPAGE: {
|
||||
@ -12,4 +13,5 @@ export const ROUTES_VS_SOURCEPAGE: {
|
||||
} = {
|
||||
[ROUTES.LOGS_SAVE_VIEWS]: 'logs',
|
||||
[ROUTES.TRACES_SAVE_VIEWS]: 'traces',
|
||||
[ROUTES.METRICS_EXPLORER_VIEWS]: 'metrics',
|
||||
} as const;
|
||||
|
Loading…
x
Reference in New Issue
Block a user