Skip to content

Commit 4630cf8

Browse files
author
Stephen Cefali
authored
Api 726/integrations detailed view (#17038)
1 parent 057b33b commit 4630cf8

File tree

11 files changed

+610
-778
lines changed

11 files changed

+610
-778
lines changed

src/sentry/static/sentry/app/routes.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -833,7 +833,7 @@ function routes() {
833833
<Route name="Integrations" path="plugins/">
834834
<Route
835835
name="Integration Details"
836-
path=":pluginSlug/"
836+
path=":integrationSlug/"
837837
componentPromise={() =>
838838
import(
839839
/* webpackChunkName: "ConfigureIntegration" */ 'app/views/organizationIntegrations/pluginDetailedView'
@@ -847,7 +847,7 @@ function routes() {
847847
<Route name="Integrations" path="sentry-apps/">
848848
<Route
849849
name="Details"
850-
path=":appSlug"
850+
path=":integrationSlug"
851851
componentPromise={() =>
852852
import(
853853
/* webpackChunkName: "ConfigureIntegration" */ 'app/views/organizationIntegrations/sentryAppDetailedView'
@@ -868,7 +868,7 @@ function routes() {
868868
/>
869869
<Route
870870
name="Integration Details"
871-
path=":providerKey"
871+
path=":integrationSlug"
872872
componentPromise={() =>
873873
import(
874874
/* webpackChunkName: "ConfigureIntegration" */ 'app/views/organizationIntegrations/integrationDetailedView'

src/sentry/static/sentry/app/types/index.tsx

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
import {SpanEntry} from 'app/components/events/interfaces/spans/types';
22
import {API_ACCESS_SCOPES} from 'app/constants';
33
import {Field} from 'app/views/settings/components/forms/type';
4+
import {
5+
INSTALLED,
6+
NOT_INSTALLED,
7+
PENDING,
8+
} from 'app/views/organizationIntegrations/constants';
9+
10+
export type IntegrationInstallationStatus =
11+
| typeof INSTALLED
12+
| typeof NOT_INSTALLED
13+
| typeof PENDING;
414

515
export type ObjectStatus =
616
| 'active'
@@ -308,10 +318,7 @@ export type PluginNoProject = {
308318
description?: string;
309319
resourceLinks?: Array<{title: string; url: string}>;
310320
features: string[];
311-
featureDescriptions: Array<{
312-
description: string;
313-
featureGate: string;
314-
}>;
321+
featureDescriptions: IntegrationFeature[];
315322
};
316323

317324
export type Plugin = PluginNoProject & {
@@ -514,7 +521,7 @@ export type IntegrationProvider = BaseIntegrationProvider & {
514521
};
515522

516523
export type IntegrationFeature = {
517-
description: React.ReactNode;
524+
description: React.ReactNode | string;
518525
featureGate: string;
519526
};
520527

src/sentry/static/sentry/app/utils/integrationUtil.tsx

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
import {uniqueId} from 'app/utils/guid';
2+
import capitalize from 'lodash/capitalize';
23
import {trackAnalyticsEvent} from 'app/utils/analytics';
3-
import {Organization} from 'app/types';
4+
import {
5+
Organization,
6+
SentryAppInstallation,
7+
IntegrationInstallationStatus,
8+
} from 'app/types';
49
import {Hooks} from 'app/types/hooks';
510
import HookStore from 'app/stores/hookStore';
611
import React from 'react';
@@ -163,3 +168,10 @@ export const getIntegrationFeatureGate = () => {
163168
const featureHook = HookStore.get('integrations:feature-gates')[0] || defaultHook;
164169
return featureHook();
165170
};
171+
172+
export const getSentryAppInstallStatus = (install: SentryAppInstallation | undefined) => {
173+
if (install) {
174+
return capitalize(install.status) as IntegrationInstallationStatus;
175+
}
176+
return 'Not Installed';
177+
};

0 commit comments

Comments
 (0)