File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed
static/gsApp/views/spikeProtection Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ import {space} from 'sentry/styles/space';
1818import type { DataCategoryInfo } from 'sentry/types/core' ;
1919import type { Organization } from 'sentry/types/organization' ;
2020import type { Project } from 'sentry/types/project' ;
21+ import { defined } from 'sentry/utils' ;
2122import { getExactDuration } from 'sentry/utils/duration/getExactDuration' ;
2223import { decodeScalar } from 'sentry/utils/queryString' ;
2324import useApi from 'sentry/utils/useApi' ;
@@ -130,11 +131,13 @@ class SpikeProtectionHistoryTable extends Component<Props> {
130131 return [
131132 < SpikeProtectionTimeDetails spike = { spike } key = "time" /> ,
132133 < StyledCell key = "threshold" >
133- { formatUsageWithUnits (
134- spike . threshold ,
135- dataCategoryInfo . plural ,
136- getFormatUsageOptions ( dataCategoryInfo . plural )
137- ) }
134+ { defined ( spike . threshold )
135+ ? formatUsageWithUnits (
136+ spike . threshold ,
137+ dataCategoryInfo . plural ,
138+ getFormatUsageOptions ( dataCategoryInfo . plural )
139+ )
140+ : '-' }
138141 </ StyledCell > ,
139142 < StyledCell key = "duration" >
140143 { duration ? getExactDuration ( duration , true ) : t ( 'Ongoing' ) }
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import type {DataCategoryInfo} from 'sentry/types/core';
33export interface SpikeDetails {
44 dataCategory : DataCategoryInfo [ 'name' ] ;
55 start : string ;
6- threshold : number ;
6+ threshold : number | null ;
77 dropped ?: number ;
88 duration ?: number | null ;
99 end ?: string ;
You can’t perform that action at this time.
0 commit comments