fix traslation object
This commit is contained in:
1 parent
cd501e46cd
commit
475801e91c
11 files changed
+368
-280
No files matched your search
@@ -16,7 +16,7 @@ const SettingsAbout = () => {
|
|||||||
component="h1"
|
component="h1"
|
||||||
variant="h2"
|
variant="h2"
|
||||||
>
|
>
|
||||||
{t("settingsPage.aboutSettings.title")}
|
{t("pages.settings.aboutSettings.title")}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
<Box>
|
<Box>
|
||||||
@@ -24,7 +24,7 @@ const SettingsAbout = () => {
|
|||||||
{t("common.appName")} {__APP_VERSION__}
|
{t("common.appName")} {__APP_VERSION__}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography sx={{ mt: theme.spacing(2), mb: theme.spacing(6), opacity: 0.6 }}>
|
<Typography sx={{ mt: theme.spacing(2), mb: theme.spacing(6), opacity: 0.6 }}>
|
||||||
{t("settingsPage.aboutSettings.labelDevelopedBy")}
|
{t("pages.settings.aboutSettings.labelDevelopedBy")}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Link
|
<Link
|
||||||
level="secondary"
|
level="secondary"
|
||||||
|
|||||||
@@ -29,10 +29,10 @@ const SettingsDemoMonitors = ({ isAdmin, HEADER_SX, isLoading }) => {
|
|||||||
component="h1"
|
component="h1"
|
||||||
variant="h2"
|
variant="h2"
|
||||||
>
|
>
|
||||||
{t("settingsPage.demoMonitorsSettings.title")}
|
{t("pages.settings.demoMonitorsSettings.title")}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography sx={HEADER_SX}>
|
<Typography sx={HEADER_SX}>
|
||||||
{t("settingsPage.demoMonitorsSettings.description")}
|
{t("pages.settings.demoMonitorsSettings.description")}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
<Box>
|
<Box>
|
||||||
@@ -45,7 +45,7 @@ const SettingsDemoMonitors = ({ isAdmin, HEADER_SX, isLoading }) => {
|
|||||||
}}
|
}}
|
||||||
sx={{ mt: theme.spacing(4) }}
|
sx={{ mt: theme.spacing(4) }}
|
||||||
>
|
>
|
||||||
{t("settingsPage.demoMonitorsSettings.buttonAddMonitors")}
|
{t("pages.settings.demoMonitorsSettings.buttonAddMonitors")}
|
||||||
</Button>
|
</Button>
|
||||||
</Box>
|
</Box>
|
||||||
</ConfigBox>
|
</ConfigBox>
|
||||||
@@ -55,10 +55,10 @@ const SettingsDemoMonitors = ({ isAdmin, HEADER_SX, isLoading }) => {
|
|||||||
component="h1"
|
component="h1"
|
||||||
variant="h2"
|
variant="h2"
|
||||||
>
|
>
|
||||||
{t("settingsPage.systemResetSettings.title")}
|
{t("pages.settings.systemResetSettings.title")}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography sx={{ mt: theme.spacing(2) }}>
|
<Typography sx={{ mt: theme.spacing(2) }}>
|
||||||
{t("settingsPage.systemResetSettings.description")}
|
{t("pages.settings.systemResetSettings.description")}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
<Box>
|
<Box>
|
||||||
@@ -69,15 +69,15 @@ const SettingsDemoMonitors = ({ isAdmin, HEADER_SX, isLoading }) => {
|
|||||||
onClick={() => setIsOpen(true)}
|
onClick={() => setIsOpen(true)}
|
||||||
sx={{ mt: theme.spacing(4) }}
|
sx={{ mt: theme.spacing(4) }}
|
||||||
>
|
>
|
||||||
{t("settingsPage.systemResetSettings.buttonRemoveAllMonitors")}
|
{t("pages.settings.systemResetSettings.buttonRemoveAllMonitors")}
|
||||||
</Button>
|
</Button>
|
||||||
</Box>
|
</Box>
|
||||||
<Dialog
|
<Dialog
|
||||||
open={isOpen}
|
open={isOpen}
|
||||||
theme={theme}
|
theme={theme}
|
||||||
title={t("settingsPage.systemResetSettings.dialogTitle")}
|
title={t("pages.settings.systemResetSettings.dialogTitle")}
|
||||||
onCancel={() => setIsOpen(false)}
|
onCancel={() => setIsOpen(false)}
|
||||||
confirmationButtonLabel={t("settingsPage.systemResetSettings.dialogConfirm")}
|
confirmationButtonLabel={t("pages.settings.systemResetSettings.dialogConfirm")}
|
||||||
onConfirm={async () => {
|
onConfirm={async () => {
|
||||||
await deleteAllMonitorsFn("/monitors/");
|
await deleteAllMonitorsFn("/monitors/");
|
||||||
setIsOpen(false);
|
setIsOpen(false);
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ const SettingsEmail = ({
|
|||||||
!systemEmailPassword
|
!systemEmailPassword
|
||||||
) {
|
) {
|
||||||
createToast({
|
createToast({
|
||||||
body: t("settingsPage.emailSettings.toastEmailRequiredFieldsError"),
|
body: t("pages.settings.emailSettings.toastEmailRequiredFieldsError"),
|
||||||
variant: "error",
|
variant: "error",
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
@@ -101,270 +101,269 @@ const SettingsEmail = ({
|
|||||||
component="h1"
|
component="h1"
|
||||||
variant="h2"
|
variant="h2"
|
||||||
>
|
>
|
||||||
{t("settingsPage.emailSettings.title")}
|
{t("pages.settings.emailSettings.title")}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography sx={HEADER_SX}>
|
<Typography sx={HEADER_SX}>
|
||||||
{t("settingsPage.emailSettings.description")}
|
{t("pages.settings.emailSettings.description")}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
<Box>
|
|
||||||
<Stack gap={theme.spacing(10)}>
|
|
||||||
<Box>
|
|
||||||
<Controller
|
|
||||||
name="systemEmailHost"
|
|
||||||
control={control}
|
|
||||||
defaultValue={defaults.systemEmailHost}
|
|
||||||
render={({ field, fieldState }) => (
|
|
||||||
<TextInput
|
|
||||||
{...field}
|
|
||||||
label={t("settingsPage.emailSettings.labelHost")}
|
|
||||||
placeholder="smtp.gmail.com"
|
|
||||||
error={!!fieldState.error}
|
|
||||||
helperText={fieldState.error?.message}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
</Box>
|
|
||||||
<Box>
|
|
||||||
<Controller
|
|
||||||
name="systemEmailPort"
|
|
||||||
control={control}
|
|
||||||
defaultValue={defaults.systemEmailPort}
|
|
||||||
render={({ field, fieldState }) => (
|
|
||||||
<TextInput
|
|
||||||
{...field}
|
|
||||||
label={t("settingsPage.emailSettings.labelPort")}
|
|
||||||
placeholder="425"
|
|
||||||
type="number"
|
|
||||||
error={!!fieldState.error}
|
|
||||||
helperText={fieldState.error?.message}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
</Box>
|
|
||||||
<Box>
|
|
||||||
<Controller
|
|
||||||
name="systemEmailUser"
|
|
||||||
control={control}
|
|
||||||
defaultValue={defaults.systemEmailUser}
|
|
||||||
render={({ field, fieldState }) => (
|
|
||||||
<TextInput
|
|
||||||
{...field}
|
|
||||||
label={t("settingsPage.emailSettings.labelUser")}
|
|
||||||
placeholder={t("settingsPage.emailSettings.placeholderUser")}
|
|
||||||
error={!!fieldState.error}
|
|
||||||
helperText={fieldState.error?.message}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
</Box>
|
|
||||||
<Box>
|
|
||||||
<Controller
|
|
||||||
name="systemEmailAddress"
|
|
||||||
control={control}
|
|
||||||
defaultValue={defaults.systemEmailAddress}
|
|
||||||
render={({ field, fieldState }) => (
|
|
||||||
<TextInput
|
|
||||||
{...field}
|
|
||||||
label={t("settingsPage.emailSettings.labelAddress")}
|
|
||||||
placeholder="uptime@bluewavelabs.ca"
|
|
||||||
error={!!fieldState.error}
|
|
||||||
helperText={fieldState.error?.message}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
</Box>
|
|
||||||
{(isEmailPasswordSet === false || emailPasswordHasBeenReset === true) && (
|
|
||||||
<Box>
|
|
||||||
<Controller
|
|
||||||
name="systemEmailPassword"
|
|
||||||
control={control}
|
|
||||||
defaultValue={defaults.systemEmailPassword}
|
|
||||||
render={({ field, fieldState }) => (
|
|
||||||
<TextInput
|
|
||||||
{...field}
|
|
||||||
label={t("settingsPage.emailSettings.labelPassword")}
|
|
||||||
type="password"
|
|
||||||
placeholder="123 456 789 101112"
|
|
||||||
endAdornment={<PasswordEndAdornment />}
|
|
||||||
error={!!fieldState.error}
|
|
||||||
helperText={fieldState.error?.message}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
</Box>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{isEmailPasswordSet === true && emailPasswordHasBeenReset === false && (
|
<Stack gap={theme.spacing(10)}>
|
||||||
<Box>
|
<Box>
|
||||||
<Typography>{t("settingsPage.emailSettings.labelPasswordSet")}</Typography>
|
<Controller
|
||||||
<Button
|
name="systemEmailHost"
|
||||||
onClick={() => {
|
control={control}
|
||||||
setEmailPasswordHasBeenReset(true);
|
defaultValue={defaults.systemEmailHost}
|
||||||
}}
|
render={({ field, fieldState }) => (
|
||||||
variant="contained"
|
<TextInput
|
||||||
color="error"
|
{...field}
|
||||||
sx={{ mt: theme.spacing(4) }}
|
label={t("pages.settings.emailSettings.labelHost")}
|
||||||
>
|
placeholder="smtp.gmail.com"
|
||||||
{t("reset")}
|
error={!!fieldState.error}
|
||||||
</Button>
|
helperText={fieldState.error?.message}
|
||||||
</Box>
|
/>
|
||||||
)}
|
)}
|
||||||
|
/>
|
||||||
|
</Box>
|
||||||
|
<Box>
|
||||||
|
<Controller
|
||||||
|
name="systemEmailPort"
|
||||||
|
control={control}
|
||||||
|
defaultValue={defaults.systemEmailPort}
|
||||||
|
render={({ field, fieldState }) => (
|
||||||
|
<TextInput
|
||||||
|
{...field}
|
||||||
|
label={t("pages.settings.emailSettings.labelPort")}
|
||||||
|
placeholder="425"
|
||||||
|
type="number"
|
||||||
|
error={!!fieldState.error}
|
||||||
|
helperText={fieldState.error?.message}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
</Box>
|
||||||
|
<Box>
|
||||||
|
<Controller
|
||||||
|
name="systemEmailUser"
|
||||||
|
control={control}
|
||||||
|
defaultValue={defaults.systemEmailUser}
|
||||||
|
render={({ field, fieldState }) => (
|
||||||
|
<TextInput
|
||||||
|
{...field}
|
||||||
|
label={t("pages.settings.emailSettings.labelUser")}
|
||||||
|
placeholder={t("pages.settings.emailSettings.placeholderUser")}
|
||||||
|
error={!!fieldState.error}
|
||||||
|
helperText={fieldState.error?.message}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
</Box>
|
||||||
|
<Box>
|
||||||
|
<Controller
|
||||||
|
name="systemEmailAddress"
|
||||||
|
control={control}
|
||||||
|
defaultValue={defaults.systemEmailAddress}
|
||||||
|
render={({ field, fieldState }) => (
|
||||||
|
<TextInput
|
||||||
|
{...field}
|
||||||
|
label={t("pages.settings.emailSettings.labelAddress")}
|
||||||
|
placeholder="uptime@bluewavelabs.ca"
|
||||||
|
error={!!fieldState.error}
|
||||||
|
helperText={fieldState.error?.message}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
</Box>
|
||||||
|
{(isEmailPasswordSet === false || emailPasswordHasBeenReset === true) && (
|
||||||
<Box>
|
<Box>
|
||||||
<Controller
|
<Controller
|
||||||
name="systemEmailTLSServername"
|
name="systemEmailPassword"
|
||||||
control={control}
|
control={control}
|
||||||
defaultValue={defaults.systemEmailTLSServername}
|
defaultValue={defaults.systemEmailPassword}
|
||||||
render={({ field, fieldState }) => (
|
render={({ field, fieldState }) => (
|
||||||
<TextInput
|
<TextInput
|
||||||
{...field}
|
{...field}
|
||||||
label={t("settingsPage.emailSettings.labelTLSServername")}
|
label={t("pages.settings.emailSettings.labelPassword")}
|
||||||
placeholder="bluewavelabs.ca"
|
type="password"
|
||||||
/>
|
placeholder="123 456 789 101112"
|
||||||
)}
|
endAdornment={<PasswordEndAdornment />}
|
||||||
/>
|
|
||||||
</Box>
|
|
||||||
<Box>
|
|
||||||
<Controller
|
|
||||||
name="systemEmailConnectionHost"
|
|
||||||
control={control}
|
|
||||||
defaultValue={defaults.systemEmailConnectionHost}
|
|
||||||
render={({ field, fieldState }) => (
|
|
||||||
<TextInput
|
|
||||||
{...field}
|
|
||||||
label={t("settingsPage.emailSettings.labelConnectionHost")}
|
|
||||||
placeholder="bluewavelabs.ca"
|
|
||||||
error={!!fieldState.error}
|
error={!!fieldState.error}
|
||||||
helperText={fieldState.error?.message}
|
helperText={fieldState.error?.message}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{isEmailPasswordSet === true && emailPasswordHasBeenReset === false && (
|
||||||
|
<Box>
|
||||||
|
<Typography>{t("pages.settings.emailSettings.labelPasswordSet")}</Typography>
|
||||||
|
<Button
|
||||||
|
onClick={() => {
|
||||||
|
setEmailPasswordHasBeenReset(true);
|
||||||
|
}}
|
||||||
|
variant="contained"
|
||||||
|
color="error"
|
||||||
|
sx={{ mt: theme.spacing(4) }}
|
||||||
|
>
|
||||||
|
{t("reset")}
|
||||||
|
</Button>
|
||||||
|
</Box>
|
||||||
|
)}
|
||||||
|
<Box>
|
||||||
|
<Controller
|
||||||
|
name="systemEmailTLSServername"
|
||||||
|
control={control}
|
||||||
|
defaultValue={defaults.systemEmailTLSServername}
|
||||||
|
render={({ field, fieldState }) => (
|
||||||
|
<TextInput
|
||||||
|
{...field}
|
||||||
|
label={t("pages.settings.emailSettings.labelTLSServername")}
|
||||||
|
placeholder="bluewavelabs.ca"
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
</Box>
|
||||||
|
<Box>
|
||||||
|
<Controller
|
||||||
|
name="systemEmailConnectionHost"
|
||||||
|
control={control}
|
||||||
|
defaultValue={defaults.systemEmailConnectionHost}
|
||||||
|
render={({ field, fieldState }) => (
|
||||||
|
<TextInput
|
||||||
|
{...field}
|
||||||
|
label={t("pages.settings.emailSettings.labelConnectionHost")}
|
||||||
|
placeholder="bluewavelabs.ca"
|
||||||
|
error={!!fieldState.error}
|
||||||
|
helperText={fieldState.error?.message}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
</Box>
|
||||||
|
<Box
|
||||||
|
sx={{
|
||||||
|
display: "flex",
|
||||||
|
flexDirection: "column",
|
||||||
|
gap: theme.spacing(4),
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{[
|
||||||
|
[
|
||||||
|
"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]) => (
|
||||||
|
<Controller
|
||||||
|
key={name}
|
||||||
|
name={name}
|
||||||
|
control={control}
|
||||||
|
defaultValue={defaults[name]}
|
||||||
|
render={({ field }) => (
|
||||||
|
<Box
|
||||||
|
key={name}
|
||||||
|
sx={{
|
||||||
|
display: "flex",
|
||||||
|
alignItems: "center",
|
||||||
|
justifyContent: "space-between",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Typography>{t(labelKey)}</Typography>
|
||||||
|
|
||||||
|
<Switch
|
||||||
|
{...field}
|
||||||
|
checked={field.value}
|
||||||
|
/>
|
||||||
|
</Box>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
))}
|
||||||
|
|
||||||
|
<TextLink
|
||||||
|
text={t("pages.settings.emailSettings.descriptionTransport")}
|
||||||
|
linkText={t("pages.settings.emailSettings.linkTransport")}
|
||||||
|
href="https://nodemailer.com/smtp"
|
||||||
|
target="_blank"
|
||||||
|
/>
|
||||||
<Box
|
<Box
|
||||||
|
component={"pre"}
|
||||||
sx={{
|
sx={{
|
||||||
display: "flex",
|
fontFamily: "monospace",
|
||||||
flexDirection: "column",
|
p: 2,
|
||||||
gap: theme.spacing(4),
|
borderRadius: 1,
|
||||||
|
overflow: "auto",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{[
|
<code>
|
||||||
[
|
{JSON.stringify(
|
||||||
"settingsPage.emailSettings.labelSecure",
|
{
|
||||||
"systemEmailSecure",
|
host: systemEmailHost,
|
||||||
systemEmailSecure,
|
port: systemEmailPort,
|
||||||
],
|
secure: systemEmailSecure,
|
||||||
[
|
auth: {
|
||||||
"settingsPage.emailSettings.labelPool",
|
user: systemEmailUser || systemEmailAddress,
|
||||||
"systemEmailPool",
|
pass: "<your_password>",
|
||||||
systemEmailPool,
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"settingsPage.emailSettings.labelIgnoreTLS",
|
|
||||||
"systemEmailIgnoreTLS",
|
|
||||||
systemEmailIgnoreTLS,
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"settingsPage.emailSettings.labelRequireTLS",
|
|
||||||
"systemEmailRequireTLS",
|
|
||||||
systemEmailRequireTLS,
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"settingsPage.emailSettings.labelRejectUnauthorized",
|
|
||||||
"systemEmailRejectUnauthorized",
|
|
||||||
systemEmailRejectUnauthorized,
|
|
||||||
],
|
|
||||||
].map(([labelKey, name, value]) => (
|
|
||||||
<Controller
|
|
||||||
key={name}
|
|
||||||
name={name}
|
|
||||||
control={control}
|
|
||||||
defaultValue={defaults[name]}
|
|
||||||
render={({ field }) => (
|
|
||||||
<Box
|
|
||||||
key={name}
|
|
||||||
sx={{
|
|
||||||
display: "flex",
|
|
||||||
alignItems: "center",
|
|
||||||
justifyContent: "space-between",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Typography>{t(labelKey)}</Typography>
|
|
||||||
|
|
||||||
<Switch
|
|
||||||
{...field}
|
|
||||||
checked={field.value}
|
|
||||||
/>
|
|
||||||
</Box>
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
))}
|
|
||||||
|
|
||||||
<TextLink
|
|
||||||
text={t("settingsPage.emailSettings.descriptionTransport")}
|
|
||||||
linkText={t("settingsPage.emailSettings.linkTransport")}
|
|
||||||
href="https://nodemailer.com/smtp"
|
|
||||||
target="_blank"
|
|
||||||
/>
|
|
||||||
<Box
|
|
||||||
component={"pre"}
|
|
||||||
sx={{
|
|
||||||
fontFamily: "monospace",
|
|
||||||
p: 2,
|
|
||||||
borderRadius: 1,
|
|
||||||
overflow: "auto",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<code>
|
|
||||||
{JSON.stringify(
|
|
||||||
{
|
|
||||||
host: systemEmailHost,
|
|
||||||
port: systemEmailPort,
|
|
||||||
secure: systemEmailSecure,
|
|
||||||
auth: {
|
|
||||||
user: systemEmailUser || systemEmailAddress,
|
|
||||||
pass: "<your_password>",
|
|
||||||
},
|
|
||||||
name: systemEmailConnectionHost || "localhost",
|
|
||||||
pool: systemEmailPool,
|
|
||||||
tls: {
|
|
||||||
rejectUnauthorized: systemEmailRejectUnauthorized,
|
|
||||||
ignoreTLS: systemEmailIgnoreTLS,
|
|
||||||
requireTLS: systemEmailRequireTLS,
|
|
||||||
servername: systemEmailTLSServername,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
null,
|
name: systemEmailConnectionHost || "localhost",
|
||||||
2
|
pool: systemEmailPool,
|
||||||
)}
|
tls: {
|
||||||
</code>
|
rejectUnauthorized: systemEmailRejectUnauthorized,
|
||||||
</Box>
|
ignoreTLS: systemEmailIgnoreTLS,
|
||||||
</Box>
|
requireTLS: systemEmailRequireTLS,
|
||||||
|
servername: systemEmailTLSServername,
|
||||||
<pre>
|
},
|
||||||
{JSON.stringify({
|
},
|
||||||
systemEmailHost: systemEmailHost,
|
null,
|
||||||
systemEmailAddress: systemEmailAddress,
|
2
|
||||||
systemEmailPassword: systemEmailPassword,
|
|
||||||
})}
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<Box>
|
|
||||||
{systemEmailHost &&
|
|
||||||
systemEmailPort &&
|
|
||||||
systemEmailAddress &&
|
|
||||||
systemEmailPassword && (
|
|
||||||
<Button
|
|
||||||
variant="contained"
|
|
||||||
color="accent"
|
|
||||||
loading={isSending}
|
|
||||||
onClick={handleSendTestEmail}
|
|
||||||
>
|
|
||||||
{t("settingsPage.emailSettings.buttonSendTestEmail")}
|
|
||||||
</Button>
|
|
||||||
)}
|
)}
|
||||||
|
</code>
|
||||||
</Box>
|
</Box>
|
||||||
</Stack>
|
</Box>
|
||||||
</Box>
|
|
||||||
|
<pre>
|
||||||
|
{JSON.stringify({
|
||||||
|
systemEmailHost: systemEmailHost,
|
||||||
|
systemEmailAddress: systemEmailAddress,
|
||||||
|
systemEmailPassword: systemEmailPassword,
|
||||||
|
})}
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
<Box>
|
||||||
|
{systemEmailHost &&
|
||||||
|
systemEmailPort &&
|
||||||
|
systemEmailAddress &&
|
||||||
|
systemEmailPassword && (
|
||||||
|
<Button
|
||||||
|
variant="contained"
|
||||||
|
color="accent"
|
||||||
|
loading={isSending}
|
||||||
|
onClick={handleSendTestEmail}
|
||||||
|
>
|
||||||
|
{t("pages.settings.emailSettings.buttonSendTestEmail")}
|
||||||
|
</Button>
|
||||||
|
)}
|
||||||
|
</Box>
|
||||||
|
</Stack>
|
||||||
</ConfigBox>
|
</ConfigBox>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -30,11 +30,11 @@ const SettingsGlobalThresholds = ({
|
|||||||
component="h1"
|
component="h1"
|
||||||
variant="h2"
|
variant="h2"
|
||||||
>
|
>
|
||||||
{t("settingsPage.globalThresholds.title", "Global Thresholds")}
|
{t("pages.settings.globalThresholds.title", "Global Thresholds")}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography sx={HEADING_SX}>
|
<Typography sx={HEADING_SX}>
|
||||||
{t(
|
{t(
|
||||||
"settingsPage.globalThresholds.description",
|
"pages.settings.globalThresholds.description",
|
||||||
"Configure global CPU, Memory, Disk, and Temperature thresholds."
|
"Configure global CPU, Memory, Disk, and Temperature thresholds."
|
||||||
)}
|
)}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|||||||
@@ -39,10 +39,10 @@ const SettingsPagespeed = ({
|
|||||||
component="h1"
|
component="h1"
|
||||||
variant="h2"
|
variant="h2"
|
||||||
>
|
>
|
||||||
{t("settingsPage.pageSpeedSettings.title")}
|
{t("pages.settings.pageSpeedSettings.title")}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography sx={HEADING_SX}>
|
<Typography sx={HEADING_SX}>
|
||||||
{t("settingsPage.pageSpeedSettings.description")}
|
{t("pages.settings.pageSpeedSettings.description")}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
<Stack gap={theme.spacing(20)}>
|
<Stack gap={theme.spacing(20)}>
|
||||||
@@ -54,7 +54,7 @@ const SettingsPagespeed = ({
|
|||||||
render={({ field, fieldState }) => (
|
render={({ field, fieldState }) => (
|
||||||
<TextInput
|
<TextInput
|
||||||
{...field}
|
{...field}
|
||||||
label={t("settingsPage.pageSpeedSettings.labelApiKey")}
|
label={t("pages.settings.pageSpeedSettings.labelApiKey")}
|
||||||
type={"password"}
|
type={"password"}
|
||||||
optionalLabel="(Optional)"
|
optionalLabel="(Optional)"
|
||||||
endAdornment={<PasswordEndAdornment />}
|
endAdornment={<PasswordEndAdornment />}
|
||||||
@@ -67,7 +67,9 @@ const SettingsPagespeed = ({
|
|||||||
|
|
||||||
{isApiKeySet === true && apiKeyHasBeenReset === false && (
|
{isApiKeySet === true && apiKeyHasBeenReset === false && (
|
||||||
<Box>
|
<Box>
|
||||||
<Typography>{t("settingsPage.pageSpeedSettings.labelApiKeySet")}</Typography>
|
<Typography>
|
||||||
|
{t("pages.settings.pageSpeedSettings.labelApiKeySet")}
|
||||||
|
</Typography>
|
||||||
<Button
|
<Button
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setValue("pagespeedApiKey", "");
|
setValue("pagespeedApiKey", "");
|
||||||
|
|||||||
@@ -31,16 +31,16 @@ const SettingsStats = ({ isAdmin, HEADING_SX, errors }) => {
|
|||||||
variant="h2"
|
variant="h2"
|
||||||
sx={HEADING_SX}
|
sx={HEADING_SX}
|
||||||
>
|
>
|
||||||
{t("settingsPage.statsSettings.title")}
|
{t("pages.settings.statsSettings.title")}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography sx={{ mt: theme.spacing(2) }}>
|
<Typography sx={{ mt: theme.spacing(2) }}>
|
||||||
{t("settingsPage.statsSettings.description")}
|
{t("pages.settings.statsSettings.description")}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
<Stack gap={theme.spacing(20)}>
|
<Stack gap={theme.spacing(20)}>
|
||||||
<Box>
|
<Box>
|
||||||
<Typography>
|
<Typography>
|
||||||
{t("settingsPage.statsSettings.clearAllStatsDescription")}
|
{t("pages.settings.statsSettings.clearAllStatsDescription")}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Button
|
<Button
|
||||||
variant="contained"
|
variant="contained"
|
||||||
@@ -48,18 +48,18 @@ const SettingsStats = ({ isAdmin, HEADING_SX, errors }) => {
|
|||||||
onClick={() => setIsOpen(true)}
|
onClick={() => setIsOpen(true)}
|
||||||
sx={{ mt: theme.spacing(4) }}
|
sx={{ mt: theme.spacing(4) }}
|
||||||
>
|
>
|
||||||
{t("settingsPage.statsSettings.clearAllStatsButton")}
|
{t("pages.settings.statsSettings.clearAllStatsButton")}
|
||||||
</Button>
|
</Button>
|
||||||
</Box>
|
</Box>
|
||||||
</Stack>
|
</Stack>
|
||||||
<Dialog
|
<Dialog
|
||||||
open={isOpen}
|
open={isOpen}
|
||||||
theme={theme}
|
theme={theme}
|
||||||
title={t("settingsPage.statsSettings.clearAllStatsDialogTitle")}
|
title={t("pages.settings.statsSettings.clearAllStatsDialogTitle")}
|
||||||
description={t("settingsPage.statsSettings.clearAllStatsDialogDescription")}
|
description={t("pages.settings.statsSettings.clearAllStatsDialogDescription")}
|
||||||
onCancel={() => setIsOpen(false)}
|
onCancel={() => setIsOpen(false)}
|
||||||
confirmationButtonLabel={t(
|
confirmationButtonLabel={t(
|
||||||
"settingsPage.statsSettings.clearAllStatsDialogConfirm"
|
"pages.settings.statsSettings.clearAllStatsDialogConfirm"
|
||||||
)}
|
)}
|
||||||
onConfirm={async () => {
|
onConfirm={async () => {
|
||||||
await deleteMonitorStatsFn("/checks/team");
|
await deleteMonitorStatsFn("/checks/team");
|
||||||
|
|||||||
@@ -37,11 +37,11 @@ const SettingsTimeZone = ({ HEADING_SX }) => {
|
|||||||
component="h1"
|
component="h1"
|
||||||
variant="h2"
|
variant="h2"
|
||||||
>
|
>
|
||||||
{t("settingsPage.timezoneSettings.title")}
|
{t("pages.settings.timezoneSettings.title")}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography sx={HEADING_SX}>
|
<Typography sx={HEADING_SX}>
|
||||||
<Typography component="span">
|
<Typography component="span">
|
||||||
{t("settingsPage.timezoneSettings.description")}
|
{t("pages.settings.timezoneSettings.description")}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
|
|||||||
@@ -32,16 +32,16 @@ const SettingsUI = ({ HEADING_SX }) => {
|
|||||||
component="h1"
|
component="h1"
|
||||||
variant="h2"
|
variant="h2"
|
||||||
>
|
>
|
||||||
{t("settingsPage.uiSettings.title")}
|
{t("pages.settings.uiSettings.title")}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography sx={HEADING_SX}>
|
<Typography sx={HEADING_SX}>
|
||||||
{t("settingsPage.uiSettings.description")}
|
{t("pages.settings.uiSettings.description")}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
<Stack gap={theme.spacing(20)}>
|
<Stack gap={theme.spacing(20)}>
|
||||||
<Select
|
<Select
|
||||||
name="mode"
|
name="mode"
|
||||||
label={t("settingsPage.uiSettings.labelTheme")}
|
label={t("pages.settings.uiSettings.labelTheme")}
|
||||||
value={mode}
|
value={mode}
|
||||||
onChange={(e) => dispatch(setMode(e.target.value))}
|
onChange={(e) => dispatch(setMode(e.target.value))}
|
||||||
items={[
|
items={[
|
||||||
@@ -51,19 +51,19 @@ const SettingsUI = ({ HEADING_SX }) => {
|
|||||||
></Select>
|
></Select>
|
||||||
<Select
|
<Select
|
||||||
name="language"
|
name="language"
|
||||||
label={t("settingsPage.uiSettings.labelLanguage")}
|
label={t("pages.settings.uiSettings.labelLanguage")}
|
||||||
value={language}
|
value={language}
|
||||||
onChange={(e) => dispatch(setLanguage(e.target.value))}
|
onChange={(e) => dispatch(setLanguage(e.target.value))}
|
||||||
items={languages.map((lang) => ({ _id: lang, name: lang.toUpperCase() }))}
|
items={languages.map((lang) => ({ _id: lang, name: lang.toUpperCase() }))}
|
||||||
></Select>
|
></Select>
|
||||||
<Select
|
<Select
|
||||||
name="chartType"
|
name="chartType"
|
||||||
label={t("settingsPage.uiSettings.labelChartType")}
|
label={t("pages.settings.uiSettings.labelChartType")}
|
||||||
value={chartType}
|
value={chartType}
|
||||||
onChange={(e) => dispatch(setChartType(e.target.value))}
|
onChange={(e) => dispatch(setChartType(e.target.value))}
|
||||||
items={[
|
items={[
|
||||||
{ _id: "histogram", name: t("settingsPage.uiSettings.chartTypeHistogram") },
|
{ _id: "histogram", name: t("pages.settings.uiSettings.chartTypeHistogram") },
|
||||||
{ _id: "heatmap", name: t("settingsPage.uiSettings.chartTypeHeatmap") },
|
{ _id: "heatmap", name: t("pages.settings.uiSettings.chartTypeHeatmap") },
|
||||||
]}
|
]}
|
||||||
></Select>
|
></Select>
|
||||||
<ThemeProvider theme={v2Theme}>
|
<ThemeProvider theme={v2Theme}>
|
||||||
|
|||||||
@@ -20,10 +20,10 @@ const SettingsURL = ({ HEADING_SX, control, defaults }) => {
|
|||||||
component="h1"
|
component="h1"
|
||||||
variant="h2"
|
variant="h2"
|
||||||
>
|
>
|
||||||
{t("settingsPage.urlSettings.title")}
|
{t("pages.settings.urlSettings.title")}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography sx={HEADING_SX}>
|
<Typography sx={HEADING_SX}>
|
||||||
{t("settingsPage.urlSettings.description")}
|
{t("pages.settings.urlSettings.description")}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
<Stack gap={theme.spacing(20)}>
|
<Stack gap={theme.spacing(20)}>
|
||||||
@@ -36,10 +36,10 @@ const SettingsURL = ({ HEADING_SX, control, defaults }) => {
|
|||||||
{...field}
|
{...field}
|
||||||
error={!!fieldState.error}
|
error={!!fieldState.error}
|
||||||
helperText={fieldState.error?.message}
|
helperText={fieldState.error?.message}
|
||||||
label={t("settingsPage.urlSettings.label")}
|
label={t("pages.settings.urlSettings.label")}
|
||||||
items={[
|
items={[
|
||||||
{ _id: true, name: t("settingsPage.urlSettings.selectEnabled") },
|
{ _id: true, name: t("pages.settings.urlSettings.selectEnabled") },
|
||||||
{ _id: false, name: t("settingsPage.urlSettings.selectDisabled") },
|
{ _id: false, name: t("pages.settings.urlSettings.selectDisabled") },
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ const Settings = () => {
|
|||||||
return (
|
return (
|
||||||
<Stack gap={theme.spacing(10)}>
|
<Stack gap={theme.spacing(10)}>
|
||||||
<Breadcrumbs list={BREADCRUMBS} />
|
<Breadcrumbs list={BREADCRUMBS} />
|
||||||
<Typography variant="h1">{t("settingsPage.title")}</Typography>
|
<Typography variant="h1">{t("pages.settings.title")}</Typography>
|
||||||
<SettingsTimeZone HEADING_SX={HEADING_SX} />
|
<SettingsTimeZone HEADING_SX={HEADING_SX} />
|
||||||
<SettingsUI HEADING_SX={HEADING_SX} />
|
<SettingsUI HEADING_SX={HEADING_SX} />
|
||||||
<SettingsPagespeed
|
<SettingsPagespeed
|
||||||
@@ -201,7 +201,7 @@ const Settings = () => {
|
|||||||
sx={{ px: theme.spacing(12), py: theme.spacing(8) }}
|
sx={{ px: theme.spacing(12), py: theme.spacing(8) }}
|
||||||
onClick={handleSubmit(onSubmit)}
|
onClick={handleSubmit(onSubmit)}
|
||||||
>
|
>
|
||||||
{t("settingsPage.saveButtonLabel")}
|
{t("pages.settings.saveButtonLabel")}
|
||||||
</Button>
|
</Button>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|||||||
@@ -901,6 +901,93 @@
|
|||||||
"title": "A PageSpeed monitor is used to:"
|
"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": {
|
"statusPages": {
|
||||||
"deleteSuccess": "Status page deleted successfully",
|
"deleteSuccess": "Status page deleted successfully",
|
||||||
"fallback": {
|
"fallback": {
|
||||||
|
|||||||
Reference in new issue
Block a user