format all files

This commit is contained in:
Alex Holliday committed 2025-05-27 09:10:32 -07:00
1 parent bfa6197ee4
commit 1b81251c93
81 files changed
+2628 -2330

No files matched your search

@@ -4,7 +4,8 @@ import { Button, Typography } from "@mui/material";
import { useTranslation } from "react-i18next";
import PropTypes from "prop-types";
const UploadFile = ({ onFileSelect }) => { // Changed prop to onFileSelect
const UploadFile = ({ onFileSelect }) => {
// Changed prop to onFileSelect
const theme = useTheme();
const [file, setFile] = useState();
const [error, setError] = useState("");
@@ -18,17 +19,17 @@ const UploadFile = ({ onFileSelect }) => { // Changed prop to onFileSelect
const handleFileChange = (e) => {
setError("");
const selectedFile = e.target.files[0];
// Basic file validation
if (!selectedFile) return;
if (!selectedFile.name.endsWith('.csv')) {
if (!selectedFile.name.endsWith(".csv")) {
setError(t("bulkImport.invalidFileType"));
return;
}
setFile(selectedFile);
onFileSelect(selectedFile); // Pass the file directly to parent
onFileSelect(selectedFile); // Pass the file directly to parent
};
return (
@@ -63,11 +64,10 @@ const UploadFile = ({ onFileSelect }) => { // Changed prop to onFileSelect
</Button>
</div>
);
}
};
UploadFile.prototype = {
onFileSelect: PropTypes.func.isRequired,
};
export default UploadFile;
export default UploadFile;
+6 -1
View File
@@ -61,7 +61,12 @@ const BulkImport = () => {
</Typography>
<ConfigBox>
<Box>
<Typography component="h2" variant="h2">{t("bulkImport.selectFileTips")}</Typography>
<Typography
component="h2"
variant="h2"
>
{t("bulkImport.selectFileTips")}
</Typography>
<Typography component="p">
<Trans
i18nKey="bulkImport.selectFileDescription"
+20 -4
View File
@@ -343,7 +343,12 @@ const Configure = () => {
</Stack>
<ConfigBox>
<Box>
<Typography component="h2" variant="h2">{t("settingsGeneralSettings")}</Typography>
<Typography
component="h2"
variant="h2"
>
{t("settingsGeneralSettings")}
</Typography>
<Typography component="p">
{t("distributedUptimeCreateSelectURL")}
</Typography>
@@ -389,7 +394,10 @@ const Configure = () => {
</ConfigBox>
<ConfigBox>
<Box>
<Typography component="h2" variant="h2">
<Typography
component="h2"
variant="h2"
>
{t("distributedUptimeCreateIncidentNotification")}
</Typography>
<Typography component="p">
@@ -457,7 +465,12 @@ const Configure = () => {
</ConfigBox>
<ConfigBox>
<Box>
<Typography component="h2" variant="h2">{t("ignoreTLSError")}</Typography>
<Typography
component="h2"
variant="h2"
>
{t("ignoreTLSError")}
</Typography>
<Typography component="p">{t("ignoreTLSErrorDescription")}</Typography>
</Box>
<Stack>
@@ -477,7 +490,10 @@ const Configure = () => {
</ConfigBox>
<ConfigBox>
<Box>
<Typography component="h2" variant="h2">
<Typography
component="h2"
variant="h2"
>
{t("distributedUptimeCreateAdvancedSettings")}
</Typography>
</Box>
+26 -5
View File
@@ -261,7 +261,12 @@ const CreateMonitor = () => {
</Typography>
<ConfigBox>
<Box>
<Typography component="h2" variant="h2">{t("distributedUptimeCreateChecks")}</Typography>
<Typography
component="h2"
variant="h2"
>
{t("distributedUptimeCreateChecks")}
</Typography>
<Typography component="p">
{t("distributedUptimeCreateChecksDescription")}
</Typography>
@@ -342,7 +347,12 @@ const CreateMonitor = () => {
</ConfigBox>
<ConfigBox>
<Box>
<Typography component="h2" variant="h2">{t("settingsGeneralSettings")}</Typography>
<Typography
component="h2"
variant="h2"
>
{t("settingsGeneralSettings")}
</Typography>
<Typography component="p">{t("uptimeCreateSelectURL")}</Typography>
</Box>
<Stack gap={theme.spacing(15)}>
@@ -386,7 +396,10 @@ const CreateMonitor = () => {
</ConfigBox>
<ConfigBox>
<Box>
<Typography component="h2" variant="h2">
<Typography
component="h2"
variant="h2"
>
{t("distributedUptimeCreateIncidentNotification")}
</Typography>
<Typography component="p">
@@ -417,7 +430,12 @@ const CreateMonitor = () => {
</ConfigBox>
<ConfigBox>
<Box>
<Typography component="h2" variant="h2">{t("ignoreTLSError")}</Typography>
<Typography
component="h2"
variant="h2"
>
{t("ignoreTLSError")}
</Typography>
<Typography component="p">{t("ignoreTLSErrorDescription")}</Typography>
</Box>
<Stack>
@@ -437,7 +455,10 @@ const CreateMonitor = () => {
</ConfigBox>
<ConfigBox>
<Box>
<Typography component="h2" variant="h2">
<Typography
component="h2"
variant="h2"
>
{t("distributedUptimeCreateAdvancedSettings")}
</Typography>
</Box>
@@ -150,7 +150,10 @@ const UptimeDataTable = ({
id: "responseTime",
content: t("responseTime"),
render: (row) => (
<Box display="flex" justifyContent="center">
<Box
display="flex"
justifyContent="center"
>
<BarChart checks={row.monitor.checks.slice().reverse()} />
</Box>
),