@@ -34,6 +34,7 @@ import {createFuzzySearch, Fuse} from 'sentry/utils/fuzzySearch';
34
34
import {
35
35
getAlertText ,
36
36
getCategoriesForIntegration ,
37
+ getIntegrationStatus ,
37
38
getSentryAppInstallStatus ,
38
39
isDocIntegration ,
39
40
isPlugin ,
@@ -236,6 +237,21 @@ export class IntegrationListDirectory extends DeprecatedAsyncComponent<
236
237
return integrations ?. find ( i => i . provider . key === integration . key ) ? 2 : 0 ;
237
238
}
238
239
240
+ getInstallStatuses ( integrations : Integration [ ] ) {
241
+ const statusList = integrations ?. map ( getIntegrationStatus ) ;
242
+ // if we have conflicting statuses, we have a priority order
243
+ if ( statusList . includes ( 'active' ) ) {
244
+ return 'Installed' ;
245
+ }
246
+ if ( statusList . includes ( 'disabled' ) ) {
247
+ return 'Disabled' ;
248
+ }
249
+ if ( statusList . includes ( 'pending_deletion' ) ) {
250
+ return 'Pending Deletion' ;
251
+ }
252
+ return 'Not Installed' ;
253
+ }
254
+
239
255
getPopularityWeight = ( integration : AppOrProviderOrPlugin ) => {
240
256
if ( isSentryApp ( integration ) || isDocIntegration ( integration ) ) {
241
257
return integration ?. popularity ?? 1 ;
@@ -395,7 +411,7 @@ export class IntegrationListDirectory extends DeprecatedAsyncComponent<
395
411
type = "firstParty"
396
412
slug = { provider . slug }
397
413
displayName = { provider . name }
398
- status = { integrations . length ? 'Installed' : 'Not Installed' }
414
+ status = { this . getInstallStatuses ( integrations ) }
399
415
publishStatus = "published"
400
416
configurations = { integrations . length }
401
417
categories = { getCategoriesForIntegration ( provider ) }
0 commit comments