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
+3473 -3469

No files matched your search

+3 -1
View File
@@ -357,7 +357,9 @@ const useUpdateMonitor = () => {
expectedValue: monitor.expectedValue, expectedValue: monitor.expectedValue,
ignoreTlsErrors: monitor.ignoreTlsErrors, ignoreTlsErrors: monitor.ignoreTlsErrors,
jsonPath: monitor.jsonPath, jsonPath: monitor.jsonPath,
...((monitor.type === "port" || monitor.type === "game") && { port: monitor.port }), ...((monitor.type === "port" || monitor.type === "game") && {
port: monitor.port,
}),
...(monitor.type === "hardware" && { ...(monitor.type === "hardware" && {
thresholds: monitor.thresholds, thresholds: monitor.thresholds,
secret: monitor.secret, secret: monitor.secret,
+17 -15
View File
@@ -43,7 +43,7 @@ import {
useFetchMonitorById, useFetchMonitorById,
} from "../../../Hooks/monitorHooks"; } from "../../../Hooks/monitorHooks";
import { GAMES } from '../../../Utils/games'; import { GAMES } from "../../../Utils/games";
/** /**
* Parses a URL string and returns a URL object. * Parses a URL string and returns a URL object.
@@ -118,7 +118,7 @@ const UptimeCreate = ({ isClone = false }) => {
const GAMELIST = Object.entries(GAMES).map(([key, value]) => ({ const GAMELIST = Object.entries(GAMES).map(([key, value]) => ({
_id: key, _id: key,
name: value.name name: value.name,
})); }));
const CRUMBS = [ const CRUMBS = [
@@ -165,7 +165,7 @@ const UptimeCreate = ({ isClone = false }) => {
label: t("monitorType.game.label"), label: t("monitorType.game.label"),
placeholder: t("monitorType.game.placeholder"), placeholder: t("monitorType.game.placeholder"),
namePlaceholder: t("monitorType.game.namePlaceholder"), namePlaceholder: t("monitorType.game.namePlaceholder"),
} },
}; };
// Handlers // Handlers
@@ -182,7 +182,8 @@ const UptimeCreate = ({ isClone = false }) => {
: monitor.url, : monitor.url,
name: monitor.name || monitor.url.substring(0, 50), name: monitor.name || monitor.url.substring(0, 50),
type: monitor.type, 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, interval: monitor.interval,
matchMethod: monitor.matchMethod, matchMethod: monitor.matchMethod,
expectedValue: monitor.expectedValue, expectedValue: monitor.expectedValue,
@@ -202,7 +203,8 @@ const UptimeCreate = ({ isClone = false }) => {
interval: monitor.interval, interval: monitor.interval,
teamId: monitor.teamId, teamId: monitor.teamId,
userId: monitor.userId, 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, ignoreTlsErrors: monitor.ignoreTlsErrors,
gameId: monitor.gameId || undefined, gameId: monitor.gameId || undefined,
}; };
@@ -573,16 +575,16 @@ const UptimeCreate = ({ isClone = false }) => {
helperText={errors["port"]} helperText={errors["port"]}
hidden={monitor.type !== "port" && monitor.type !== "game"} hidden={monitor.type !== "port" && monitor.type !== "game"}
/> />
{ {monitor.type === "game" && (
monitor.type === "game" && <Select
(<Select name="gameId"
name="gameId" label={t("chooseGame")}
label={t("chooseGame")} value={monitor.gameId || ""}
value={monitor.gameId || ""} placeholder={t("chooseGame")}
placeholder={t('chooseGame')} onChange={onChange}
onChange={onChange} items={GAMELIST}
items={GAMELIST} />
/>)} )}
<TextInput <TextInput
name="name" name="name"
type="text" 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, ""), expectedValue: joi.string().allow(null, ""),
jsonPath: joi.string().allow(null, ""), jsonPath: joi.string().allow(null, ""),
matchMethod: joi.string().allow(null, ""), matchMethod: joi.string().allow(null, ""),
gameId: joi.string().allow(null, "") gameId: joi.string().allow(null, ""),
}); });
const imageValidation = joi.object({ const imageValidation = joi.object({
@@ -1,6 +1,6 @@
import jmespath from "jmespath"; import jmespath from "jmespath";
import https from "https"; import https from "https";
import { GameDig } from 'gamedig'; import { GameDig } from "gamedig";
const SERVICE_NAME = "NetworkService"; const SERVICE_NAME = "NetworkService";
const UPROCK_ENDPOINT = "https://api.uprock.com/checkmate/push"; const UPROCK_ENDPOINT = "https://api.uprock.com/checkmate/push";
+2 -2
View File
@@ -171,7 +171,7 @@ const createMonitorBodyValidation = joi.object({
jsonPath: joi.string().allow(""), jsonPath: joi.string().allow(""),
expectedValue: joi.string().allow(""), expectedValue: joi.string().allow(""),
matchMethod: joi.string(), matchMethod: joi.string(),
gameId: joi.string() gameId: joi.string(),
}); });
const createMonitorsBodyValidation = joi.array().items( const createMonitorsBodyValidation = joi.array().items(
@@ -198,7 +198,7 @@ const editMonitorBodyValidation = joi.object({
usage_disk: joi.number(), usage_disk: joi.number(),
usage_temperature: joi.number(), usage_temperature: joi.number(),
}), }),
gameId: joi.string() gameId: joi.string(),
}); });
const pauseMonitorParamValidation = joi.object({ const pauseMonitorParamValidation = joi.object({