auth
This commit is contained in:
1 parent
c9dea5c0ae
commit
901b5a43c8
20 files changed
+393
-137
No files matched your search
@@ -61,12 +61,12 @@ const SettingsPage = () => {
|
||||
return (
|
||||
<BasePage>
|
||||
<ConfigBox
|
||||
title="UI Settings"
|
||||
subtitle="Configure time zone, UI mode, and language preferences"
|
||||
title={t("settings.form.ui.title")}
|
||||
subtitle={t("settings.form.ui.description")}
|
||||
rightContent={
|
||||
<Stack spacing={theme.spacing(10)}>
|
||||
<Stack spacing={theme.spacing(2)}>
|
||||
<Typography>Time zone</Typography>
|
||||
<Typography>{t("settings.form.ui.optionTimezone")}</Typography>
|
||||
|
||||
<AutoComplete
|
||||
value={selectedTimezone}
|
||||
@@ -78,47 +78,55 @@ const SettingsPage = () => {
|
||||
/>
|
||||
</Stack>
|
||||
<Stack spacing={theme.spacing(2)}>
|
||||
<Typography>UI Mode</Typography>
|
||||
<Typography>{t("settings.form.ui.optionUIMode")}</Typography>
|
||||
<Select
|
||||
value={mode}
|
||||
onChange={(e: SelectChangeEvent<string>) => {
|
||||
dispatch(setMode(e.target.value));
|
||||
}}
|
||||
>
|
||||
<MenuItem value="light">Light</MenuItem>
|
||||
<MenuItem value="dark">Dark</MenuItem>
|
||||
<MenuItem value="light">
|
||||
{t("settings.form.ui.valueUIModeLight")}
|
||||
</MenuItem>
|
||||
<MenuItem value="dark">
|
||||
{t("settings.form.ui.valueUIModeDark")}
|
||||
</MenuItem>
|
||||
</Select>
|
||||
</Stack>
|
||||
|
||||
<Stack spacing={theme.spacing(2)}>
|
||||
<Typography>Language</Typography>
|
||||
<Typography>{t("settings.form.ui.optionLanguage")}</Typography>
|
||||
<LanguageSelector />
|
||||
</Stack>
|
||||
</Stack>
|
||||
}
|
||||
/>
|
||||
<ConfigBox
|
||||
title="Chart settings"
|
||||
subtitle="Choose what type of Uptime chart you want to see on the dashboard and status page"
|
||||
title={t("settings.form.chart.title")}
|
||||
subtitle={t("settings.form.chart.description")}
|
||||
leftContent={<DummyChart type={chartType} />}
|
||||
rightContent={
|
||||
<Stack gap={theme.spacing(4)}>
|
||||
<Typography>Chart Type</Typography>
|
||||
<Typography>{t("settings.form.chart.optionChartType")}</Typography>
|
||||
<Stack gap={theme.spacing(4)}>
|
||||
<RadioWithDescription
|
||||
checked={chartType === "heatmap"}
|
||||
onChange={() => dispatch(setChartType("heatmap"))}
|
||||
value="heatmap"
|
||||
label="Heatmap"
|
||||
description="Compact tiles; color shows response speed, top strip shows availability."
|
||||
label={t("settings.form.chart.valueChartTypeHeatmap")}
|
||||
description={t(
|
||||
"settings.form.chart.descriptionChartTypeHeatmap"
|
||||
)}
|
||||
name="chart-type"
|
||||
/>
|
||||
<RadioWithDescription
|
||||
checked={chartType === "histogram"}
|
||||
onChange={() => dispatch(setChartType("histogram"))}
|
||||
value="histogram"
|
||||
label="Histogram"
|
||||
description="One bar per check; height shows response time, color shows status."
|
||||
label={t("settings.form.chart.valueChartTypeHistogram")}
|
||||
description={t(
|
||||
"settings.form.chart.descriptionChartTypeHistogram"
|
||||
)}
|
||||
name="chart-type"
|
||||
/>
|
||||
</Stack>
|
||||
@@ -127,17 +135,17 @@ const SettingsPage = () => {
|
||||
/>
|
||||
{hasDelete && (
|
||||
<ConfigBox
|
||||
title="Monitors"
|
||||
subtitle="Monitor related settings"
|
||||
title={t("settings.form.monitors.title")}
|
||||
subtitle={t("settings.form.monitors.description")}
|
||||
rightContent={
|
||||
<Stack gap={theme.spacing(4)}>
|
||||
<Box>
|
||||
<Button variant="contained" color="error" onClick={handleOpen}>
|
||||
Remove all monitors
|
||||
{t("common.buttons.removeAllMonitors")}
|
||||
</Button>
|
||||
</Box>
|
||||
<Typography>
|
||||
Removes all monitors from your organization.
|
||||
{t("settings.form.monitors.descriptionRemoveAllMonitors")}
|
||||
</Typography>
|
||||
</Stack>
|
||||
}
|
||||
|
||||
@@ -57,13 +57,13 @@ export const SettingsForm = ({
|
||||
onSubmit={handleSubmit(onSubmitEmail)}
|
||||
>
|
||||
<ConfigBox
|
||||
title={t("settingsPage.emailSettings.title")}
|
||||
subtitle={t("settingsPage.emailSettings.description")}
|
||||
title={t("adminSettings.form.email.title")}
|
||||
subtitle={t("adminSettings.form.email.description")}
|
||||
leftContent={
|
||||
<Stack>
|
||||
<TextLink
|
||||
text={t("settingsPage.emailSettings.descriptionTransport")}
|
||||
linkText={t("settingsPage.emailSettings.linkTransport")}
|
||||
text={t("adminSettings.form.email.descriptionTransport")}
|
||||
linkText={t("adminSettings.form.email.linkTransport")}
|
||||
href="https://nodemailer.com/smtp"
|
||||
target="_blank"
|
||||
/>
|
||||
@@ -114,7 +114,7 @@ export const SettingsForm = ({
|
||||
<TextInput
|
||||
{...field}
|
||||
type="text"
|
||||
fieldLabel={t("settingsPage.emailSettings.labelHost")}
|
||||
fieldLabel={t("adminSettings.form.email.optionHost")}
|
||||
fullWidth
|
||||
error={!!errors.systemEmailHost}
|
||||
helperText={
|
||||
@@ -132,7 +132,7 @@ export const SettingsForm = ({
|
||||
<TextInput
|
||||
{...field}
|
||||
type="number"
|
||||
fieldLabel={t("settingsPage.emailSettings.labelPort")}
|
||||
fieldLabel={t("adminSettings.form.email.optionPort")}
|
||||
fullWidth
|
||||
error={!!errors.systemEmailPort}
|
||||
helperText={
|
||||
@@ -150,7 +150,7 @@ export const SettingsForm = ({
|
||||
<TextInput
|
||||
{...field}
|
||||
type="text"
|
||||
fieldLabel={t("settingsPage.emailSettings.labelUser")}
|
||||
fieldLabel={t("adminSettings.form.email.optionUser")}
|
||||
fullWidth
|
||||
error={!!errors.systemEmailUser}
|
||||
helperText={
|
||||
@@ -168,7 +168,7 @@ export const SettingsForm = ({
|
||||
<TextInput
|
||||
{...field}
|
||||
type="text"
|
||||
fieldLabel={t("settingsPage.emailSettings.labelAddress")}
|
||||
fieldLabel={t("adminSettings.form.email.optionAddress")}
|
||||
fullWidth
|
||||
error={!!errors.systemEmailAddress}
|
||||
helperText={
|
||||
@@ -186,7 +186,7 @@ export const SettingsForm = ({
|
||||
<TextInput
|
||||
{...field}
|
||||
type="password"
|
||||
fieldLabel={t("settingsPage.emailSettings.labelPassword")}
|
||||
fieldLabel={t("adminSettings.form.email.optionPassword")}
|
||||
fullWidth
|
||||
error={!!errors.systemEmailPassword}
|
||||
helperText={
|
||||
@@ -205,7 +205,7 @@ export const SettingsForm = ({
|
||||
{...field}
|
||||
type="text"
|
||||
fieldLabel={t(
|
||||
"settingsPage.emailSettings.labelTLSServername"
|
||||
"adminSettings.form.email.optionTLSServername"
|
||||
)}
|
||||
fullWidth
|
||||
error={!!errors.systemEmailTLSServername}
|
||||
@@ -225,7 +225,7 @@ export const SettingsForm = ({
|
||||
{...field}
|
||||
type="text"
|
||||
fieldLabel={t(
|
||||
"settingsPage.emailSettings.labelConnectionHost"
|
||||
"adminSettings.form.email.optionConnectionHost"
|
||||
)}
|
||||
fullWidth
|
||||
error={!!errors.systemEmailConnectionHost}
|
||||
@@ -244,7 +244,7 @@ export const SettingsForm = ({
|
||||
<Stack direction="row" alignItems={"center"}>
|
||||
<Switch {...field} checked={field.value} />
|
||||
<Typography>
|
||||
{t("settingsPage.emailSettings.labelSecure")}
|
||||
{t("adminSettings.form.email.optionSecure")}
|
||||
</Typography>
|
||||
</Stack>
|
||||
)}
|
||||
@@ -257,7 +257,7 @@ export const SettingsForm = ({
|
||||
<Switch {...field} checked={field.value} />
|
||||
|
||||
<Typography>
|
||||
{t("settingsPage.emailSettings.labelPool")}
|
||||
{t("adminSettings.form.email.optionPool")}
|
||||
</Typography>
|
||||
</Stack>
|
||||
)}
|
||||
@@ -270,7 +270,7 @@ export const SettingsForm = ({
|
||||
<Switch {...field} checked={field.value} />
|
||||
|
||||
<Typography>
|
||||
{t("settingsPage.emailSettings.labelIgnoreTLS")}
|
||||
{t("adminSettings.form.email.optionIgnoreTLS")}
|
||||
</Typography>
|
||||
</Stack>
|
||||
)}
|
||||
@@ -283,7 +283,7 @@ export const SettingsForm = ({
|
||||
<Switch {...field} checked={field.value} />
|
||||
|
||||
<Typography>
|
||||
{t("settingsPage.emailSettings.labelRequireTLS")}
|
||||
{t("adminSettings.form.email.optionRequireTLS")}
|
||||
</Typography>
|
||||
</Stack>
|
||||
)}
|
||||
@@ -296,7 +296,7 @@ export const SettingsForm = ({
|
||||
<Switch {...field} checked={field.value} />
|
||||
|
||||
<Typography>
|
||||
{t("settingsPage.emailSettings.labelRejectUnauthorized")}
|
||||
{t("adminSettings.form.email.optionRejectUnauthorized")}
|
||||
</Typography>
|
||||
</Stack>
|
||||
)}
|
||||
@@ -314,7 +314,7 @@ export const SettingsForm = ({
|
||||
onTest(formValues);
|
||||
}}
|
||||
>
|
||||
Test transport config
|
||||
{t("common.buttons.testTransport")}
|
||||
</Button>
|
||||
<Button
|
||||
loading={loading}
|
||||
@@ -322,7 +322,7 @@ export const SettingsForm = ({
|
||||
variant="contained"
|
||||
color="primary"
|
||||
>
|
||||
Save e-mail settings
|
||||
{t("common.buttons.saveEmailSettings")}
|
||||
</Button>
|
||||
</Stack>
|
||||
</Stack>
|
||||
@@ -335,8 +335,8 @@ export const SettingsForm = ({
|
||||
spacing={theme.spacing(10)}
|
||||
>
|
||||
<ConfigBox
|
||||
title="Global Data retention"
|
||||
subtitle="Set data retention policy. This affects all organizations and teams"
|
||||
title={t("adminSettings.form.retention.title")}
|
||||
subtitle={t("adminSettings.form.retention.description")}
|
||||
rightContent={
|
||||
<Stack spacing={theme.spacing(10)}>
|
||||
<Controller
|
||||
@@ -346,7 +346,9 @@ export const SettingsForm = ({
|
||||
<TextInput
|
||||
{...field}
|
||||
type="number"
|
||||
fieldLabel="Retention days"
|
||||
fieldLabel={t(
|
||||
"adminSettings.form.retention.optionRetentionDays"
|
||||
)}
|
||||
fullWidth
|
||||
error={!!errors.checksRetentionDays}
|
||||
helperText={
|
||||
|
||||
Reference in new issue
Block a user