diff --git a/client/src/Pages/Logs/Diagnostics/components/gauges/index.jsx b/client/src/Pages/Logs/Diagnostics/components/gauges/index.jsx
deleted file mode 100644
index b19893ed6..000000000
--- a/client/src/Pages/Logs/Diagnostics/components/gauges/index.jsx
+++ /dev/null
@@ -1,188 +0,0 @@
-import Stack from "@mui/material/Stack";
-import CustomGauge from "@/Components/v1/Charts/CustomGauge/index.jsx";
-import Typography from "@mui/material/Typography";
-
-// Utils
-import { useTheme } from "@emotion/react";
-import PropTypes from "prop-types";
-import { getPercentage, formatBytes } from "../../utils/utils.js";
-import { useTranslation } from "react-i18next";
-import { Box } from "@mui/material";
-
-const BaseContainer = ({ children }) => {
- const theme = useTheme();
- return (
-
- {children}
-
- );
-};
-
-const InfrastructureStyleGauge = ({
- value,
- heading,
- metricOne,
- valueOne,
- metricTwo,
- valueTwo,
-}) => {
- const theme = useTheme();
-
- const MetricRow = ({ label, value }) => (
-
- {label}
-
- {value}
-
-
- );
-
- return (
-
-
-
-
-
- {heading}
-
-
-
-
- {metricTwo && valueTwo && (
-
- )}
-
-
-
- );
-};
-
-const Gauges = ({ diagnostics, isLoading }) => {
- const heapTotalSize = getPercentage(
- diagnostics?.v8HeapStats?.totalHeapSizeBytes,
- diagnostics?.v8HeapStats?.heapSizeLimitBytes
- );
-
- const heapUsedSize = getPercentage(
- diagnostics?.v8HeapStats?.usedHeapSizeBytes,
- diagnostics?.v8HeapStats?.heapSizeLimitBytes
- );
-
- const actualHeapUsed = getPercentage(
- diagnostics?.v8HeapStats?.usedHeapSizeBytes,
- diagnostics?.v8HeapStats?.totalHeapSizeBytes
- );
-
- const theme = useTheme();
- const { t } = useTranslation();
-
- return (
-
-
-
-
-
-
- );
-};
-
-Gauges.propTypes = {
- diagnostics: PropTypes.object,
- isLoading: PropTypes.bool,
-};
-
-InfrastructureStyleGauge.propTypes = {
- value: PropTypes.number,
- heading: PropTypes.string,
- metricOne: PropTypes.string,
- valueOne: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
- metricTwo: PropTypes.string,
- valueTwo: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
-};
-
-BaseContainer.propTypes = {
- children: PropTypes.node.isRequired,
-};
-
-export default Gauges;
diff --git a/client/src/Pages/Logs/Diagnostics/components/stats/index.jsx b/client/src/Pages/Logs/Diagnostics/components/stats/index.jsx
deleted file mode 100644
index 13ed63618..000000000
--- a/client/src/Pages/Logs/Diagnostics/components/stats/index.jsx
+++ /dev/null
@@ -1,97 +0,0 @@
-import Stack from "@mui/material/Stack";
-import Typography from "@mui/material/Typography";
-import Card from "@mui/material/Card";
-import CardContent from "@mui/material/CardContent";
-import CircularProgress from "@mui/material/CircularProgress";
-
-import { useTheme } from "@emotion/react";
-import PropTypes from "prop-types";
-
-import { getHumanReadableDuration } from "../../../../../Utils/timeUtilsLegacy.js";
-import { formatBytes } from "../../utils/utils.js";
-import { useTranslation } from "react-i18next";
-
-const StatsCard = ({ title, value, unit = "", isLoading }) => {
- const theme = useTheme();
- return (
-
- {isLoading ? (
-
-
-
- ) : (
-
-
- {title}
-
-
- {value} {unit}
-
-
- )}
-
- );
-};
-
-StatsCard.propTypes = {
- title: PropTypes.string,
- value: PropTypes.string,
- unit: PropTypes.string,
- isLoading: PropTypes.bool,
-};
-
-const Stats = ({ diagnostics, isLoading }) => {
- const theme = useTheme();
- const { t } = useTranslation();
- return (
-
-
-
-
-
-
-
-
-
-
- );
-};
-
-Stats.propTypes = {
- diagnostics: PropTypes.object,
- isLoading: PropTypes.bool,
-};
-
-export default Stats;
diff --git a/client/src/Pages/Logs/Diagnostics/index.jsx b/client/src/Pages/Logs/Diagnostics/index.jsx
deleted file mode 100644
index 194e13821..000000000
--- a/client/src/Pages/Logs/Diagnostics/index.jsx
+++ /dev/null
@@ -1,77 +0,0 @@
-import Stack from "@mui/material/Stack";
-import Box from "@mui/material/Box";
-import Gauges from "./components/gauges/index.jsx";
-import Button from "@mui/material/Button";
-import StatBox from "@/Components/v1/StatBox/index.jsx";
-import StatusBoxes from "@/Components/v1/StatusBoxes/index.jsx";
-import { useTheme } from "@emotion/react";
-import { useTranslation } from "react-i18next";
-import { useFetchDiagnostics } from "../../../Hooks/logHooks.js";
-import { getHumanReadableDuration } from "../../../Utils/timeUtilsLegacy.js";
-import { formatBytes, getPercentage } from "./utils/utils.js";
-
-const Diagnostics = () => {
- // Local state
-
- // Hooks
- const theme = useTheme();
- const { t } = useTranslation();
- const [diagnostics, fetchDiagnostics, isLoading, error] = useFetchDiagnostics();
- // Setup
- return (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- );
-};
-
-export default Diagnostics;
diff --git a/client/src/Pages/Logs/Diagnostics/utils/utils.js b/client/src/Pages/Logs/Diagnostics/utils/utils.js
deleted file mode 100644
index a3b75631f..000000000
--- a/client/src/Pages/Logs/Diagnostics/utils/utils.js
+++ /dev/null
@@ -1,16 +0,0 @@
-export const getPercentage = (value, total) => {
- if (!value || !total) return 0;
- return (value / total) * 100;
-};
-
-export const formatBytes = (bytes) => {
- if (!bytes) return "N/A";
-
- if (bytes === 0) return "0 Bytes";
-
- if (bytes >= 1024 * 1024 * 1024) {
- return `${(bytes / (1024 * 1024 * 1024)).toFixed(2)} GB`;
- }
-
- return `${(bytes / (1024 * 1024)).toFixed(2)} MB`;
-};
diff --git a/client/src/Pages/Logs/Logs/index.jsx b/client/src/Pages/Logs/Logs/index.jsx
deleted file mode 100644
index d0319a387..000000000
--- a/client/src/Pages/Logs/Logs/index.jsx
+++ /dev/null
@@ -1,176 +0,0 @@
-import Stack from "@mui/material/Stack";
-import Box from "@mui/material/Box";
-import Select from "@/Components/v1/Inputs/Select/index.jsx";
-import Typography from "@mui/material/Typography";
-import DataTable from "@/Components/v1/Table/index.jsx";
-import Pagination from "@/Components/v1/Table/TablePagination/index.jsx";
-
-import { useFetchLogs } from "../../../Hooks/logHooks.js";
-import { useTheme } from "@emotion/react";
-import { useState } from "react";
-import { useTranslation } from "react-i18next";
-
-const LevelBadge = ({ level }) => {
- const theme = useTheme();
-
- const levelColors = {
- info: theme.palette.success.main,
- warn: theme.palette.warning.main,
- error: theme.palette.error.main,
- debug: theme.palette.accent.main,
- };
-
- const color = levelColors[level] || theme.palette.primary.contrastText;
-
- return (
-
- {level}
-
- );
-};
-
-const formatTimestamp = (timestamp) => {
- if (!timestamp) return "-";
- const date = new Date(timestamp);
- return date.toLocaleString();
-};
-
-const Logs = () => {
- const [logLevel, setLogLevel] = useState("all");
- const [page, setPage] = useState(0);
- const [rowsPerPage, setRowsPerPage] = useState(15);
-
- const theme = useTheme();
- const { t } = useTranslation();
- const [logs, isLoading, error] = useFetchLogs();
-
- const LOG_LEVELS = [
- { _id: "all", name: t("logsPage.logLevelSelect.values.all") },
- { _id: "info", name: t("logsPage.logLevelSelect.values.info") },
- { _id: "warn", name: t("logsPage.logLevelSelect.values.warn") },
- { _id: "error", name: t("logsPage.logLevelSelect.values.error") },
- { _id: "debug", name: t("logsPage.logLevelSelect.values.debug") },
- ];
-
- const headers = [
- {
- id: "timestamp",
- content: t("logsPage.table.timestamp"),
- render: (row) => (
-
- {formatTimestamp(row.timestamp)}
-
- ),
- },
- {
- id: "level",
- content: t("logsPage.table.level"),
- render: (row) => ,
- },
- {
- id: "service",
- content: t("logsPage.table.service"),
- render: (row) => (
- {row.service || "-"}
- ),
- },
- {
- id: "method",
- content: t("logsPage.table.method"),
- render: (row) => (
- {row.method || "-"}
- ),
- },
- {
- id: "message",
- content: t("logsPage.table.message"),
- render: (row) => (
-
- {row.message || "-"}
-
- ),
- },
- ];
-
- const filteredLogs = logs
- ?.filter((log) => {
- if (logLevel === "all") return true;
- return log.level === logLevel;
- })
- .reverse()
- .map((log, idx) => ({ ...log, id: idx }));
-
- const paginatedLogs = filteredLogs?.slice(
- page * rowsPerPage,
- page * rowsPerPage + rowsPerPage
- );
-
- const handleChangePage = (event, newPage) => {
- setPage(newPage);
- };
-
- const handleChangeRowsPerPage = (event) => {
- setRowsPerPage(parseInt(event.target.value, 10));
- setPage(0);
- };
-
- const handleLogLevelChange = (e) => {
- setLogLevel(e.target.value);
- setPage(0);
- };
-
- return (
-
-
- {t("logsPage.logLevelSelect.title")}
-
-
-
-
-
- {filteredLogs?.length > 0 && (
-
- )}
-
- );
-};
-
-export default Logs;
diff --git a/client/src/Pages/Logs/Queue/components/FailedJobTable/index.jsx b/client/src/Pages/Logs/Queue/components/FailedJobTable/index.jsx
deleted file mode 100644
index 49f6317bf..000000000
--- a/client/src/Pages/Logs/Queue/components/FailedJobTable/index.jsx
+++ /dev/null
@@ -1,82 +0,0 @@
-import Stack from "@mui/material/Stack";
-import Typography from "@mui/material/Typography";
-import DataTable from "@/Components/v1/Table/index.jsx";
-
-import { useNavigate } from "react-router-dom";
-import { useTheme } from "@emotion/react";
-import { TypeToPathMap } from "../../../../../Utils/monitorUtilsLegacy.js";
-import PropTypes from "prop-types";
-import { useTranslation } from "react-i18next";
-
-const FailedJobTable = ({ metrics = {} }) => {
- const { t } = useTranslation();
- const theme = useTheme();
- const jobsWithFailures = metrics?.jobsWithFailures;
- const navigate = useNavigate();
-
- const headers = [
- {
- id: "monitorId",
- content: t("queuePage.failedJobTable.monitorIdHeader"),
- render: (row) => {
- return row.monitorId;
- },
- },
- {
- id: "monitorUrl",
- content: t("queuePage.failedJobTable.monitorUrlHeader"),
- render: (row) => {
- return row.monitorUrl;
- },
- },
- {
- id: "failCount",
- content: t("queuePage.failedJobTable.failCountHeader"),
- render: (row) => {
- return row.failCount;
- },
- },
- {
- id: "failedAt",
- content: t("queuePage.failedJobTable.failedAtHeader"),
- render: (row) => {
- return row.failedAt;
- },
- },
- {
- id: "failReason",
- content: t("queuePage.failedJobTable.failReasonHeader"),
- render: (row) => {
- return row.failReason;
- },
- },
- ];
- return (
-
- {t("queuePage.failedJobTable.title")}
- {
- const path = TypeToPathMap[row.monitorType];
- navigate(`/${path}/${row.monitorId}`);
- },
- rowSX: {
- cursor: "pointer",
- "&:hover td": {
- backgroundColor: theme.palette.tertiary.main,
- transition: "background-color .3s ease",
- },
- },
- }}
- />
-
- );
-};
-
-FailedJobTable.propTypes = {
- metrics: PropTypes.object,
-};
-
-export default FailedJobTable;
diff --git a/client/src/Pages/Logs/Queue/components/JobTable/index.jsx b/client/src/Pages/Logs/Queue/components/JobTable/index.jsx
deleted file mode 100644
index 33636b6f5..000000000
--- a/client/src/Pages/Logs/Queue/components/JobTable/index.jsx
+++ /dev/null
@@ -1,130 +0,0 @@
-import Stack from "@mui/material/Stack";
-import DataTable from "@/Components/v1/Table/index.jsx";
-import Typography from "@mui/material/Typography";
-// Utils
-import PropTypes from "prop-types";
-import { useTheme } from "@emotion/react";
-import { useNavigate } from "react-router-dom";
-import { TypeToPathMap } from "../../../../../Utils/monitorUtilsLegacy.js";
-import { useTranslation } from "react-i18next";
-import { createHeaderFactory } from "@/Components/v1/Table/TableUtils.js";
-
-const JobTable = ({ jobs = [] }) => {
- const theme = useTheme();
- const { t } = useTranslation();
- const navigate = useNavigate();
- const buildSx = (row) => {
- if (row.lockedAt) {
- return {
- color: `${theme.palette.success.main} !important`,
- };
- }
- if (!row.active) {
- return {
- color: `${theme.palette.warning.main} !important`,
- };
- }
-
- if (row.failCount > 0 && row.lastFailedAt >= row.lastFinishedAt) {
- return {
- color: `${theme.palette.error.main} !important`,
- };
- }
-
- return {};
- };
-
- const createHeader = createHeaderFactory(buildSx);
- const headersData = [
- {
- id: "id",
- content: t("queuePage.jobTable.idHeader"),
- render: (row) => row.monitorId,
- },
- {
- id: "url",
- content: t("queuePage.jobTable.urlHeader"),
- render: (row) => row.monitorUrl,
- },
- {
- id: "interval",
- content: t("queuePage.jobTable.intervalHeader"),
- render: (row) => `${row.monitorInterval} ms`,
- },
- {
- id: "type",
- content: t("queuePage.jobTable.typeHeader"),
- render: (row) => row.monitorType,
- },
- {
- id: "active",
- content: t("queuePage.jobTable.activeHeader"),
- render: (row) => row.active.toString(),
- },
- {
- id: "runCount",
- content: t("queuePage.jobTable.runCountHeader"),
- render: (row) => row.runCount,
- },
- {
- id: "failCount",
- content: t("queuePage.jobTable.failCountHeader"),
- render: (row) => row.failCount,
- },
- {
- id: "lastRun",
- content: t("queuePage.jobTable.lastRunHeader"),
- render: (row) => row.lastRunAt || "-",
- },
- {
- id: "lockedAt",
- content: t("queuePage.jobTable.lockedAtHeader"),
- render: (row) => row.lockedAt || "-",
- },
-
- {
- id: "lastFinish",
- content: t("queuePage.jobTable.lastFinishedAtHeader"),
- render: (row) => row.lastFinishedAt || "-",
- },
- {
- id: "lastRunTook",
- content: t("queuePage.jobTable.lastRunTookHeader"),
- render: (row) => {
- const value = row.lastRunTook ? row.lastRunTook + " ms" : "-";
- return value;
- },
- },
- ];
-
- const headers = headersData.map((header) => createHeader(header));
-
- return (
-
- {t("queuePage.jobTable.title")}
- {
- const path = TypeToPathMap[row.monitorType];
- navigate(`/${path}/${row.monitorId}`);
- },
- rowSX: {
- cursor: "pointer",
- "&:hover td": {
- backgroundColor: theme.palette.tertiary.main,
- transition: "background-color .3s ease",
- },
- },
- }}
- />
-
- );
-};
-
-JobTable.propTypes = {
- jobs: PropTypes.array,
-};
-
-export default JobTable;
diff --git a/client/src/Pages/Logs/Queue/components/Metrics/index.jsx b/client/src/Pages/Logs/Queue/components/Metrics/index.jsx
deleted file mode 100644
index c4f4389c3..000000000
--- a/client/src/Pages/Logs/Queue/components/Metrics/index.jsx
+++ /dev/null
@@ -1,38 +0,0 @@
-import Stack from "@mui/material/Stack";
-import StatBox from "@/Components/v1/StatBox/index.jsx";
-import StatusBoxes from "@/Components/v1/StatusBoxes/index.jsx";
-import { useTranslation } from "react-i18next";
-import { useTheme } from "@emotion/react";
-
-const camelToTitle = (str) => {
- return str
- .replace(/([A-Z])/g, " $1")
- .toLowerCase()
- .replace(/^./, (m) => m.toUpperCase());
-};
-
-const Metrics = ({ metrics = {} }) => {
- const { t } = useTranslation();
- const theme = useTheme();
-
- const data = Object.keys(metrics)
- .filter((key) => key !== "jobsWithFailures")
- .map((key) => {
- return { key, title: camelToTitle(key), value: metrics[key] };
- });
-
- return (
-
- {data.map((metric) => {
- return (
-
- );
- })}
-
- );
-};
-export default Metrics;
diff --git a/client/src/Pages/Logs/Queue/components/MetricsTable/index.jsx b/client/src/Pages/Logs/Queue/components/MetricsTable/index.jsx
deleted file mode 100644
index d96f37a20..000000000
--- a/client/src/Pages/Logs/Queue/components/MetricsTable/index.jsx
+++ /dev/null
@@ -1,60 +0,0 @@
-import Stack from "@mui/material/Stack";
-import Typography from "@mui/material/Typography";
-import DataTable from "@/Components/v1/Table/index.jsx";
-
-// Utils
-import { useTranslation } from "react-i18next";
-import { useTheme } from "@emotion/react";
-import PropTypes from "prop-types";
-
-const camelToTitle = (str) => {
- return str
- .replace(/([A-Z])/g, " $1")
- .toLowerCase()
- .replace(/^./, (m) => m.toUpperCase());
-};
-
-const Metrics = ({ metrics = {} }) => {
- const { t } = useTranslation();
- const theme = useTheme();
- const keys = Object.keys(metrics);
-
- const headers = [
- {
- id: "metric",
- content: t("queuePage.metricsTable.metricHeader"),
- render: (row) => {
- return {row.key};
- },
- },
- {
- id: "value",
- content: t("queuePage.metricsTable.valueHeader"),
- render: (row) => {
- return {row.value};
- },
- },
- ];
-
- const data = keys
- .filter((key) => key !== "jobsWithFailures")
- .map((key) => {
- return { key: camelToTitle(key), value: metrics[key] };
- });
-
- return (
-
- {t("queuePage.metricsTable.title")}
-
-
- );
-};
-
-Metrics.propTypes = {
- metrics: PropTypes.object,
-};
-
-export default Metrics;
diff --git a/client/src/Pages/Logs/Queue/index.jsx b/client/src/Pages/Logs/Queue/index.jsx
deleted file mode 100644
index b2d0dc685..000000000
--- a/client/src/Pages/Logs/Queue/index.jsx
+++ /dev/null
@@ -1,73 +0,0 @@
-// Components
-import Stack from "@mui/material/Stack";
-import JobTable from "./components/JobTable/index.jsx";
-import Metrics from "./components/Metrics/index.jsx";
-import FailedJobTable from "./components/FailedJobTable/index.jsx";
-import ButtonGroup from "@mui/material/ButtonGroup";
-import Button from "@mui/material/Button";
-import Typography from "@mui/material/Typography";
-import Divider from "@mui/material/Divider";
-
-// Utils
-import { useState } from "react";
-import { useFetchQueueData, useFlushQueue } from "../../../Hooks/logHooks.js";
-import { useTranslation } from "react-i18next";
-import { useTheme } from "@emotion/react";
-
-const QueueDetails = () => {
- // Local state
- const [trigger, setTrigger] = useState(false);
-
- // Hooks
- const { t } = useTranslation();
- const theme = useTheme();
- const [jobs, metrics, isLoading, error] = useFetchQueueData(trigger);
- const [flushQueue, isFlushing, flushError] = useFlushQueue();
-
- if (isLoading) return
Loading...
;
- if (error || flushError) return Error: {error.message}
;
-
- return (
-
-
-
-
-
-
-
-
-
-
-
-
- );
-};
-
-export default QueueDetails;
diff --git a/client/src/Pages/Logs/TabDiagnostics.tsx b/client/src/Pages/Logs/TabDiagnostics.tsx
index fb18fa091..7ab84ba25 100644
--- a/client/src/Pages/Logs/TabDiagnostics.tsx
+++ b/client/src/Pages/Logs/TabDiagnostics.tsx
@@ -1,6 +1,6 @@
import Stack from "@mui/material/Stack";
-import { Stats } from "@/Pages/Logs/Stats";
-import { StatGauges } from "@/Pages/Logs/StatGauges";
+import { Stats } from "@/Pages/Logs/components/Stats";
+import { StatGauges } from "@/Pages/Logs/components/StatGauges";
import { useTheme } from "@mui/material";
import { useGet } from "@/Hooks/UseApi";
diff --git a/client/src/Pages/Logs/TabLogs.tsx b/client/src/Pages/Logs/TabLogs.tsx
index b4d601429..a44de73a4 100644
--- a/client/src/Pages/Logs/TabLogs.tsx
+++ b/client/src/Pages/Logs/TabLogs.tsx
@@ -3,7 +3,7 @@ import MenuItem from "@mui/material/MenuItem";
import Typography from "@mui/material/Typography";
import { useSelector } from "react-redux";
import { Select } from "@/Components/v2/inputs";
-import { TableLogs } from "./TableLogs";
+import { TableLogs } from "@/Pages/Logs/components/TableLogs";
import { useTheme } from "@mui/material";
import { useGet } from "@/Hooks/UseApi";
diff --git a/client/src/Pages/Logs/TabQueue.tsx b/client/src/Pages/Logs/TabQueue.tsx
index 7cfd15f0e..be0013368 100644
--- a/client/src/Pages/Logs/TabQueue.tsx
+++ b/client/src/Pages/Logs/TabQueue.tsx
@@ -1,12 +1,12 @@
import Stack from "@mui/material/Stack";
import Typography from "@mui/material/Typography";
-import { TableJobs, TableFailedJobs } from "@/Pages/Logs/TableJobs";
+import { TableJobs, TableFailedJobs } from "./components/TableJobs";
import { useTheme } from "@mui/material";
import { useTranslation } from "react-i18next";
import { useGet, usePost } from "@/Hooks/UseApi";
import type { QueueData } from "@/Types/Queue";
-import { Metrics } from "@/Pages/Logs/Metrics";
+import { Metrics } from "@/Pages/Logs/components/Metrics";
import { Button } from "@/Components/v2/inputs";
export const TabQueue = () => {
diff --git a/client/src/Pages/Logs/Metrics.tsx b/client/src/Pages/Logs/components/Metrics.tsx
similarity index 100%
rename from client/src/Pages/Logs/Metrics.tsx
rename to client/src/Pages/Logs/components/Metrics.tsx
diff --git a/client/src/Pages/Logs/StatGauges.tsx b/client/src/Pages/Logs/components/StatGauges.tsx
similarity index 89%
rename from client/src/Pages/Logs/StatGauges.tsx
rename to client/src/Pages/Logs/components/StatGauges.tsx
index e78c89ced..17137f114 100644
--- a/client/src/Pages/Logs/StatGauges.tsx
+++ b/client/src/Pages/Logs/components/StatGauges.tsx
@@ -15,7 +15,7 @@ const getPercentage = (value: number, total: number) => {
return (value / total) * 100;
};
-const formatPerecentage = new Intl.NumberFormat("en-US", {
+const formatPercentage = new Intl.NumberFormat("en-US", {
style: "percent",
minimumFractionDigits: 1,
maximumFractionDigits: 1,
@@ -51,7 +51,7 @@ export const StatGauges = ({ diagnostics }: StatGaugesProps) => {
@@ -59,7 +59,7 @@ export const StatGauges = ({ diagnostics }: StatGaugesProps) => {
title={t("pages.logs.diagnostics.gauges.heapUsage")}
progress={heapUsedSize}
upperLabel={t("pages.logs.diagnostics.gauges.availableMemoryPercentage")}
- upperValue={formatPerecentage.format(heapUsedSize / 100)}
+ upperValue={formatPercentage.format(heapUsedSize / 100)}
lowerLabel={t("pages.logs.diagnostics.gauges.used")}
lowerValue={prettyBytes(diagnostics.v8HeapStats?.usedHeapSizeBytes ?? 0)}
/>
@@ -67,7 +67,7 @@ export const StatGauges = ({ diagnostics }: StatGaugesProps) => {
title={t("pages.logs.diagnostics.gauges.heapUtilization")}
progress={actualHeapUsed}
upperLabel={t("pages.logs.diagnostics.gauges.allocatedPercentage")}
- upperValue={formatPerecentage.format(actualHeapUsed / 100)}
+ upperValue={formatPercentage.format(actualHeapUsed / 100)}
lowerLabel={t("pages.logs.diagnostics.gauges.total")}
lowerValue={prettyBytes(diagnostics.v8HeapStats?.usedHeapSizeBytes ?? 0)}
/>
@@ -75,7 +75,7 @@ export const StatGauges = ({ diagnostics }: StatGaugesProps) => {
title={t("pages.logs.diagnostics.gauges.instantCpuUsage")}
progress={diagnostics.cpuUsage?.usagePercentage ?? 0}
upperLabel={t("pages.logs.diagnostics.gauges.usedSPercentage")}
- upperValue={formatPerecentage.format(
+ upperValue={formatPercentage.format(
(diagnostics.cpuUsage?.usagePercentage ?? 0) / 100
)}
/>
diff --git a/client/src/Pages/Logs/Stats.tsx b/client/src/Pages/Logs/components/Stats.tsx
similarity index 100%
rename from client/src/Pages/Logs/Stats.tsx
rename to client/src/Pages/Logs/components/Stats.tsx
diff --git a/client/src/Pages/Logs/TableJobs.tsx b/client/src/Pages/Logs/components/TableJobs.tsx
similarity index 100%
rename from client/src/Pages/Logs/TableJobs.tsx
rename to client/src/Pages/Logs/components/TableJobs.tsx
diff --git a/client/src/Pages/Logs/TableLogs.tsx b/client/src/Pages/Logs/components/TableLogs.tsx
similarity index 100%
rename from client/src/Pages/Logs/TableLogs.tsx
rename to client/src/Pages/Logs/components/TableLogs.tsx
diff --git a/client/src/Pages/Logs/old.jsx b/client/src/Pages/Logs/old.jsx
deleted file mode 100644
index e5bdf623d..000000000
--- a/client/src/Pages/Logs/old.jsx
+++ /dev/null
@@ -1,50 +0,0 @@
-import Stack from "@mui/material/Stack";
-import Breadcrumbs from "@/Components/v1/Breadcrumbs/index.jsx";
-import Tabs from "@mui/material/Tabs";
-import Tab from "@mui/material/Tab";
-import Queue from "./Queue/index.jsx";
-import LogsComponent from "./Logs/index.jsx";
-import Diagnostics from "./Diagnostics/index.jsx";
-
-import { useTheme } from "@emotion/react";
-import { useTranslation } from "react-i18next";
-import { useState } from "react";
-
-const Logs = () => {
- const { t } = useTranslation();
- const theme = useTheme();
-
- // Local state
- const [value, setValue] = useState(0);
-
- // Handlers
- const handleChange = (event, newValue) => {
- setValue(newValue);
- };
-
- const BREADCRUMBS = [{ name: t("logsPage.title"), path: "/logs" }];
- return (
-
-
-
-
-
-
-
- {value === 0 && }
- {value === 1 && }
- {value === 2 && }
-
- );
-};
-
-export default Logs;