Files
signoz/frontend/src/container/MetricsApplication/Tabs/Overview/GraphControlsPanel/GraphControlsPanel.tsx
Ashwin Bhatkal 195f44802d chore: add eslint rules for import export sorting rules (#10074)
* chore: updated eslint base config with comments

* chore: add eslint rules for no-else-return and curly

* chore: use isNumber from lodash-es

* chore: add eslint rules for no-console

* chore: update eslint overrides

* chore: sort all files

* chore: fix tests
2026-01-29 11:44:07 +00:00

63 lines
1.4 KiB
TypeScript

import { Color } from '@signozhq/design-tokens';
import { Button } from 'antd';
import { Binoculars, DraftingCompass, ScrollText } from 'lucide-react';
import './GraphControlsPanel.styles.scss';
interface GraphControlsPanelProps {
id: string;
onViewLogsClick?: () => void;
onViewTracesClick: () => void;
onViewAPIMonitoringClick?: () => void;
}
function GraphControlsPanel({
id,
onViewLogsClick,
onViewTracesClick,
onViewAPIMonitoringClick,
}: GraphControlsPanelProps): JSX.Element {
return (
<div id={id} className="graph-controls-panel">
<Button
type="link"
icon={<DraftingCompass size={14} />}
size="small"
onClick={onViewTracesClick}
style={{ color: Color.BG_VANILLA_100 }}
>
View traces
</Button>
{onViewLogsClick && (
<Button
type="link"
icon={<ScrollText size={14} />}
size="small"
onClick={onViewLogsClick}
style={{ color: Color.BG_VANILLA_100 }}
>
View logs
</Button>
)}
{onViewAPIMonitoringClick && (
<Button
type="link"
icon={<Binoculars size={14} />}
size="small"
onClick={onViewAPIMonitoringClick}
style={{ color: Color.BG_VANILLA_100 }}
>
View External APIs
</Button>
)}
</div>
);
}
GraphControlsPanel.defaultProps = {
onViewLogsClick: undefined,
onViewAPIMonitoringClick: undefined,
};
export default GraphControlsPanel;