diff --git a/client/src/Pages/Settings/SettingsAbout.jsx b/client/src/Pages/Settings/SettingsAbout.jsx index 6a8125af3..7b0a4ad2c 100644 --- a/client/src/Pages/Settings/SettingsAbout.jsx +++ b/client/src/Pages/Settings/SettingsAbout.jsx @@ -16,7 +16,7 @@ const SettingsAbout = () => { component="h1" variant="h2" > - {t("settingsPage.aboutSettings.title")} + {t("pages.settings.aboutSettings.title")} @@ -24,7 +24,7 @@ const SettingsAbout = () => { {t("common.appName")} {__APP_VERSION__} - {t("settingsPage.aboutSettings.labelDevelopedBy")} + {t("pages.settings.aboutSettings.labelDevelopedBy")} { component="h1" variant="h2" > - {t("settingsPage.demoMonitorsSettings.title")} + {t("pages.settings.demoMonitorsSettings.title")} - {t("settingsPage.demoMonitorsSettings.description")} + {t("pages.settings.demoMonitorsSettings.description")} @@ -45,7 +45,7 @@ const SettingsDemoMonitors = ({ isAdmin, HEADER_SX, isLoading }) => { }} sx={{ mt: theme.spacing(4) }} > - {t("settingsPage.demoMonitorsSettings.buttonAddMonitors")} + {t("pages.settings.demoMonitorsSettings.buttonAddMonitors")} @@ -55,10 +55,10 @@ const SettingsDemoMonitors = ({ isAdmin, HEADER_SX, isLoading }) => { component="h1" variant="h2" > - {t("settingsPage.systemResetSettings.title")} + {t("pages.settings.systemResetSettings.title")} - {t("settingsPage.systemResetSettings.description")} + {t("pages.settings.systemResetSettings.description")} @@ -69,15 +69,15 @@ const SettingsDemoMonitors = ({ isAdmin, HEADER_SX, isLoading }) => { onClick={() => setIsOpen(true)} sx={{ mt: theme.spacing(4) }} > - {t("settingsPage.systemResetSettings.buttonRemoveAllMonitors")} + {t("pages.settings.systemResetSettings.buttonRemoveAllMonitors")} setIsOpen(false)} - confirmationButtonLabel={t("settingsPage.systemResetSettings.dialogConfirm")} + confirmationButtonLabel={t("pages.settings.systemResetSettings.dialogConfirm")} onConfirm={async () => { await deleteAllMonitorsFn("/monitors/"); setIsOpen(false); diff --git a/client/src/Pages/Settings/SettingsEmail.jsx b/client/src/Pages/Settings/SettingsEmail.jsx index 024fd5854..5757df98e 100644 --- a/client/src/Pages/Settings/SettingsEmail.jsx +++ b/client/src/Pages/Settings/SettingsEmail.jsx @@ -66,7 +66,7 @@ const SettingsEmail = ({ !systemEmailPassword ) { createToast({ - body: t("settingsPage.emailSettings.toastEmailRequiredFieldsError"), + body: t("pages.settings.emailSettings.toastEmailRequiredFieldsError"), variant: "error", }); return; @@ -101,270 +101,269 @@ const SettingsEmail = ({ component="h1" variant="h2" > - {t("settingsPage.emailSettings.title")} + {t("pages.settings.emailSettings.title")} - {t("settingsPage.emailSettings.description")} + {t("pages.settings.emailSettings.description")} - - - - ( - - )} - /> - - - ( - - )} - /> - - - ( - - )} - /> - - - ( - - )} - /> - - {(isEmailPasswordSet === false || emailPasswordHasBeenReset === true) && ( - - ( - } - error={!!fieldState.error} - helperText={fieldState.error?.message} - /> - )} - /> - - )} - {isEmailPasswordSet === true && emailPasswordHasBeenReset === false && ( - - {t("settingsPage.emailSettings.labelPasswordSet")} - - - )} + + + ( + + )} + /> + + + ( + + )} + /> + + + ( + + )} + /> + + + ( + + )} + /> + + {(isEmailPasswordSet === false || emailPasswordHasBeenReset === true) && ( ( - )} - /> - - - ( - } error={!!fieldState.error} helperText={fieldState.error?.message} /> )} /> + )} + + {isEmailPasswordSet === true && emailPasswordHasBeenReset === false && ( + + {t("pages.settings.emailSettings.labelPasswordSet")} + + + )} + + ( + + )} + /> + + + ( + + )} + /> + + + {[ + [ + "pages.settings.emailSettings.labelSecure", + "systemEmailSecure", + systemEmailSecure, + ], + [ + "pages.settings.emailSettings.labelPool", + "systemEmailPool", + systemEmailPool, + ], + [ + "pages.settings.emailSettings.labelIgnoreTLS", + "systemEmailIgnoreTLS", + systemEmailIgnoreTLS, + ], + [ + "pages.settings.emailSettings.labelRequireTLS", + "systemEmailRequireTLS", + systemEmailRequireTLS, + ], + [ + "pages.settings.emailSettings.labelRejectUnauthorized", + "systemEmailRejectUnauthorized", + systemEmailRejectUnauthorized, + ], + ].map(([labelKey, name, value]) => ( + ( + + {t(labelKey)} + + + + )} + /> + ))} + + - {[ - [ - "settingsPage.emailSettings.labelSecure", - "systemEmailSecure", - systemEmailSecure, - ], - [ - "settingsPage.emailSettings.labelPool", - "systemEmailPool", - systemEmailPool, - ], - [ - "settingsPage.emailSettings.labelIgnoreTLS", - "systemEmailIgnoreTLS", - systemEmailIgnoreTLS, - ], - [ - "settingsPage.emailSettings.labelRequireTLS", - "systemEmailRequireTLS", - systemEmailRequireTLS, - ], - [ - "settingsPage.emailSettings.labelRejectUnauthorized", - "systemEmailRejectUnauthorized", - systemEmailRejectUnauthorized, - ], - ].map(([labelKey, name, value]) => ( - ( - - {t(labelKey)} - - - - )} - /> - ))} - - - - - {JSON.stringify( - { - host: systemEmailHost, - port: systemEmailPort, - secure: systemEmailSecure, - auth: { - user: systemEmailUser || systemEmailAddress, - pass: "", - }, - name: systemEmailConnectionHost || "localhost", - pool: systemEmailPool, - tls: { - rejectUnauthorized: systemEmailRejectUnauthorized, - ignoreTLS: systemEmailIgnoreTLS, - requireTLS: systemEmailRequireTLS, - servername: systemEmailTLSServername, - }, + + {JSON.stringify( + { + host: systemEmailHost, + port: systemEmailPort, + secure: systemEmailSecure, + auth: { + user: systemEmailUser || systemEmailAddress, + pass: "", }, - null, - 2 - )} - - - - -
-						{JSON.stringify({
-							systemEmailHost: systemEmailHost,
-							systemEmailAddress: systemEmailAddress,
-							systemEmailPassword: systemEmailPassword,
-						})}
-					
- - - {systemEmailHost && - systemEmailPort && - systemEmailAddress && - systemEmailPassword && ( - + name: systemEmailConnectionHost || "localhost", + pool: systemEmailPool, + tls: { + rejectUnauthorized: systemEmailRejectUnauthorized, + ignoreTLS: systemEmailIgnoreTLS, + requireTLS: systemEmailRequireTLS, + servername: systemEmailTLSServername, + }, + }, + null, + 2 )} +
-
-
+ + +
+					{JSON.stringify({
+						systemEmailHost: systemEmailHost,
+						systemEmailAddress: systemEmailAddress,
+						systemEmailPassword: systemEmailPassword,
+					})}
+				
+ + + {systemEmailHost && + systemEmailPort && + systemEmailAddress && + systemEmailPassword && ( + + )} + + ); }; diff --git a/client/src/Pages/Settings/SettingsGlobalThresholds.jsx b/client/src/Pages/Settings/SettingsGlobalThresholds.jsx index 15d651c6e..c2bc671f1 100644 --- a/client/src/Pages/Settings/SettingsGlobalThresholds.jsx +++ b/client/src/Pages/Settings/SettingsGlobalThresholds.jsx @@ -30,11 +30,11 @@ const SettingsGlobalThresholds = ({ component="h1" variant="h2" > - {t("settingsPage.globalThresholds.title", "Global Thresholds")} + {t("pages.settings.globalThresholds.title", "Global Thresholds")} {t( - "settingsPage.globalThresholds.description", + "pages.settings.globalThresholds.description", "Configure global CPU, Memory, Disk, and Temperature thresholds." )} diff --git a/client/src/Pages/Settings/SettingsPagespeed.jsx b/client/src/Pages/Settings/SettingsPagespeed.jsx index 3ef2b8f8f..a479ff660 100644 --- a/client/src/Pages/Settings/SettingsPagespeed.jsx +++ b/client/src/Pages/Settings/SettingsPagespeed.jsx @@ -39,10 +39,10 @@ const SettingsPagespeed = ({ component="h1" variant="h2" > - {t("settingsPage.pageSpeedSettings.title")} + {t("pages.settings.pageSpeedSettings.title")} - {t("settingsPage.pageSpeedSettings.description")} + {t("pages.settings.pageSpeedSettings.description")} @@ -54,7 +54,7 @@ const SettingsPagespeed = ({ render={({ field, fieldState }) => ( } @@ -67,7 +67,9 @@ const SettingsPagespeed = ({ {isApiKeySet === true && apiKeyHasBeenReset === false && ( - {t("settingsPage.pageSpeedSettings.labelApiKeySet")} + + {t("pages.settings.pageSpeedSettings.labelApiKeySet")} + setIsOpen(false)} confirmationButtonLabel={t( - "settingsPage.statsSettings.clearAllStatsDialogConfirm" + "pages.settings.statsSettings.clearAllStatsDialogConfirm" )} onConfirm={async () => { await deleteMonitorStatsFn("/checks/team"); diff --git a/client/src/Pages/Settings/SettingsTimeZone.jsx b/client/src/Pages/Settings/SettingsTimeZone.jsx index bf048cefa..444088c8a 100644 --- a/client/src/Pages/Settings/SettingsTimeZone.jsx +++ b/client/src/Pages/Settings/SettingsTimeZone.jsx @@ -37,11 +37,11 @@ const SettingsTimeZone = ({ HEADING_SX }) => { component="h1" variant="h2" > - {t("settingsPage.timezoneSettings.title")} + {t("pages.settings.timezoneSettings.title")} - {t("settingsPage.timezoneSettings.description")} + {t("pages.settings.timezoneSettings.description")} diff --git a/client/src/Pages/Settings/SettingsUI.jsx b/client/src/Pages/Settings/SettingsUI.jsx index 3fd1b0dc5..aa58a67d9 100644 --- a/client/src/Pages/Settings/SettingsUI.jsx +++ b/client/src/Pages/Settings/SettingsUI.jsx @@ -32,16 +32,16 @@ const SettingsUI = ({ HEADING_SX }) => { component="h1" variant="h2" > - {t("settingsPage.uiSettings.title")} + {t("pages.settings.uiSettings.title")} - {t("settingsPage.uiSettings.description")} + {t("pages.settings.uiSettings.description")} diff --git a/client/src/Pages/Settings/SettingsURL.jsx b/client/src/Pages/Settings/SettingsURL.jsx index 5ed32b9fc..11e7ea821 100644 --- a/client/src/Pages/Settings/SettingsURL.jsx +++ b/client/src/Pages/Settings/SettingsURL.jsx @@ -20,10 +20,10 @@ const SettingsURL = ({ HEADING_SX, control, defaults }) => { component="h1" variant="h2" > - {t("settingsPage.urlSettings.title")} + {t("pages.settings.urlSettings.title")} - {t("settingsPage.urlSettings.description")} + {t("pages.settings.urlSettings.description")} @@ -36,10 +36,10 @@ const SettingsURL = ({ HEADING_SX, control, defaults }) => { {...field} error={!!fieldState.error} helperText={fieldState.error?.message} - label={t("settingsPage.urlSettings.label")} + label={t("pages.settings.urlSettings.label")} items={[ - { _id: true, name: t("settingsPage.urlSettings.selectEnabled") }, - { _id: false, name: t("settingsPage.urlSettings.selectDisabled") }, + { _id: true, name: t("pages.settings.urlSettings.selectEnabled") }, + { _id: false, name: t("pages.settings.urlSettings.selectDisabled") }, ]} /> )} diff --git a/client/src/Pages/Settings/index.jsx b/client/src/Pages/Settings/index.jsx index ea47ec23b..56ab44cf5 100644 --- a/client/src/Pages/Settings/index.jsx +++ b/client/src/Pages/Settings/index.jsx @@ -114,7 +114,7 @@ const Settings = () => { return ( - {t("settingsPage.title")} + {t("pages.settings.title")} { sx={{ px: theme.spacing(12), py: theme.spacing(8) }} onClick={handleSubmit(onSubmit)} > - {t("settingsPage.saveButtonLabel")} + {t("pages.settings.saveButtonLabel")} diff --git a/client/src/locales/en.json b/client/src/locales/en.json index 8e18d8e2a..94d5b5642 100644 --- a/client/src/locales/en.json +++ b/client/src/locales/en.json @@ -901,6 +901,93 @@ "title": "A PageSpeed monitor is used to:" } }, + "settings": { + "aboutSettings": { + "labelDevelopedBy": "Developed by Bluewave Labs", + "labelVersion": "Version", + "title": "About" + }, + "demoMonitorsSettings": { + "buttonAddMonitors": "Add demo monitors", + "description": "Add sample monitors for demonstration purposes.", + "title": "Demo monitors" + }, + "emailSettings": { + "buttonSendTestEmail": "Send test e-mail", + "description": "Configure the email settings for your system. This is used to send notifications and alerts.", + "descriptionTransport": "This builds an SMTP transport for NodeMailer", + "labelAddress": "Email address - Used for authentication", + "labelConnectionHost": "Email connection host - Hostname to use in the HELO/EHLO greeting", + "labelHost": "Email host - Hostname or IP address to connect to", + "labelIgnoreTLS": "Disable STARTTLS: Don't use TLS even if the server supports it", + "labelPassword": "Email password - Password for authentication", + "labelPasswordSet": "Password is set. Click Reset to change it.", + "labelPool": "Enable connection pooling: Reuse existing connections to improve performance", + "labelPort": "Email port - Port to connect to", + "labelRejectUnauthorized": "Reject invalid certificates: Reject connections with self-signed or untrusted certificates", + "labelRequireTLS": "Force STARTTLS: Require TLS upgrade, fail if not supported", + "labelSecure": "Use SSL (recommended): Encrypt the connection using SSL/TLS", + "labelTLSServername": "TLS Servername - Optional Hostname for TLS Validation when host is an IP", + "labelUser": "Email user - Username for authentication, overrides email address if specified", + "linkTransport": "See specifications here", + "placeholderUser": "Leave empty if not required", + "title": "Email", + "toastEmailRequiredFieldsError": "Email address, host, port and password are required" + }, + "globalThresholds": { + "title": "Global Thresholds", + "description": "Configure global CPU, Memory, Disk, and Temperature thresholds. If a value is provided, it will automatically be enabled for monitoring." + }, + "pageSpeedSettings": { + "description": "Enter your Google PageSpeed API key to enable Google PageSpeed monitoring. Click Reset to update the key.", + "labelApiKeySet": "API key is set. Click Reset to change it.", + "labelApiKey": "PageSpeed API key", + "title": "Google PageSpeed API key" + }, + "saveButtonLabel": "Save", + "statsSettings": { + "clearAllStatsButton": "Clear all stats", + "clearAllStatsDescription": "Clear all stats. This is irreversible.", + "clearAllStatsDialogConfirm": "Yes, clear all stats", + "clearAllStatsDialogDescription": "Once removed, the monitoring history and stats cannot be retrieved.", + "clearAllStatsDialogTitle": "Do you want to clear all stats?", + "description": "Define how long you want to retain historical data. You can also clear all existing data.", + "labelTTL": "The days you want to keep monitoring history.", + "labelTTLOptional": "0 for infinite", + "title": "Monitor history" + }, + "systemResetSettings": { + "buttonRemoveAllMonitors": "Remove all monitors", + "description": "Remove all monitors from your system.", + "dialogConfirm": "Yes, remove all monitors", + "dialogDescription": "Once removed, the monitors cannot be retrieved.", + "dialogTitle": "Do you want to remove all monitors?", + "title": "System reset" + }, + "timezoneSettings": { + "description": "Select the timezone used to display dates and times throughout the application.", + "label": "Display timezone", + "title": "Display timezone" + }, + "title": "Settings", + "uiSettings": { + "description": "Switch between light and dark mode, or change user interface language.", + "labelLanguage": "Language", + "labelTheme": "Theme mode", + "labelChartType": "Chart type", + "chartTypeHistogram": "Histogram", + "chartTypeHeatmap": "Heatmap", + "title": "Appearance" + }, + "urlSettings": { + "description": "Display the IP address or URL of monitor on the public Status page. If it's disabled, only the monitor name will be shown to protect sensitive information.", + "label": "Display IP/URL on status page", + "selectDisabled": "Disabled", + "selectEnabled": "Enabled", + "title": "Monitor IP/URL on Status Page" + } + }, + "statusPages": { "deleteSuccess": "Status page deleted successfully", "fallback": {