Skip to content
Merged
Show file tree
Hide file tree
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 @@ -18,7 +18,6 @@ import {
useOpenPeriods,
} from 'sentry/views/detectors/hooks/useOpenPeriods';
import {useIssueDetails} from 'sentry/views/issueDetails/streamline/context';
import {GraphAlert} from 'sentry/views/issueDetails/streamline/eventGraph';

interface MetricIssueChartProps {
event: Event | undefined;
Expand Down Expand Up @@ -58,7 +57,7 @@ export function MetricIssueChart({group, event}: MetricIssueChartProps) {
if (isDetectorError) {
return (
<Container width="100%">
<GraphAlert variant="danger">{getDetectorErrorMessage(detectorError)}</GraphAlert>
<Alert variant="danger">{getDetectorErrorMessage(detectorError)}</Alert>
</Container>
);
}
Expand Down Expand Up @@ -121,9 +120,9 @@ function MetricIssueChartContent({
if (chartError) {
return (
<Container width="100%">
<GraphAlert variant="danger">
<Alert variant="danger">
{t('Error loading metric monitor: %s', chartError?.message)}
</GraphAlert>
</Alert>
</Container>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,12 +215,7 @@ export function EventDetailsHeader({group, event, project}: EventDetailsHeaderPr
{issueTypeConfig.header.graph.enabled && (
<GraphSection>
{issueTypeConfig.header.graph.type === 'discover-events' && (
<EventGraph
event={event}
group={group}
showReleasesAs="bubble"
style={{flex: 1}}
/>
<EventGraph event={event} group={group} showReleasesAs="bubble" />
)}
{issueTypeConfig.header.graph.type === 'detector-history' && (
<MetricIssueChart group={group} event={event} />
Expand Down
21 changes: 3 additions & 18 deletions static/app/views/issueDetails/streamline/eventGraph.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
import {
useCallback,
useEffect,
useMemo,
useRef,
useState,
type CSSProperties,
} from 'react';
import {useCallback, useEffect, useMemo, useRef, useState} from 'react';
import {useTheme} from '@emotion/react';
import styled from '@emotion/styled';
import {mergeRefs, useResizeObserver} from '@react-aria/utils';
Expand Down Expand Up @@ -82,7 +75,6 @@ interface EventGraphProps {
* Enable/disables showing the event and user summary
*/
showSummary?: boolean;
style?: CSSProperties;
}

function createSeriesAndCount(stats: EventsStats) {
Expand Down Expand Up @@ -474,9 +466,9 @@ export function EventGraph({

if (error) {
return (
<GraphAlert variant="danger" {...styleProps}>
<Alert variant="danger">
{tct('Graph Query Error: [message]', {message: error.message})}
</GraphAlert>
</Alert>
Comment thread
cursor[bot] marked this conversation as resolved.
);
}

Expand Down Expand Up @@ -630,10 +622,3 @@ const ChartContainer = styled('div')`
padding: ${p => p.theme.space.sm} ${p => p.theme.space.md} ${p => p.theme.space.sm} 0;
}
`;

export const GraphAlert = styled(Alert)`
padding-left: ${p => p.theme.space['2xl']};
margin: 0 0 0 -${p => p.theme.space['2xl']};
border: 0;
border-radius: 0;
`;
Loading