Skip to content

feat: connection explanation box #9598

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 24, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@ import type { FC } from 'react';
import { usePageTitle } from 'hooks/usePageTitle';
import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig';
import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender';
import { Alert, Box } from '@mui/material';
import {
Alert,
Box,
styled,
Tooltip as TooltipComponent,
Typography,
} from '@mui/material';
import { PeriodSelector } from './PeriodSelector';
import { Bar } from 'react-chartjs-2';
import { customHighlightPlugin } from 'component/common/Chart/customHighlightPlugin';
Expand All @@ -20,6 +26,13 @@ import {
} from 'chart.js';
import annotationPlugin from 'chartjs-plugin-annotation';
import { useChartDataSelection } from './hooks/useChartDataSelection';
import HelpOutline from '@mui/icons-material/HelpOutline';

const ConnectionExplanationBox = styled(Box)(({ theme }) => ({
display: 'flex',
alignItems: 'center',
gap: theme.spacing(0.5),
}));

// TODO: consider renaming to Connection Consumption
export const BackendConnections: FC = () => {
Expand All @@ -41,7 +54,17 @@ export const BackendConnections: FC = () => {
<StyledBox>
<TopRow>
<Box>
1 connection = 7200 backend SDK requests per day
<Alert severity='info' icon={false}>
<ConnectionExplanationBox>
<Typography>
1 connection = 7200 backend SDK
requests per day
</Typography>
<TooltipComponent title='1 connection involves polling every 15 seconds and sending metrics every 60 seconds. This translates to 5 requests per minute, 300 requests per hour, and 7200 requests per day.'>
<HelpOutline />
</TooltipComponent>
</ConnectionExplanationBox>
</Alert>
</Box>
<PeriodSelector
selectedPeriod={chartDataSelection}
Expand Down
Loading