Skip to content

Commit 6f91716

Browse files
author
Stephen Cefali
authored
fix(notifications): hide provider option for weekly reports and fix org specific settings (#57992)
We only support the email provider for weekly reports. Also, we can hide the dropdown for organization for deploy notifications. Before: <img width="1009" alt="Screen Shot 2023-10-12 at 11 32 01 AM" src="https://github.com/getsentry/sentry/assets/8533851/972b7d0a-f4f0-4c07-bf71-627d022d60c4"> <img width="1018" alt="Screen Shot 2023-10-12 at 11 31 08 AM" src="https://github.com/getsentry/sentry/assets/8533851/d1540c5e-53c5-4aad-8a0d-4b863c90edae"> After: <img width="1103" alt="Screen Shot 2023-10-12 at 11 11 01 AM" src="https://github.com/getsentry/sentry/assets/8533851/8a7411e7-c3df-4f9f-b890-d2db7330c277"> <img width="1069" alt="Screen Shot 2023-10-12 at 11 26 05 AM" src="https://github.com/getsentry/sentry/assets/8533851/d0078354-0255-467d-bbd4-cdd35dd3ae6d">
1 parent 3b9a4b0 commit 6f91716

File tree

2 files changed

+19
-13
lines changed

2 files changed

+19
-13
lines changed

static/app/views/settings/account/notifications/notificationSettingsByEntity.tsx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -236,11 +236,15 @@ function NotificationSettingsByEntity(props: Props) {
236236
<Fragment>
237237
<Panel>
238238
<StyledPanelHeader>
239-
<OrganizationSelectHeader
240-
organizations={organizations}
241-
organizationId={orgId}
242-
handleOrgChange={handleOrgChange}
243-
/>
239+
{entityType === 'project' ? (
240+
<OrganizationSelectHeader
241+
organizations={organizations}
242+
organizationId={orgId}
243+
handleOrgChange={handleOrgChange}
244+
/>
245+
) : (
246+
t('Settings for Organizations')
247+
)}
244248
</StyledPanelHeader>
245249
<Item>
246250
{/* TODO: enable search for sentry projects */}

static/app/views/settings/account/notifications/notificationSettingsByTypeV2.tsx

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -332,14 +332,16 @@ class NotificationSettingsByTypeV2 extends DeprecatedAsyncComponent<Props, State
332332
fields={this.getFields()}
333333
/>
334334
</Form>
335-
<Form
336-
saveOnBlur
337-
apiMethod="PUT"
338-
apiEndpoint="/users/me/notification-providers/"
339-
initialData={this.getProviderInitialData()}
340-
>
341-
<BottomJsonForm fields={this.getProviderFields()} />
342-
</Form>
335+
{notificationType !== 'reports' ? (
336+
<Form
337+
saveOnBlur
338+
apiMethod="PUT"
339+
apiEndpoint="/users/me/notification-providers/"
340+
initialData={this.getProviderInitialData()}
341+
>
342+
<BottomJsonForm fields={this.getProviderFields()} />
343+
</Form>
344+
) : null}
343345
<NotificationSettingsByEntity
344346
notificationType={notificationType}
345347
notificationOptions={notificationOptions}

0 commit comments

Comments
 (0)