Skip to content

Commit e037423

Browse files
committed
Remove alerts
1 parent c986e51 commit e037423

File tree

2 files changed

+0
-34
lines changed

2 files changed

+0
-34
lines changed

site/src/pages/DeploySettingsPage/NotificationsPage/NotificationsPage.stories.tsx

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -56,18 +56,6 @@ type Story = StoryObj<typeof NotificationsPage>;
5656

5757
export const Default: Story = {};
5858

59-
export const NoWebhookEndpoint: Story = {
60-
parameters: {
61-
deploymentValues: {
62-
notifications: {
63-
webhook: {
64-
endpoint: "",
65-
},
66-
},
67-
} as DeploymentValues,
68-
},
69-
};
70-
7159
export const Toggle: Story = {
7260
play: async ({ canvasElement }) => {
7361
spyOn(API, "updateNotificationTemplateMethod").mockResolvedValue();

site/src/pages/DeploySettingsPage/NotificationsPage/NotificationsPage.tsx

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ import {
1717
systemNotificationTemplates,
1818
updateNotificationTemplateMethod,
1919
} from "api/queries/notifications";
20-
import type { NotificationsConfig } from "api/typesGenerated";
21-
import { Alert } from "components/Alert/Alert";
2220
import { displaySuccess } from "components/GlobalSnackbar/utils";
2321
import { Loader } from "components/Loader/Loader";
2422
import { Stack } from "components/Stack/Stack";
@@ -157,7 +155,6 @@ export const NotificationsPage: FC = () => {
157155
availableMethods={dispatchMethods.data.available.map(
158156
castNotificationMethod,
159157
)}
160-
notificationsConfig={deploymentValues.config.notifications}
161158
templatesByGroup={templatesByGroup.data}
162159
/>
163160
) : (
@@ -179,35 +176,16 @@ export const NotificationsPage: FC = () => {
179176
type EventsViewProps = {
180177
defaultMethod: NotificationMethod;
181178
availableMethods: NotificationMethod[];
182-
notificationsConfig?: NotificationsConfig;
183179
templatesByGroup: ReturnType<typeof selectTemplatesByGroup>;
184180
};
185181

186182
const EventsView: FC<EventsViewProps> = ({
187183
defaultMethod,
188184
availableMethods,
189-
notificationsConfig,
190185
templatesByGroup,
191186
}) => {
192-
const isUsingWebhook = availableMethods.includes("webhook");
193-
const isUsingSmpt = availableMethods.includes("smtp");
194-
const webhookEndpoint = notificationsConfig?.webhook.endpoint;
195-
const smtpConfig = notificationsConfig?.email;
196-
197187
return (
198188
<Stack spacing={3}>
199-
{isUsingWebhook && !webhookEndpoint && (
200-
<Alert severity="warning">
201-
Webhook method is enabled, but the endpoint is not configured.
202-
</Alert>
203-
)}
204-
205-
{isUsingSmpt && !smtpConfig && (
206-
<Alert severity="warning">
207-
SMTP method is enabled, but is not configured.
208-
</Alert>
209-
)}
210-
211189
{Object.entries(templatesByGroup).map(([group, templates]) => (
212190
<Card
213191
key={group}

0 commit comments

Comments
 (0)