mirror of
https://github.com/bluewave-labs/Checkmate.git
synced 2026-05-21 00:48:45 -05:00
fix traslation object
This commit is contained in:
@@ -16,7 +16,7 @@ const SettingsAbout = () => {
|
||||
component="h1"
|
||||
variant="h2"
|
||||
>
|
||||
{t("settingsPage.aboutSettings.title")}
|
||||
{t("pages.settings.aboutSettings.title")}
|
||||
</Typography>
|
||||
</Box>
|
||||
<Box>
|
||||
@@ -24,7 +24,7 @@ const SettingsAbout = () => {
|
||||
{t("common.appName")} {__APP_VERSION__}
|
||||
</Typography>
|
||||
<Typography sx={{ mt: theme.spacing(2), mb: theme.spacing(6), opacity: 0.6 }}>
|
||||
{t("settingsPage.aboutSettings.labelDevelopedBy")}
|
||||
{t("pages.settings.aboutSettings.labelDevelopedBy")}
|
||||
</Typography>
|
||||
<Link
|
||||
level="secondary"
|
||||
|
||||
@@ -29,10 +29,10 @@ const SettingsDemoMonitors = ({ isAdmin, HEADER_SX, isLoading }) => {
|
||||
component="h1"
|
||||
variant="h2"
|
||||
>
|
||||
{t("settingsPage.demoMonitorsSettings.title")}
|
||||
{t("pages.settings.demoMonitorsSettings.title")}
|
||||
</Typography>
|
||||
<Typography sx={HEADER_SX}>
|
||||
{t("settingsPage.demoMonitorsSettings.description")}
|
||||
{t("pages.settings.demoMonitorsSettings.description")}
|
||||
</Typography>
|
||||
</Box>
|
||||
<Box>
|
||||
@@ -45,7 +45,7 @@ const SettingsDemoMonitors = ({ isAdmin, HEADER_SX, isLoading }) => {
|
||||
}}
|
||||
sx={{ mt: theme.spacing(4) }}
|
||||
>
|
||||
{t("settingsPage.demoMonitorsSettings.buttonAddMonitors")}
|
||||
{t("pages.settings.demoMonitorsSettings.buttonAddMonitors")}
|
||||
</Button>
|
||||
</Box>
|
||||
</ConfigBox>
|
||||
@@ -55,10 +55,10 @@ const SettingsDemoMonitors = ({ isAdmin, HEADER_SX, isLoading }) => {
|
||||
component="h1"
|
||||
variant="h2"
|
||||
>
|
||||
{t("settingsPage.systemResetSettings.title")}
|
||||
{t("pages.settings.systemResetSettings.title")}
|
||||
</Typography>
|
||||
<Typography sx={{ mt: theme.spacing(2) }}>
|
||||
{t("settingsPage.systemResetSettings.description")}
|
||||
{t("pages.settings.systemResetSettings.description")}
|
||||
</Typography>
|
||||
</Box>
|
||||
<Box>
|
||||
@@ -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")}
|
||||
</Button>
|
||||
</Box>
|
||||
<Dialog
|
||||
open={isOpen}
|
||||
theme={theme}
|
||||
title={t("settingsPage.systemResetSettings.dialogTitle")}
|
||||
title={t("pages.settings.systemResetSettings.dialogTitle")}
|
||||
onCancel={() => setIsOpen(false)}
|
||||
confirmationButtonLabel={t("settingsPage.systemResetSettings.dialogConfirm")}
|
||||
confirmationButtonLabel={t("pages.settings.systemResetSettings.dialogConfirm")}
|
||||
onConfirm={async () => {
|
||||
await deleteAllMonitorsFn("/monitors/");
|
||||
setIsOpen(false);
|
||||
|
||||
@@ -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")}
|
||||
</Typography>
|
||||
<Typography sx={HEADER_SX}>
|
||||
{t("settingsPage.emailSettings.description")}
|
||||
{t("pages.settings.emailSettings.description")}
|
||||
</Typography>
|
||||
</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 && (
|
||||
<Box>
|
||||
<Typography>{t("settingsPage.emailSettings.labelPasswordSet")}</Typography>
|
||||
<Button
|
||||
onClick={() => {
|
||||
setEmailPasswordHasBeenReset(true);
|
||||
}}
|
||||
variant="contained"
|
||||
color="error"
|
||||
sx={{ mt: theme.spacing(4) }}
|
||||
>
|
||||
{t("reset")}
|
||||
</Button>
|
||||
</Box>
|
||||
)}
|
||||
<Stack gap={theme.spacing(10)}>
|
||||
<Box>
|
||||
<Controller
|
||||
name="systemEmailHost"
|
||||
control={control}
|
||||
defaultValue={defaults.systemEmailHost}
|
||||
render={({ field, fieldState }) => (
|
||||
<TextInput
|
||||
{...field}
|
||||
label={t("pages.settings.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("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>
|
||||
<Controller
|
||||
name="systemEmailTLSServername"
|
||||
name="systemEmailPassword"
|
||||
control={control}
|
||||
defaultValue={defaults.systemEmailTLSServername}
|
||||
defaultValue={defaults.systemEmailPassword}
|
||||
render={({ field, fieldState }) => (
|
||||
<TextInput
|
||||
{...field}
|
||||
label={t("settingsPage.emailSettings.labelTLSServername")}
|
||||
placeholder="bluewavelabs.ca"
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
</Box>
|
||||
<Box>
|
||||
<Controller
|
||||
name="systemEmailConnectionHost"
|
||||
control={control}
|
||||
defaultValue={defaults.systemEmailConnectionHost}
|
||||
render={({ field, fieldState }) => (
|
||||
<TextInput
|
||||
{...field}
|
||||
label={t("settingsPage.emailSettings.labelConnectionHost")}
|
||||
placeholder="bluewavelabs.ca"
|
||||
label={t("pages.settings.emailSettings.labelPassword")}
|
||||
type="password"
|
||||
placeholder="123 456 789 101112"
|
||||
endAdornment={<PasswordEndAdornment />}
|
||||
error={!!fieldState.error}
|
||||
helperText={fieldState.error?.message}
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
</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
|
||||
component={"pre"}
|
||||
sx={{
|
||||
display: "flex",
|
||||
flexDirection: "column",
|
||||
gap: theme.spacing(4),
|
||||
fontFamily: "monospace",
|
||||
p: 2,
|
||||
borderRadius: 1,
|
||||
overflow: "auto",
|
||||
}}
|
||||
>
|
||||
{[
|
||||
[
|
||||
"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]) => (
|
||||
<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,
|
||||
},
|
||||
<code>
|
||||
{JSON.stringify(
|
||||
{
|
||||
host: systemEmailHost,
|
||||
port: systemEmailPort,
|
||||
secure: systemEmailSecure,
|
||||
auth: {
|
||||
user: systemEmailUser || systemEmailAddress,
|
||||
pass: "<your_password>",
|
||||
},
|
||||
null,
|
||||
2
|
||||
)}
|
||||
</code>
|
||||
</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("settingsPage.emailSettings.buttonSendTestEmail")}
|
||||
</Button>
|
||||
name: systemEmailConnectionHost || "localhost",
|
||||
pool: systemEmailPool,
|
||||
tls: {
|
||||
rejectUnauthorized: systemEmailRejectUnauthorized,
|
||||
ignoreTLS: systemEmailIgnoreTLS,
|
||||
requireTLS: systemEmailRequireTLS,
|
||||
servername: systemEmailTLSServername,
|
||||
},
|
||||
},
|
||||
null,
|
||||
2
|
||||
)}
|
||||
</code>
|
||||
</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>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -30,11 +30,11 @@ const SettingsGlobalThresholds = ({
|
||||
component="h1"
|
||||
variant="h2"
|
||||
>
|
||||
{t("settingsPage.globalThresholds.title", "Global Thresholds")}
|
||||
{t("pages.settings.globalThresholds.title", "Global Thresholds")}
|
||||
</Typography>
|
||||
<Typography sx={HEADING_SX}>
|
||||
{t(
|
||||
"settingsPage.globalThresholds.description",
|
||||
"pages.settings.globalThresholds.description",
|
||||
"Configure global CPU, Memory, Disk, and Temperature thresholds."
|
||||
)}
|
||||
</Typography>
|
||||
|
||||
@@ -39,10 +39,10 @@ const SettingsPagespeed = ({
|
||||
component="h1"
|
||||
variant="h2"
|
||||
>
|
||||
{t("settingsPage.pageSpeedSettings.title")}
|
||||
{t("pages.settings.pageSpeedSettings.title")}
|
||||
</Typography>
|
||||
<Typography sx={HEADING_SX}>
|
||||
{t("settingsPage.pageSpeedSettings.description")}
|
||||
{t("pages.settings.pageSpeedSettings.description")}
|
||||
</Typography>
|
||||
</Box>
|
||||
<Stack gap={theme.spacing(20)}>
|
||||
@@ -54,7 +54,7 @@ const SettingsPagespeed = ({
|
||||
render={({ field, fieldState }) => (
|
||||
<TextInput
|
||||
{...field}
|
||||
label={t("settingsPage.pageSpeedSettings.labelApiKey")}
|
||||
label={t("pages.settings.pageSpeedSettings.labelApiKey")}
|
||||
type={"password"}
|
||||
optionalLabel="(Optional)"
|
||||
endAdornment={<PasswordEndAdornment />}
|
||||
@@ -67,7 +67,9 @@ const SettingsPagespeed = ({
|
||||
|
||||
{isApiKeySet === true && apiKeyHasBeenReset === false && (
|
||||
<Box>
|
||||
<Typography>{t("settingsPage.pageSpeedSettings.labelApiKeySet")}</Typography>
|
||||
<Typography>
|
||||
{t("pages.settings.pageSpeedSettings.labelApiKeySet")}
|
||||
</Typography>
|
||||
<Button
|
||||
onClick={() => {
|
||||
setValue("pagespeedApiKey", "");
|
||||
|
||||
@@ -31,16 +31,16 @@ const SettingsStats = ({ isAdmin, HEADING_SX, errors }) => {
|
||||
variant="h2"
|
||||
sx={HEADING_SX}
|
||||
>
|
||||
{t("settingsPage.statsSettings.title")}
|
||||
{t("pages.settings.statsSettings.title")}
|
||||
</Typography>
|
||||
<Typography sx={{ mt: theme.spacing(2) }}>
|
||||
{t("settingsPage.statsSettings.description")}
|
||||
{t("pages.settings.statsSettings.description")}
|
||||
</Typography>
|
||||
</Box>
|
||||
<Stack gap={theme.spacing(20)}>
|
||||
<Box>
|
||||
<Typography>
|
||||
{t("settingsPage.statsSettings.clearAllStatsDescription")}
|
||||
{t("pages.settings.statsSettings.clearAllStatsDescription")}
|
||||
</Typography>
|
||||
<Button
|
||||
variant="contained"
|
||||
@@ -48,18 +48,18 @@ const SettingsStats = ({ isAdmin, HEADING_SX, errors }) => {
|
||||
onClick={() => setIsOpen(true)}
|
||||
sx={{ mt: theme.spacing(4) }}
|
||||
>
|
||||
{t("settingsPage.statsSettings.clearAllStatsButton")}
|
||||
{t("pages.settings.statsSettings.clearAllStatsButton")}
|
||||
</Button>
|
||||
</Box>
|
||||
</Stack>
|
||||
<Dialog
|
||||
open={isOpen}
|
||||
theme={theme}
|
||||
title={t("settingsPage.statsSettings.clearAllStatsDialogTitle")}
|
||||
description={t("settingsPage.statsSettings.clearAllStatsDialogDescription")}
|
||||
title={t("pages.settings.statsSettings.clearAllStatsDialogTitle")}
|
||||
description={t("pages.settings.statsSettings.clearAllStatsDialogDescription")}
|
||||
onCancel={() => setIsOpen(false)}
|
||||
confirmationButtonLabel={t(
|
||||
"settingsPage.statsSettings.clearAllStatsDialogConfirm"
|
||||
"pages.settings.statsSettings.clearAllStatsDialogConfirm"
|
||||
)}
|
||||
onConfirm={async () => {
|
||||
await deleteMonitorStatsFn("/checks/team");
|
||||
|
||||
@@ -37,11 +37,11 @@ const SettingsTimeZone = ({ HEADING_SX }) => {
|
||||
component="h1"
|
||||
variant="h2"
|
||||
>
|
||||
{t("settingsPage.timezoneSettings.title")}
|
||||
{t("pages.settings.timezoneSettings.title")}
|
||||
</Typography>
|
||||
<Typography sx={HEADING_SX}>
|
||||
<Typography component="span">
|
||||
{t("settingsPage.timezoneSettings.description")}
|
||||
{t("pages.settings.timezoneSettings.description")}
|
||||
</Typography>
|
||||
</Typography>
|
||||
</Box>
|
||||
|
||||
@@ -32,16 +32,16 @@ const SettingsUI = ({ HEADING_SX }) => {
|
||||
component="h1"
|
||||
variant="h2"
|
||||
>
|
||||
{t("settingsPage.uiSettings.title")}
|
||||
{t("pages.settings.uiSettings.title")}
|
||||
</Typography>
|
||||
<Typography sx={HEADING_SX}>
|
||||
{t("settingsPage.uiSettings.description")}
|
||||
{t("pages.settings.uiSettings.description")}
|
||||
</Typography>
|
||||
</Box>
|
||||
<Stack gap={theme.spacing(20)}>
|
||||
<Select
|
||||
name="mode"
|
||||
label={t("settingsPage.uiSettings.labelTheme")}
|
||||
label={t("pages.settings.uiSettings.labelTheme")}
|
||||
value={mode}
|
||||
onChange={(e) => dispatch(setMode(e.target.value))}
|
||||
items={[
|
||||
@@ -51,19 +51,19 @@ const SettingsUI = ({ HEADING_SX }) => {
|
||||
></Select>
|
||||
<Select
|
||||
name="language"
|
||||
label={t("settingsPage.uiSettings.labelLanguage")}
|
||||
label={t("pages.settings.uiSettings.labelLanguage")}
|
||||
value={language}
|
||||
onChange={(e) => dispatch(setLanguage(e.target.value))}
|
||||
items={languages.map((lang) => ({ _id: lang, name: lang.toUpperCase() }))}
|
||||
></Select>
|
||||
<Select
|
||||
name="chartType"
|
||||
label={t("settingsPage.uiSettings.labelChartType")}
|
||||
label={t("pages.settings.uiSettings.labelChartType")}
|
||||
value={chartType}
|
||||
onChange={(e) => dispatch(setChartType(e.target.value))}
|
||||
items={[
|
||||
{ _id: "histogram", name: t("settingsPage.uiSettings.chartTypeHistogram") },
|
||||
{ _id: "heatmap", name: t("settingsPage.uiSettings.chartTypeHeatmap") },
|
||||
{ _id: "histogram", name: t("pages.settings.uiSettings.chartTypeHistogram") },
|
||||
{ _id: "heatmap", name: t("pages.settings.uiSettings.chartTypeHeatmap") },
|
||||
]}
|
||||
></Select>
|
||||
<ThemeProvider theme={v2Theme}>
|
||||
|
||||
@@ -20,10 +20,10 @@ const SettingsURL = ({ HEADING_SX, control, defaults }) => {
|
||||
component="h1"
|
||||
variant="h2"
|
||||
>
|
||||
{t("settingsPage.urlSettings.title")}
|
||||
{t("pages.settings.urlSettings.title")}
|
||||
</Typography>
|
||||
<Typography sx={HEADING_SX}>
|
||||
{t("settingsPage.urlSettings.description")}
|
||||
{t("pages.settings.urlSettings.description")}
|
||||
</Typography>
|
||||
</Box>
|
||||
<Stack gap={theme.spacing(20)}>
|
||||
@@ -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") },
|
||||
]}
|
||||
/>
|
||||
)}
|
||||
|
||||
@@ -114,7 +114,7 @@ const Settings = () => {
|
||||
return (
|
||||
<Stack gap={theme.spacing(10)}>
|
||||
<Breadcrumbs list={BREADCRUMBS} />
|
||||
<Typography variant="h1">{t("settingsPage.title")}</Typography>
|
||||
<Typography variant="h1">{t("pages.settings.title")}</Typography>
|
||||
<SettingsTimeZone HEADING_SX={HEADING_SX} />
|
||||
<SettingsUI HEADING_SX={HEADING_SX} />
|
||||
<SettingsPagespeed
|
||||
@@ -201,7 +201,7 @@ const Settings = () => {
|
||||
sx={{ px: theme.spacing(12), py: theme.spacing(8) }}
|
||||
onClick={handleSubmit(onSubmit)}
|
||||
>
|
||||
{t("settingsPage.saveButtonLabel")}
|
||||
{t("pages.settings.saveButtonLabel")}
|
||||
</Button>
|
||||
</Stack>
|
||||
</Stack>
|
||||
|
||||
@@ -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": {
|
||||
|
||||
Reference in New Issue
Block a user