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,6 +18,7 @@ import {space} from 'sentry/styles/space';
import type {DataCategoryInfo} from 'sentry/types/core';
import type {Organization} from 'sentry/types/organization';
import type {Project} from 'sentry/types/project';
import {defined} from 'sentry/utils';
import {getExactDuration} from 'sentry/utils/duration/getExactDuration';
import {decodeScalar} from 'sentry/utils/queryString';
import useApi from 'sentry/utils/useApi';
Expand Down Expand Up @@ -130,11 +131,13 @@ class SpikeProtectionHistoryTable extends Component<Props> {
return [
<SpikeProtectionTimeDetails spike={spike} key="time" />,
<StyledCell key="threshold">
{formatUsageWithUnits(
spike.threshold,
dataCategoryInfo.plural,
getFormatUsageOptions(dataCategoryInfo.plural)
)}
{defined(spike.threshold)
? formatUsageWithUnits(
spike.threshold,
dataCategoryInfo.plural,
getFormatUsageOptions(dataCategoryInfo.plural)
)
: '-'}
</StyledCell>,
<StyledCell key="duration">
{duration ? getExactDuration(duration, true) : t('Ongoing')}
Expand Down
2 changes: 1 addition & 1 deletion static/gsApp/views/spikeProtection/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type {DataCategoryInfo} from 'sentry/types/core';
export interface SpikeDetails {
dataCategory: DataCategoryInfo['name'];
start: string;
threshold: number;
threshold: number | null;
dropped?: number;
duration?: number | null;
end?: string;
Expand Down
Loading