From f490e13b2e0a90ec12699c50e8109f7a2ebbc0bf Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Tue, 4 Mar 2025 11:19:21 -0800 Subject: [PATCH 01/28] remove devices --- src/Components/Sidebar/index.jsx | 2 +- .../Details/Hooks/useSubscribeToDetails.jsx | 68 +------------------ 2 files changed, 3 insertions(+), 67 deletions(-) diff --git a/src/Components/Sidebar/index.jsx b/src/Components/Sidebar/index.jsx index 3b78d9f51..c82f2e5be 100644 --- a/src/Components/Sidebar/index.jsx +++ b/src/Components/Sidebar/index.jsx @@ -63,7 +63,7 @@ const menu = [ { name: "Status pages", path: "status", icon: }, { name: "Maintenance", path: "maintenance", icon: }, - { name: "Integrations", path: "integrations", icon: }, + // { name: "Integrations", path: "integrations", icon: }, { name: "Settings", icon: , diff --git a/src/Pages/DistributedUptime/Details/Hooks/useSubscribeToDetails.jsx b/src/Pages/DistributedUptime/Details/Hooks/useSubscribeToDetails.jsx index 684ae587b..7febdc478 100644 --- a/src/Pages/DistributedUptime/Details/Hooks/useSubscribeToDetails.jsx +++ b/src/Pages/DistributedUptime/Details/Hooks/useSubscribeToDetails.jsx @@ -1,49 +1,6 @@ -import { useState, useEffect, useRef } from "react"; +import { useState, useEffect } from "react"; import { networkService } from "../../../../main"; -const getRandomDevice = () => { - const manufacturers = { - Apple: ["iPhone 15 Pro Max", "iPhone 15", "iPhone 14 Pro", "iPhone 14", "iPhone 13"], - Samsung: [ - "Galaxy S23 Ultra", - "Galaxy S23+", - "Galaxy S23", - "Galaxy Z Fold5", - "Galaxy Z Flip5", - ], - Google: ["Pixel 8 Pro", "Pixel 8", "Pixel 7a", "Pixel 7", "Pixel 6a"], - OnePlus: [ - "OnePlus 11", - "OnePlus 10T", - "OnePlus Nord 3", - "OnePlus 10 Pro", - "OnePlus Nord 2T", - ], - Xiaomi: ["13 Pro", "13", "Redmi Note 12", "POCO F5", "Redmi 12"], - Huawei: ["P60 Pro", "Mate X3", "Nova 11", "P50 Pro", "Mate 50"], - Sony: ["Xperia 1 V", "Xperia 5 V", "Xperia 10 V", "Xperia Pro-I", "Xperia 1 IV"], - Motorola: ["Edge 40 Pro", "Edge 40", "G84", "G54", "Razr 40 Ultra"], - ASUS: [ - "ROG Phone 7", - "Zenfone 10", - "ROG Phone 6", - "Zenfone 9", - "ROG Phone 7 Ultimate", - ], - }; - - const manufacturerNames = Object.keys(manufacturers); - const randomManufacturer = - manufacturerNames[Math.floor(Math.random() * manufacturerNames.length)]; - - const models = manufacturers[randomManufacturer]; - const randomModel = models[Math.floor(Math.random() * models.length)]; - - return { - manufacturer: randomManufacturer, - model: randomModel, - }; -}; const useSubscribeToDetails = ({ monitorId, isPublic, isPublished, dateRange }) => { const [isLoading, setIsLoading] = useState(true); const [connectionStatus, setConnectionStatus] = useState(undefined); @@ -51,9 +8,6 @@ const useSubscribeToDetails = ({ monitorId, isPublic, isPublished, dateRange }) const [networkError, setNetworkError] = useState(false); const [monitor, setMonitor] = useState(undefined); const [lastUpdateTrigger, setLastUpdateTrigger] = useState(0); - const [devices, setDevices] = useState(Array.from({ length: 5 }, getRandomDevice)); - - const prevDateRangeRef = useRef(dateRange); useEffect(() => { if (typeof monitorId === "undefined") { @@ -77,15 +31,7 @@ const useSubscribeToDetails = ({ monitorId, isPublic, isPublished, dateRange }) setNetworkError(false); } setLastUpdateTrigger(Date.now()); - const latestChecksWithDevice = data?.monitor?.latestChecks.map((check, idx) => { - check.device = devices[idx]; - return check; - }); - const monitorWithDevice = { - ...data.monitor, - latestChecks: latestChecksWithDevice, - }; - setMonitor(monitorWithDevice); + setMonitor(data.monitor); }, onOpen: () => { setConnectionStatus("up"); @@ -107,21 +53,11 @@ const useSubscribeToDetails = ({ monitorId, isPublic, isPublished, dateRange }) retryCount, setConnectionStatus, networkError, - devices, isLoading, isPublic, isPublished, ]); - useEffect(() => { - const hasDateRangeChanged = prevDateRangeRef.current !== dateRange; - prevDateRangeRef.current = dateRange; // Update the ref to the current dateRange - - if (!hasDateRangeChanged) { - setDevices(Array.from({ length: 5 }, getRandomDevice)); - } - }, [dateRange]); - return [isLoading, networkError, connectionStatus, monitor, lastUpdateTrigger]; }; From 71569e1d50b6315f1d3d2311e44c0bb3150d15ba Mon Sep 17 00:00:00 2001 From: Aryaman Kumar Sharma Date: Wed, 5 Mar 2025 00:58:43 +0530 Subject: [PATCH 02/28] Fix: Incidents for all monitors --- src/Pages/Incidents/Components/IncidentTable/index.jsx | 3 +++ src/Pages/Incidents/Hooks/useChecksFetch.jsx | 5 +++-- src/Pages/Incidents/Hooks/useMonitorsFetch.jsx | 10 +++++++--- src/Utils/NetworkService.js | 1 + 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/Pages/Incidents/Components/IncidentTable/index.jsx b/src/Pages/Incidents/Components/IncidentTable/index.jsx index ba7a03e05..16adcee16 100644 --- a/src/Pages/Incidents/Components/IncidentTable/index.jsx +++ b/src/Pages/Incidents/Components/IncidentTable/index.jsx @@ -27,8 +27,11 @@ const IncidentTable = ({ //Local state const [page, setPage] = useState(0); const [rowsPerPage, setRowsPerPage] = useState(10); + const selectedMonitorDetails = monitors?.[selectedMonitor]; + const selectedMonitorType = selectedMonitorDetails?.type; const { isLoading, networkError, checks, checksCount } = useChecksFetch({ selectedMonitor, + selectedMonitorType, filter, dateRange, page, diff --git a/src/Pages/Incidents/Hooks/useChecksFetch.jsx b/src/Pages/Incidents/Hooks/useChecksFetch.jsx index 8460a3036..bb1f201b0 100644 --- a/src/Pages/Incidents/Hooks/useChecksFetch.jsx +++ b/src/Pages/Incidents/Hooks/useChecksFetch.jsx @@ -2,7 +2,7 @@ import { useState, useEffect } from "react"; import { networkService } from "../../../main"; import { createToast } from "../../../Utils/toastUtils"; import { useSelector } from "react-redux"; -const useChecksFetch = ({ selectedMonitor, filter, dateRange, page, rowsPerPage }) => { +const useChecksFetch = ({ selectedMonitor, selectedMonitorType, filter, dateRange, page, rowsPerPage }) => { //Redux const { user } = useSelector((state) => state.auth); @@ -33,6 +33,7 @@ const useChecksFetch = ({ selectedMonitor, filter, dateRange, page, rowsPerPage res = await networkService.getChecksByMonitor({ status: false, monitorId: selectedMonitor, + type: selectedMonitorType, sortOrder: "desc", limit: null, dateRange, @@ -51,7 +52,7 @@ const useChecksFetch = ({ selectedMonitor, filter, dateRange, page, rowsPerPage } }; fetchChecks(); - }, [user, dateRange, page, rowsPerPage, filter, selectedMonitor]); + }, [user, dateRange, page, rowsPerPage, filter, selectedMonitor, selectedMonitorType]); return { isLoading, networkError, checks, checksCount }; }; diff --git a/src/Pages/Incidents/Hooks/useMonitorsFetch.jsx b/src/Pages/Incidents/Hooks/useMonitorsFetch.jsx index 3d80a89c7..fcf729cee 100644 --- a/src/Pages/Incidents/Hooks/useMonitorsFetch.jsx +++ b/src/Pages/Incidents/Hooks/useMonitorsFetch.jsx @@ -25,9 +25,13 @@ const useMonitorsFetch = ({ teamId }) => { field: null, order: null, }); - if (res?.data?.data?.monitors?.length > 0) { - const monitorLookup = res.data.data.monitors.reduce((acc, monitor) => { - acc[monitor._id] = monitor; + if (res?.data?.data?.filteredMonitors?.length > 0) { + const monitorLookup = res.data.data.filteredMonitors.reduce((acc, monitor) => { + acc[monitor._id] = { + _id: monitor._id, + name: monitor.name, + type: monitor.type + }; return acc; }, {}); setMonitors(monitorLookup); diff --git a/src/Utils/NetworkService.js b/src/Utils/NetworkService.js index 1f6a36726..8925ead1e 100644 --- a/src/Utils/NetworkService.js +++ b/src/Utils/NetworkService.js @@ -567,6 +567,7 @@ class NetworkService { async getChecksByMonitor(config) { const params = new URLSearchParams(); + if (config.type) params.append("type", config.type); if (config.sortOrder) params.append("sortOrder", config.sortOrder); if (config.limit) params.append("limit", config.limit); if (config.dateRange) params.append("dateRange", config.dateRange); From a2c35c903bff01edffae7401a936c5aa0d4f3edd Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Tue, 4 Mar 2025 11:52:50 -0800 Subject: [PATCH 03/28] add getDistributedUptimeDetails --- src/Utils/NetworkService.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Utils/NetworkService.js b/src/Utils/NetworkService.js index 1f6a36726..c15a816e0 100644 --- a/src/Utils/NetworkService.js +++ b/src/Utils/NetworkService.js @@ -897,6 +897,15 @@ class NetworkService { }; } + getDistributedUptimeDetails(config) { + const params = new URLSearchParams(); + const { monitorId, onUpdate, onOpen, onError, dateRange, normalize } = config; + if (dateRange) params.append("dateRange", dateRange); + if (normalize) params.append("normalize", normalize); + const url = `${this.axiosInstance.defaults.baseURL}/distributed-uptime/monitors/details/${monitorId}/initial?${params.toString()}`; + return this.axiosInstance.get(url); + } + subscribeToDistributedUptimeDetails(config) { const params = new URLSearchParams(); const { monitorId, onUpdate, onOpen, onError, dateRange, normalize } = config; From ceedf231bda3cd7b53ebf644b5d286c07fbf57ca Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Tue, 4 Mar 2025 11:53:04 -0800 Subject: [PATCH 04/28] fetch initial data --- .../Details/Hooks/useSubscribeToDetails.jsx | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/Pages/DistributedUptime/Details/Hooks/useSubscribeToDetails.jsx b/src/Pages/DistributedUptime/Details/Hooks/useSubscribeToDetails.jsx index 7febdc478..99e048e26 100644 --- a/src/Pages/DistributedUptime/Details/Hooks/useSubscribeToDetails.jsx +++ b/src/Pages/DistributedUptime/Details/Hooks/useSubscribeToDetails.jsx @@ -1,5 +1,6 @@ import { useState, useEffect } from "react"; import { networkService } from "../../../../main"; +import { createToast } from "../../../../Utils/toastUtils"; const useSubscribeToDetails = ({ monitorId, isPublic, isPublished, dateRange }) => { const [isLoading, setIsLoading] = useState(true); @@ -18,6 +19,35 @@ const useSubscribeToDetails = ({ monitorId, isPublic, isPublished, dateRange }) return; } + // Get initial data + + const fetchInitialData = async () => { + try { + const res = await networkService.getDistributedUptimeDetails({ + monitorId, + dateRange: dateRange, + normalize: true, + }); + const responseData = res?.data?.data; + + if (typeof responseData === "undefined") { + throw new Error("No data"); + } + + setLastUpdateTrigger(Date.now()); + setMonitor(responseData); + } catch (error) { + setNetworkError(true); + createToast({ + body: error.message, + }); + } finally { + setIsLoading(false); + } + }; + + fetchInitialData(); + try { const cleanup = networkService.subscribeToDistributedUptimeDetails({ monitorId, From 32260355891144eaf40093e7f1317e44a7ec78d9 Mon Sep 17 00:00:00 2001 From: Owaise Imdad Date: Wed, 5 Mar 2025 09:11:15 +0530 Subject: [PATCH 05/28] fix-1847 truncate fix for selection component. --- src/Components/Inputs/Select/index.jsx | 38 ++++++++++++++++++++++++++ src/Utils/truncateUtils.jsx | 32 ++++++++++++++++++++++ 2 files changed, 70 insertions(+) create mode 100644 src/Utils/truncateUtils.jsx diff --git a/src/Components/Inputs/Select/index.jsx b/src/Components/Inputs/Select/index.jsx index f0a1d11c0..f6accc415 100644 --- a/src/Components/Inputs/Select/index.jsx +++ b/src/Components/Inputs/Select/index.jsx @@ -4,6 +4,8 @@ import { MenuItem, Select as MuiSelect, Stack, Typography } from "@mui/material" import KeyboardArrowDownIcon from "@mui/icons-material/KeyboardArrowDown"; import "./index.css"; +import { useEffect, useRef, useState } from "react"; +import { renderTruncatedValue } from "../../../Utils/truncateUtils.jsx"; /** * @component @@ -50,7 +52,12 @@ const Select = ({ sx, name = "", labelControlSpacing = 2, + truncate = false, + maxStringLength = 10, }) => { + const [maxLength, setMaxLength] = useState(0); // Initially set maxLength to 0 + const selectRef = useRef(null); // Reference for the Select container + const theme = useTheme(); const itemStyles = { fontSize: "var(--env-var-font-size-medium)", @@ -59,6 +66,31 @@ const Select = ({ margin: theme.spacing(2), }; + // Dynamically adjust maxLength based on window width + useEffect(() => { + if (!truncate) return; // If truncate is false, do not run this effect + + const calculateMaxLength = () => { + console.log(selectRef); + if (selectRef.current) { + const width = selectRef.current.offsetWidth; + const calculatedMaxLength = Math.floor(width / maxStringLength); + setMaxLength(calculatedMaxLength); + } + }; + calculateMaxLength(); + window.addEventListener("resize", calculateMaxLength); + + return () => { + window.removeEventListener("resize", calculateMaxLength); // Cleanup on unmount + }; + }, [maxStringLength, truncate]); + + // Get the selected item's name + const selectedItemName = truncate + ? items.find((item) => item._id === value)?.name // Only calculate if truncate is true + : null; + return ( )} + renderTruncatedValue(selectedItemName, truncate, maxLength, placeholder) + } > {placeholder && ( {truncateTextWithDottedEnds(displayName, maxLength)} + ) : ( + {displayName} + ); +}; From a7a8bb2ea8dcb717102b6d3f2116ea3fd942f6e5 Mon Sep 17 00:00:00 2001 From: Owaise Imdad Date: Wed, 5 Mar 2025 09:16:49 +0530 Subject: [PATCH 06/28] removed all console logs. --- src/Components/Inputs/Select/index.jsx | 1 - src/Utils/truncateUtils.jsx | 1 - 2 files changed, 2 deletions(-) diff --git a/src/Components/Inputs/Select/index.jsx b/src/Components/Inputs/Select/index.jsx index f6accc415..ec5f2d012 100644 --- a/src/Components/Inputs/Select/index.jsx +++ b/src/Components/Inputs/Select/index.jsx @@ -71,7 +71,6 @@ const Select = ({ if (!truncate) return; // If truncate is false, do not run this effect const calculateMaxLength = () => { - console.log(selectRef); if (selectRef.current) { const width = selectRef.current.offsetWidth; const calculatedMaxLength = Math.floor(width / maxStringLength); diff --git a/src/Utils/truncateUtils.jsx b/src/Utils/truncateUtils.jsx index 3bb38e9e2..2474bae4f 100644 --- a/src/Utils/truncateUtils.jsx +++ b/src/Utils/truncateUtils.jsx @@ -21,7 +21,6 @@ export const renderTruncatedValue = function ( maxLength, placeholder ) { - console.log(maxLength); if (isEmpty(displayName)) return placeholder; return truncate ? ( From 3376186ff34ddf533c87763a480eb53ed33a8b86 Mon Sep 17 00:00:00 2001 From: Owaise Imdad Date: Wed, 5 Mar 2025 09:21:08 +0530 Subject: [PATCH 07/28] Refactored the code. --- src/Components/Inputs/Select/index.jsx | 5 ++--- src/Utils/truncateUtils.jsx | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Components/Inputs/Select/index.jsx b/src/Components/Inputs/Select/index.jsx index ec5f2d012..a3d0a5608 100644 --- a/src/Components/Inputs/Select/index.jsx +++ b/src/Components/Inputs/Select/index.jsx @@ -55,8 +55,8 @@ const Select = ({ truncate = false, maxStringLength = 10, }) => { - const [maxLength, setMaxLength] = useState(0); // Initially set maxLength to 0 - const selectRef = useRef(null); // Reference for the Select container + const [maxLength, setMaxLength] = useState(0); + const selectRef = useRef(null); const theme = useTheme(); const itemStyles = { @@ -85,7 +85,6 @@ const Select = ({ }; }, [maxStringLength, truncate]); - // Get the selected item's name const selectedItemName = truncate ? items.find((item) => item._id === value)?.name // Only calculate if truncate is true : null; diff --git a/src/Utils/truncateUtils.jsx b/src/Utils/truncateUtils.jsx index 2474bae4f..579b71622 100644 --- a/src/Utils/truncateUtils.jsx +++ b/src/Utils/truncateUtils.jsx @@ -1,5 +1,5 @@ // src/utils/truncateUtils.js -import { isEmpty } from "./stringUtils"; // assuming you have the stringUtils file +import { isEmpty } from "./stringUtils"; /** * Utility function to render a truncated value with an optional title. From 14b5cfc053444b06471cae06e086be98c9dcbbda Mon Sep 17 00:00:00 2001 From: Owaise Imdad Date: Wed, 5 Mar 2025 11:22:45 +0530 Subject: [PATCH 08/28] selectedItemName value to empty --- src/Components/Inputs/Select/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Components/Inputs/Select/index.jsx b/src/Components/Inputs/Select/index.jsx index a3d0a5608..91d08cf18 100644 --- a/src/Components/Inputs/Select/index.jsx +++ b/src/Components/Inputs/Select/index.jsx @@ -87,7 +87,7 @@ const Select = ({ const selectedItemName = truncate ? items.find((item) => item._id === value)?.name // Only calculate if truncate is true - : null; + : ""; return ( Date: Wed, 5 Mar 2025 21:03:03 +0530 Subject: [PATCH 09/28] Changed the logic to only depend on css styles and typography component. --- src/Components/Inputs/Select/index.jsx | 60 ++++++++----------- .../Components/OptionsHeader/index.jsx | 1 - src/Utils/truncateUtils.jsx | 31 ---------- 3 files changed, 24 insertions(+), 68 deletions(-) delete mode 100644 src/Utils/truncateUtils.jsx diff --git a/src/Components/Inputs/Select/index.jsx b/src/Components/Inputs/Select/index.jsx index 91d08cf18..0d183d4e3 100644 --- a/src/Components/Inputs/Select/index.jsx +++ b/src/Components/Inputs/Select/index.jsx @@ -4,8 +4,6 @@ import { MenuItem, Select as MuiSelect, Stack, Typography } from "@mui/material" import KeyboardArrowDownIcon from "@mui/icons-material/KeyboardArrowDown"; import "./index.css"; -import { useEffect, useRef, useState } from "react"; -import { renderTruncatedValue } from "../../../Utils/truncateUtils.jsx"; /** * @component @@ -52,12 +50,8 @@ const Select = ({ sx, name = "", labelControlSpacing = 2, - truncate = false, - maxStringLength = 10, + maxWidthValue = 250, }) => { - const [maxLength, setMaxLength] = useState(0); - const selectRef = useRef(null); - const theme = useTheme(); const itemStyles = { fontSize: "var(--env-var-font-size-medium)", @@ -66,29 +60,6 @@ const Select = ({ margin: theme.spacing(2), }; - // Dynamically adjust maxLength based on window width - useEffect(() => { - if (!truncate) return; // If truncate is false, do not run this effect - - const calculateMaxLength = () => { - if (selectRef.current) { - const width = selectRef.current.offsetWidth; - const calculatedMaxLength = Math.floor(width / maxStringLength); - setMaxLength(calculatedMaxLength); - } - }; - calculateMaxLength(); - window.addEventListener("resize", calculateMaxLength); - - return () => { - window.removeEventListener("resize", calculateMaxLength); // Cleanup on unmount - }; - }, [maxStringLength, truncate]); - - const selectedItemName = truncate - ? items.find((item) => item._id === value)?.name // Only calculate if truncate is true - : ""; - return ( )} - renderTruncatedValue(selectedItemName, truncate, maxLength, placeholder) - } + renderValue={(selected) => { + const selectedItem = items.find((item) => item._id === selected); + const displayName = selectedItem ? selectedItem.name : placeholder; + return ( + + {displayName} + + ); + }} > {placeholder && ( diff --git a/src/Utils/truncateUtils.jsx b/src/Utils/truncateUtils.jsx deleted file mode 100644 index 579b71622..000000000 --- a/src/Utils/truncateUtils.jsx +++ /dev/null @@ -1,31 +0,0 @@ -// src/utils/truncateUtils.js -import { isEmpty } from "./stringUtils"; - -/** - * Utility function to render a truncated value with an optional title. - * @param {string} displayName - The name or text to display. - * @param {number} maxLength - The maximum length of the text. - * @param {string} placeholder - Placeholder text if no value is provided. - * @returns {JSX.Element} - The JSX element for the rendered value. - * - */ - -const truncateTextWithDottedEnds = function (text, maxLength) { - if (!text || text.length <= maxLength) return text; - return `${text.substring(0, maxLength)}...`; -}; - -export const renderTruncatedValue = function ( - displayName, - truncate, - maxLength, - placeholder -) { - if (isEmpty(displayName)) return placeholder; - - return truncate ? ( - {truncateTextWithDottedEnds(displayName, maxLength)} - ) : ( - {displayName} - ); -}; From 6df3b985af7248a8cd8e9571c76f79918313d472 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 5 Mar 2025 17:46:51 +0000 Subject: [PATCH 10/28] Update material-ui monorepo --- package-lock.json | 50 +++++++++++++++++++++++------------------------ package.json | 6 +++--- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8921c721d..babcadf5c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,9 +12,9 @@ "@emotion/styled": "^11.13.0", "@fontsource/roboto": "^5.0.13", "@hello-pangea/dnd": "^18.0.0", - "@mui/icons-material": "6.4.6", - "@mui/lab": "6.0.0-beta.29", - "@mui/material": "6.4.6", + "@mui/icons-material": "6.4.7", + "@mui/lab": "6.0.0-beta.30", + "@mui/material": "6.4.7", "@mui/x-charts": "^7.5.1", "@mui/x-data-grid": "7.27.2", "@mui/x-date-pickers": "7.27.1", @@ -3516,9 +3516,9 @@ } }, "node_modules/@mui/core-downloads-tracker": { - "version": "6.4.6", - "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-6.4.6.tgz", - "integrity": "sha512-rho5Q4IscbrVmK9rCrLTJmjLjfH6m/NcqKr/mchvck0EIXlyYUB9+Z0oVmkt/+Mben43LMRYBH8q/Uzxj/c4Vw==", + "version": "6.4.7", + "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-6.4.7.tgz", + "integrity": "sha512-XjJrKFNt9zAKvcnoIIBquXyFyhfrHYuttqMsoDS7lM7VwufYG4fAPw4kINjBFg++fqXM2BNAuWR9J7XVIuKIKg==", "license": "MIT", "funding": { "type": "opencollective", @@ -3526,9 +3526,9 @@ } }, "node_modules/@mui/icons-material": { - "version": "6.4.6", - "resolved": "https://registry.npmjs.org/@mui/icons-material/-/icons-material-6.4.6.tgz", - "integrity": "sha512-rGJBvIQQbQAlyKYljHQ8wAQS/K2/uYwvemcpygnAmCizmCI4zSF9HQPuiG8Ql4YLZ6V/uKjA3WHIYmF/8sV+pQ==", + "version": "6.4.7", + "resolved": "https://registry.npmjs.org/@mui/icons-material/-/icons-material-6.4.7.tgz", + "integrity": "sha512-Rk8cs9ufQoLBw582Rdqq7fnSXXZTqhYRbpe1Y5SAz9lJKZP3CIdrj0PfG8HJLGw1hrsHFN/rkkm70IDzhJsG1g==", "license": "MIT", "dependencies": { "@babel/runtime": "^7.26.0" @@ -3541,7 +3541,7 @@ "url": "https://opencollective.com/mui-org" }, "peerDependencies": { - "@mui/material": "^6.4.6", + "@mui/material": "^6.4.7", "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", "react": "^17.0.0 || ^18.0.0 || ^19.0.0" }, @@ -3552,14 +3552,14 @@ } }, "node_modules/@mui/lab": { - "version": "6.0.0-beta.29", - "resolved": "https://registry.npmjs.org/@mui/lab/-/lab-6.0.0-beta.29.tgz", - "integrity": "sha512-C5nTm9xfzVi4Zz4DLrZq1Kn+cQ2fGZmSJxyoUbOu+jDPlLZrUpSsgxEkkbjJB5dasiv6fgGKhO3EaKKyfobLAQ==", + "version": "6.0.0-beta.30", + "resolved": "https://registry.npmjs.org/@mui/lab/-/lab-6.0.0-beta.30.tgz", + "integrity": "sha512-ayDYkzTlkm5cnDGa10bvuFygX+2b9Hm1T4QZYMqV8+nSx3frKE0TLAbE7/qQ4vInOO5E4aOkHVBwZjyO+UbMTA==", "license": "MIT", "dependencies": { "@babel/runtime": "^7.26.0", "@mui/base": "5.0.0-beta.69", - "@mui/system": "^6.4.6", + "@mui/system": "^6.4.7", "@mui/types": "^7.2.21", "@mui/utils": "^6.4.6", "clsx": "^2.1.1", @@ -3575,8 +3575,8 @@ "peerDependencies": { "@emotion/react": "^11.5.0", "@emotion/styled": "^11.3.0", - "@mui/material": "^6.4.6", - "@mui/material-pigment-css": "^6.4.6", + "@mui/material": "^6.4.7", + "@mui/material-pigment-css": "^6.4.7", "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", "react": "^17.0.0 || ^18.0.0 || ^19.0.0", "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0" @@ -3597,14 +3597,14 @@ } }, "node_modules/@mui/material": { - "version": "6.4.6", - "resolved": "https://registry.npmjs.org/@mui/material/-/material-6.4.6.tgz", - "integrity": "sha512-6UyAju+DBOdMogfYmLiT3Nu7RgliorimNBny1pN/acOjc+THNFVE7hlxLyn3RDONoZJNDi/8vO4AQQr6dLAXqA==", + "version": "6.4.7", + "resolved": "https://registry.npmjs.org/@mui/material/-/material-6.4.7.tgz", + "integrity": "sha512-K65StXUeGAtFJ4ikvHKtmDCO5Ab7g0FZUu2J5VpoKD+O6Y3CjLYzRi+TMlI3kaL4CL158+FccMoOd/eaddmeRQ==", "license": "MIT", "dependencies": { "@babel/runtime": "^7.26.0", - "@mui/core-downloads-tracker": "^6.4.6", - "@mui/system": "^6.4.6", + "@mui/core-downloads-tracker": "^6.4.7", + "@mui/system": "^6.4.7", "@mui/types": "^7.2.21", "@mui/utils": "^6.4.6", "@popperjs/core": "^2.11.8", @@ -3625,7 +3625,7 @@ "peerDependencies": { "@emotion/react": "^11.5.0", "@emotion/styled": "^11.3.0", - "@mui/material-pigment-css": "^6.4.6", + "@mui/material-pigment-css": "^6.4.7", "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", "react": "^17.0.0 || ^18.0.0 || ^19.0.0", "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0" @@ -3713,9 +3713,9 @@ } }, "node_modules/@mui/system": { - "version": "6.4.6", - "resolved": "https://registry.npmjs.org/@mui/system/-/system-6.4.6.tgz", - "integrity": "sha512-FQjWwPec7pMTtB/jw5f9eyLynKFZ6/Ej9vhm5kGdtmts1z5b7Vyn3Rz6kasfYm1j2TfrfGnSXRvvtwVWxjpz6g==", + "version": "6.4.7", + "resolved": "https://registry.npmjs.org/@mui/system/-/system-6.4.7.tgz", + "integrity": "sha512-7wwc4++Ak6tGIooEVA9AY7FhH2p9fvBMORT4vNLMAysH3Yus/9B9RYMbrn3ANgsOyvT3Z7nE+SP8/+3FimQmcg==", "license": "MIT", "dependencies": { "@babel/runtime": "^7.26.0", diff --git a/package.json b/package.json index 86d69c015..60d1abaa1 100644 --- a/package.json +++ b/package.json @@ -18,9 +18,9 @@ "@mui/x-charts": "^7.5.1", "@mui/x-data-grid": "7.27.2", "@mui/x-date-pickers": "7.27.1", - "@mui/icons-material": "6.4.6", - "@mui/lab": "6.0.0-beta.29", - "@mui/material": "6.4.6", + "@mui/icons-material": "6.4.7", + "@mui/lab": "6.0.0-beta.30", + "@mui/material": "6.4.7", "@reduxjs/toolkit": "2.6.0", "@solana/wallet-adapter-base": "0.9.23", "@solana/wallet-adapter-material-ui": "0.16.34", From 5c0c33a339843e69b3574a184ade5da44e5073ba Mon Sep 17 00:00:00 2001 From: Owaise Imdad Date: Thu, 6 Mar 2025 00:27:37 +0530 Subject: [PATCH 11/28] Made maxwidth to be default 100% and if the number is provided then we truncate. --- src/Components/Inputs/Select/index.jsx | 18 ++++++++++-------- .../Components/OptionsHeader/index.jsx | 1 + 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/Components/Inputs/Select/index.jsx b/src/Components/Inputs/Select/index.jsx index 0d183d4e3..1cb35c19c 100644 --- a/src/Components/Inputs/Select/index.jsx +++ b/src/Components/Inputs/Select/index.jsx @@ -50,7 +50,7 @@ const Select = ({ sx, name = "", labelControlSpacing = 2, - maxWidthValue = 250, + maxWidth, }) => { const theme = useTheme(); const itemStyles = { @@ -60,6 +60,13 @@ const Select = ({ margin: theme.spacing(2), }; + const responsiveMaxWidth = { + xs: `${maxWidth * 0.5}px`, + sm: `${maxWidth * 0.75}px`, + md: `${maxWidth * 0.9}px`, + lg: `${maxWidth}px`, + }; + return ( From 5ac2bfe7b551ba8c768d9f5d11f317518a226007 Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Wed, 5 Mar 2025 11:19:18 -0800 Subject: [PATCH 12/28] add recent date format --- src/Components/Charts/Utils/chartUtilFunctions.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Components/Charts/Utils/chartUtilFunctions.js b/src/Components/Charts/Utils/chartUtilFunctions.js index 70f5ac9c3..d8ec6cdb6 100644 --- a/src/Components/Charts/Utils/chartUtilFunctions.js +++ b/src/Components/Charts/Utils/chartUtilFunctions.js @@ -13,6 +13,7 @@ export const tooltipDateFormatLookup = (dateRange) => { export const tickDateFormatLookup = (dateRange) => { const tickFormatLookup = { + recent: "h:mm A", day: "h:mm A", week: "MM/D, h:mm A", month: "ddd. M/D", From 65343e1e4b5ab8e630e3c93e0ffc71b29f294470 Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Wed, 5 Mar 2025 11:19:48 -0800 Subject: [PATCH 13/28] Add recent to header --- src/Components/MonitorTimeFrameHeader/index.jsx | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/Components/MonitorTimeFrameHeader/index.jsx b/src/Components/MonitorTimeFrameHeader/index.jsx index e43d63494..9ac8b8b6a 100644 --- a/src/Components/MonitorTimeFrameHeader/index.jsx +++ b/src/Components/MonitorTimeFrameHeader/index.jsx @@ -20,6 +20,13 @@ const MonitorTimeFrameHeader = ({ if (hasDateRange) { timeFramePicker = ( +