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({
@@ -1,6 +1,6 @@
import jmespath from "jmespath";
import https from "https";
import { GameDig } from 'gamedig';
import { GameDig } from "gamedig";
const SERVICE_NAME = "NetworkService";
const UPROCK_ENDPOINT = "https://api.uprock.com/checkmate/push";
@@ -487,7 +487,7 @@ class NetworkService {
* @property {string} message - A message indicating the result of the request.
*/
async requestGame(monitor) {
try {
try {
const { url, port, gameId } = monitor;
const gameResponse = {
+2 -2
View File
@@ -171,7 +171,7 @@ const createMonitorBodyValidation = joi.object({
jsonPath: joi.string().allow(""),
expectedValue: joi.string().allow(""),
matchMethod: joi.string(),
gameId: joi.string()
gameId: joi.string(),
});
const createMonitorsBodyValidation = joi.array().items(
@@ -198,7 +198,7 @@ const editMonitorBodyValidation = joi.object({
usage_disk: joi.number(),
usage_temperature: joi.number(),
}),
gameId: joi.string()
gameId: joi.string(),
});
const pauseMonitorParamValidation = joi.object({