@@ -7,13 +7,11 @@ import {IconWarning} from 'app/icons';
7
7
import { PanelItem } from 'app/components/panels' ;
8
8
import { t , tct } from 'app/locale' ;
9
9
import AsyncComponent from 'app/components/asyncComponent' ;
10
- import Count from 'app/components/count' ;
11
10
import DateTime from 'app/components/dateTime' ;
12
11
import Duration from 'app/components/duration' ;
13
12
import ErrorBoundary from 'app/components/errorBoundary' ;
14
13
import IdBadge from 'app/components/idBadge' ;
15
14
import Link from 'app/components/links/link' ;
16
- import Placeholder from 'app/components/placeholder' ;
17
15
import Projects from 'app/utils/projects' ;
18
16
import theme from 'app/utils/theme' ;
19
17
import TimeSince from 'app/components/timeSince' ;
@@ -99,14 +97,12 @@ class AlertListRow extends AsyncComponent<Props, State> {
99
97
100
98
renderBody ( ) {
101
99
const { incident, orgId, projectsLoaded, projects, filteredStatus} = this . props ;
102
- const { loading , error, stats} = this . state ;
100
+ const { error, stats} = this . state ;
103
101
const started = moment ( incident . dateStarted ) ;
104
102
const duration = moment
105
103
. duration ( moment ( incident . dateClosed || new Date ( ) ) . diff ( started ) )
106
104
. as ( 'seconds' ) ;
107
105
const slug = incident . projects [ 0 ] ;
108
- const lastEventStatsValue =
109
- stats ?. eventStats . data [ stats . eventStats . data . length - 1 ] ?. [ 1 ] ?. [ 0 ] ?. count || 0 ;
110
106
111
107
return (
112
108
< ErrorBoundary >
@@ -131,22 +127,6 @@ class AlertListRow extends AsyncComponent<Props, State> {
131
127
) }
132
128
</ TitleAndSparkLine >
133
129
134
- { filteredStatus === 'open' && (
135
- < NumericColumn >
136
- { ! loading && ! error ? (
137
- < React . Fragment >
138
- < MetricName >
139
- { this . metricPreset ?. name ?? t ( 'Custom metric' ) }
140
- { ':' }
141
- </ MetricName >
142
- < Count value = { lastEventStatsValue } />
143
- </ React . Fragment >
144
- ) : (
145
- < NumericPlaceholder error = { error && < ErrorLoadingStatsIcon /> } />
146
- ) }
147
- </ NumericColumn >
148
- ) }
149
-
150
130
< ProjectBadge
151
131
avatarSize = { 18 }
152
132
project = { ! projectsLoaded ? { slug} : this . getProject ( slug , projects ) }
@@ -204,10 +184,6 @@ const Title = styled('span')`
204
184
${ overflowEllipsis }
205
185
` ;
206
186
207
- const MetricName = styled ( 'span' ) `
208
- margin-right: ${ space ( 0.5 ) } ;
209
- ` ;
210
-
211
187
const IncidentLink = styled ( Link ) `
212
188
padding: 0 ${ space ( 1 ) } ;
213
189
` ;
@@ -217,20 +193,4 @@ const IncidentPanelItem = styled(PanelItem)`
217
193
padding: ${ space ( 1.5 ) } ${ space ( 2 ) } ${ space ( 1.5 ) } 0;
218
194
` ;
219
195
220
- const NumericPlaceholder = styled ( Placeholder ) < { error ?: React . ReactNode } > `
221
- ${ p =>
222
- p . error &&
223
- `
224
- align-items: center;
225
- line-height: 1;
226
- ` }
227
- height: 100%;
228
- ` ;
229
-
230
- const NumericColumn = styled ( 'div' ) `
231
- height: 100%;
232
- display: flex;
233
- align-items: center;
234
- ` ;
235
-
236
196
export default AlertListRow ;
0 commit comments