Merge pull request #2232 from bluewave-labs/feat/email-settings

feat: email settings
This commit is contained in:
Alexander Holliday authored and GitHub committed 2025-05-10 16:13:35 -07:00
commit 38f52af0f0
14 files changed
+688 -516

No files matched your search

+2 -2
View File
@@ -3,7 +3,7 @@ import { networkService } from "../main";
import { createToast } from "../Utils/toastUtils"; import { createToast } from "../Utils/toastUtils";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
const useFetchSettings = ({ setSettings }) => { const useFetchSettings = ({ setSettingsData }) => {
const [isLoading, setIsLoading] = useState(false); const [isLoading, setIsLoading] = useState(false);
const [error, setError] = useState(undefined); const [error, setError] = useState(undefined);
useEffect(() => { useEffect(() => {
@@ -11,7 +11,7 @@ const useFetchSettings = ({ setSettings }) => {
setIsLoading(true); setIsLoading(true);
try { try {
const response = await networkService.getAppSettings(); const response = await networkService.getAppSettings();
setSettings(response?.data?.data); setSettingsData(response?.data?.data);
} catch (error) { } catch (error) {
createToast({ body: "Failed to fetch settings" }); createToast({ body: "Failed to fetch settings" });
setError(error); setError(error);
@@ -8,12 +8,8 @@ import { PropTypes } from "prop-types";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import Dialog from "../../Components/Dialog"; import Dialog from "../../Components/Dialog";
import { useState } from "react"; import { useState } from "react";
const SettingsDemoMonitors = ({
isLoading, const SettingsDemoMonitors = ({ HEADER_SX, handleChange, isLoading }) => {
authIsLoading,
checksIsLoading,
handleChange,
}) => {
const { t } = useTranslation(); const { t } = useTranslation();
const theme = useTheme(); const theme = useTheme();
// Local state // Local state
@@ -23,16 +19,14 @@ const SettingsDemoMonitors = ({
<ConfigBox> <ConfigBox>
<Box> <Box>
<Typography component="h1">{t("settingsDemoMonitors")}</Typography> <Typography component="h1">{t("settingsDemoMonitors")}</Typography>
<Typography sx={{ mt: theme.spacing(2) }}> <Typography sx={HEADER_SX}>{t("settingsDemoMonitorsDescription")}</Typography>
{t("settingsDemoMonitorsDescription")}
</Typography>
</Box> </Box>
<Box> <Box>
<Typography>{t("settingsAddDemoMonitors")}</Typography> <Typography>{t("settingsAddDemoMonitors")}</Typography>
<Button <Button
variant="contained" variant="contained"
color="accent" color="accent"
loading={isLoading || authIsLoading || checksIsLoading} loading={isLoading}
onClick={() => { onClick={() => {
const syntheticEvent = { const syntheticEvent = {
target: { target: {
@@ -59,7 +53,7 @@ const SettingsDemoMonitors = ({
<Button <Button
variant="contained" variant="contained"
color="error" color="error"
loading={isLoading || authIsLoading || checksIsLoading} loading={isLoading}
onClick={() => setIsOpen(true)} onClick={() => setIsOpen(true)}
sx={{ mt: theme.spacing(4) }} sx={{ mt: theme.spacing(4) }}
> >
@@ -81,7 +75,7 @@ const SettingsDemoMonitors = ({
handleChange(syntheticEvent); handleChange(syntheticEvent);
setIsOpen(false); setIsOpen(false);
}} }}
isLoading={isLoading || authIsLoading || checksIsLoading} isLoading={isLoading}
/> />
</ConfigBox> </ConfigBox>
</> </>
@@ -89,10 +83,8 @@ const SettingsDemoMonitors = ({
}; };
SettingsDemoMonitors.propTypes = { SettingsDemoMonitors.propTypes = {
isLoading: PropTypes.bool,
authIsLoading: PropTypes.bool,
checksIsLoading: PropTypes.bool,
handleChange: PropTypes.func, handleChange: PropTypes.func,
HEADER_SX: PropTypes.object,
}; };
export default SettingsDemoMonitors; export default SettingsDemoMonitors;
+126
View File
@@ -0,0 +1,126 @@
import Box from "@mui/material/Box";
import Typography from "@mui/material/Typography";
import ConfigBox from "../../Components/ConfigBox";
import TextInput from "../../Components/Inputs/TextInput";
import Button from "@mui/material/Button";
import Stack from "@mui/material/Stack";
// Utils
import { useTheme } from "@emotion/react";
import { PropTypes } from "prop-types";
import { useState } from "react";
import { useTranslation } from "react-i18next";
import { PasswordEndAdornment } from "../../Components/Inputs/TextInput/Adornments";
const SettingsEmail = ({
HEADER_SX,
handleChange,
settingsData,
setSettingsData,
isPasswordSet,
}) => {
const { t } = useTranslation();
const theme = useTheme();
const [password, setPassword] = useState("");
const [hasBeenReset, setHasBeenReset] = useState(false);
const handlePasswordChange = (e) => {
setPassword(e.target.value);
setSettingsData({
...settingsData,
settings: { ...settingsData.settings, systemEmailPassword: e.target.value },
});
};
return (
<ConfigBox>
<Box>
<Typography component="h1">{t("settingsEmail")}</Typography>
<Typography sx={HEADER_SX}>{t("settingsEmailDescription")}</Typography>
</Box>
<Box>
<Stack gap={theme.spacing(10)}>
<Box>
<Typography>{t("settingsEmailHost")}</Typography>
<TextInput
name="systemEmailHost"
placeholder="smtp.gmail.com"
value={settingsData?.settings?.systemEmailHost ?? ""}
onChange={handleChange}
/>
</Box>
<Box>
<Typography>{t("settingsEmailPort")}</Typography>
<TextInput
name="systemEmailPort"
placeholder="425"
type="number"
value={settingsData?.settings?.systemEmailPort ?? ""}
onChange={handleChange}
/>
</Box>
<Box>
<Typography>{t("settingsEmailUser")}</Typography>
<TextInput
name="systemEmailUser"
placeholder="Leave empty if not required"
value={settingsData?.settings?.systemEmailUser ?? ""}
onChange={handleChange}
/>
</Box>
<Box>
<Typography>{t("settingsEmailAddress")}</Typography>
<TextInput
name="systemEmailAddress"
placeholder="uptime@bluewavelabs.ca"
value={settingsData?.settings?.systemEmailAddress ?? ""}
onChange={handleChange}
/>
</Box>
{(isPasswordSet === false || hasBeenReset === true) && (
<Box>
<Typography>{t("settingsEmailPassword")}</Typography>
<TextInput
name="systemEmailPassword"
type="password"
placeholder="123 456 789 101112"
value={password}
onChange={handlePasswordChange}
endAdornment={<PasswordEndAdornment />}
/>
</Box>
)}
{isPasswordSet === true && hasBeenReset === false && (
<Box>
<Typography>{t("settingsEmailFieldResetLabel")}</Typography>
<Button
onClick={() => {
setPassword("");
setSettingsData({
...settingsData,
settings: { ...settingsData.settings, systemEmailPassword: "" },
});
setHasBeenReset(true);
}}
variant="contained"
color="error"
sx={{ mt: theme.spacing(4) }}
>
{t("reset")}
</Button>
</Box>
)}
</Stack>
</Box>
</ConfigBox>
);
};
SettingsEmail.propTypes = {
settingsData: PropTypes.object,
setSettingsData: PropTypes.func,
handleChange: PropTypes.func,
HEADER_SX: PropTypes.object,
isPasswordSet: PropTypes.bool,
};
export default SettingsEmail;
+17 -11
View File
@@ -11,26 +11,28 @@ import { PropTypes } from "prop-types";
import { useState, useEffect } from "react"; import { useState, useEffect } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
const SettingsPagespeed = ({ HEADING_SX, settings, setSettings }) => { const SettingsPagespeed = ({
HEADING_SX,
settingsData,
setSettingsData,
isApiKeySet,
}) => {
const { t } = useTranslation(); const { t } = useTranslation();
const theme = useTheme(); const theme = useTheme();
// Local state // Local state
const [apiKey, setApiKey] = useState(""); const [apiKey, setApiKey] = useState("");
const [isApiKeySet, setIsApiKeySet] = useState(false);
const [hasBeenReset, setHasBeenReset] = useState(false); const [hasBeenReset, setHasBeenReset] = useState(false);
// Handler // Handler
const handleChange = (e) => { const handleChange = (e) => {
setApiKey(e.target.value); setApiKey(e.target.value);
setSettings({ ...settings, pagespeedApiKey: e.target.value }); setSettingsData({
...settingsData,
settings: { ...settingsData.settings, pagespeedApiKey: e.target.value },
});
}; };
useEffect(() => {
console.log(settings);
setIsApiKeySet(Boolean(settings.pagespeedApiKey) && apiKey === "");
}, [settings, apiKey]);
return ( return (
<ConfigBox> <ConfigBox>
<Box> <Box>
@@ -56,7 +58,10 @@ const SettingsPagespeed = ({ HEADING_SX, settings, setSettings }) => {
<Button <Button
onClick={() => { onClick={() => {
setApiKey(""); setApiKey("");
setSettings({ ...settings, pagespeedApiKey: "" }); setSettingsData({
...settingsData,
settings: { ...settingsData.settings, pagespeedApiKey: "" },
});
setHasBeenReset(true); setHasBeenReset(true);
}} }}
variant="contained" variant="contained"
@@ -74,8 +79,9 @@ const SettingsPagespeed = ({ HEADING_SX, settings, setSettings }) => {
SettingsPagespeed.propTypes = { SettingsPagespeed.propTypes = {
HEADING_SX: PropTypes.object, HEADING_SX: PropTypes.object,
settings: PropTypes.object, settingsData: PropTypes.object,
setSettings: PropTypes.func, setSettingsData: PropTypes.func,
isApiKeySet: PropTypes.bool,
}; };
export default SettingsPagespeed; export default SettingsPagespeed;
+3 -3
View File
@@ -12,7 +12,7 @@ import { PropTypes } from "prop-types";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { useState } from "react"; import { useState } from "react";
const SettingsStats = ({ HEADING_SX, handleChange, settings, errors }) => { const SettingsStats = ({ HEADING_SX, handleChange, settingsData, errors }) => {
const theme = useTheme(); const theme = useTheme();
const { t } = useTranslation(); const { t } = useTranslation();
const [isOpen, setIsOpen] = useState(false); const [isOpen, setIsOpen] = useState(false);
@@ -34,7 +34,7 @@ const SettingsStats = ({ HEADING_SX, handleChange, settings, errors }) => {
name="checkTTL" name="checkTTL"
label={t("settingsTTLLabel")} label={t("settingsTTLLabel")}
optionalLabel={t("settingsTTLOptionalLabel")} optionalLabel={t("settingsTTLOptionalLabel")}
value={settings?.checkTTL ?? ""} value={settingsData?.settings?.checkTTL ?? ""}
onChange={handleChange} onChange={handleChange}
type="number" type="number"
error={errors.checkTTL ? true : false} error={errors.checkTTL ? true : false}
@@ -77,7 +77,7 @@ const SettingsStats = ({ HEADING_SX, handleChange, settings, errors }) => {
SettingsStats.propTypes = { SettingsStats.propTypes = {
HEADING_SX: PropTypes.object, HEADING_SX: PropTypes.object,
handleChange: PropTypes.func, handleChange: PropTypes.func,
settings: PropTypes.object, settingsData: PropTypes.object,
errors: PropTypes.object, errors: PropTypes.object,
}; };
+28 -18
View File
@@ -6,6 +6,7 @@ import SettingsUI from "./SettingsUI";
import SettingsPagespeed from "./SettingsPagespeed"; import SettingsPagespeed from "./SettingsPagespeed";
import SettingsDemoMonitors from "./SettingsDemoMonitors"; import SettingsDemoMonitors from "./SettingsDemoMonitors";
import SettingsAbout from "./SettingsAbout"; import SettingsAbout from "./SettingsAbout";
import SettingsEmail from "./SettingsEmail";
import Button from "@mui/material/Button"; import Button from "@mui/material/Button";
// Utils // Utils
import { settingsValidation } from "../../Validation/validation"; import { settingsValidation } from "../../Validation/validation";
@@ -15,7 +16,6 @@ import { useTheme } from "@emotion/react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { useSelector, useDispatch } from "react-redux"; import { useSelector, useDispatch } from "react-redux";
import { setTimezone, setMode, setLanguage } from "../../Features/UI/uiSlice"; import { setTimezone, setMode, setLanguage } from "../../Features/UI/uiSlice";
import { getAppSettings } from "../../Features/Settings/settingsSlice";
import SettingsStats from "./SettingsStats"; import SettingsStats from "./SettingsStats";
import { import {
deleteMonitorChecksByTeamId, deleteMonitorChecksByTeamId,
@@ -34,17 +34,14 @@ const Settings = () => {
const { user } = useSelector((state) => state.auth); const { user } = useSelector((state) => state.auth);
// Local state // Local state
const [settings, setSettings] = useState({}); const [settingsData, setSettingsData] = useState({});
const [errors, setErrors] = useState({}); const [errors, setErrors] = useState({});
// Network // Network
const [isSettingsLoading, settingsError] = useFetchSettings({ const [isSettingsLoading, settingsError] = useFetchSettings({
settings, setSettingsData,
setSettings,
}); });
const [isSaving, saveError, saveSettings] = useSaveSettings(); const [isSaving, saveError, saveSettings] = useSaveSettings();
const [deleteMonitorStats, isDeletingMonitorStats] = UseDeleteMonitorStats(); const [deleteMonitorStats, isDeletingMonitorStats] = UseDeleteMonitorStats();
// Setup // Setup
@@ -58,10 +55,15 @@ const Settings = () => {
const { name, value } = e.target; const { name, value } = e.target;
// Build next state early // Build next state early
const newSettings = { ...settings, [name]: value }; const newSettingsData = {
...settingsData,
settings: { ...settingsData.settings, [name]: value },
};
// Validate // Validate
const { error } = settingsValidation.validate(newSettings, { abortEarly: false }); const { error } = settingsValidation.validate(newSettingsData.settings, {
abortEarly: false,
});
if (!error || error.details.length === 0) { if (!error || error.details.length === 0) {
setErrors({}); setErrors({});
} else { } else {
@@ -118,11 +120,13 @@ const Settings = () => {
return; return;
} }
setSettings(newSettings); setSettingsData(newSettingsData);
}; };
const handleSave = () => { const handleSave = () => {
const { error } = settingsValidation.validate(settings, { abortEarly: false }); const { error } = settingsValidation.validate(settingsData.settings, {
abortEarly: false,
});
if (!error || error.details.length === 0) { if (!error || error.details.length === 0) {
setErrors({}); setErrors({});
} else { } else {
@@ -132,7 +136,7 @@ const Settings = () => {
}); });
setErrors(newErrors); setErrors(newErrors);
} }
saveSettings(settings); saveSettings(settingsData?.settings);
}; };
return ( return (
@@ -152,21 +156,27 @@ const Settings = () => {
/> />
<SettingsPagespeed <SettingsPagespeed
HEADING_SX={HEADING_SX} HEADING_SX={HEADING_SX}
settings={settings} settingsData={settingsData}
setSettings={setSettings} setSettingsData={setSettingsData}
isApiKeySet={settingsData?.pagespeedKeySet ?? false}
/> />
<SettingsStats <SettingsStats
HEADING_SX={HEADING_SX} HEADING_SX={HEADING_SX}
settings={settings} settingsData={settingsData}
setSettings={setSettings}
handleChange={handleChange} handleChange={handleChange}
errors={errors} errors={errors}
/> />
<SettingsDemoMonitors <SettingsDemoMonitors
isLoading={false} HEADER_SX={HEADING_SX}
authIsLoading={false}
checksIsLoading={false}
handleChange={handleChange} handleChange={handleChange}
isLoading={isSettingsLoading || isSaving || isDeletingMonitorStats}
/>
<SettingsEmail
HEADER_SX={HEADING_SX}
handleChange={handleChange}
settingsData={settingsData}
setSettingsData={setSettingsData}
isPasswordSet={settingsData?.emailPasswordSet ?? false}
/> />
<SettingsAbout /> <SettingsAbout />
<Stack <Stack
+5
View File
@@ -262,6 +262,11 @@ const settingsValidation = joi.object({
}), }),
pagespeedApiKey: joi.string().allow("").optional(), pagespeedApiKey: joi.string().allow("").optional(),
language: joi.string().required(), language: joi.string().required(),
systemEmailHost: joi.string().allow(""),
systemEmailPort: joi.number().allow(null, ""),
systemEmailAddress: joi.string().allow(""),
systemEmailPassword: joi.string().allow(""),
systemEmailUser: joi.string().allow(""),
}); });
const dayjsValidator = (value, helpers) => { const dayjsValidator = (value, helpers) => {
+448 -441
View File
@@ -1,444 +1,451 @@
{ {
"dontHaveAccount": "Don't have account", "dontHaveAccount": "Don't have account",
"doNotHaveAccount": "Do not have an account?", "doNotHaveAccount": "Do not have an account?",
"registerHere": "Register here", "registerHere": "Register here",
"email": "E-mail", "email": "E-mail",
"forgotPassword": "Forgot Password", "forgotPassword": "Forgot Password",
"password": "Password", "password": "Password",
"signUp": "Sign Up", "signUp": "Sign Up",
"submit": "Submit", "submit": "Submit",
"title": "Title", "title": "Title",
"continue": "Continue", "continue": "Continue",
"enterEmail": "Enter your email", "enterEmail": "Enter your email",
"authLoginTitle": "Log In", "authLoginTitle": "Log In",
"authLoginEnterPassword": "Enter your password", "authLoginEnterPassword": "Enter your password",
"commonPassword": "Password", "commonPassword": "Password",
"commonBack": "Back", "commonBack": "Back",
"authForgotPasswordTitle": "Forgot password?", "authForgotPasswordTitle": "Forgot password?",
"authForgotPasswordResetPassword": "Reset password", "authForgotPasswordResetPassword": "Reset password",
"createPassword": "Create your password", "createPassword": "Create your password",
"createAPassword": "Password", "createAPassword": "Password",
"authRegisterAlreadyHaveAccount": "Already have an account?", "authRegisterAlreadyHaveAccount": "Already have an account?",
"authRegisterLoginLink": "Log In", "authRegisterLoginLink": "Log In",
"commonAppName": "Checkmate", "commonAppName": "Checkmate",
"welcomeBack": "Welcome back! You're successfully logged in.", "welcomeBack": "Welcome back! You're successfully logged in.",
"authLoginEnterEmail": "Enter your email", "authLoginEnterEmail": "Enter your email",
"authRegisterTitle": "Create an account", "authRegisterTitle": "Create an account",
"authRegisterStepOneTitle": "Create your account", "authRegisterStepOneTitle": "Create your account",
"authRegisterStepOneDescription": "Enter your details to get started", "authRegisterStepOneDescription": "Enter your details to get started",
"authRegisterStepTwoTitle": "Set up your profile", "authRegisterStepTwoTitle": "Set up your profile",
"authRegisterStepTwoDescription": "Tell us more about yourself", "authRegisterStepTwoDescription": "Tell us more about yourself",
"authRegisterStepThreeTitle": "Almost done!", "authRegisterStepThreeTitle": "Almost done!",
"authRegisterStepThreeDescription": "Review your information", "authRegisterStepThreeDescription": "Review your information",
"authForgotPasswordDescription": "No worries, we'll send you reset instructions.", "authForgotPasswordDescription": "No worries, we'll send you reset instructions.",
"authForgotPasswordSendInstructions": "Send instructions", "authForgotPasswordSendInstructions": "Send instructions",
"authForgotPasswordBackTo": "Back to", "authForgotPasswordBackTo": "Back to",
"authCheckEmailTitle": "Check your email", "authCheckEmailTitle": "Check your email",
"authCheckEmailDescription": "We sent a password reset link to", "authCheckEmailDescription": "We sent a password reset link to",
"authCheckEmailResendEmail": "Resend email", "authCheckEmailResendEmail": "Resend email",
"authCheckEmailBackTo": "Back to", "authCheckEmailBackTo": "Back to",
"goBackTo": "Go back to", "goBackTo": "Go back to",
"authCheckEmailDidntReceiveEmail": "Didn't receive the email?", "authCheckEmailDidntReceiveEmail": "Didn't receive the email?",
"authCheckEmailClickToResend": "Click to resend", "authCheckEmailClickToResend": "Click to resend",
"authSetNewPasswordTitle": "Set new password", "authSetNewPasswordTitle": "Set new password",
"authSetNewPasswordDescription": "Your new password must be different from previously used passwords.", "authSetNewPasswordDescription": "Your new password must be different from previously used passwords.",
"authSetNewPasswordNewPassword": "New password", "authSetNewPasswordNewPassword": "New password",
"authSetNewPasswordConfirmPassword": "Confirm password", "authSetNewPasswordConfirmPassword": "Confirm password",
"confirmPassword": "Re-enter password to confirm", "confirmPassword": "Re-enter password to confirm",
"authSetNewPasswordResetPassword": "Reset password", "authSetNewPasswordResetPassword": "Reset password",
"authSetNewPasswordBackTo": "Back to", "authSetNewPasswordBackTo": "Back to",
"authPasswordMustBeAtLeast": "Must be at least", "authPasswordMustBeAtLeast": "Must be at least",
"authPasswordCharactersLong": "8 characters long", "authPasswordCharactersLong": "8 characters long",
"authPasswordMustContainAtLeast": "Must contain at least", "authPasswordMustContainAtLeast": "Must contain at least",
"authPasswordSpecialCharacter": "one special character", "authPasswordSpecialCharacter": "one special character",
"authPasswordOneNumber": "one number", "authPasswordOneNumber": "one number",
"authPasswordUpperCharacter": "one upper character", "authPasswordUpperCharacter": "one upper character",
"authPasswordLowerCharacter": "one lower character", "authPasswordLowerCharacter": "one lower character",
"authPasswordConfirmAndPassword": "Confirm password and password", "authPasswordConfirmAndPassword": "Confirm password and password",
"authPasswordMustMatch": "Passwords must match", "authPasswordMustMatch": "Passwords must match",
"validationNameRequired": "Please enter your name", "validationNameRequired": "Please enter your name",
"validationNameTooLong": "Name should be less than 50 characters", "validationNameTooLong": "Name should be less than 50 characters",
"validationNameInvalidCharacters": "Please use only letters, spaces, apostrophes, or hyphens", "validationNameInvalidCharacters": "Please use only letters, spaces, apostrophes, or hyphens",
"authRegisterCreateAccount": "Create your account to get started", "authRegisterCreateAccount": "Create your account to get started",
"authRegisterCreateSuperAdminAccount": "Create your super admin account to get started", "authRegisterCreateSuperAdminAccount": "Create your super admin account to get started",
"authRegisterSignUpWithEmail": "Create super admin account", "authRegisterSignUpWithEmail": "Create super admin account",
"authRegisterBySigningUp": "By creating an account, you agree to our <a1>Terms of Service</a1> and <a2>Privacy Policy</a2>.", "authRegisterBySigningUp": "By creating an account, you agree to our <a1>Terms of Service</a1> and <a2>Privacy Policy</a2>.",
"distributedStatusHeaderText": "Real-time, real-device coverage", "distributedStatusHeaderText": "Real-time, real-device coverage",
"distributedStatusSubHeaderText": "Powered by millions devices worldwide, view a system performance by global region, country or city", "distributedStatusSubHeaderText": "Powered by millions devices worldwide, view a system performance by global region, country or city",
"settingsGeneralSettings": "General settings", "settingsGeneralSettings": "General settings",
"settingsDisplayTimezone": "Display timezone", "settingsDisplayTimezone": "Display timezone",
"settingsDisplayTimezoneDescription": "Select the timezone used to display dates and times throughout the application.", "settingsDisplayTimezoneDescription": "Select the timezone used to display dates and times throughout the application.",
"settingsAppearance": "Appearance", "settingsAppearance": "Appearance",
"settingsAppearanceDescription": "Switch between light and dark mode, or change user interface language", "settingsAppearanceDescription": "Switch between light and dark mode, or change user interface language",
"settingsThemeMode": "Theme Mode", "settingsThemeMode": "Theme Mode",
"settingsLanguage": "Language", "settingsLanguage": "Language",
"settingsDistributedUptime": "Distributed uptime", "settingsDistributedUptime": "Distributed uptime",
"settingsDistributedUptimeDescription": "Enable/disable distributed uptime monitoring.", "settingsDistributedUptimeDescription": "Enable/disable distributed uptime monitoring.",
"settingsEnabled": "Enabled", "settingsEnabled": "Enabled",
"settingsDisabled": "Disabled", "settingsDisabled": "Disabled",
"settingsHistoryAndMonitoring": "History of monitoring", "settingsHistoryAndMonitoring": "History of monitoring",
"settingsHistoryAndMonitoringDescription": "Define how long you want to retain historical data. You can also clear all existing data.", "settingsHistoryAndMonitoringDescription": "Define how long you want to retain historical data. You can also clear all existing data.",
"settingsTTLLabel": "The days you want to keep monitoring history.", "settingsTTLLabel": "The days you want to keep monitoring history.",
"settingsTTLOptionalLabel": "0 for infinite", "settingsTTLOptionalLabel": "0 for infinite",
"settingsClearAllStats": "Clear all stats. This is irreversible.", "settingsClearAllStats": "Clear all stats. This is irreversible.",
"settingsClearAllStatsButton": "Clear all stats", "settingsClearAllStatsButton": "Clear all stats",
"settingsClearAllStatsDialogTitle": "Do you want to clear all stats?", "settingsClearAllStatsDialogTitle": "Do you want to clear all stats?",
"settingsClearAllStatsDialogDescription": "Once removed, the monitoring history and stats cannot be retrieved.", "settingsClearAllStatsDialogDescription": "Once removed, the monitoring history and stats cannot be retrieved.",
"settingsClearAllStatsDialogConfirm": "Yes, clear all stats", "settingsClearAllStatsDialogConfirm": "Yes, clear all stats",
"settingsDemoMonitors": "Demo monitors", "settingsDemoMonitors": "Demo monitors",
"settingsDemoMonitorsDescription": "Add sample monitors for demonstration purposes.", "settingsDemoMonitorsDescription": "Add sample monitors for demonstration purposes.",
"settingsAddDemoMonitors": "Adding demo monitors", "settingsAddDemoMonitors": "Adding demo monitors",
"settingsAddDemoMonitorsButton": "Add demo monitors", "settingsAddDemoMonitorsButton": "Add demo monitors",
"settingsSystemReset": "System reset", "settingsSystemReset": "System reset",
"settingsSystemResetDescription": "Remove all monitors from your system.", "settingsSystemResetDescription": "Remove all monitors from your system.",
"settingsRemoveAllMonitors": "Removing all monitors", "settingsRemoveAllMonitors": "Removing all monitors",
"settingsRemoveAllMonitorsButton": "Remove all monitors", "settingsRemoveAllMonitorsButton": "Remove all monitors",
"settingsRemoveAllMonitorsDialogTitle": "Do you want to remove all monitors?", "settingsRemoveAllMonitorsDialogTitle": "Do you want to remove all monitors?",
"settingsRemoveAllMonitorsDialogConfirm": "Yes, remove all monitors", "settingsRemoveAllMonitorsDialogConfirm": "Yes, remove all monitors",
"settingsWallet": "Wallet", "settingsWallet": "Wallet",
"settingsWalletDescription": "Connect your wallet here. This is required for the Distributed Uptime monitor to connect to multiple nodes globally.", "settingsWalletDescription": "Connect your wallet here. This is required for the Distributed Uptime monitor to connect to multiple nodes globally.",
"settingsAbout": "About", "settingsAbout": "About",
"settingsDevelopedBy": "Developed by Bluewave Labs.", "settingsDevelopedBy": "Developed by Bluewave Labs.",
"settingsSave": "Save", "settingsSave": "Save",
"settingsSuccessSaved": "Settings saved successfully", "settingsSuccessSaved": "Settings saved successfully",
"settingsFailedToSave": "Failed to save settings", "settingsFailedToSave": "Failed to save settings",
"settingsStatsCleared": "Stats cleared successfully", "settingsStatsCleared": "Stats cleared successfully",
"settingsFailedToClearStats": "Failed to clear stats", "settingsFailedToClearStats": "Failed to clear stats",
"settingsDemoMonitorsAdded": "Successfully added demo monitors", "settingsDemoMonitorsAdded": "Successfully added demo monitors",
"settingsFailedToAddDemoMonitors": "Failed to add demo monitors", "settingsFailedToAddDemoMonitors": "Failed to add demo monitors",
"settingsMonitorsDeleted": "Successfully deleted all monitors", "settingsMonitorsDeleted": "Successfully deleted all monitors",
"settingsFailedToDeleteMonitors": "Failed to delete all monitors", "settingsFailedToDeleteMonitors": "Failed to delete all monitors",
"backendUnreachable": "Server Connection Error", "settingsEmail": "Email settings",
"backendUnreachableMessage": "We're unable to connect to the server. Please check your internet connection or verify your deployment configuration if the problem persists.", "settingsEmailDescription": "Configure email settings",
"backendUnreachableError": "Cannot connect to the server. Please try again later.", "settingsEmailHost": "Email host",
"retryConnection": "Retry connection", "settingsEmailPort": "Email port",
"retryingConnection": "Connecting...", "settingsEmailAddress": "Email address",
"backendReconnected": "Successfully reconnected to the server.", "settingsEmailPassword": "Email password",
"backendStillUnreachable": "Server is still unreachable. Please try again later.", "settingsEmailUser": "Email user",
"backendConnectionError": "Error connecting to the server. Please check your network connection.", "settingsEmailFieldResetLabel": "Password is set. Click Reset to change it.",
"starPromptTitle": "Star Checkmate", "backendUnreachable": "Server Connection Error",
"starPromptDescription": "See the latest releases and help grow the community on GitHub", "backendUnreachableMessage": "We're unable to connect to the server. Please check your internet connection or verify your deployment configuration if the problem persists.",
"https": "HTTPS", "backendUnreachableError": "Cannot connect to the server. Please try again later.",
"http": "HTTP", "retryConnection": "Retry connection",
"monitor": "monitor", "retryingConnection": "Connecting...",
"aboutus": "About Us", "backendReconnected": "Successfully reconnected to the server.",
"backendStillUnreachable": "Server is still unreachable. Please try again later.",
"backendConnectionError": "Error connecting to the server. Please check your network connection.",
"starPromptTitle": "Star Checkmate",
"starPromptDescription": "See the latest releases and help grow the community on GitHub",
"https": "HTTPS",
"http": "HTTP",
"monitor": "monitor",
"aboutus": "About Us",
"now": "Now", "now": "Now",
"delete": "Delete", "delete": "Delete",
"configure": "Configure", "configure": "Configure",
"networkError": "Network error", "networkError": "Network error",
"responseTime": "Response time", "responseTime": "Response time",
"ms": "ms", "ms": "ms",
"bar": "Bar", "bar": "Bar",
"area": "Area", "area": "Area",
"country": "COUNTRY", "country": "COUNTRY",
"city": "CITY", "city": "CITY",
"response": "RESPONSE", "response": "RESPONSE",
"checkConnection": "Please check your connection", "checkConnection": "Please check your connection",
"passwordreset": "Password Reset", "passwordreset": "Password Reset",
"authRegisterStepOnePersonalDetails": "Enter your personal details", "authRegisterStepOnePersonalDetails": "Enter your personal details",
"authCheckEmailOpenEmailButton": "Open email app", "authCheckEmailOpenEmailButton": "Open email app",
"authNewPasswordConfirmed": "Your password has been successfully reset. Click below to log in magically.", "authNewPasswordConfirmed": "Your password has been successfully reset. Click below to log in magically.",
"monitorStatusUp": "Monitor {name} ({url}) is now UP and responding", "monitorStatusUp": "Monitor {name} ({url}) is now UP and responding",
"monitorStatusDown": "Monitor {name} ({url}) is DOWN and not responding", "monitorStatusDown": "Monitor {name} ({url}) is DOWN and not responding",
"webhookSendSuccess": "Webhook notification sent successfully", "webhookSendSuccess": "Webhook notification sent successfully",
"webhookSendError": "Error sending webhook notification to {platform}", "webhookSendError": "Error sending webhook notification to {platform}",
"webhookUnsupportedPlatform": "Unsupported platform: {platform}", "webhookUnsupportedPlatform": "Unsupported platform: {platform}",
"distributedRightCategoryTitle": "Monitor", "distributedRightCategoryTitle": "Monitor",
"distributedStatusServerMonitors": "Server Monitors", "distributedStatusServerMonitors": "Server Monitors",
"distributedStatusServerMonitorsDescription": "Monitor status of related servers", "distributedStatusServerMonitorsDescription": "Monitor status of related servers",
"distributedUptimeCreateSelectURL": "Here you can select the URL of the host, together with the type of monitor.", "distributedUptimeCreateSelectURL": "Here you can select the URL of the host, together with the type of monitor.",
"distributedUptimeCreateChecks": "Checks to perform", "distributedUptimeCreateChecks": "Checks to perform",
"distributedUptimeCreateChecksDescription": "You can always add or remove checks after adding your site.", "distributedUptimeCreateChecksDescription": "You can always add or remove checks after adding your site.",
"distributedUptimeCreateIncidentNotification": "Incident notifications", "distributedUptimeCreateIncidentNotification": "Incident notifications",
"distributedUptimeCreateIncidentDescription": "When there is an incident, notify users.", "distributedUptimeCreateIncidentDescription": "When there is an incident, notify users.",
"distributedUptimeCreateAdvancedSettings": "Advanced settings", "distributedUptimeCreateAdvancedSettings": "Advanced settings",
"distributedUptimeDetailsNoMonitorHistory": "There is no check history for this monitor yet.", "distributedUptimeDetailsNoMonitorHistory": "There is no check history for this monitor yet.",
"distributedUptimeDetailsFooterHeading": "Made with ❤️ by UpRock & Bluewave Labs", "distributedUptimeDetailsFooterHeading": "Made with ❤️ by UpRock & Bluewave Labs",
"distributedUptimeDetailsFooterBuilt": "Built on", "distributedUptimeDetailsFooterBuilt": "Built on",
"distributedUptimeDetailsFooterSolana": "Solana", "distributedUptimeDetailsFooterSolana": "Solana",
"distributedUptimeDetailsMonitorHeader": "Distributed Uptime Monitoring powered by DePIN", "distributedUptimeDetailsMonitorHeader": "Distributed Uptime Monitoring powered by DePIN",
"distributedUptimeDetailsStatusHeaderUptime": "Uptime:", "distributedUptimeDetailsStatusHeaderUptime": "Uptime:",
"distributedUptimeDetailsStatusHeaderLastUpdate": "Last updated", "distributedUptimeDetailsStatusHeaderLastUpdate": "Last updated",
"notifications": { "notifications": {
"enableNotifications": "Enable {{platform}} notifications", "enableNotifications": "Enable {{platform}} notifications",
"testNotification": "Test notification", "testNotification": "Test notification",
"addOrEditNotifications": "Add or edit notifications", "addOrEditNotifications": "Add or edit notifications",
"slack": { "slack": {
"label": "Slack", "label": "Slack",
"description": "To enable Slack notifications, create a Slack app and enable incoming webhooks. After that, simply provide the webhook URL here.", "description": "To enable Slack notifications, create a Slack app and enable incoming webhooks. After that, simply provide the webhook URL here.",
"webhookLabel": "Webhook URL", "webhookLabel": "Webhook URL",
"webhookPlaceholder": "https://hooks.slack.com/services/...", "webhookPlaceholder": "https://hooks.slack.com/services/...",
"webhookRequired": "Slack webhook URL is required" "webhookRequired": "Slack webhook URL is required"
}, },
"discord": { "discord": {
"label": "Discord", "label": "Discord",
"description": "To send data to a Discord channel from Checkmate via Discord notifications using webhooks, you can use Discord's incoming Webhooks feature.", "description": "To send data to a Discord channel from Checkmate via Discord notifications using webhooks, you can use Discord's incoming Webhooks feature.",
"webhookLabel": "Discord Webhook URL", "webhookLabel": "Discord Webhook URL",
"webhookPlaceholder": "https://discord.com/api/webhooks/...", "webhookPlaceholder": "https://discord.com/api/webhooks/...",
"webhookRequired": "Discord webhook URL is required" "webhookRequired": "Discord webhook URL is required"
}, },
"telegram": { "telegram": {
"label": "Telegram", "label": "Telegram",
"description": "To enable Telegram notifications, create a Telegram bot using BotFather, an official bot for creating and managing Telegram bots. Then, get the API token and chat ID and write them down here.", "description": "To enable Telegram notifications, create a Telegram bot using BotFather, an official bot for creating and managing Telegram bots. Then, get the API token and chat ID and write them down here.",
"tokenLabel": "Your bot token", "tokenLabel": "Your bot token",
"tokenPlaceholder": "123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11", "tokenPlaceholder": "123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11",
"chatIdLabel": "Your Chat ID", "chatIdLabel": "Your Chat ID",
"chatIdPlaceholder": "-1001234567890", "chatIdPlaceholder": "-1001234567890",
"fieldsRequired": "Telegram token and chat ID are required" "fieldsRequired": "Telegram token and chat ID are required"
}, },
"webhook": { "webhook": {
"label": "Webhooks", "label": "Webhooks",
"description": "You can set up a custom webhook to receive notifications when incidents occur.", "description": "You can set up a custom webhook to receive notifications when incidents occur.",
"urlLabel": "Webhook URL", "urlLabel": "Webhook URL",
"urlPlaceholder": "https://your-server.com/webhook", "urlPlaceholder": "https://your-server.com/webhook",
"urlRequired": "Webhook URL is required" "urlRequired": "Webhook URL is required"
}, },
"testNotificationDevelop": "Test notification 2", "testNotificationDevelop": "Test notification 2",
"integrationButton": "Notification Integration", "integrationButton": "Notification Integration",
"testSuccess": "Test notification sent successfully!", "testSuccess": "Test notification sent successfully!",
"testFailed": "Failed to send test notification", "testFailed": "Failed to send test notification",
"unsupportedType": "Unsupported notification type", "unsupportedType": "Unsupported notification type",
"networkError": "Network error occurred" "networkError": "Network error occurred"
}, },
"testLocale": "testLocale", "testLocale": "testLocale",
"add": "Add", "add": "Add",
"monitors": "monitors", "monitors": "monitors",
"distributedUptimeStatusCreateStatusPage": "status page", "distributedUptimeStatusCreateStatusPage": "status page",
"distributedUptimeStatusCreateStatusPageAccess": "Access", "distributedUptimeStatusCreateStatusPageAccess": "Access",
"distributedUptimeStatusCreateStatusPageReady": "If your status page is ready, you can mark it as published.", "distributedUptimeStatusCreateStatusPageReady": "If your status page is ready, you can mark it as published.",
"distributedUptimeStatusBasicInfoHeader": "Basic Information", "distributedUptimeStatusBasicInfoHeader": "Basic Information",
"distributedUptimeStatusBasicInfoDescription": "Define company name and the subdomain that your status page points to.", "distributedUptimeStatusBasicInfoDescription": "Define company name and the subdomain that your status page points to.",
"distributedUptimeStatusLogoHeader": "Logo", "distributedUptimeStatusLogoHeader": "Logo",
"distributedUptimeStatusLogoDescription": "Upload a logo for your status page", "distributedUptimeStatusLogoDescription": "Upload a logo for your status page",
"distributedUptimeStatusLogoUploadButton": "Upload logo", "distributedUptimeStatusLogoUploadButton": "Upload logo",
"distributedUptimeStatusStandardMonitorsHeader": "Standard Monitors", "distributedUptimeStatusStandardMonitorsHeader": "Standard Monitors",
"distributedUptimeStatusStandardMonitorsDescription": "Attach standard monitors to your status page.", "distributedUptimeStatusStandardMonitorsDescription": "Attach standard monitors to your status page.",
"distributedUptimeStatusCreateYour": "Create your", "distributedUptimeStatusCreateYour": "Create your",
"distributedUptimeStatusEditYour": "Edit your", "distributedUptimeStatusEditYour": "Edit your",
"distributedUptimeStatusPublishedLabel": "Published and visible to the public", "distributedUptimeStatusPublishedLabel": "Published and visible to the public",
"distributedUptimeStatusCompanyNameLabel": "Company name", "distributedUptimeStatusCompanyNameLabel": "Company name",
"distributedUptimeStatusPageAddressLabel": "Your status page address", "distributedUptimeStatusPageAddressLabel": "Your status page address",
"distributedUptimeStatus30Days": "30 days", "distributedUptimeStatus30Days": "30 days",
"distributedUptimeStatus60Days": "60 days", "distributedUptimeStatus60Days": "60 days",
"distributedUptimeStatus90Days": "90 days", "distributedUptimeStatus90Days": "90 days",
"distributedUptimeStatusPageNotSetUp": "A status page is not set up.", "distributedUptimeStatusPageNotSetUp": "A status page is not set up.",
"distributedUptimeStatusContactAdmin": "Please contact your administrator", "distributedUptimeStatusContactAdmin": "Please contact your administrator",
"distributedUptimeStatusPageNotPublic": "This status page is not public.", "distributedUptimeStatusPageNotPublic": "This status page is not public.",
"distributedUptimeStatusPageDeleteDialog": "Do you want to delete this status page?", "distributedUptimeStatusPageDeleteDialog": "Do you want to delete this status page?",
"distributedUptimeStatusPageDeleteConfirm": "Yes, delete status page", "distributedUptimeStatusPageDeleteConfirm": "Yes, delete status page",
"distributedUptimeStatusPageDeleteDescription": "Once deleted, your status page cannot be retrieved.", "distributedUptimeStatusPageDeleteDescription": "Once deleted, your status page cannot be retrieved.",
"distributedUptimeStatusDevices": "Devices", "distributedUptimeStatusDevices": "Devices",
"distributedUptimeStatusUpt": "UPT", "distributedUptimeStatusUpt": "UPT",
"distributedUptimeStatusUptBurned": "UPT Burned", "distributedUptimeStatusUptBurned": "UPT Burned",
"distributedUptimeStatusUptLogo": "Upt Logo", "distributedUptimeStatusUptLogo": "Upt Logo",
"incidentsTableNoIncidents": "No incidents recorded", "incidentsTableNoIncidents": "No incidents recorded",
"incidentsTablePaginationLabel": "incidents", "incidentsTablePaginationLabel": "incidents",
"incidentsTableMonitorName": "Monitor Name", "incidentsTableMonitorName": "Monitor Name",
"incidentsTableStatus": "Status", "incidentsTableStatus": "Status",
"incidentsTableDateTime": "Date & Time", "incidentsTableDateTime": "Date & Time",
"incidentsTableStatusCode": "Status Code", "incidentsTableStatusCode": "Status Code",
"incidentsTableMessage": "Message", "incidentsTableMessage": "Message",
"incidentsOptionsHeader": "Incidents for:", "incidentsOptionsHeader": "Incidents for:",
"incidentsOptionsHeaderFilterBy": "Filter by:", "incidentsOptionsHeaderFilterBy": "Filter by:",
"incidentsOptionsHeaderFilterAll": "All", "incidentsOptionsHeaderFilterAll": "All",
"incidentsOptionsHeaderFilterDown": "Down", "incidentsOptionsHeaderFilterDown": "Down",
"incidentsOptionsHeaderFilterCannotResolve": "Cannot resolve", "incidentsOptionsHeaderFilterCannotResolve": "Cannot resolve",
"incidentsOptionsHeaderShow": "Show:", "incidentsOptionsHeaderShow": "Show:",
"incidentsOptionsHeaderLastHour": "Last hour", "incidentsOptionsHeaderLastHour": "Last hour",
"incidentsOptionsHeaderLastDay": "Last day", "incidentsOptionsHeaderLastDay": "Last day",
"incidentsOptionsHeaderLastWeek": "Last week", "incidentsOptionsHeaderLastWeek": "Last week",
"incidentsOptionsPlaceholderAllServers": "All servers", "incidentsOptionsPlaceholderAllServers": "All servers",
"infrastructureCreateYour": "Create your", "infrastructureCreateYour": "Create your",
"infrastructureCreateGeneralSettingsDescription": "Here you can select the URL of the host, together with the friendly name and authorization secret to connect to the server agent.", "infrastructureCreateGeneralSettingsDescription": "Here you can select the URL of the host, together with the friendly name and authorization secret to connect to the server agent.",
"infrastructureServerRequirement": "The server you are monitoring must be running the", "infrastructureServerRequirement": "The server you are monitoring must be running the",
"infrastructureCustomizeAlerts": "Customize alerts", "infrastructureCustomizeAlerts": "Customize alerts",
"infrastructureAlertNotificationDescription": "Send a notification to user(s) when thresholds exceed a specified percentage.", "infrastructureAlertNotificationDescription": "Send a notification to user(s) when thresholds exceed a specified percentage.",
"infrastructureCreateMonitor": "Create Infrastructure Monitor", "infrastructureCreateMonitor": "Create Infrastructure Monitor",
"infrastructureProtocol": "Protocol", "infrastructureProtocol": "Protocol",
"infrastructureServerUrlLabel": "Server URL", "infrastructureServerUrlLabel": "Server URL",
"infrastructureDisplayNameLabel": "Display name", "infrastructureDisplayNameLabel": "Display name",
"infrastructureAuthorizationSecretLabel": "Authorization secret", "infrastructureAuthorizationSecretLabel": "Authorization secret",
"gb": "GB", "gb": "GB",
"mb": "MB", "mb": "MB",
"mem": "Mem", "mem": "Mem",
"memoryUsage": "Memory usage", "memoryUsage": "Memory usage",
"cpu": "CPU", "cpu": "CPU",
"cpuUsage": "CPU usage", "cpuUsage": "CPU usage",
"cpuTemperature": "CPU Temperature", "cpuTemperature": "CPU Temperature",
"diskUsage": "Disk Usage", "diskUsage": "Disk Usage",
"used": "Used", "used": "Used",
"total": "Total", "total": "Total",
"cores": "Cores", "cores": "Cores",
"frequency": "Frequency", "frequency": "Frequency",
"status": "Status", "status": "Status",
"cpuPhysical": "CPU (Physical)", "cpuPhysical": "CPU (Physical)",
"cpuLogical": "CPU (Logical)", "cpuLogical": "CPU (Logical)",
"cpuFrequency": "CPU Frequency", "cpuFrequency": "CPU Frequency",
"avgCpuTemperature": "Average CPU Temperature", "avgCpuTemperature": "Average CPU Temperature",
"memory": "Memory", "memory": "Memory",
"disk": "Disk", "disk": "Disk",
"uptime": "Uptime", "uptime": "Uptime",
"os": "OS", "os": "OS",
"host": "Host", "host": "Host",
"actions": "Actions", "actions": "Actions",
"integrations": "Integrations", "integrations": "Integrations",
"integrationsPrism": "Connect Prism to your favorite service.", "integrationsPrism": "Connect Prism to your favorite service.",
"integrationsSlack": "Slack", "integrationsSlack": "Slack",
"integrationsSlackInfo": "Connect with Slack and see incidents in a channel", "integrationsSlackInfo": "Connect with Slack and see incidents in a channel",
"integrationsDiscord": "Discord", "integrationsDiscord": "Discord",
"integrationsDiscordInfo": "Connect with Discord and view incidents directly in a channel", "integrationsDiscordInfo": "Connect with Discord and view incidents directly in a channel",
"integrationsZapier": "Zapier", "integrationsZapier": "Zapier",
"integrationsZapierInfo": "Send all incidents to Zapier, and then see them everywhere", "integrationsZapierInfo": "Send all incidents to Zapier, and then see them everywhere",
"commonSave": "Save", "commonSave": "Save",
"createYour": "Create your", "createYour": "Create your",
"createMonitor": "Create monitor", "createMonitor": "Create monitor",
"pause": "Pause", "pause": "Pause",
"resume": "Resume", "resume": "Resume",
"editing": "Editing...", "editing": "Editing...",
"url": "URL", "url": "URL",
"access": "Access", "access": "Access",
"timezone": "Timezone", "timezone": "Timezone",
"features": "Features", "features": "Features",
"administrator": "Administrator?", "administrator": "Administrator?",
"loginHere": "Login here", "loginHere": "Login here",
"displayName": "Display name", "displayName": "Display name",
"urlMonitor": "URL to monitor", "urlMonitor": "URL to monitor",
"portToMonitor": "Port to monitor", "portToMonitor": "Port to monitor",
"websiteMonitoring": "Website monitoring", "websiteMonitoring": "Website monitoring",
"websiteMonitoringDescription": "Use HTTP(s) to monitor your website or API endpoint.", "websiteMonitoringDescription": "Use HTTP(s) to monitor your website or API endpoint.",
"pingMonitoring": "Ping monitoring", "pingMonitoring": "Ping monitoring",
"pingMonitoringDescription": "Check whether your server is available or not.", "pingMonitoringDescription": "Check whether your server is available or not.",
"dockerContainerMonitoring": "Docker container monitoring", "dockerContainerMonitoring": "Docker container monitoring",
"dockerContainerMonitoringDescription": "Check whether your Docker container is running or not.", "dockerContainerMonitoringDescription": "Check whether your Docker container is running or not.",
"portMonitoring": "Port monitoring", "portMonitoring": "Port monitoring",
"portMonitoringDescription": "Check whether your port is open or not.", "portMonitoringDescription": "Check whether your port is open or not.",
"createMaintenanceWindow": "Create maintenance window", "createMaintenanceWindow": "Create maintenance window",
"createMaintenance": "Create maintenance", "createMaintenance": "Create maintenance",
"editMaintenance": "Edit maintenance", "editMaintenance": "Edit maintenance",
"maintenanceWindowName": "Maintenance Window Name", "maintenanceWindowName": "Maintenance Window Name",
"friendlyNameInput": "Friendly name", "friendlyNameInput": "Friendly name",
"friendlyNamePlaceholder": "Maintenance at __ : __ for ___ minutes", "friendlyNamePlaceholder": "Maintenance at __ : __ for ___ minutes",
"maintenanceRepeat": "Maintenance Repeat", "maintenanceRepeat": "Maintenance Repeat",
"maintenance": "maintenance", "maintenance": "maintenance",
"duration": "Duration", "duration": "Duration",
"addMonitors": "Add monitors", "addMonitors": "Add monitors",
"window": "window", "window": "window",
"cancel": "Cancel", "cancel": "Cancel",
"message": "Message", "message": "Message",
"low": "low", "low": "low",
"high": "high", "high": "high",
"statusCode": "Status code", "statusCode": "Status code",
"date&Time": "Date & Time", "date&Time": "Date & Time",
"type": "Type", "type": "Type",
"statusPageName": "Status page name", "statusPageName": "Status page name",
"publicURL": "Public URL", "publicURL": "Public URL",
"repeat": "Repeat", "repeat": "Repeat",
"edit": "Edit", "edit": "Edit",
"createA": "Create a", "createA": "Create a",
"remove": "Remove", "remove": "Remove",
"maintenanceWindowDescription": "Your pings won't be sent during this time frame", "maintenanceWindowDescription": "Your pings won't be sent during this time frame",
"startTime": "Start time", "startTime": "Start time",
"timeZoneInfo": "All dates and times are in GMT+0 time zone.", "timeZoneInfo": "All dates and times are in GMT+0 time zone.",
"monitorsToApply": "Monitors to apply maintenance window to", "monitorsToApply": "Monitors to apply maintenance window to",
"nextWindow": "Next window", "nextWindow": "Next window",
"notFoundButton": "Go to the main dashboard", "notFoundButton": "Go to the main dashboard",
"pageSpeedConfigureSettingsDescription": "Here you can select the URL of the host, together with the type of monitor.", "pageSpeedConfigureSettingsDescription": "Here you can select the URL of the host, together with the type of monitor.",
"monitorDisplayName": "Monitor display name", "monitorDisplayName": "Monitor display name",
"whenNewIncident": "When there is a new incident,", "whenNewIncident": "When there is a new incident,",
"notifySMS": "Notify via SMS (coming soon)", "notifySMS": "Notify via SMS (coming soon)",
"notifyEmails": "Also notify via email to multiple addresses (coming soon)", "notifyEmails": "Also notify via email to multiple addresses (coming soon)",
"seperateEmails": "You can separate multiple emails with a comma", "seperateEmails": "You can separate multiple emails with a comma",
"checkFrequency": "Check frequency", "checkFrequency": "Check frequency",
"matchMethod": "Match Method", "matchMethod": "Match Method",
"expectedValue": "Expected value", "expectedValue": "Expected value",
"deleteDialogTitle": "Do you really want to delete this monitor?", "deleteDialogTitle": "Do you really want to delete this monitor?",
"deleteDialogDescription": "Once deleted, this monitor cannot be retrieved.", "deleteDialogDescription": "Once deleted, this monitor cannot be retrieved.",
"pageSpeedMonitor": "PageSpeed monitor", "pageSpeedMonitor": "PageSpeed monitor",
"shown": "Shown", "shown": "Shown",
"ago": "ago", "ago": "ago",
"companyName": "Company name", "companyName": "Company name",
"pageSpeedDetailsPerformanceReport": "Values are estimated and may vary.", "pageSpeedDetailsPerformanceReport": "Values are estimated and may vary.",
"pageSpeedDetailsPerformanceReportCalculator": "See calculator", "pageSpeedDetailsPerformanceReportCalculator": "See calculator",
"checkingEvery": "Checking every", "checkingEvery": "Checking every",
"statusPageCreateSettings": "If your status page is ready, you can mark it as published.", "statusPageCreateSettings": "If your status page is ready, you can mark it as published.",
"basicInformation": "Basic Information", "basicInformation": "Basic Information",
"statusPageCreateBasicInfoDescription": "Define company name and the subdomain that your status page points to.", "statusPageCreateBasicInfoDescription": "Define company name and the subdomain that your status page points to.",
"statusPageCreateSelectTimeZoneDescription": "Select the timezone that your status page will be displayed in.", "statusPageCreateSelectTimeZoneDescription": "Select the timezone that your status page will be displayed in.",
"statusPageCreateAppearanceDescription": "Define the default look and feel of your public status page.", "statusPageCreateAppearanceDescription": "Define the default look and feel of your public status page.",
"statusPageCreateSettingsCheckboxLabel": "Published and visible to the public", "statusPageCreateSettingsCheckboxLabel": "Published and visible to the public",
"statusPageCreateBasicInfoStatusPageAddress": "Your status page address", "statusPageCreateBasicInfoStatusPageAddress": "Your status page address",
"statusPageCreateTabsContent": "Status page servers", "statusPageCreateTabsContent": "Status page servers",
"statusPageCreateTabsContentDescription": "You can add any number of servers that you monitor to your status page. You can also reorder them for the best viewing experience.", "statusPageCreateTabsContentDescription": "You can add any number of servers that you monitor to your status page. You can also reorder them for the best viewing experience.",
"statusPageCreateTabsContentFeaturesDescription": "Show more details on the status page", "statusPageCreateTabsContentFeaturesDescription": "Show more details on the status page",
"showCharts": "Show charts", "showCharts": "Show charts",
"showUptimePercentage": "Show uptime percentage", "showUptimePercentage": "Show uptime percentage",
"removeLogo": "Remove Logo", "removeLogo": "Remove Logo",
"statusPageStatus": "A public status page is not set up.", "statusPageStatus": "A public status page is not set up.",
"statusPageStatusContactAdmin": "Please contact to your administrator", "statusPageStatusContactAdmin": "Please contact to your administrator",
"statusPageStatusNotPublic": "This status page is not public.", "statusPageStatusNotPublic": "This status page is not public.",
"statusPageStatusNoPage": "There's no status page here.", "statusPageStatusNoPage": "There's no status page here.",
"statusPageStatusServiceStatus": "Service status", "statusPageStatusServiceStatus": "Service status",
"deleteStatusPage": "Do you want to delete this status page?", "deleteStatusPage": "Do you want to delete this status page?",
"deleteStatusPageConfirm": "Yes, delete status page", "deleteStatusPageConfirm": "Yes, delete status page",
"deleteStatusPageDescription": "Once deleted, your status page cannot be retrieved.", "deleteStatusPageDescription": "Once deleted, your status page cannot be retrieved.",
"uptimeCreate": "The expected value is used to match against response result, and the match determines the status.", "uptimeCreate": "The expected value is used to match against response result, and the match determines the status.",
"uptimeCreateJsonPath": "This expression will be evaluated against the reponse JSON data and the result will be used to match against the expected value. See", "uptimeCreateJsonPath": "This expression will be evaluated against the reponse JSON data and the result will be used to match against the expected value. See",
"uptimeCreateJsonPathQuery": "for query language documentation.", "uptimeCreateJsonPathQuery": "for query language documentation.",
"maintenanceTableActionMenuDialogTitle": "Do you really want to remove this maintenance window?", "maintenanceTableActionMenuDialogTitle": "Do you really want to remove this maintenance window?",
"infrastructureEditYour": "Edit your", "infrastructureEditYour": "Edit your",
"infrastructureEditMonitor": "Save Infrastructure Monitor", "infrastructureEditMonitor": "Save Infrastructure Monitor",
"infrastructureMonitorCreated": "Infrastructure monitor created successfully!", "infrastructureMonitorCreated": "Infrastructure monitor created successfully!",
"infrastructureMonitorUpdated": "Infrastructure monitor updated successfully!", "infrastructureMonitorUpdated": "Infrastructure monitor updated successfully!",
"errorInvalidTypeId": "Invalid notification type provided", "errorInvalidTypeId": "Invalid notification type provided",
"errorInvalidFieldId": "Invalid field ID provided", "errorInvalidFieldId": "Invalid field ID provided",
"inviteNoTokenFound": "No invite token found", "inviteNoTokenFound": "No invite token found",
"pageSpeedWarning": "Warning: You haven't added a Google PageSpeed API key yet. Without it, the PageSpeed monitor won't function.", "pageSpeedWarning": "Warning: You haven't added a Google PageSpeed API key yet. Without it, the PageSpeed monitor won't function.",
"pageSpeedLearnMoreLink": "Click here", "pageSpeedLearnMoreLink": "Click here",
"pageSpeedAddApiKey": "to add your API key.", "pageSpeedAddApiKey": "to add your API key.",
"update": "Update", "update": "Update",
"invalidFileFormat": "Unsupported file format!", "invalidFileFormat": "Unsupported file format!",
"invalidFileSize": "File size is too large!", "invalidFileSize": "File size is too large!",
"ClickUpload": "Click to upload", "ClickUpload": "Click to upload",
"DragandDrop": "drag and drop", "DragandDrop": "drag and drop",
"MaxSize": "Maximum Size", "MaxSize": "Maximum Size",
"SupportedFormats": "Supported formats", "SupportedFormats": "Supported formats",
"FirstName": "First name", "FirstName": "First name",
"LastName": "Last name", "LastName": "Last name",
"EmailDescriptionText": "This is your current email address — it cannot be changed.", "EmailDescriptionText": "This is your current email address — it cannot be changed.",
"ignoreTLSError": "Ignore TLS/SSL error", "ignoreTLSError": "Ignore TLS/SSL error",
"tlsErrorIgnored": "TLS/SSL errors ignored", "tlsErrorIgnored": "TLS/SSL errors ignored",
"ignoreTLSErrorDescription": "Ignore TLS/SSL errors and continue checking the website's availability", "ignoreTLSErrorDescription": "Ignore TLS/SSL errors and continue checking the website's availability",
"YourPhoto": "Profile photo", "YourPhoto": "Profile photo",
"PhotoDescriptionText": "This photo will be displayed in your profile page.", "PhotoDescriptionText": "This photo will be displayed in your profile page.",
"save": "Save", "save": "Save",
"DeleteAccountTitle": "Remove account", "DeleteAccountTitle": "Remove account",
"DeleteAccountButton": "Remove account", "DeleteAccountButton": "Remove account",
"DeleteDescriptionText": "This will remove the account and all associated data from the server. This isn't reversible.", "DeleteDescriptionText": "This will remove the account and all associated data from the server. This isn't reversible.",
"DeleteAccountWarning": "Removing your account means you won't be able to sign in again and all your data will be removed. This isn't reversible.", "DeleteAccountWarning": "Removing your account means you won't be able to sign in again and all your data will be removed. This isn't reversible.",
"DeleteWarningTitle": "Really remove this account?", "DeleteWarningTitle": "Really remove this account?",
"authRegisterFirstName": "Name", "authRegisterFirstName": "Name",
"authRegisterLastName": "Surname", "authRegisterLastName": "Surname",
"authRegisterEmail": "Email", "authRegisterEmail": "Email",
"authRegisterEmailRequired": "To continue, please enter your email address", "authRegisterEmailRequired": "To continue, please enter your email address",
"authRegisterEmailInvalid": "Please enter a valid email address", "authRegisterEmailInvalid": "Please enter a valid email address",
"bulkImport": { "bulkImport": {
"title": "Bulk Import", "title": "Bulk Import",
"selectFileTips": "Select CSV file to upload", "selectFileTips": "Select CSV file to upload",
"selectFileDescription": "You can download our <template>template</template> or <sample>sample</sample>", "selectFileDescription": "You can download our <template>template</template> or <sample>sample</sample>",
"selectFile": "Select File", "selectFile": "Select File",
"parsingFailed": "Parsing failed", "parsingFailed": "Parsing failed",
"uploadSuccess": "Monitors created successfully!", "uploadSuccess": "Monitors created successfully!",
"validationFailed": "Validation failed", "validationFailed": "Validation failed",
"noFileSelected": "No file selected", "noFileSelected": "No file selected",
"fallbackPage": "Import a file to upload a list of servers in bulk" "fallbackPage": "Import a file to upload a list of servers in bulk"
}, },
"publicLink": "Public link", "publicLink": "Public link",
"maskedPageSpeedKeyPlaceholder": "*************************************", "maskedPageSpeedKeyPlaceholder": "*************************************",
"pageSpeedApiKeyFieldTitle": "Google PageSpeed API key", "pageSpeedApiKeyFieldTitle": "Google PageSpeed API key",
"pageSpeedApiKeyFieldLabel": "PageSpeed API key", "pageSpeedApiKeyFieldLabel": "PageSpeed API key",
"pageSpeedApiKeyFieldDescription": "Enter your Google PageSpeed API key to enable pagespeed monitoring. Click Reset to update the key.", "pageSpeedApiKeyFieldDescription": "Enter your Google PageSpeed API key to enable pagespeed monitoring. Click Reset to update the key.",
"pageSpeedApiKeyFieldResetLabel": "API key is set. Click Reset to change it.", "pageSpeedApiKeyFieldResetLabel": "API key is set. Click Reset to change it.",
"reset": "Reset" "reset": "Reset"
} }
+1 -2
View File
@@ -649,9 +649,8 @@ class MonitorController {
sendTestEmail = async (req, res, next) => { sendTestEmail = async (req, res, next) => {
try { try {
const { to } = req.body; const { to } = req.body;
if (!to || typeof to !== "string") { if (!to || typeof to !== "string") {
return res.error({ msg: this.stringService.errorForValidEmailAddress }); throw new Error(this.stringService.errorForValidEmailAddress);
} }
const subject = this.stringService.testEmailSubject; const subject = this.stringService.testEmailSubject;
+15 -2
View File
@@ -13,12 +13,25 @@ class SettingsController {
getAppSettings = async (req, res, next) => { getAppSettings = async (req, res, next) => {
const dbSettings = await this.settingsService.getDBSettings(); const dbSettings = await this.settingsService.getDBSettings();
const sanitizedSettings = { ...dbSettings }; const sanitizedSettings = { ...dbSettings };
const returnSettings = {
pagespeedKeySet: false,
emailPasswordSet: false,
};
if (typeof sanitizedSettings.pagespeedApiKey !== "undefined") { if (typeof sanitizedSettings.pagespeedApiKey !== "undefined") {
sanitizedSettings.pagespeedApiKey = "********"; returnSettings.pagespeedKeySet = true;
delete sanitizedSettings.pagespeedApiKey;
} }
if (typeof sanitizedSettings.systemEmailPassword !== "undefined") {
returnSettings.emailPasswordSet = true;
delete sanitizedSettings.systemEmailPassword;
}
returnSettings.settings = sanitizedSettings;
return res.success({ return res.success({
msg: this.stringService.getAppSettings, msg: this.stringService.getAppSettings,
data: sanitizedSettings, data: returnSettings,
}); });
}; };
+3
View File
@@ -25,6 +25,9 @@ const AppSettingsSchema = mongoose.Schema(
systemEmailPassword: { systemEmailPassword: {
type: String, type: String,
}, },
systemEmailUser: {
type: String,
},
singleton: { singleton: {
type: Boolean, type: Boolean,
required: true, required: true,
@@ -21,6 +21,11 @@ const updateAppSettings = async (newSettings) => {
delete update.$set.pagespeedApiKey; delete update.$set.pagespeedApiKey;
} }
if (newSettings.systemEmailPassword === "") {
update.$unset = { systemEmailPassword: "" };
delete update.$set.systemEmailPassword;
}
const settings = await AppSettings.findOneAndUpdate({}, update, { const settings = await AppSettings.findOneAndUpdate({}, update, {
new: true, new: true,
upsert: true, upsert: true,
+27 -22
View File
@@ -29,7 +29,10 @@ class EmailService {
this.mjml2html = mjml2html; this.mjml2html = mjml2html;
this.nodemailer = nodemailer; this.nodemailer = nodemailer;
this.logger = logger; this.logger = logger;
this.init();
}
init = async () => {
/** /**
* Loads an email template from the filesystem. * Loads an email template from the filesystem.
* *
@@ -67,34 +70,14 @@ class EmailService {
serverIsUpTemplate: this.loadTemplate("serverIsUp"), serverIsUpTemplate: this.loadTemplate("serverIsUp"),
passwordResetTemplate: this.loadTemplate("passwordReset"), passwordResetTemplate: this.loadTemplate("passwordReset"),
hardwareIncidentTemplate: this.loadTemplate("hardwareIncident"), hardwareIncidentTemplate: this.loadTemplate("hardwareIncident"),
testEmailTemplate: this.loadTemplate("testEmailTemplate") testEmailTemplate: this.loadTemplate("testEmailTemplate"),
}; };
/** /**
* The email transporter used to send emails. * The email transporter used to send emails.
* @type {Object} * @type {Object}
*/ */
};
const {
systemEmailHost,
systemEmailPort,
systemEmailUser,
systemEmailAddress,
systemEmailPassword,
} = this.settingsService.getSettings();
const emailConfig = {
host: systemEmailHost,
port: systemEmailPort,
secure: true,
auth: {
user: systemEmailUser || systemEmailAddress,
pass: systemEmailPassword,
},
};
this.transporter = this.nodemailer.createTransport(emailConfig);
}
/** /**
* Asynchronously builds and sends an email using a specified template and context. * Asynchronously builds and sends an email using a specified template and context.
@@ -106,6 +89,28 @@ class EmailService {
* @returns {Promise<string>} A promise that resolves to the messageId of the sent email. * @returns {Promise<string>} A promise that resolves to the messageId of the sent email.
*/ */
buildAndSendEmail = async (template, context, to, subject) => { buildAndSendEmail = async (template, context, to, subject) => {
// TODO - Consider an update transporter method so this only needs to be recreated when smtp settings change
const {
systemEmailHost,
systemEmailPort,
systemEmailUser,
systemEmailAddress,
systemEmailPassword,
} = await this.settingsService.getDBSettings();
const emailConfig = {
host: systemEmailHost,
port: systemEmailPort,
secure: true,
auth: {
user: systemEmailUser || systemEmailAddress,
pass: systemEmailPassword,
},
connectionTimeout: 5000,
};
this.transporter = this.nodemailer.createTransport(emailConfig);
const buildHtml = async (template, context) => { const buildHtml = async (template, context) => {
try { try {
const mjml = this.templateLookup[template](context); const mjml = this.templateLookup[template](context);
+1
View File
@@ -431,6 +431,7 @@ const updateAppSettingsBodyValidation = joi.object({
systemEmailPort: joi.number().allow(""), systemEmailPort: joi.number().allow(""),
systemEmailAddress: joi.string().allow(""), systemEmailAddress: joi.string().allow(""),
systemEmailPassword: joi.string().allow(""), systemEmailPassword: joi.string().allow(""),
systemEmailUser: joi.string().allow(""),
}); });
//**************************************** //****************************************