email env priority

This commit is contained in:
Alex Holliday committed 2025-11-20 19:27:22 +00:00
1 parent 3faff5dc54
commit 60153a88e2
7 files changed
+189 -23

No files matched your search

@@ -64,6 +64,7 @@ export const NotificationChannelsForm = ({
const isValid = await trigger();
if (isValid) {
const res = await post("/notification-channels/test", getValues());
if (res) {
toastSuccess("Success");
}
@@ -130,12 +131,12 @@ export const NotificationChannelsForm = ({
type === "email"
? "Configure the email address where notifications will be sent"
: type === "webhook"
? "Configure the webhook URL endpoint where notifications will be sent"
: type === "slack"
? "Configure your Slack webhook URL. Create one in Slack: Settings & administration → Manage apps → Custom Integrations → Incoming Webhooks"
: type === "discord"
? "Configure your Discord webhook URL. Create one in Discord: Server Settings → Integrations → Webhooks → New Webhook"
: "Configure notification channel settings"
? "Configure the webhook URL endpoint where notifications will be sent"
: type === "slack"
? "Configure your Slack webhook URL. Create one in Slack: Settings & administration → Manage apps → Custom Integrations → Incoming Webhooks"
: type === "discord"
? "Configure your Discord webhook URL. Create one in Discord: Server Settings → Integrations → Webhooks → New Webhook"
: "Configure notification channel settings"
}
rightContent={
type === "email" ? (
+1 -2
View File
@@ -40,8 +40,7 @@ const SettingsPage = () => {
const initialSettings = useMemo(() => settings, [settings]);
const onSubmit = async (data: Partial<FormValues>) => {
const res = await patch("/settings", data);
console.log(res?.data);
const res = await patch("/settings/email", data);
};
const onTest = async (data: Partial<FormValues>) => {
+4 -2
View File
@@ -202,7 +202,9 @@ export const UptimeForm = ({
<TextInput
{...field}
type="number"
fieldLabel={t("createMonitorPage.incidentConfigStatusCheckNumber")}
fieldLabel={t(
"createMonitorPage.incidentConfigStatusCheckNumber"
)}
fullWidth
error={!!errors.n}
helperText={errors.n ? errors.n.message : ""}
@@ -227,7 +229,7 @@ export const UptimeForm = ({
render={({ field }) => (
<AutoComplete
multiple
fieldLabel={`You have ${notificationOptions.length} available notification ${notificationOptions.length === 1 ? 'channel' : 'channels'}`}
fieldLabel={`You have ${notificationOptions.length} available notification ${notificationOptions.length === 1 ? "channel" : "channels"}`}
options={notificationOptions}
getOptionLabel={(option) => option.name}
value={notificationOptions.filter((o: any) =>