-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: metrics explorer base setup (#7024)
- Loading branch information
1 parent
f548afe
commit c7c7b25
Showing
17 changed files
with
208 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
frontend/src/container/MetricsExplorer/Explorer/Explorer.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import * as Sentry from '@sentry/react'; | ||
import ErrorBoundaryFallback from 'pages/ErrorBoundaryFallback/ErrorBoundaryFallback'; | ||
|
||
function Explorer(): JSX.Element { | ||
return ( | ||
<Sentry.ErrorBoundary fallback={<ErrorBoundaryFallback />}> | ||
Explorer | ||
</Sentry.ErrorBoundary> | ||
); | ||
} | ||
|
||
export default Explorer; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import Explorer from './Explorer'; | ||
|
||
export default Explorer; |
12 changes: 12 additions & 0 deletions
12
frontend/src/container/MetricsExplorer/Summary/Summary.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import * as Sentry from '@sentry/react'; | ||
import ErrorBoundaryFallback from 'pages/ErrorBoundaryFallback/ErrorBoundaryFallback'; | ||
|
||
function Summary(): JSX.Element { | ||
return ( | ||
<Sentry.ErrorBoundary fallback={<ErrorBoundaryFallback />}> | ||
Summary | ||
</Sentry.ErrorBoundary> | ||
); | ||
} | ||
|
||
export default Summary; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import Summary from './Summary'; | ||
|
||
export default Summary; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import Views from './Views'; | ||
|
||
export default Views; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
frontend/src/pages/MetricsExplorer/MetricsExplorerPage.styles.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
.metrics-explorer-page { | ||
flex: 1; | ||
display: flex; | ||
flex-direction: column; | ||
height: 100%; | ||
|
||
.ant-tabs { | ||
height: 100%; | ||
} | ||
|
||
.ant-tabs-nav { | ||
padding: 0 8px; | ||
margin-bottom: 0px; | ||
|
||
&::before { | ||
border-bottom: 1px solid var(--bg-slate-400) !important; | ||
} | ||
} | ||
|
||
.ant-tabs-content-holder { | ||
display: flex; | ||
|
||
.ant-tabs-content { | ||
flex: 1; | ||
display: flex; | ||
flex-direction: column; | ||
|
||
.ant-tabs-tabpane { | ||
flex: 1; | ||
display: flex; | ||
flex-direction: column; | ||
} | ||
} | ||
} | ||
|
||
.tab-item { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
gap: 8px; | ||
} | ||
} | ||
|
||
.lightMode { | ||
.metrics-explorer-page { | ||
.ant-tabs-nav { | ||
&::before { | ||
border-bottom: 1px solid var(--bg-vanilla-300) !important; | ||
} | ||
} | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
frontend/src/pages/MetricsExplorer/MetricsExplorerPage.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import './MetricsExplorerPage.styles.scss'; | ||
|
||
import RouteTab from 'components/RouteTab'; | ||
import { TabRoutes } from 'components/RouteTab/types'; | ||
import history from 'lib/history'; | ||
import { useLocation } from 'react-use'; | ||
|
||
import { Explorer, Summary, Views } from './constants'; | ||
|
||
function MetricsExplorerPage(): JSX.Element { | ||
const { pathname } = useLocation(); | ||
|
||
const routes: TabRoutes[] = [Summary, Explorer, Views]; | ||
|
||
return ( | ||
<div className="metrics-explorer-page"> | ||
<RouteTab routes={routes} activeKey={pathname} history={history} /> | ||
</div> | ||
); | ||
} | ||
|
||
export default MetricsExplorerPage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
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'; | ||
|
||
export const Summary: TabRoutes = { | ||
Component: SummaryPage, | ||
name: ( | ||
<div className="tab-item"> | ||
<BarChart2 size={16} /> Summary | ||
</div> | ||
), | ||
route: ROUTES.METRICS_EXPLORER, | ||
key: ROUTES.METRICS_EXPLORER, | ||
}; | ||
|
||
export const Explorer: TabRoutes = { | ||
Component: ExplorerPage, | ||
name: ( | ||
<div className="tab-item"> | ||
<Compass size={16} /> Explorer | ||
</div> | ||
), | ||
route: ROUTES.METRICS_EXPLORER_EXPLORER, | ||
key: ROUTES.METRICS_EXPLORER_EXPLORER, | ||
}; | ||
|
||
export const Views: TabRoutes = { | ||
Component: ViewsPage, | ||
name: ( | ||
<div className="tab-item"> | ||
<TowerControl size={16} /> Views | ||
</div> | ||
), | ||
route: ROUTES.METRICS_EXPLORER_VIEWS, | ||
key: ROUTES.METRICS_EXPLORER_VIEWS, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import MetricsExplorer from './MetricsExplorerPage'; | ||
|
||
export default MetricsExplorer; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters