mirror of
https://github.com/bluewave-labs/Checkmate.git
synced 2026-05-20 08:28:48 -05:00
url settigns
This commit is contained in:
@@ -13,8 +13,8 @@ import { useIsAdmin } from "@/Hooks/useIsAdmin.js";
|
||||
import type { SettingsFormData } from "@/Validation/settings";
|
||||
import { useState } from "react";
|
||||
import { Controller } from "react-hook-form";
|
||||
import { TextField, FieldLabel, Button } from "@/Components/v2/inputs";
|
||||
import { Typography, Box } from "@mui/material";
|
||||
import { TextField, Button, FieldLabel } from "@/Components/v2/inputs";
|
||||
import { Box } from "@mui/material";
|
||||
|
||||
import {
|
||||
setTimezone,
|
||||
@@ -268,6 +268,38 @@ export const SettingsPage = () => {
|
||||
}
|
||||
/>
|
||||
)}
|
||||
|
||||
{/* URL Settings */}
|
||||
<ConfigBox
|
||||
title={t("pages.settings.form.url.title")}
|
||||
subtitle={t("pages.settings.form.url.description")}
|
||||
rightContent={
|
||||
<Controller
|
||||
name="showURL"
|
||||
control={form.control}
|
||||
defaultValue={defaults.showURL}
|
||||
render={({ field, fieldState }) => (
|
||||
<Select
|
||||
{...field}
|
||||
value={field.value === undefined ? "false" : field.value.toString()}
|
||||
onChange={(e) => {
|
||||
const value = e.target.value === "true";
|
||||
field.onChange(value);
|
||||
}}
|
||||
fieldLabel={t("pages.settings.form.url.option.showURL.label")}
|
||||
error={!!fieldState.error}
|
||||
>
|
||||
<MenuItem value="true">
|
||||
{t("pages.settings.form.url.option.showURL.enabled")}
|
||||
</MenuItem>
|
||||
<MenuItem value="false">
|
||||
{t("pages.settings.form.url.option.showURL.disabled")}
|
||||
</MenuItem>
|
||||
</Select>
|
||||
)}
|
||||
/>
|
||||
}
|
||||
/>
|
||||
</Stack>
|
||||
|
||||
{/* Sticky Save Button */}
|
||||
|
||||
@@ -544,6 +544,17 @@
|
||||
"label": "Temperature alert threshold (°C)"
|
||||
}
|
||||
}
|
||||
},
|
||||
"url": {
|
||||
"title": "Monitor IP/URL on Status Page",
|
||||
"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.",
|
||||
"option": {
|
||||
"showURL": {
|
||||
"label": "Display IP/URL on status page",
|
||||
"enabled": "Enabled",
|
||||
"disabled": "Disabled"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -948,6 +959,17 @@
|
||||
"placeholder": "Enter your Google PageSpeed API key"
|
||||
}
|
||||
}
|
||||
},
|
||||
"url": {
|
||||
"title": "Monitor IP/URL on Status Page",
|
||||
"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.",
|
||||
"option": {
|
||||
"showURL": {
|
||||
"label": "Display IP/URL on status page",
|
||||
"enabled": "Enabled",
|
||||
"disabled": "Disabled"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user