Run npm run format

This commit is contained in:
Burak Arslan committed 2025-08-02 02:25:58 +03:00
1 parent 9ad3b58fcd
commit b53650a50f
6 files changed
+3475 -3471

No files matched your search

+3 -1
View File
@@ -357,7 +357,9 @@ const useUpdateMonitor = () => {
expectedValue: monitor.expectedValue,
ignoreTlsErrors: monitor.ignoreTlsErrors,
jsonPath: monitor.jsonPath,
...((monitor.type === "port" || monitor.type === "game") && { port: monitor.port }),
...((monitor.type === "port" || monitor.type === "game") && {
port: monitor.port,
}),
...(monitor.type === "hardware" && {
thresholds: monitor.thresholds,
secret: monitor.secret,
+18 -16
View File
@@ -43,7 +43,7 @@ import {
useFetchMonitorById,
} from "../../../Hooks/monitorHooks";
import { GAMES } from '../../../Utils/games';
import { GAMES } from "../../../Utils/games";
/**
* Parses a URL string and returns a URL object.
@@ -115,10 +115,10 @@ const UptimeCreate = ({ isClone = false }) => {
{ _id: 4, name: t("time.fourMinutes") },
{ _id: 5, name: t("time.fiveMinutes") },
];
const GAMELIST = Object.entries(GAMES).map(([key, value]) => ({
_id: key,
name: value.name
name: value.name,
}));
const CRUMBS = [
@@ -165,7 +165,7 @@ const UptimeCreate = ({ isClone = false }) => {
label: t("monitorType.game.label"),
placeholder: t("monitorType.game.placeholder"),
namePlaceholder: t("monitorType.game.namePlaceholder"),
}
},
};
// Handlers
@@ -182,7 +182,8 @@ const UptimeCreate = ({ isClone = false }) => {
: monitor.url,
name: monitor.name || monitor.url.substring(0, 50),
type: monitor.type,
port: (monitor.type === "port" || monitor.type === "game") ? monitor.port : undefined,
port:
monitor.type === "port" || monitor.type === "game" ? monitor.port : undefined,
interval: monitor.interval,
matchMethod: monitor.matchMethod,
expectedValue: monitor.expectedValue,
@@ -202,7 +203,8 @@ const UptimeCreate = ({ isClone = false }) => {
interval: monitor.interval,
teamId: monitor.teamId,
userId: monitor.userId,
port: (monitor.type === "port" || monitor.type === "game") ? monitor.port : undefined,
port:
monitor.type === "port" || monitor.type === "game" ? monitor.port : undefined,
ignoreTlsErrors: monitor.ignoreTlsErrors,
gameId: monitor.gameId || undefined,
};
@@ -573,16 +575,16 @@ const UptimeCreate = ({ isClone = false }) => {
helperText={errors["port"]}
hidden={monitor.type !== "port" && monitor.type !== "game"}
/>
{
monitor.type === "game" &&
(<Select
name="gameId"
label={t("chooseGame")}
value={monitor.gameId || ""}
placeholder={t('chooseGame')}
onChange={onChange}
items={GAMELIST}
/>)}
{monitor.type === "game" && (
<Select
name="gameId"
label={t("chooseGame")}
value={monitor.gameId || ""}
placeholder={t("chooseGame")}
onChange={onChange}
items={GAMELIST}
/>
)}
<TextInput
name="name"
type="text"
+3449 -3449
View File
File diff suppressed because it is too large. Load diff
+1 -1
View File
@@ -205,7 +205,7 @@ const monitorValidation = joi.object({
expectedValue: joi.string().allow(null, ""),
jsonPath: joi.string().allow(null, ""),
matchMethod: joi.string().allow(null, ""),
gameId: joi.string().allow(null, "")
gameId: joi.string().allow(null, ""),
});
const imageValidation = joi.object({