diff --git a/client/src/Components/LanguageSelector.jsx b/client/src/Components/LanguageSelector.jsx
index 57d102a9e..56a9a898d 100644
--- a/client/src/Components/LanguageSelector.jsx
+++ b/client/src/Components/LanguageSelector.jsx
@@ -6,7 +6,6 @@ import { useSelector } from "react-redux";
import { useDispatch } from "react-redux";
import { setLanguage } from "../Features/UI/uiSlice";
-
const langMap = {
cs: "cz",
ja: "jp",
diff --git a/client/src/Pages/Infrastructure/Details/Components/GaugeBoxes/index.jsx b/client/src/Pages/Infrastructure/Details/Components/GaugeBoxes/index.jsx
index 4dd978018..3c1c68f8b 100644
--- a/client/src/Pages/Infrastructure/Details/Components/GaugeBoxes/index.jsx
+++ b/client/src/Pages/Infrastructure/Details/Components/GaugeBoxes/index.jsx
@@ -2,18 +2,19 @@
import { Stack } from "@mui/material";
import Gauge from "./Gauge";
import SkeletonLayout from "./skeleton";
+import PropTypes from "prop-types";
// Utils
import { useHardwareUtils } from "../../Hooks/useHardwareUtils";
import { useTheme } from "@emotion/react";
import { useTranslation } from "react-i18next";
-const Gauges = ({ shouldRender, monitor }) => {
+const Gauges = ({ isLoading = false, monitor }) => {
const { decimalToPercentage, formatBytes } = useHardwareUtils();
const theme = useTheme();
const { t } = useTranslation();
- if (!shouldRender) {
+ if (isLoading) {
return ;
}
@@ -60,6 +61,7 @@ const Gauges = ({ shouldRender, monitor }) => {
return (
{gauges.map((gauge) => {
@@ -79,4 +81,9 @@ const Gauges = ({ shouldRender, monitor }) => {
);
};
+Gauges.propTypes = {
+ isLoading: PropTypes.bool,
+ monitor: PropTypes.object,
+};
+
export default Gauges;
diff --git a/client/src/Pages/Infrastructure/Details/index.jsx b/client/src/Pages/Infrastructure/Details/index.jsx
index b57e0b91e..30840851f 100644
--- a/client/src/Pages/Infrastructure/Details/index.jsx
+++ b/client/src/Pages/Infrastructure/Details/index.jsx
@@ -92,11 +92,11 @@ const InfrastructureDetails = () => {
monitor={monitor}
/>
diff --git a/server/validation/joi.js b/server/validation/joi.js
index 57c8b7350..b33283d98 100755
--- a/server/validation/joi.js
+++ b/server/validation/joi.js
@@ -164,11 +164,7 @@ const createMonitorBodyValidation = joi.object({
.custom((value, helpers) => {
// 1. Standard URLs: must have protocol and pass canParse()
if (/^(https?:\/\/)/.test(value)) {
- if (
- typeof URL !== "undefined" &&
- typeof URL.canParse === "function" &&
- URL.canParse(value)
- ) {
+ if (typeof URL !== "undefined" && typeof URL.canParse === "function" && URL.canParse(value)) {
return value;
}
// else, it's a malformed URL with protocol
@@ -197,8 +193,7 @@ const createMonitorBodyValidation = joi.object({
.messages({
"string.empty": "This field is required.",
"string.uri": "The URL you provided is not valid.",
- "string.invalidUrl":
- "Please enter a valid URL, hostname, or container name (with optional port).",
+ "string.invalidUrl": "Please enter a valid URL, hostname, or container name (with optional port).",
}),
ignoreTlsErrors: joi.boolean().default(false),
port: joi.number(),