Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion static/app/constants/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ export const DATA_CATEGORY_INFO = {
titleName: t('Prevent Reviews'),
productName: t('Prevent Reviews'),
uid: 30,
isBilledCategory: true,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this above for PREVENT_USER as well?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, we'll use the ff for prevent users

isBilledCategory: false,
statsInfo: {
...DEFAULT_STATS_INFO,
showExternalStats: false, // TODO(prevent): add external stats when ready
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@ describe('NotificationSettingsByType', () => {
'continuous-profiling-billing',
'seer-billing',
'logs-billing',
'prevent-billing',
],
});
renderComponent({
Expand All @@ -345,6 +346,7 @@ describe('NotificationSettingsByType', () => {
expect(screen.getByText('UI Profile Hours', {exact: true})).toBeInTheDocument();
expect(screen.getByText('Seer Budget')).toBeInTheDocument();
expect(screen.getByText('Logs')).toBeInTheDocument();
expect(screen.getByText('Prevent Users')).toBeInTheDocument();
expect(screen.queryByText('Transactions')).not.toBeInTheDocument();

const editSettingMock = MockApiClient.addMockResponse({
Expand Down Expand Up @@ -521,5 +523,6 @@ describe('NotificationSettingsByType', () => {
expect(screen.queryByText('Transactions')).not.toBeInTheDocument();
expect(screen.queryByText('Seer Budget')).not.toBeInTheDocument();
expect(screen.queryByText('Logs')).not.toBeInTheDocument();
expect(screen.queryByText('Prevent Users')).not.toBeInTheDocument();
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,10 @@ export function NotificationSettingsByType({notificationType}: Props) {
organization.features?.includes('logs-billing')
);

const hasPreventBilling = organizations.some(organization =>
organization.features?.includes('prevent-billing')
);

const excludeTransactions = hasOrgWithAm3 && !hasOrgWithoutAm3;
const includeSpans = hasOrgWithAm3;
const includeProfileDuration =
Expand All @@ -238,6 +242,9 @@ export function NotificationSettingsByType({notificationType}: Props) {
if (field.name.startsWith('quotaLogBytes') && !includeLogs) {
return false;
}
if (field.name.startsWith('quotaPrevent') && !hasPreventBilling) {
return false;
}
return true;
});
};
Expand Down
Loading