Merge branch 'develop' into new-uptime-time-range

This commit is contained in:
karenvicent committed 2026-01-14 22:50:58 -05:00
commit e306499bce
324 files changed
+10262 -5545

No files matched your search

+2
View File
@@ -1,3 +1,5 @@
.idea .idea
.vscode .vscode
.VSCodeCounter .VSCodeCounter
*.sh
mongo
+1
View File
@@ -29,3 +29,4 @@ dist-ssr
# Scripts # Scripts
*.sh *.sh
!env.sh !env.sh
.env.development
+624 -20
View File
@@ -97,6 +97,7 @@
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.27.1.tgz", "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.27.1.tgz",
"integrity": "sha512-IaaGWsQqfsQWVLqMn9OB92MNN7zukfVA4s7KKAI0KfrrDsZ0yhi5uV4baBuLuN7n3vsZpwP8asPPcVwApxvjBQ==", "integrity": "sha512-IaaGWsQqfsQWVLqMn9OB92MNN7zukfVA4s7KKAI0KfrrDsZ0yhi5uV4baBuLuN7n3vsZpwP8asPPcVwApxvjBQ==",
"license": "MIT", "license": "MIT",
"peer": true,
"dependencies": { "dependencies": {
"@ampproject/remapping": "^2.2.0", "@ampproject/remapping": "^2.2.0",
"@babel/code-frame": "^7.27.1", "@babel/code-frame": "^7.27.1",
@@ -408,6 +409,7 @@
"resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.14.0.tgz", "resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.14.0.tgz",
"integrity": "sha512-O000MLDBDdk/EohJPFUqvnp4qnHeYkVP5B0xEG0D/L7cOKP9kefu2DXn8dj74cQfsEzUqh+sr1RzFqiL1o+PpA==", "integrity": "sha512-O000MLDBDdk/EohJPFUqvnp4qnHeYkVP5B0xEG0D/L7cOKP9kefu2DXn8dj74cQfsEzUqh+sr1RzFqiL1o+PpA==",
"license": "MIT", "license": "MIT",
"peer": true,
"dependencies": { "dependencies": {
"@babel/runtime": "^7.18.3", "@babel/runtime": "^7.18.3",
"@emotion/babel-plugin": "^11.13.5", "@emotion/babel-plugin": "^11.13.5",
@@ -451,6 +453,7 @@
"resolved": "https://registry.npmjs.org/@emotion/styled/-/styled-11.14.0.tgz", "resolved": "https://registry.npmjs.org/@emotion/styled/-/styled-11.14.0.tgz",
"integrity": "sha512-XxfOnXFffatap2IyCeJyNov3kiDQWoR08gPUQxvbL7fxKryGBKUZUkG6Hz48DZwVrJSVh9sJboyV1Ds4OW6SgA==", "integrity": "sha512-XxfOnXFffatap2IyCeJyNov3kiDQWoR08gPUQxvbL7fxKryGBKUZUkG6Hz48DZwVrJSVh9sJboyV1Ds4OW6SgA==",
"license": "MIT", "license": "MIT",
"peer": true,
"dependencies": { "dependencies": {
"@babel/runtime": "^7.18.3", "@babel/runtime": "^7.18.3",
"@emotion/babel-plugin": "^11.13.5", "@emotion/babel-plugin": "^11.13.5",
@@ -496,6 +499,262 @@
"integrity": "sha512-snKqtPW01tN0ui7yu9rGv69aJXr/a/Ywvl11sUjNtEcRc+ng/mQriFL0wLXMef74iHa/EkftbDzU9F8iFbH+zg==", "integrity": "sha512-snKqtPW01tN0ui7yu9rGv69aJXr/a/Ywvl11sUjNtEcRc+ng/mQriFL0wLXMef74iHa/EkftbDzU9F8iFbH+zg==",
"license": "MIT" "license": "MIT"
}, },
"node_modules/@esbuild/aix-ppc64": {
"version": "0.25.5",
"resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.5.tgz",
"integrity": "sha512-9o3TMmpmftaCMepOdA5k/yDw8SfInyzWWTjYTFCX3kPSDJMROQTb8jg+h9Cnwnmm1vOzvxN7gIfB5V2ewpjtGA==",
"cpu": [
"ppc64"
],
"license": "MIT",
"optional": true,
"os": [
"aix"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/android-arm": {
"version": "0.25.5",
"resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.5.tgz",
"integrity": "sha512-AdJKSPeEHgi7/ZhuIPtcQKr5RQdo6OO2IL87JkianiMYMPbCtot9fxPbrMiBADOWWm3T2si9stAiVsGbTQFkbA==",
"cpu": [
"arm"
],
"license": "MIT",
"optional": true,
"os": [
"android"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/android-arm64": {
"version": "0.25.5",
"resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.5.tgz",
"integrity": "sha512-VGzGhj4lJO+TVGV1v8ntCZWJktV7SGCs3Pn1GRWI1SBFtRALoomm8k5E9Pmwg3HOAal2VDc2F9+PM/rEY6oIDg==",
"cpu": [
"arm64"
],
"license": "MIT",
"optional": true,
"os": [
"android"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/android-x64": {
"version": "0.25.5",
"resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.5.tgz",
"integrity": "sha512-D2GyJT1kjvO//drbRT3Hib9XPwQeWd9vZoBJn+bu/lVsOZ13cqNdDeqIF/xQ5/VmWvMduP6AmXvylO/PIc2isw==",
"cpu": [
"x64"
],
"license": "MIT",
"optional": true,
"os": [
"android"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/darwin-arm64": {
"version": "0.25.5",
"resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.5.tgz",
"integrity": "sha512-GtaBgammVvdF7aPIgH2jxMDdivezgFu6iKpmT+48+F8Hhg5J/sfnDieg0aeG/jfSvkYQU2/pceFPDKlqZzwnfQ==",
"cpu": [
"arm64"
],
"license": "MIT",
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/darwin-x64": {
"version": "0.25.5",
"resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.5.tgz",
"integrity": "sha512-1iT4FVL0dJ76/q1wd7XDsXrSW+oLoquptvh4CLR4kITDtqi2e/xwXwdCVH8hVHU43wgJdsq7Gxuzcs6Iq/7bxQ==",
"cpu": [
"x64"
],
"license": "MIT",
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/freebsd-arm64": {
"version": "0.25.5",
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.5.tgz",
"integrity": "sha512-nk4tGP3JThz4La38Uy/gzyXtpkPW8zSAmoUhK9xKKXdBCzKODMc2adkB2+8om9BDYugz+uGV7sLmpTYzvmz6Sw==",
"cpu": [
"arm64"
],
"license": "MIT",
"optional": true,
"os": [
"freebsd"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/freebsd-x64": {
"version": "0.25.5",
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.5.tgz",
"integrity": "sha512-PrikaNjiXdR2laW6OIjlbeuCPrPaAl0IwPIaRv+SMV8CiM8i2LqVUHFC1+8eORgWyY7yhQY+2U2fA55mBzReaw==",
"cpu": [
"x64"
],
"license": "MIT",
"optional": true,
"os": [
"freebsd"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/linux-arm": {
"version": "0.25.5",
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.5.tgz",
"integrity": "sha512-cPzojwW2okgh7ZlRpcBEtsX7WBuqbLrNXqLU89GxWbNt6uIg78ET82qifUy3W6OVww6ZWobWub5oqZOVtwolfw==",
"cpu": [
"arm"
],
"license": "MIT",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/linux-arm64": {
"version": "0.25.5",
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.5.tgz",
"integrity": "sha512-Z9kfb1v6ZlGbWj8EJk9T6czVEjjq2ntSYLY2cw6pAZl4oKtfgQuS4HOq41M/BcoLPzrUbNd+R4BXFyH//nHxVg==",
"cpu": [
"arm64"
],
"license": "MIT",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/linux-ia32": {
"version": "0.25.5",
"resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.5.tgz",
"integrity": "sha512-sQ7l00M8bSv36GLV95BVAdhJ2QsIbCuCjh/uYrWiMQSUuV+LpXwIqhgJDcvMTj+VsQmqAHL2yYaasENvJ7CDKA==",
"cpu": [
"ia32"
],
"license": "MIT",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/linux-loong64": {
"version": "0.25.5",
"resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.5.tgz",
"integrity": "sha512-0ur7ae16hDUC4OL5iEnDb0tZHDxYmuQyhKhsPBV8f99f6Z9KQM02g33f93rNH5A30agMS46u2HP6qTdEt6Q1kg==",
"cpu": [
"loong64"
],
"license": "MIT",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/linux-mips64el": {
"version": "0.25.5",
"resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.5.tgz",
"integrity": "sha512-kB/66P1OsHO5zLz0i6X0RxlQ+3cu0mkxS3TKFvkb5lin6uwZ/ttOkP3Z8lfR9mJOBk14ZwZ9182SIIWFGNmqmg==",
"cpu": [
"mips64el"
],
"license": "MIT",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/linux-ppc64": {
"version": "0.25.5",
"resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.5.tgz",
"integrity": "sha512-UZCmJ7r9X2fe2D6jBmkLBMQetXPXIsZjQJCjgwpVDz+YMcS6oFR27alkgGv3Oqkv07bxdvw7fyB71/olceJhkQ==",
"cpu": [
"ppc64"
],
"license": "MIT",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/linux-riscv64": {
"version": "0.25.5",
"resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.5.tgz",
"integrity": "sha512-kTxwu4mLyeOlsVIFPfQo+fQJAV9mh24xL+y+Bm6ej067sYANjyEw1dNHmvoqxJUCMnkBdKpvOn0Ahql6+4VyeA==",
"cpu": [
"riscv64"
],
"license": "MIT",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/linux-s390x": {
"version": "0.25.5",
"resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.5.tgz",
"integrity": "sha512-K2dSKTKfmdh78uJ3NcWFiqyRrimfdinS5ErLSn3vluHNeHVnBAFWC8a4X5N+7FgVE1EjXS1QDZbpqZBjfrqMTQ==",
"cpu": [
"s390x"
],
"license": "MIT",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/linux-x64": { "node_modules/@esbuild/linux-x64": {
"version": "0.25.5", "version": "0.25.5",
"resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.5.tgz", "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.5.tgz",
@@ -512,6 +771,134 @@
"node": ">=18" "node": ">=18"
} }
}, },
"node_modules/@esbuild/netbsd-arm64": {
"version": "0.25.5",
"resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.5.tgz",
"integrity": "sha512-pwHtMP9viAy1oHPvgxtOv+OkduK5ugofNTVDilIzBLpoWAM16r7b/mxBvfpuQDpRQFMfuVr5aLcn4yveGvBZvw==",
"cpu": [
"arm64"
],
"license": "MIT",
"optional": true,
"os": [
"netbsd"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/netbsd-x64": {
"version": "0.25.5",
"resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.5.tgz",
"integrity": "sha512-WOb5fKrvVTRMfWFNCroYWWklbnXH0Q5rZppjq0vQIdlsQKuw6mdSihwSo4RV/YdQ5UCKKvBy7/0ZZYLBZKIbwQ==",
"cpu": [
"x64"
],
"license": "MIT",
"optional": true,
"os": [
"netbsd"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/openbsd-arm64": {
"version": "0.25.5",
"resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.5.tgz",
"integrity": "sha512-7A208+uQKgTxHd0G0uqZO8UjK2R0DDb4fDmERtARjSHWxqMTye4Erz4zZafx7Di9Cv+lNHYuncAkiGFySoD+Mw==",
"cpu": [
"arm64"
],
"license": "MIT",
"optional": true,
"os": [
"openbsd"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/openbsd-x64": {
"version": "0.25.5",
"resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.5.tgz",
"integrity": "sha512-G4hE405ErTWraiZ8UiSoesH8DaCsMm0Cay4fsFWOOUcz8b8rC6uCvnagr+gnioEjWn0wC+o1/TAHt+It+MpIMg==",
"cpu": [
"x64"
],
"license": "MIT",
"optional": true,
"os": [
"openbsd"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/sunos-x64": {
"version": "0.25.5",
"resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.5.tgz",
"integrity": "sha512-l+azKShMy7FxzY0Rj4RCt5VD/q8mG/e+mDivgspo+yL8zW7qEwctQ6YqKX34DTEleFAvCIUviCFX1SDZRSyMQA==",
"cpu": [
"x64"
],
"license": "MIT",
"optional": true,
"os": [
"sunos"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/win32-arm64": {
"version": "0.25.5",
"resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.5.tgz",
"integrity": "sha512-O2S7SNZzdcFG7eFKgvwUEZ2VG9D/sn/eIiz8XRZ1Q/DO5a3s76Xv0mdBzVM5j5R639lXQmPmSo0iRpHqUUrsxw==",
"cpu": [
"arm64"
],
"license": "MIT",
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/win32-ia32": {
"version": "0.25.5",
"resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.5.tgz",
"integrity": "sha512-onOJ02pqs9h1iMJ1PQphR+VZv8qBMQ77Klcsqv9CNW2w6yLqoURLcgERAIurY6QE63bbLuqgP9ATqajFLK5AMQ==",
"cpu": [
"ia32"
],
"license": "MIT",
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/win32-x64": {
"version": "0.25.5",
"resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.5.tgz",
"integrity": "sha512-TXv6YnJ8ZMVdX+SXWVBo/0p8LTcrUYngpWjvm91TMjjBQii7Oz11Lw5lbDV5Y0TzuhSJHwiH4hEtC1I42mMS0g==",
"cpu": [
"x64"
],
"license": "MIT",
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@eslint-community/eslint-utils": { "node_modules/@eslint-community/eslint-utils": {
"version": "4.7.0", "version": "4.7.0",
"resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.7.0.tgz", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.7.0.tgz",
@@ -989,6 +1376,7 @@
"resolved": "https://registry.npmjs.org/@mui/material/-/material-6.4.11.tgz", "resolved": "https://registry.npmjs.org/@mui/material/-/material-6.4.11.tgz",
"integrity": "sha512-k2D3FLJS+/qD0qnd6ZlAjGFvaaxe1Dl10NyvpeDzIebMuYdn8VqYe6XBgGueEAtnzSJM4V03VD9kb5Fi24dnTA==", "integrity": "sha512-k2D3FLJS+/qD0qnd6ZlAjGFvaaxe1Dl10NyvpeDzIebMuYdn8VqYe6XBgGueEAtnzSJM4V03VD9kb5Fi24dnTA==",
"license": "MIT", "license": "MIT",
"peer": true,
"dependencies": { "dependencies": {
"@babel/runtime": "^7.26.0", "@babel/runtime": "^7.26.0",
"@mui/core-downloads-tracker": "^6.4.11", "@mui/core-downloads-tracker": "^6.4.11",
@@ -1153,7 +1541,6 @@
"resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-7.1.0.tgz", "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-7.1.0.tgz",
"integrity": "sha512-4Kck4jxhqF6YxNwJdSae1WgDfXVg0lIH6JVJ7gtuFfuKcQCgomJxPvUEOySTFRPz1IZzwz5OAcToskRdffElDA==", "integrity": "sha512-4Kck4jxhqF6YxNwJdSae1WgDfXVg0lIH6JVJ7gtuFfuKcQCgomJxPvUEOySTFRPz1IZzwz5OAcToskRdffElDA==",
"license": "MIT", "license": "MIT",
"peer": true,
"dependencies": { "dependencies": {
"@babel/runtime": "^7.27.1", "@babel/runtime": "^7.27.1",
"@mui/utils": "^7.1.0", "@mui/utils": "^7.1.0",
@@ -1181,7 +1568,6 @@
"resolved": "https://registry.npmjs.org/@mui/utils/-/utils-7.1.0.tgz", "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-7.1.0.tgz",
"integrity": "sha512-/OM3S8kSHHmWNOP+NH9xEtpYSG10upXeQ0wLZnfDgmgadTAk5F4MQfFLyZ5FCRJENB3eRzltMmaNl6UtDnPovw==", "integrity": "sha512-/OM3S8kSHHmWNOP+NH9xEtpYSG10upXeQ0wLZnfDgmgadTAk5F4MQfFLyZ5FCRJENB3eRzltMmaNl6UtDnPovw==",
"license": "MIT", "license": "MIT",
"peer": true,
"dependencies": { "dependencies": {
"@babel/runtime": "^7.27.1", "@babel/runtime": "^7.27.1",
"@mui/types": "^7.4.2", "@mui/types": "^7.4.2",
@@ -1212,7 +1598,6 @@
"resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-7.1.0.tgz", "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-7.1.0.tgz",
"integrity": "sha512-m0mJ0c6iRC+f9hMeRe0W7zZX1wme3oUX0+XTVHjPG7DJz6OdQ6K/ggEOq7ZdwilcpdsDUwwMfOmvO71qDkYd2w==", "integrity": "sha512-m0mJ0c6iRC+f9hMeRe0W7zZX1wme3oUX0+XTVHjPG7DJz6OdQ6K/ggEOq7ZdwilcpdsDUwwMfOmvO71qDkYd2w==",
"license": "MIT", "license": "MIT",
"peer": true,
"dependencies": { "dependencies": {
"@babel/runtime": "^7.27.1", "@babel/runtime": "^7.27.1",
"@emotion/cache": "^11.13.5", "@emotion/cache": "^11.13.5",
@@ -1288,7 +1673,6 @@
"resolved": "https://registry.npmjs.org/@mui/utils/-/utils-7.1.0.tgz", "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-7.1.0.tgz",
"integrity": "sha512-/OM3S8kSHHmWNOP+NH9xEtpYSG10upXeQ0wLZnfDgmgadTAk5F4MQfFLyZ5FCRJENB3eRzltMmaNl6UtDnPovw==", "integrity": "sha512-/OM3S8kSHHmWNOP+NH9xEtpYSG10upXeQ0wLZnfDgmgadTAk5F4MQfFLyZ5FCRJENB3eRzltMmaNl6UtDnPovw==",
"license": "MIT", "license": "MIT",
"peer": true,
"dependencies": { "dependencies": {
"@babel/runtime": "^7.27.1", "@babel/runtime": "^7.27.1",
"@mui/types": "^7.4.2", "@mui/types": "^7.4.2",
@@ -1696,6 +2080,123 @@
} }
} }
}, },
"node_modules/@rollup/rollup-android-arm-eabi": {
"version": "4.41.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.41.0.tgz",
"integrity": "sha512-KxN+zCjOYHGwCl4UCtSfZ6jrq/qi88JDUtiEFk8LELEHq2Egfc/FgW+jItZiOLRuQfb/3xJSgFuNPC9jzggX+A==",
"cpu": [
"arm"
],
"license": "MIT",
"optional": true,
"os": [
"android"
]
},
"node_modules/@rollup/rollup-android-arm64": {
"version": "4.41.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.41.0.tgz",
"integrity": "sha512-yDvqx3lWlcugozax3DItKJI5j05B0d4Kvnjx+5mwiUpWramVvmAByYigMplaoAQ3pvdprGCTCE03eduqE/8mPQ==",
"cpu": [
"arm64"
],
"license": "MIT",
"optional": true,
"os": [
"android"
]
},
"node_modules/@rollup/rollup-darwin-arm64": {
"version": "4.41.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.41.0.tgz",
"integrity": "sha512-2KOU574vD3gzcPSjxO0eyR5iWlnxxtmW1F5CkNOHmMlueKNCQkxR6+ekgWyVnz6zaZihpUNkGxjsYrkTJKhkaw==",
"cpu": [
"arm64"
],
"license": "MIT",
"optional": true,
"os": [
"darwin"
]
},
"node_modules/@rollup/rollup-darwin-x64": {
"version": "4.41.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.41.0.tgz",
"integrity": "sha512-gE5ACNSxHcEZyP2BA9TuTakfZvULEW4YAOtxl/A/YDbIir/wPKukde0BNPlnBiP88ecaN4BJI2TtAd+HKuZPQQ==",
"cpu": [
"x64"
],
"license": "MIT",
"optional": true,
"os": [
"darwin"
]
},
"node_modules/@rollup/rollup-freebsd-arm64": {
"version": "4.41.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.41.0.tgz",
"integrity": "sha512-GSxU6r5HnWij7FoSo7cZg3l5GPg4HFLkzsFFh0N/b16q5buW1NAWuCJ+HMtIdUEi6XF0qH+hN0TEd78laRp7Dg==",
"cpu": [
"arm64"
],
"license": "MIT",
"optional": true,
"os": [
"freebsd"
]
},
"node_modules/@rollup/rollup-freebsd-x64": {
"version": "4.41.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.41.0.tgz",
"integrity": "sha512-KGiGKGDg8qLRyOWmk6IeiHJzsN/OYxO6nSbT0Vj4MwjS2XQy/5emsmtoqLAabqrohbgLWJ5GV3s/ljdrIr8Qjg==",
"cpu": [
"x64"
],
"license": "MIT",
"optional": true,
"os": [
"freebsd"
]
},
"node_modules/@rollup/rollup-linux-arm-gnueabihf": {
"version": "4.41.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.41.0.tgz",
"integrity": "sha512-46OzWeqEVQyX3N2/QdiU/CMXYDH/lSHpgfBkuhl3igpZiaB3ZIfSjKuOnybFVBQzjsLwkus2mjaESy8H41SzvA==",
"cpu": [
"arm"
],
"license": "MIT",
"optional": true,
"os": [
"linux"
]
},
"node_modules/@rollup/rollup-linux-arm-musleabihf": {
"version": "4.41.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.41.0.tgz",
"integrity": "sha512-lfgW3KtQP4YauqdPpcUZHPcqQXmTmH4nYU0cplNeW583CMkAGjtImw4PKli09NFi2iQgChk4e9erkwlfYem6Lg==",
"cpu": [
"arm"
],
"license": "MIT",
"optional": true,
"os": [
"linux"
]
},
"node_modules/@rollup/rollup-linux-arm64-gnu": {
"version": "4.41.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.41.0.tgz",
"integrity": "sha512-nn8mEyzMbdEJzT7cwxgObuwviMx6kPRxzYiOl6o/o+ChQq23gfdlZcUNnt89lPhhz3BYsZ72rp0rxNqBSfqlqw==",
"cpu": [
"arm64"
],
"license": "MIT",
"optional": true,
"os": [
"linux"
]
},
"node_modules/@rollup/rollup-linux-arm64-musl": { "node_modules/@rollup/rollup-linux-arm64-musl": {
"version": "4.41.0", "version": "4.41.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.41.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.41.0.tgz",
@@ -1709,6 +2210,71 @@
"linux" "linux"
] ]
}, },
"node_modules/@rollup/rollup-linux-loongarch64-gnu": {
"version": "4.41.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.41.0.tgz",
"integrity": "sha512-WbnJaxPv1gPIm6S8O/Wg+wfE/OzGSXlBMbOe4ie+zMyykMOeqmgD1BhPxZQuDqwUN+0T/xOFtL2RUWBspnZj3w==",
"cpu": [
"loong64"
],
"license": "MIT",
"optional": true,
"os": [
"linux"
]
},
"node_modules/@rollup/rollup-linux-powerpc64le-gnu": {
"version": "4.41.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.41.0.tgz",
"integrity": "sha512-eRDWR5t67/b2g8Q/S8XPi0YdbKcCs4WQ8vklNnUYLaSWF+Cbv2axZsp4jni6/j7eKvMLYCYdcsv8dcU+a6QNFg==",
"cpu": [
"ppc64"
],
"license": "MIT",
"optional": true,
"os": [
"linux"
]
},
"node_modules/@rollup/rollup-linux-riscv64-gnu": {
"version": "4.41.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.41.0.tgz",
"integrity": "sha512-TWrZb6GF5jsEKG7T1IHwlLMDRy2f3DPqYldmIhnA2DVqvvhY2Ai184vZGgahRrg8k9UBWoSlHv+suRfTN7Ua4A==",
"cpu": [
"riscv64"
],
"license": "MIT",
"optional": true,
"os": [
"linux"
]
},
"node_modules/@rollup/rollup-linux-riscv64-musl": {
"version": "4.41.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.41.0.tgz",
"integrity": "sha512-ieQljaZKuJpmWvd8gW87ZmSFwid6AxMDk5bhONJ57U8zT77zpZ/TPKkU9HpnnFrM4zsgr4kiGuzbIbZTGi7u9A==",
"cpu": [
"riscv64"
],
"license": "MIT",
"optional": true,
"os": [
"linux"
]
},
"node_modules/@rollup/rollup-linux-s390x-gnu": {
"version": "4.41.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.41.0.tgz",
"integrity": "sha512-/L3pW48SxrWAlVsKCN0dGLB2bi8Nv8pr5S5ocSM+S0XCn5RCVCXqi8GVtHFsOBBCSeR+u9brV2zno5+mg3S4Aw==",
"cpu": [
"s390x"
],
"license": "MIT",
"optional": true,
"os": [
"linux"
]
},
"node_modules/@rollup/rollup-linux-x64-gnu": { "node_modules/@rollup/rollup-linux-x64-gnu": {
"version": "4.41.0", "version": "4.41.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.41.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.41.0.tgz",
@@ -1735,6 +2301,45 @@
"linux" "linux"
] ]
}, },
"node_modules/@rollup/rollup-win32-arm64-msvc": {
"version": "4.41.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.41.0.tgz",
"integrity": "sha512-4yodtcOrFHpbomJGVEqZ8fzD4kfBeCbpsUy5Pqk4RluXOdsWdjLnjhiKy2w3qzcASWd04fp52Xz7JKarVJ5BTg==",
"cpu": [
"arm64"
],
"license": "MIT",
"optional": true,
"os": [
"win32"
]
},
"node_modules/@rollup/rollup-win32-ia32-msvc": {
"version": "4.41.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.41.0.tgz",
"integrity": "sha512-tmazCrAsKzdkXssEc65zIE1oC6xPHwfy9d5Ta25SRCDOZS+I6RypVVShWALNuU9bxIfGA0aqrmzlzoM5wO5SPQ==",
"cpu": [
"ia32"
],
"license": "MIT",
"optional": true,
"os": [
"win32"
]
},
"node_modules/@rollup/rollup-win32-x64-msvc": {
"version": "4.41.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.41.0.tgz",
"integrity": "sha512-h1J+Yzjo/X+0EAvR2kIXJDuTuyT7drc+t2ALY0nIcGPbTatNOf0VWdhEA2Z4AAjv6X1NJV7SYo5oCTYRJhSlVA==",
"cpu": [
"x64"
],
"license": "MIT",
"optional": true,
"os": [
"win32"
]
},
"node_modules/@sideway/address": { "node_modules/@sideway/address": {
"version": "4.1.5", "version": "4.1.5",
"resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.5.tgz", "resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.5.tgz",
@@ -2133,6 +2738,7 @@
"integrity": "sha512-FYxk1I7wPv3K2XBaoyH2cTnocQEu8AOZ60hPbsyukMPLv5/5qr7V1i8PLHdl6Zf87I+xZXFvPCXYjiTFq+YSDQ==", "integrity": "sha512-FYxk1I7wPv3K2XBaoyH2cTnocQEu8AOZ60hPbsyukMPLv5/5qr7V1i8PLHdl6Zf87I+xZXFvPCXYjiTFq+YSDQ==",
"devOptional": true, "devOptional": true,
"license": "MIT", "license": "MIT",
"peer": true,
"dependencies": { "dependencies": {
"undici-types": "~7.12.0" "undici-types": "~7.12.0"
} }
@@ -2154,6 +2760,7 @@
"resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.22.tgz", "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.22.tgz",
"integrity": "sha512-vUhG0YmQZ7kL/tmKLrD3g5zXbXXreZXB3pmROW8bg3CnLnpjkRVwUlLne7Ufa2r9yJ8+/6B73RzhAek5TBKh2Q==", "integrity": "sha512-vUhG0YmQZ7kL/tmKLrD3g5zXbXXreZXB3pmROW8bg3CnLnpjkRVwUlLne7Ufa2r9yJ8+/6B73RzhAek5TBKh2Q==",
"license": "MIT", "license": "MIT",
"peer": true,
"dependencies": { "dependencies": {
"@types/prop-types": "*", "@types/prop-types": "*",
"csstype": "^3.0.2" "csstype": "^3.0.2"
@@ -2217,6 +2824,7 @@
"integrity": "sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==", "integrity": "sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"peer": true,
"bin": { "bin": {
"acorn": "bin/acorn" "acorn": "bin/acorn"
}, },
@@ -2523,6 +3131,7 @@
} }
], ],
"license": "MIT", "license": "MIT",
"peer": true,
"dependencies": { "dependencies": {
"caniuse-lite": "^1.0.30001716", "caniuse-lite": "^1.0.30001716",
"electron-to-chromium": "^1.5.149", "electron-to-chromium": "^1.5.149",
@@ -2935,7 +3544,8 @@
"version": "1.11.13", "version": "1.11.13",
"resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.13.tgz", "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.13.tgz",
"integrity": "sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg==", "integrity": "sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg==",
"license": "MIT" "license": "MIT",
"peer": true
}, },
"node_modules/debug": { "node_modules/debug": {
"version": "4.4.1", "version": "4.4.1",
@@ -3342,6 +3952,7 @@
"deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"peer": true,
"dependencies": { "dependencies": {
"@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/eslint-utils": "^4.2.0",
"@eslint-community/regexpp": "^4.6.1", "@eslint-community/regexpp": "^4.6.1",
@@ -4149,6 +4760,7 @@
} }
], ],
"license": "MIT", "license": "MIT",
"peer": true,
"dependencies": { "dependencies": {
"@babel/runtime": "^7.27.6" "@babel/runtime": "^7.27.6"
}, },
@@ -5416,6 +6028,7 @@
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz",
"integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==",
"license": "MIT", "license": "MIT",
"peer": true,
"dependencies": { "dependencies": {
"loose-envify": "^1.1.0", "loose-envify": "^1.1.0",
"scheduler": "^0.23.2" "scheduler": "^0.23.2"
@@ -5429,6 +6042,7 @@
"resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.63.0.tgz", "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.63.0.tgz",
"integrity": "sha512-ZwueDMvUeucovM2VjkCf7zIHcs1aAlDimZu2Hvel5C5907gUzMpm4xCrQXtRzCvsBqFjonB4m3x4LzCFI1ZKWA==", "integrity": "sha512-ZwueDMvUeucovM2VjkCf7zIHcs1aAlDimZu2Hvel5C5907gUzMpm4xCrQXtRzCvsBqFjonB4m3x4LzCFI1ZKWA==",
"license": "MIT", "license": "MIT",
"peer": true,
"engines": { "engines": {
"node": ">=18.0.0" "node": ">=18.0.0"
}, },
@@ -5632,7 +6246,8 @@
"version": "5.0.1", "version": "5.0.1",
"resolved": "https://registry.npmjs.org/redux/-/redux-5.0.1.tgz", "resolved": "https://registry.npmjs.org/redux/-/redux-5.0.1.tgz",
"integrity": "sha512-M9/ELqF6fy8FwmkpnF0S3YKOqMyoWJ4+CS5Efg2ct3oY9daQvd/Pc71FpGZsVsbl3Cpb+IIcjBDUnnyBdQbq4w==", "integrity": "sha512-M9/ELqF6fy8FwmkpnF0S3YKOqMyoWJ4+CS5Efg2ct3oY9daQvd/Pc71FpGZsVsbl3Cpb+IIcjBDUnnyBdQbq4w==",
"license": "MIT" "license": "MIT",
"peer": true
}, },
"node_modules/redux-persist": { "node_modules/redux-persist": {
"version": "6.0.0", "version": "6.0.0",
@@ -5770,6 +6385,7 @@
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.41.0.tgz", "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.41.0.tgz",
"integrity": "sha512-HqMFpUbWlf/tvcxBFNKnJyzc7Lk+XO3FGc3pbNBLqEbOz0gPLRgcrlS3UF4MfUrVlstOaP/q0kM6GVvi+LrLRg==", "integrity": "sha512-HqMFpUbWlf/tvcxBFNKnJyzc7Lk+XO3FGc3pbNBLqEbOz0gPLRgcrlS3UF4MfUrVlstOaP/q0kM6GVvi+LrLRg==",
"license": "MIT", "license": "MIT",
"peer": true,
"dependencies": { "dependencies": {
"@types/estree": "1.0.7" "@types/estree": "1.0.7"
}, },
@@ -6405,6 +7021,7 @@
"integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",
"devOptional": true, "devOptional": true,
"license": "Apache-2.0", "license": "Apache-2.0",
"peer": true,
"bin": { "bin": {
"tsc": "bin/tsc", "tsc": "bin/tsc",
"tsserver": "bin/tsserver" "tsserver": "bin/tsserver"
@@ -6524,6 +7141,7 @@
"resolved": "https://registry.npmjs.org/vite/-/vite-6.3.6.tgz", "resolved": "https://registry.npmjs.org/vite/-/vite-6.3.6.tgz",
"integrity": "sha512-0msEVHJEScQbhkbVTb/4iHZdJ6SXp/AvxL2sjwYQFfBqleHtnCqv1J3sa9zbWz/6kW1m9Tfzn92vW+kZ1WV6QA==", "integrity": "sha512-0msEVHJEScQbhkbVTb/4iHZdJ6SXp/AvxL2sjwYQFfBqleHtnCqv1J3sa9zbWz/6kW1m9Tfzn92vW+kZ1WV6QA==",
"license": "MIT", "license": "MIT",
"peer": true,
"dependencies": { "dependencies": {
"esbuild": "^0.25.0", "esbuild": "^0.25.0",
"fdir": "^6.4.4", "fdir": "^6.4.4",
@@ -6744,20 +7362,6 @@
"integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==",
"license": "ISC" "license": "ISC"
}, },
"node_modules/yaml": {
"version": "2.8.0",
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.0.tgz",
"integrity": "sha512-4lLa/EcQCB0cJkyts+FpIRx5G/llPxfP6VQU5KByHEhLxY3IJCH0f0Hy1MHI8sClTvsIb8qwRJ6R/ZdlDJ/leQ==",
"license": "ISC",
"optional": true,
"peer": true,
"bin": {
"yaml": "bin.mjs"
},
"engines": {
"node": ">= 14.6"
}
},
"node_modules/yocto-queue": { "node_modules/yocto-queue": {
"version": "0.1.0", "version": "0.1.0",
"resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
@@ -12,7 +12,7 @@ import { useNavigate } from "react-router-dom";
import { createToast } from "../../../Utils/toastUtils.jsx"; import { createToast } from "../../../Utils/toastUtils.jsx";
import PropTypes from "prop-types"; import PropTypes from "prop-types";
import { usePauseMonitor, useDeleteMonitor } from "../../../Hooks/v1/monitorHooks.js"; import { usePauseMonitor, useDeleteMonitor } from "../../../Hooks/monitorHooks.js";
const ActionsMenu = ({ const ActionsMenu = ({
monitor, monitor,
@@ -31,7 +31,8 @@ const ActionsMenu = ({
const handleRemove = async (event) => { const handleRemove = async (event) => {
event.preventDefault(); event.preventDefault();
event.stopPropagation(); event.stopPropagation();
let monitor = { _id: actions.id }; let monitor = { id: actions.id };
console.log(monitor);
await deleteMonitor({ monitor }); await deleteMonitor({ monitor });
updateRowCallback(); updateRowCallback();
}; };
@@ -39,7 +40,7 @@ const ActionsMenu = ({
const handlePause = async () => { const handlePause = async () => {
try { try {
setIsLoading(true); setIsLoading(true);
await pauseMonitor({ monitorId: monitor._id }); await pauseMonitor({ monitorId: monitor.id });
pauseCallback(); pauseCallback();
} catch (error) { } catch (error) {
createToast({ body: "Failed to pause monitor." }); createToast({ body: "Failed to pause monitor." });
@@ -72,7 +73,7 @@ const ActionsMenu = ({
aria-label="monitor actions" aria-label="monitor actions"
onClick={(event) => { onClick={(event) => {
event.stopPropagation(); event.stopPropagation();
openMenu(event, monitor._id, monitor.type === "ping" ? null : monitor.url); openMenu(event, monitor.id, monitor.type === "ping" ? null : monitor.url);
}} }}
sx={{ sx={{
"&:focus": { "&:focus": {
@@ -197,6 +198,7 @@ const ActionsMenu = ({
confirmationButtonLabel="Delete" confirmationButtonLabel="Delete"
/* Do we need stop propagation? */ /* Do we need stop propagation? */
onConfirm={(e) => { onConfirm={(e) => {
console.log(e);
e.stopPropagation(); e.stopPropagation();
handleRemove(e); handleRemove(e);
}} }}
@@ -210,7 +212,7 @@ const ActionsMenu = ({
ActionsMenu.propTypes = { ActionsMenu.propTypes = {
monitor: PropTypes.shape({ monitor: PropTypes.shape({
_id: PropTypes.string, id: PropTypes.string,
url: PropTypes.string, url: PropTypes.string,
type: PropTypes.string, type: PropTypes.string,
isActive: PropTypes.bool, isActive: PropTypes.bool,
@@ -103,7 +103,7 @@ const BarChart = ({ checks = [] }) => {
</> </>
} }
placement="top" placement="top"
key={`check-${check?._id}`} key={`check-${check?.id}`}
slotProps={{ slotProps={{
popper: { popper: {
className: "bar-tooltip", className: "bar-tooltip",
@@ -145,7 +145,7 @@ const BarChart = ({ checks = [] }) => {
position="relative" position="relative"
width="9px" width="9px"
height="100%" height="100%"
backgroundColor={theme.palette.primary.lowContrast} // CAIO_REVIEW backgroundColor={theme.palette.primary.lowContrast}
sx={{ sx={{
borderRadius: theme.spacing(1.5), borderRadius: theme.spacing(1.5),
/* /*
@@ -85,7 +85,12 @@ const Search = ({
const enhancedOptions = React.useMemo(() => { const enhancedOptions = React.useMemo(() => {
return multiple && isAdorned return multiple && isAdorned
? [ ? [
{ [filteredBy]: t("selectAll"), isSelectAll: true, _id: "select_all" }, {
[filteredBy]: t("selectAll"),
isSelectAll: true,
_id: "select_all",
id: "select_all",
},
...options, ...options,
] ]
: options; : options;
@@ -93,7 +98,7 @@ const Search = ({
const isOptionSelected = (option) => { const isOptionSelected = (option) => {
if (!multiple && !isAdorned) return false; if (!multiple && !isAdorned) return false;
if (Array.isArray(value)) { if (Array.isArray(value)) {
return value.some((item) => item._id === option._id); return value.some((item) => (item._id ?? item.id) === (option._id ?? option.id));
} }
return false; return false;
}; };
@@ -145,7 +150,9 @@ const Search = ({
disableClearable disableClearable
options={enhancedOptions} options={enhancedOptions}
getOptionLabel={(option) => option[filteredBy]} getOptionLabel={(option) => option[filteredBy]}
isOptionEqualToValue={(option, value) => option._id === value._id} // Compare by unique identifier isOptionEqualToValue={(option, value) =>
(option._id ?? option.id) === (value?._id ?? value?.id)
} // Compare by unique identifier
renderInput={(params) => ( renderInput={(params) => (
<FieldWrapper <FieldWrapper
label={label} label={label}
@@ -206,7 +213,7 @@ const Search = ({
return filtered; return filtered;
}} }}
getOptionKey={(option) => { getOptionKey={(option) => {
return option._id; return option._id ?? option.id;
}} }}
renderOption={(props, option) => { renderOption={(props, option) => {
const { key, ...optionProps } = props; const { key, ...optionProps } = props;
@@ -62,6 +62,7 @@ const Select = ({
fieldWrapperSx = {}, fieldWrapperSx = {},
}) => { }) => {
const theme = useTheme(); const theme = useTheme();
const getItemValue = (item) => item?._id ?? item?.id;
const itemStyles = { const itemStyles = {
fontSize: "var(--env-var-font-size-medium)", fontSize: "var(--env-var-font-size-medium)",
color: theme.palette.primary.contrastTextTertiary, color: theme.palette.primary.contrastTextTertiary,
@@ -123,7 +124,7 @@ const Select = ({
...sx, ...sx,
}} }}
renderValue={(selected) => { renderValue={(selected) => {
const selectedItem = items.find((item) => item._id === selected); const selectedItem = items.find((item) => getItemValue(item) === selected);
const displayName = selectedItem ? selectedItem.name : placeholder; const displayName = selectedItem ? selectedItem.name : placeholder;
return ( return (
<Typography <Typography
@@ -152,17 +153,25 @@ const Select = ({
{placeholder} {placeholder}
</MenuItem> </MenuItem>
)} )}
{items.map((item) => ( {items
<MenuItem .map((item) => {
value={item._id} const itemValue = getItemValue(item);
key={`${id}-${item._id}`} if (itemValue === undefined || itemValue === null) {
sx={{ return null;
...itemStyles, }
}} return (
> <MenuItem
{item.name} value={itemValue}
</MenuItem> key={`${id}-${itemValue}`}
))} sx={{
...itemStyles,
}}
>
{item.name}
</MenuItem>
);
})
.filter(Boolean)}
</MuiSelect> </MuiSelect>
</FieldWrapper> </FieldWrapper>
); );
@@ -179,8 +188,8 @@ Select.propTypes = {
.isRequired, .isRequired,
items: PropTypes.arrayOf( items: PropTypes.arrayOf(
PropTypes.shape({ PropTypes.shape({
_id: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.bool]) _id: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.bool]),
.isRequired, id: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.bool]),
name: PropTypes.string.isRequired, name: PropTypes.string.isRequired,
}) })
@@ -11,7 +11,7 @@ import MenuList from "@mui/material/MenuList";
import { useNavigate } from "react-router-dom"; import { useNavigate } from "react-router-dom";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { createToast } from "../../../Utils/toastUtils.jsx"; import { createToast } from "../../../Utils/toastUtils.jsx";
import { useExportMonitors } from "../../../Hooks/v1/monitorHooks.js"; import { useExportMonitors } from "../../../Hooks/monitorHooks.js";
const MonitorActions = ({ isLoading }) => { const MonitorActions = ({ isLoading }) => {
const [open, setOpen] = React.useState(false); const [open, setOpen] = React.useState(false);
@@ -12,10 +12,10 @@ import EmailIcon from "@mui/icons-material/Email";
import PropTypes from "prop-types"; import PropTypes from "prop-types";
import { useNavigate } from "react-router-dom"; import { useNavigate } from "react-router-dom";
import { useTheme } from "@mui/material/styles"; import { useTheme } from "@mui/material/styles";
import { usePauseMonitor } from "../../../Hooks/v1/monitorHooks.js"; import { usePauseMonitor } from "../../../Hooks/monitorHooks.js";
import { useSendTestEmail } from "../../../Hooks/v1/useSendTestEmail.js"; import { useSendTestEmail } from "../../../Hooks/useSendTestEmail.js";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { useTestAllNotifications } from "../../../Hooks/v1/useNotifications.js"; import { useTestAllNotifications } from "../../../Hooks/useNotifications.js";
/** /**
* MonitorDetailsControlHeader component displays the control header for monitor details. * MonitorDetailsControlHeader component displays the control header for monitor details.
* It includes status display, pause/resume button, and a configure button for admins. * It includes status display, pause/resume button, and a configure button for admins.
@@ -7,7 +7,7 @@ import Dot from "../Dot/index.jsx";
import { formatDurationRounded } from "../../../Utils/timeUtils.js"; import { formatDurationRounded } from "../../../Utils/timeUtils.js";
import PropTypes from "prop-types"; import PropTypes from "prop-types";
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
import { useMonitorUtils } from "../../../Hooks/v1/useMonitorUtils.js"; import { useMonitorUtils } from "../../../Hooks/useMonitorUtils.js";
import { formatMonitorUrl } from "../../../Utils/utils.js"; import { formatMonitorUrl } from "../../../Utils/utils.js";
/** /**
* Status component displays the status information of a monitor. * Status component displays the status information of a monitor.
@@ -3,7 +3,7 @@ import Fallback from "../Fallback/index.jsx";
import { Typography } from "@mui/material"; import { Typography } from "@mui/material";
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { useIsAdmin } from "../../../Hooks/v1/useIsAdmin.js"; import { useIsAdmin } from "@/Hooks/useIsAdmin.js";
import PropTypes from "prop-types"; import PropTypes from "prop-types";
const PageStateWrapper = ({ const PageStateWrapper = ({
networkError, networkError,
+1 -1
View File
@@ -2,7 +2,7 @@ import { Stack, Typography } from "@mui/material";
import Image from "../Image/index.jsx"; import Image from "../Image/index.jsx";
import { useTheme } from "@mui/material/styles"; import { useTheme } from "@mui/material/styles";
import PropTypes from "prop-types"; import PropTypes from "prop-types";
import { useMonitorUtils } from "../../../Hooks/v1/useMonitorUtils.js"; import { useMonitorUtils } from "../../../Hooks/useMonitorUtils.js";
/** /**
* StatBox Component * StatBox Component
@@ -1,6 +1,6 @@
import { useState, useEffect } from "react"; import { useState, useEffect } from "react";
import { networkService } from "../../main.jsx"; import { networkService } from "../main.jsx";
import { createToast } from "../../Utils/toastUtils.jsx"; import { createToast } from "../Utils/toastUtils.jsx";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
const useFetchChecksTeam = ({ const useFetchChecksTeam = ({
@@ -1,5 +1,5 @@
import { useState } from "react"; import { useState } from "react";
import { networkService } from "../../main.jsx"; import { networkService } from "../main.jsx";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
const CLIENT_HOST = import.meta.env.VITE_APP_CLIENT_HOST; const CLIENT_HOST = import.meta.env.VITE_APP_CLIENT_HOST;
@@ -1,6 +1,6 @@
import { useState, useEffect } from "react"; import { useState, useEffect } from "react";
import { networkService } from "../../main.jsx"; import { networkService } from "../main.jsx";
import { createToast } from "../../Utils/toastUtils.jsx"; import { createToast } from "../Utils/toastUtils.jsx";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
const useFetchLogs = () => { const useFetchLogs = () => {
@@ -1,12 +1,12 @@
import { useEffect, useState } from "react"; import { useEffect, useState } from "react";
import { networkService } from "../../main.jsx"; import { networkService } from "../main.jsx";
import { createToast } from "../../Utils/toastUtils.jsx"; import { createToast } from "../Utils/toastUtils.jsx";
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
import { useMonitorUtils } from "./useMonitorUtils.js"; import { useMonitorUtils } from "./useMonitorUtils.js";
import { useNavigate } from "react-router-dom"; import { useNavigate } from "react-router-dom";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
const useFetchMonitorsWithSummary = ({ types, monitorUpdateTrigger }) => { export const useFetchMonitorsWithSummary = ({ types, monitorUpdateTrigger }) => {
const [isLoading, setIsLoading] = useState(false); const [isLoading, setIsLoading] = useState(false);
const [monitors, setMonitors] = useState(undefined); const [monitors, setMonitors] = useState(undefined);
const [monitorsSummary, setMonitorsSummary] = useState(undefined); const [monitorsSummary, setMonitorsSummary] = useState(undefined);
@@ -37,7 +37,7 @@ const useFetchMonitorsWithSummary = ({ types, monitorUpdateTrigger }) => {
return [monitors, monitorsSummary, isLoading, networkError]; return [monitors, monitorsSummary, isLoading, networkError];
}; };
const useFetchMonitorsWithChecks = ({ export const useFetchMonitorsWithChecks = ({
types, types,
limit, limit,
page, page,
@@ -67,12 +67,13 @@ const useFetchMonitorsWithChecks = ({
field, field,
order, order,
}); });
const { count, monitors } = res?.data?.data ?? {}; const { count, monitors } = res?.data?.data ?? {};
const mappedMonitors = monitors.map((monitor) => const mappedMonitors = monitors.map((monitor) =>
getMonitorWithPercentage(monitor, theme) getMonitorWithPercentage(monitor, theme)
); );
setMonitors(mappedMonitors); setMonitors(mappedMonitors);
setCount(count?.monitorsCount ?? 0); setCount(count || 0);
} catch (error) { } catch (error) {
console.error(error); console.error(error);
setNetworkError(true); setNetworkError(true);
@@ -99,22 +100,9 @@ const useFetchMonitorsWithChecks = ({
return [monitors, count, isLoading, networkError]; return [monitors, count, isLoading, networkError];
}; };
const useFetchMonitorsByTeamId = ({ export const useFetchMonitorsByTeamId = ({ types, filter, updateTrigger }) => {
types,
limit,
page,
rowsPerPage,
filter,
field,
order,
checkOrder,
normalize,
status,
updateTrigger,
}) => {
const [isLoading, setIsLoading] = useState(false); const [isLoading, setIsLoading] = useState(false);
const [monitors, setMonitors] = useState(undefined); const [monitors, setMonitors] = useState(undefined);
const [summary, setSummary] = useState(undefined);
const [networkError, setNetworkError] = useState(false); const [networkError, setNetworkError] = useState(false);
useEffect(() => { useEffect(() => {
@@ -122,20 +110,11 @@ const useFetchMonitorsByTeamId = ({
try { try {
setIsLoading(true); setIsLoading(true);
const res = await networkService.getMonitorsByTeamId({ const res = await networkService.getMonitorsByTeamId({
limit,
types, types,
page,
rowsPerPage,
filter, filter,
field,
order,
checkOrder,
status,
normalize,
}); });
if (res?.data?.data?.filteredMonitors) { if (res?.data?.data) {
setMonitors(res.data.data.filteredMonitors); setMonitors(res.data.data);
setSummary(res.data.data.summary);
} }
} catch (error) { } catch (error) {
setNetworkError(true); setNetworkError(true);
@@ -147,23 +126,11 @@ const useFetchMonitorsByTeamId = ({
} }
}; };
fetchMonitors(); fetchMonitors();
}, [ }, [types, filter, updateTrigger]);
types, return [monitors, isLoading, networkError];
limit,
page,
rowsPerPage,
filter,
field,
order,
updateTrigger,
checkOrder,
normalize,
status,
]);
return [monitors, summary, isLoading, networkError];
}; };
const useFetchStatsByMonitorId = ({ export const useFetchStatsByMonitorId = ({
monitorId, monitorId,
sortOrder, sortOrder,
limit, limit,
@@ -202,7 +169,7 @@ const useFetchStatsByMonitorId = ({
return [monitor, audits, isLoading, networkError]; return [monitor, audits, isLoading, networkError];
}; };
const useFetchMonitorGames = ({ setGames, updateTrigger }) => { export const useFetchMonitorGames = ({ setGames, updateTrigger }) => {
const [isLoading, setIsLoading] = useState(true); const [isLoading, setIsLoading] = useState(true);
useEffect(() => { useEffect(() => {
const fetchGames = async () => { const fetchGames = async () => {
@@ -221,7 +188,7 @@ const useFetchMonitorGames = ({ setGames, updateTrigger }) => {
return [isLoading]; return [isLoading];
}; };
const useFetchMonitorById = ({ monitorId, setMonitor, updateTrigger }) => { export const useFetchMonitorById = ({ monitorId, setMonitor, updateTrigger }) => {
const [isLoading, setIsLoading] = useState(true); const [isLoading, setIsLoading] = useState(true);
useEffect(() => { useEffect(() => {
if (typeof monitorId === "undefined") { if (typeof monitorId === "undefined") {
@@ -244,7 +211,7 @@ const useFetchMonitorById = ({ monitorId, setMonitor, updateTrigger }) => {
return [isLoading]; return [isLoading];
}; };
const useFetchHardwareMonitorById = ({ monitorId, dateRange, updateTrigger }) => { export const useFetchHardwareMonitorById = ({ monitorId, dateRange, updateTrigger }) => {
const [isLoading, setIsLoading] = useState(true); const [isLoading, setIsLoading] = useState(true);
const [networkError, setNetworkError] = useState(false); const [networkError, setNetworkError] = useState(false);
const [monitor, setMonitor] = useState(undefined); const [monitor, setMonitor] = useState(undefined);
@@ -270,8 +237,34 @@ const useFetchHardwareMonitorById = ({ monitorId, dateRange, updateTrigger }) =>
}, [monitorId, dateRange, updateTrigger]); }, [monitorId, dateRange, updateTrigger]);
return [monitor, isLoading, networkError]; return [monitor, isLoading, networkError];
}; };
export const useFetchPageSpeedMonitorById = ({ monitorId, dateRange, updateTrigger }) => {
const [isLoading, setIsLoading] = useState(true);
const [networkError, setNetworkError] = useState(false);
const [monitor, setMonitor] = useState(undefined);
const useFetchUptimeMonitorById = ({ monitorId, dateRange, trigger }) => { useEffect(() => {
const fetchMonitor = async () => {
try {
if (!monitorId) {
return { monitor: undefined, isLoading: false, networkError: undefined };
}
const response = await networkService.getPageSpeedDetailsByMonitorId({
monitorId: monitorId,
dateRange: dateRange,
});
setMonitor(response.data.data);
} catch (error) {
setNetworkError(true);
} finally {
setIsLoading(false);
}
};
fetchMonitor();
}, [monitorId, dateRange, updateTrigger]);
return [monitor, isLoading, networkError];
};
export const useFetchUptimeMonitorById = ({ monitorId, dateRange, trigger }) => {
const [networkError, setNetworkError] = useState(false); const [networkError, setNetworkError] = useState(false);
const [isLoading, setIsLoading] = useState(true); const [isLoading, setIsLoading] = useState(true);
const [monitor, setMonitor] = useState(undefined); const [monitor, setMonitor] = useState(undefined);
@@ -299,7 +292,7 @@ const useFetchUptimeMonitorById = ({ monitorId, dateRange, trigger }) => {
return [monitor, monitorStats, isLoading, networkError]; return [monitor, monitorStats, isLoading, networkError];
}; };
const useCreateMonitor = () => { export const useCreateMonitor = () => {
const [isLoading, setIsLoading] = useState(false); const [isLoading, setIsLoading] = useState(false);
const navigate = useNavigate(); const navigate = useNavigate();
const createMonitor = async ({ monitor, redirect }) => { const createMonitor = async ({ monitor, redirect }) => {
@@ -319,7 +312,7 @@ const useCreateMonitor = () => {
return [createMonitor, isLoading]; return [createMonitor, isLoading];
}; };
const useFetchGlobalSettings = () => { export const useFetchGlobalSettings = () => {
const [isLoading, setIsLoading] = useState(true); const [isLoading, setIsLoading] = useState(true);
const [globalSettings, setGlobalSettings] = useState(undefined); const [globalSettings, setGlobalSettings] = useState(undefined);
useEffect(() => { useEffect(() => {
@@ -341,13 +334,14 @@ const useFetchGlobalSettings = () => {
return [globalSettings, isLoading]; return [globalSettings, isLoading];
}; };
const useDeleteMonitor = () => { export const useDeleteMonitor = () => {
const [isLoading, setIsLoading] = useState(false); const [isLoading, setIsLoading] = useState(false);
const navigate = useNavigate(); const navigate = useNavigate();
const deleteMonitor = async ({ monitor, redirect }) => { const deleteMonitor = async ({ monitor, redirect }) => {
try { try {
setIsLoading(true); setIsLoading(true);
await networkService.deleteMonitorById({ monitorId: monitor._id }); console.log(monitor);
await networkService.deleteMonitorById({ monitorId: monitor.id });
createToast({ body: "Monitor deleted successfully!" }); createToast({ body: "Monitor deleted successfully!" });
if (redirect) { if (redirect) {
navigate(redirect); navigate(redirect);
@@ -361,7 +355,7 @@ const useDeleteMonitor = () => {
return [deleteMonitor, isLoading]; return [deleteMonitor, isLoading];
}; };
const useUpdateMonitor = () => { export const useUpdateMonitor = () => {
const [isLoading, setIsLoading] = useState(false); const [isLoading, setIsLoading] = useState(false);
const navigate = useNavigate(); const navigate = useNavigate();
const updateMonitor = async ({ monitor, redirect }) => { const updateMonitor = async ({ monitor, redirect }) => {
@@ -408,7 +402,7 @@ const useUpdateMonitor = () => {
return [updateMonitor, isLoading]; return [updateMonitor, isLoading];
}; };
const usePauseMonitor = () => { export const usePauseMonitor = () => {
const [isLoading, setIsLoading] = useState(false); const [isLoading, setIsLoading] = useState(false);
const [error, setError] = useState(undefined); const [error, setError] = useState(undefined);
const pauseMonitor = async ({ monitorId, triggerUpdate }) => { const pauseMonitor = async ({ monitorId, triggerUpdate }) => {
@@ -431,7 +425,7 @@ const usePauseMonitor = () => {
return [pauseMonitor, isLoading, error]; return [pauseMonitor, isLoading, error];
}; };
const useAddDemoMonitors = () => { export const useAddDemoMonitors = () => {
const [isLoading, setIsLoading] = useState(false); const [isLoading, setIsLoading] = useState(false);
const { t } = useTranslation(); const { t } = useTranslation();
const addDemoMonitors = async () => { const addDemoMonitors = async () => {
@@ -448,7 +442,7 @@ const useAddDemoMonitors = () => {
return [addDemoMonitors, isLoading]; return [addDemoMonitors, isLoading];
}; };
const useDeleteAllMonitors = () => { export const useDeleteAllMonitors = () => {
const [isLoading, setIsLoading] = useState(false); const [isLoading, setIsLoading] = useState(false);
const { t } = useTranslation(); const { t } = useTranslation();
const deleteAllMonitors = async () => { const deleteAllMonitors = async () => {
@@ -465,7 +459,7 @@ const useDeleteAllMonitors = () => {
return [deleteAllMonitors, isLoading]; return [deleteAllMonitors, isLoading];
}; };
const useDeleteMonitorStats = () => { export const useDeleteMonitorStats = () => {
const { t } = useTranslation(); const { t } = useTranslation();
const [isLoading, setIsLoading] = useState(false); const [isLoading, setIsLoading] = useState(false);
const deleteMonitorStats = async () => { const deleteMonitorStats = async () => {
@@ -483,7 +477,7 @@ const useDeleteMonitorStats = () => {
return [deleteMonitorStats, isLoading]; return [deleteMonitorStats, isLoading];
}; };
const useCreateBulkMonitors = () => { export const useCreateBulkMonitors = () => {
const [isLoading, setIsLoading] = useState(false); const [isLoading, setIsLoading] = useState(false);
const createBulkMonitors = async (file, user) => { const createBulkMonitors = async (file, user) => {
@@ -506,7 +500,7 @@ const useCreateBulkMonitors = () => {
return [createBulkMonitors, isLoading]; return [createBulkMonitors, isLoading];
}; };
const useExportMonitors = () => { export const useExportMonitors = () => {
const [isLoading, setIsLoading] = useState(false); const [isLoading, setIsLoading] = useState(false);
const { t } = useTranslation(); const { t } = useTranslation();
@@ -539,7 +533,7 @@ const useExportMonitors = () => {
return [exportMonitors, isLoading]; return [exportMonitors, isLoading];
}; };
const useFetchJson = () => { export const useFetchJson = () => {
const [isLoading, setIsLoading] = useState(false); const [isLoading, setIsLoading] = useState(false);
const fetchJson = async () => { const fetchJson = async () => {
try { try {
@@ -555,25 +549,3 @@ const useFetchJson = () => {
}; };
return [fetchJson, isLoading]; return [fetchJson, isLoading];
}; };
export {
useFetchMonitorsWithSummary,
useFetchMonitorsWithChecks,
useFetchMonitorsByTeamId,
useFetchStatsByMonitorId,
useFetchMonitorById,
useFetchUptimeMonitorById,
useFetchHardwareMonitorById,
useCreateMonitor,
useFetchGlobalSettings,
useDeleteMonitor,
useUpdateMonitor,
usePauseMonitor,
useAddDemoMonitors,
useDeleteAllMonitors,
useDeleteMonitorStats,
useCreateBulkMonitors,
useExportMonitors,
useFetchMonitorGames,
useFetchJson,
};
@@ -1,6 +1,6 @@
import { useState, useEffect } from "react"; import { useState, useEffect } from "react";
import { networkService } from "../../main.jsx"; import { networkService } from "../main.jsx";
import { createToast } from "../../Utils/toastUtils.jsx"; import { createToast } from "../Utils/toastUtils.jsx";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
const useFetchSettings = ({ setSettingsData, setIsApiKeySet, setIsEmailPasswordSet }) => { const useFetchSettings = ({ setSettingsData, setIsApiKeySet, setIsEmailPasswordSet }) => {
@@ -42,11 +42,11 @@ const useSaveSettings = ({
setIsLoading(true); setIsLoading(true);
try { try {
const settingsResponse = await networkService.updateAppSettings({ settings }); const settingsResponse = await networkService.updateAppSettings({ settings });
if (settings.checkTTL) { // if (settings.checkTTL) {
await networkService.updateChecksTTL({ // await networkService.updateChecksTTL({
ttl: settings.checkTTL, // ttl: settings.checkTTL,
}); // });
} // }
setIsApiKeySet(settingsResponse.data.data.pagespeedKeySet); setIsApiKeySet(settingsResponse.data.data.pagespeedKeySet);
setIsEmailPasswordSet(settingsResponse.data.data.emailPasswordSet); setIsEmailPasswordSet(settingsResponse.data.data.emailPasswordSet);
if (settingsResponse.data.data.pagespeedKeySet === true) { if (settingsResponse.data.data.pagespeedKeySet === true) {
File renamed without changes.
File renamed without changes.
@@ -1,9 +1,9 @@
import { useState, useEffect, useCallback } from "react"; import { useState, useEffect, useCallback } from "react";
import { createToast } from "../../Utils/toastUtils.jsx"; import { createToast } from "../Utils/toastUtils.jsx";
import { networkService } from "../../main.jsx"; import { networkService } from "../main.jsx";
import { useNavigate } from "react-router-dom"; import { useNavigate } from "react-router-dom";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { NOTIFICATION_TYPES } from "../../Pages/v1/Notifications/utils.js"; import { NOTIFICATION_TYPES } from "../Pages/Notifications/utils.js";
const useCreateNotification = () => { const useCreateNotification = () => {
const navigate = useNavigate(); const navigate = useNavigate();
@@ -1,7 +1,7 @@
import { useState } from "react"; import { useState } from "react";
import { networkService } from "../../main.jsx"; import { networkService } from "../main.jsx";
import { useSelector } from "react-redux"; import { useSelector } from "react-redux";
import { createToast } from "../../Utils/toastUtils.jsx"; import { createToast } from "../Utils/toastUtils.jsx";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
const useSendTestEmail = () => { const useSendTestEmail = () => {
@@ -1,6 +1,6 @@
import { useEffect, useState, useCallback } from "react"; import { useEffect, useState, useCallback } from "react";
import { networkService } from "../../main.jsx"; import { networkService } from "../main.jsx";
import { createToast } from "../../Utils/toastUtils.jsx"; import { createToast } from "../Utils/toastUtils.jsx";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
export const useGetUser = (userId) => { export const useGetUser = (userId) => {
File renamed without changes.
@@ -1,8 +1,8 @@
import { useState, useEffect } from "react"; import { useState, useEffect } from "react";
import { ROLES } from "../../../../../Utils/roleUtils.js"; import { ROLES } from "../../../../Utils/roleUtils.js";
import { editUserValidation } from "../../../../../Validation/validation.js"; import { editUserValidation } from "../../../../Validation/validation.js";
import Joi from "joi"; import Joi from "joi";
import { createToast } from "../../../../../Utils/toastUtils.jsx"; import { createToast } from "../../../../Utils/toastUtils.jsx";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
export const useEditUserForm = (user) => { export const useEditUserForm = (user) => {
const [searchInput, setSearchInput] = useState(""); const [searchInput, setSearchInput] = useState("");
@@ -11,8 +11,8 @@ import ChangePasswordModal from "@/Pages/Account/components/ChangePasswordModal/
import { useParams } from "react-router-dom"; import { useParams } from "react-router-dom";
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { useGetUser, useEditUser } from "../../../../Hooks/v1/userHooks.js"; import { useGetUser, useEditUser } from "../../../Hooks/userHooks.js";
import { EDITABLE_ROLES, ROLES } from "../../../../Utils/roleUtils.js"; import { EDITABLE_ROLES, ROLES } from "../../../Utils/roleUtils.js";
import { useEditUserForm, useValidateEditUserForm } from "./hooks/editUser.js"; import { useEditUserForm, useValidateEditUserForm } from "./hooks/editUser.js";
import { useSelector } from "react-redux"; import { useSelector } from "react-redux";
@@ -1,5 +1,5 @@
import { useState } from "react"; import { useState } from "react";
import { newOrChangedCredentials } from "../../../../../../Validation/validation.js"; import { newOrChangedCredentials } from "../../../../../Validation/validation.js";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
const useAddTeamMember = () => { const useAddTeamMember = () => {
const { t } = useTranslation(); const { t } = useTranslation();
@@ -2,10 +2,10 @@ import { Button, Stack } from "@mui/material";
import { GenericDialog } from "@/Components/v1/Dialog/genericDialog.jsx"; import { GenericDialog } from "@/Components/v1/Dialog/genericDialog.jsx";
import TextInput from "@/Components/v1/Inputs/TextInput/index.jsx"; import TextInput from "@/Components/v1/Inputs/TextInput/index.jsx";
import Select from "@/Components/v1/Inputs/Select/index.jsx"; import Select from "@/Components/v1/Inputs/Select/index.jsx";
import { useGetInviteToken } from "../../../../../Hooks/v1/inviteHooks.js"; import { useGetInviteToken } from "../../../../Hooks/inviteHooks.js";
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { createToast } from "../../../../../Utils/toastUtils.jsx"; import { createToast } from "../../../../Utils/toastUtils.jsx";
import { useState } from "react"; import { useState } from "react";
import PasswordTooltip from "../../../Auth/components/PasswordTooltip.jsx"; import PasswordTooltip from "../../../Auth/components/PasswordTooltip.jsx";
import useAddTeamMember from "./hooks/useAddTeamMember.jsx"; import useAddTeamMember from "./hooks/useAddTeamMember.jsx";
@@ -2,12 +2,12 @@ import { useState } from "react";
import { Button, Stack } from "@mui/material"; import { Button, Stack } from "@mui/material";
import { GenericDialog } from "@/Components/v1/Dialog/genericDialog"; import { GenericDialog } from "@/Components/v1/Dialog/genericDialog";
import TextInput from "@/Components/v1/Inputs/TextInput"; import TextInput from "@/Components/v1/Inputs/TextInput";
import PasswordTooltip from "@/Pages/v1/Auth/components/PasswordTooltip"; import PasswordTooltip from "@/Pages/Auth/components/PasswordTooltip";
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { createToast } from "../../../../Utils/toastUtils"; import { createToast } from "../../../../Utils/toastUtils";
import { PasswordEndAdornment } from "@/Components/v1/Inputs/TextInput/Adornments"; import { PasswordEndAdornment } from "@/Components/v1/Inputs/TextInput/Adornments";
import usePasswordFeedback from "@/Pages/v1/Auth/hooks/usePasswordFeedback"; import usePasswordFeedback from "@/Pages/Auth/hooks/usePasswordFeedback";
import PropTypes from "prop-types"; import PropTypes from "prop-types";
const ChangePasswordModal = ({ isSaving, isLoading, changePassword }) => { const ChangePasswordModal = ({ isSaving, isLoading, changePassword }) => {
@@ -4,12 +4,12 @@ import { useTheme } from "@emotion/react";
import { Box, Stack, Typography, Button } from "@mui/material"; import { Box, Stack, Typography, Button } from "@mui/material";
import { PasswordEndAdornment } from "@/Components/v1/Inputs/TextInput/Adornments/index.jsx"; import { PasswordEndAdornment } from "@/Components/v1/Inputs/TextInput/Adornments/index.jsx";
import TextInput from "@/Components/v1/Inputs/TextInput/index.jsx"; import TextInput from "@/Components/v1/Inputs/TextInput/index.jsx";
import { newOrChangedCredentials } from "../../../../Validation/validation.js"; import { newOrChangedCredentials } from "../../../Validation/validation.js";
import Alert from "@/Components/v1/Alert/index.jsx"; import Alert from "@/Components/v1/Alert/index.jsx";
import { update } from "../../../../Features/Auth/authSlice.js"; import { update } from "../../../Features/Auth/authSlice.js";
import { useDispatch, useSelector } from "react-redux"; import { useDispatch, useSelector } from "react-redux";
import { createToast } from "../../../../Utils/toastUtils.jsx"; import { createToast } from "../../../Utils/toastUtils.jsx";
import { getTouchedFieldErrors } from "../../../../Validation/error.js"; import { getTouchedFieldErrors } from "../../../Validation/error.js";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
const defaultPasswordsState = { const defaultPasswordsState = {
@@ -5,15 +5,11 @@ import { Box, Button, Divider, Stack, Typography } from "@mui/material";
import Avatar from "@/Components/v1/Avatar/index.jsx"; import Avatar from "@/Components/v1/Avatar/index.jsx";
import TextInput from "@/Components/v1/Inputs/TextInput/index.jsx"; import TextInput from "@/Components/v1/Inputs/TextInput/index.jsx";
import ImageUpload from "@/Components/v1/Inputs/ImageUpload/index.jsx"; import ImageUpload from "@/Components/v1/Inputs/ImageUpload/index.jsx";
import { newOrChangedCredentials } from "../../../../Validation/validation.js"; import { newOrChangedCredentials } from "../../../Validation/validation.js";
import { useDispatch, useSelector } from "react-redux"; import { useDispatch, useSelector } from "react-redux";
import { import { clearAuthState, deleteUser, update } from "../../../Features/Auth/authSlice.js";
clearAuthState, import { createToast } from "../../../Utils/toastUtils.jsx";
deleteUser, import { logger } from "../../../Utils/Logger.js";
update,
} from "../../../../Features/Auth/authSlice.js";
import { createToast } from "../../../../Utils/toastUtils.jsx";
import { logger } from "../../../../Utils/Logger.js";
import { GenericDialog } from "@/Components/v1/Dialog/genericDialog.jsx"; import { GenericDialog } from "@/Components/v1/Dialog/genericDialog.jsx";
import Dialog from "@/Components/v1/Dialog/index.jsx"; import Dialog from "@/Components/v1/Dialog/index.jsx";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
@@ -3,7 +3,7 @@ import DataTable from "@/Components/v1/Table/index.jsx";
import DeleteOutlineRoundedIcon from "@mui/icons-material/DeleteOutlineRounded"; import DeleteOutlineRoundedIcon from "@mui/icons-material/DeleteOutlineRounded";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { ROLES } from "../../../../../Utils/roleUtils.js"; import { ROLES } from "../../../../Utils/roleUtils.js";
const RoleTable = ({ roles, handleDeleteRole }) => { const RoleTable = ({ roles, handleDeleteRole }) => {
const { t } = useTranslation(); const { t } = useTranslation();
@@ -4,16 +4,16 @@ import { Button, ButtonGroup, Stack, Typography } from "@mui/material";
import { useEffect, useState } from "react"; import { useEffect, useState } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import TextInput from "@/Components/v1/Inputs/TextInput/index.jsx"; import TextInput from "@/Components/v1/Inputs/TextInput/index.jsx";
import { newOrChangedCredentials } from "../../../../Validation/validation.js"; import { newOrChangedCredentials } from "../../../Validation/validation.js";
import { networkService } from "../../../../main.jsx"; import { networkService } from "../../../main.jsx";
import { createToast } from "../../../../Utils/toastUtils.jsx"; import { createToast } from "../../../Utils/toastUtils.jsx";
import Select from "@/Components/v1/Inputs/Select/index.jsx"; import Select from "@/Components/v1/Inputs/Select/index.jsx";
import { GenericDialog } from "@/Components/v1/Dialog/genericDialog.jsx"; import { GenericDialog } from "@/Components/v1/Dialog/genericDialog.jsx";
import AddTeamMember from "./AddTeamMember/index.jsx"; import AddTeamMember from "./AddTeamMember/index.jsx";
import DataTable from "@/Components/v1/Table/index.jsx"; import DataTable from "@/Components/v1/Table/index.jsx";
import { useGetInviteToken } from "../../../../Hooks/v1/inviteHooks.js"; import { useGetInviteToken } from "../../../Hooks/inviteHooks.js";
import { useNavigate } from "react-router-dom"; import { useNavigate } from "react-router-dom";
import { useIsSuperAdmin } from "../../../../Hooks/v1/useIsAdmin.js"; import { useIsSuperAdmin } from "@/Hooks/useIsAdmin.js";
import AddMemberMenu from "./AddMemberMenu/index.jsx"; import AddMemberMenu from "./AddMemberMenu/index.jsx";
/** /**
* TeamPanel component manages the organization and team members, * TeamPanel component manages the organization and team members,
File renamed without changes.
@@ -3,12 +3,12 @@ import { useEffect, useState } from "react";
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
import { useDispatch } from "react-redux"; import { useDispatch } from "react-redux";
import { useNavigate } from "react-router-dom"; import { useNavigate } from "react-router-dom";
import { createToast } from "../../../Utils/toastUtils.jsx"; import { createToast } from "../../Utils/toastUtils.jsx";
import { forgotPassword } from "../../../Features/Auth/authSlice.js"; import { forgotPassword } from "../../Features/Auth/authSlice.js";
import { Trans, useTranslation } from "react-i18next"; import { Trans, useTranslation } from "react-i18next";
import Background from "../../../assets/Images/background-grid.svg?react"; import Background from "@/assets/Images/background-grid.svg?react";
import EmailIcon from "../../../assets/icons/email.svg?react"; import EmailIcon from "@/assets/icons/email.svg?react";
import Logo from "../../../assets/icons/checkmate-icon.svg?react"; import Logo from "@/assets/icons/checkmate-icon.svg?react";
import IconBox from "@/Components/v1/IconBox/index.jsx"; import IconBox from "@/Components/v1/IconBox/index.jsx";
import "./index.css"; import "./index.css";
@@ -1,15 +1,15 @@
import { Box, Stack, Typography, Button } from "@mui/material"; import { Box, Stack, Typography, Button } from "@mui/material";
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
import { createToast } from "../../../Utils/toastUtils.jsx"; import { createToast } from "../../Utils/toastUtils.jsx";
import { useDispatch, useSelector } from "react-redux"; import { useDispatch, useSelector } from "react-redux";
import { forgotPassword } from "../../../Features/Auth/authSlice.js"; import { forgotPassword } from "../../Features/Auth/authSlice.js";
import { useEffect, useState } from "react"; import { useEffect, useState } from "react";
import { newOrChangedCredentials } from "../../../Validation/validation.js"; import { newOrChangedCredentials } from "../../Validation/validation.js";
import { useNavigate } from "react-router-dom"; import { useNavigate } from "react-router-dom";
import TextInput from "@/Components/v1/Inputs/TextInput/index.jsx"; import TextInput from "@/Components/v1/Inputs/TextInput/index.jsx";
import Logo from "../../../assets/icons/checkmate-icon.svg?react"; import Logo from "@/assets/icons/checkmate-icon.svg?react";
import Key from "../../../assets/icons/key.svg?react"; import Key from "@/assets/icons/key.svg?react";
import Background from "../../../assets/Images/background-grid.svg?react"; import Background from "@/assets/Images/background-grid.svg?react";
import IconBox from "@/Components/v1/IconBox/index.jsx"; import IconBox from "@/Components/v1/IconBox/index.jsx";
import { Trans, useTranslation } from "react-i18next"; import { Trans, useTranslation } from "react-i18next";
import "./index.css"; import "./index.css";
@@ -1,7 +1,7 @@
import { useDispatch } from "react-redux"; import { useDispatch } from "react-redux";
import { login } from "../../../../../Features/Auth/authSlice.js"; import { login } from "../../../../Features/Auth/authSlice.js";
import { useNavigate } from "react-router-dom"; import { useNavigate } from "react-router-dom";
import { createToast } from "../../../../../Utils/toastUtils.jsx"; import { createToast } from "../../../../Utils/toastUtils.jsx";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
const useLoginSubmit = () => { const useLoginSubmit = () => {
@@ -1,5 +1,5 @@
import { useState } from "react"; import { useState } from "react";
import { loginCredentials } from "../../../../../Validation/validation.js"; import { loginCredentials } from "../../../../Validation/validation.js";
const useValidateLoginForm = () => { const useValidateLoginForm = () => {
const [errors, setErrors] = useState({ const [errors, setErrors] = useState({
@@ -2,10 +2,10 @@ import { Box, Button, Stack, Typography } from "@mui/material";
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
import { useNavigate } from "react-router-dom"; import { useNavigate } from "react-router-dom";
import { useDispatch } from "react-redux"; import { useDispatch } from "react-redux";
import { clearAuthState } from "../../../Features/Auth/authSlice.js"; import { clearAuthState } from "../../Features/Auth/authSlice.js";
import Background from "../../../assets/Images/background-grid.svg?react"; import Background from "@/assets/Images/background-grid.svg?react";
import ConfirmIcon from "../../../assets/icons/check-outlined.svg?react"; import ConfirmIcon from "@/assets/icons/check-outlined.svg?react";
import Logo from "../../../assets/icons/checkmate-icon.svg?react"; import Logo from "@/assets/icons/checkmate-icon.svg?react";
import IconBox from "@/Components/v1/IconBox/index.jsx"; import IconBox from "@/Components/v1/IconBox/index.jsx";
import { Trans, useTranslation } from "react-i18next"; import { Trans, useTranslation } from "react-i18next";
import "./index.css"; import "./index.css";
@@ -13,11 +13,11 @@ import { useState, useEffect } from "react";
import { useNavigate } from "react-router-dom"; import { useNavigate } from "react-router-dom";
import { useDispatch, useSelector } from "react-redux"; import { useDispatch, useSelector } from "react-redux";
import { useParams } from "react-router-dom"; import { useParams } from "react-router-dom";
import { networkService } from "../../../../main.jsx"; import { networkService } from "../../../main.jsx";
import { newOrChangedCredentials } from "../../../../Validation/validation.js"; import { newOrChangedCredentials } from "../../../Validation/validation.js";
import { register } from "../../../../Features/Auth/authSlice.js"; import { register } from "../../../Features/Auth/authSlice.js";
import AuthPageWrapper from "../components/AuthPageWrapper.jsx"; import AuthPageWrapper from "../components/AuthPageWrapper.jsx";
import { createToast } from "../../../../Utils/toastUtils.jsx"; import { createToast } from "../../../Utils/toastUtils.jsx";
import PropTypes from "prop-types"; import PropTypes from "prop-types";
const getFeedbackStatus = (form, errors, field, criteria) => { const getFeedbackStatus = (form, errors, field, criteria) => {
@@ -4,16 +4,16 @@ import { useNavigate } from "react-router-dom";
import { useParams } from "react-router-dom"; import { useParams } from "react-router-dom";
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
import { Box, Stack, Typography, Button } from "@mui/material"; import { Box, Stack, Typography, Button } from "@mui/material";
import { setNewPassword } from "../../../Features/Auth/authSlice.js"; import { setNewPassword } from "../../Features/Auth/authSlice.js";
import { createToast } from "../../../Utils/toastUtils.jsx"; import { createToast } from "../../Utils/toastUtils.jsx";
import { newOrChangedCredentials } from "../../../Validation/validation.js"; import { newOrChangedCredentials } from "../../Validation/validation.js";
import Check from "@/Components/v1/Check/Check.jsx"; import Check from "@/Components/v1/Check/Check.jsx";
import TextInput from "@/Components/v1/Inputs/TextInput/index.jsx"; import TextInput from "@/Components/v1/Inputs/TextInput/index.jsx";
import { PasswordEndAdornment } from "@/Components/v1/Inputs/TextInput/Adornments/index.jsx"; import { PasswordEndAdornment } from "@/Components/v1/Inputs/TextInput/Adornments/index.jsx";
import IconBox from "@/Components/v1/IconBox/index.jsx"; import IconBox from "@/Components/v1/IconBox/index.jsx";
import LockIcon from "../../../assets/icons/lock.svg?react"; import LockIcon from "@/assets/icons/lock.svg?react";
import Logo from "../../../assets/icons/checkmate-icon.svg?react"; import Logo from "@/assets/icons/checkmate-icon.svg?react";
import Background from "../../../assets/Images/background-grid.svg?react"; import Background from "@/assets/Images/background-grid.svg?react";
import "./index.css"; import "./index.css";
import { useValidatePassword } from "./hooks/useValidatePassword.jsx"; import { useValidatePassword } from "./hooks/useValidatePassword.jsx";
import { Trans, useTranslation } from "react-i18next"; import { Trans, useTranslation } from "react-i18next";
@@ -1,8 +1,8 @@
// Components // Components
import Stack from "@mui/material/Stack"; import Stack from "@mui/material/Stack";
import Typography from "@mui/material/Typography"; import Typography from "@mui/material/Typography";
import Logo from "../../../../assets/icons/checkmate-icon.svg?react"; import Logo from "@/assets/icons/checkmate-icon.svg?react";
import LanguageSelector from "../../../../Components/LanguageSelector.jsx"; import LanguageSelector from "@/Components/LanguageSelector.jsx";
import ThemeSwitch from "@/Components/v1/ThemeSwitch/index.jsx"; import ThemeSwitch from "@/Components/v1/ThemeSwitch/index.jsx";
// Utils // Utils
@@ -1,10 +1,10 @@
import Background from "../../../../assets/Images/background-grid.svg?react"; import Background from "@/assets/Images/background-grid.svg?react";
import Stack from "@mui/material/Stack"; import Stack from "@mui/material/Stack";
import Box from "@mui/material/Box"; import Box from "@mui/material/Box";
import Typography from "@mui/material/Typography"; import Typography from "@mui/material/Typography";
import AuthHeader from "./AuthHeader.jsx"; import AuthHeader from "./AuthHeader.jsx";
import { useTheme } from "@mui/material/styles"; import { useTheme } from "@mui/material/styles";
import Logo from "../../../../assets/icons/checkmate-icon.svg?react"; import Logo from "@/assets/icons/checkmate-icon.svg?react";
import PropTypes from "prop-types"; import PropTypes from "prop-types";
const AuthPageWrapper = ({ children, heading, welcome }) => { const AuthPageWrapper = ({ children, heading, welcome }) => {
@@ -1,5 +1,5 @@
import { useState } from "react"; import { useState } from "react";
import { newOrChangedCredentials } from "../../../../Validation/validation.js"; import { newOrChangedCredentials } from "../../../Validation/validation.js";
const usePasswordFeedback = () => { const usePasswordFeedback = () => {
const [feedback, setFeedback] = useState({}); const [feedback, setFeedback] = useState({});
@@ -1,5 +1,5 @@
import { useMemo, useState } from "react"; import { useMemo, useState } from "react";
import { newOrChangedCredentials } from "../../../../Validation/validation.js"; import { newOrChangedCredentials } from "../../../Validation/validation.js";
const getFeedbackStatus = (form, errors, field, criteria) => { const getFeedbackStatus = (form, errors, field, criteria) => {
const fieldErrors = errors[field]; const fieldErrors = errors[field];
File renamed without changes.
@@ -13,14 +13,16 @@ import GenericFallback from "@/Components/v1/GenericFallback/index.jsx";
import NetworkError from "@/Components/v1/GenericFallback/NetworkError.jsx"; import NetworkError from "@/Components/v1/GenericFallback/NetworkError.jsx";
//Utils //Utils
import { formatDateWithTz } from "../../../../../Utils/timeUtils.js"; import { formatDateWithTz } from "@/Utils/timeUtils.js";
import { useSelector } from "react-redux"; import { useSelector } from "react-redux";
import { useState } from "react"; import { useState } from "react";
import PropTypes from "prop-types"; import PropTypes from "prop-types";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { useFetchChecksTeam } from "../../../../../Hooks/v1/checkHooks.js"; import {
import { useFetchChecksByMonitor } from "../../../../../Hooks/v1/checkHooks.js"; useFetchChecksTeam,
import { useResolveIncident } from "../../../../../Hooks/v1/checkHooks.js"; useFetchChecksByMonitor,
useResolveIncident,
} from "@/Hooks/checkHooks.js";
import { Button, Typography, useTheme } from "@mui/material"; import { Button, Typography, useTheme } from "@mui/material";
import { lighten } from "@mui/material/styles"; import { lighten } from "@mui/material/styles";
@@ -1,11 +1,11 @@
import PropTypes from "prop-types"; import PropTypes from "prop-types";
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
import { Box, Stack, Typography } from "@mui/material"; import { Box, Stack, Typography } from "@mui/material";
import Background from "../../../../../assets/Images/background-grid.svg?react"; import Background from "@/assets/Images/background-grid.svg?react";
import AlertIcon from "../../../../../assets/icons/alert-icon.svg?react"; import AlertIcon from "@/assets/icons/alert-icon.svg?react";
import CheckIcon from "../../../../../assets/icons/check-icon.svg?react"; import CheckIcon from "@/assets/icons/check-icon.svg?react";
import CloseIcon from "../../../../../assets/icons/close-icon.svg?react"; import CloseIcon from "@/assets/icons/close-icon.svg?react";
import WarningIcon from "../../../../../assets/icons/warning-icon.svg?react"; import WarningIcon from "@/assets/icons/warning-icon.svg?react";
const StatusBox = ({ title, value, status }) => { const StatusBox = ({ title, value, status }) => {
const theme = useTheme(); const theme = useTheme();
@@ -9,9 +9,11 @@ import { Box, Button } from "@mui/material";
//Utils //Utils
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
import { useFetchMonitorsByTeamId } from "../../../Hooks/v1/monitorHooks.js"; import { useFetchMonitorsByTeamId } from "@/Hooks/monitorHooks.js";
import { useFetchChecksSummaryByTeamId } from "../../../Hooks/v1/checkHooks.js"; import {
import { useAcknowledgeChecks } from "../../../Hooks/v1/checkHooks.js"; useFetchChecksSummaryByTeamId,
useAcknowledgeChecks,
} from "@/Hooks/checkHooks.js";
import { useState, useEffect } from "react"; import { useState, useEffect } from "react";
import NetworkError from "@/Components/v1/GenericFallback/NetworkError.jsx"; import NetworkError from "@/Components/v1/GenericFallback/NetworkError.jsx";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
@@ -8,7 +8,7 @@ import GenericFallback from "@/Components/v1/GenericFallback/index.jsx";
import NetworkError from "@/Components/v1/GenericFallback/NetworkError.jsx"; import NetworkError from "@/Components/v1/GenericFallback/NetworkError.jsx";
//Utils //Utils
import { formatDateWithTz } from "../../../../../Utils/timeUtils.js"; import { formatDateWithTz } from "../../../../Utils/timeUtils.js";
import { useSelector } from "react-redux"; import { useSelector } from "react-redux";
import PropTypes from "prop-types"; import PropTypes from "prop-types";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
@@ -1,6 +1,6 @@
import { useState, useCallback } from "react"; import { useState, useCallback } from "react";
import { networkService } from "../../../../main.jsx"; import { networkService } from "../../../main.jsx";
import { createToast } from "../../../../Utils/toastUtils.jsx"; import { createToast } from "../../../Utils/toastUtils.jsx";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
/** /**
* Hook to fetch and manage incidents * Hook to fetch and manage incidents
@@ -14,7 +14,7 @@ import { useTranslation } from "react-i18next";
// Hooks // Hooks
import useFetchIncidents from "./hooks/useFetchIncidents.js"; import useFetchIncidents from "./hooks/useFetchIncidents.js";
import { useFetchMonitorsByTeamId } from "../../../Hooks/v1/monitorHooks.js"; import { useFetchMonitorsByTeamId } from "../../Hooks/monitorHooks.js";
const Incidents2 = () => { const Incidents2 = () => {
const { t } = useTranslation(); const { t } = useTranslation();
@@ -34,7 +34,7 @@ const Incidents2 = () => {
setUpdateTrigger((prev) => !prev); setUpdateTrigger((prev) => !prev);
}; };
const [monitors, , isLoadingMonitors, monitorsNetworkError] = useFetchMonitorsByTeamId( const [monitors, isLoadingMonitors, monitorsNetworkError] = useFetchMonitorsByTeamId(
{} {}
); );
@@ -1,7 +1,7 @@
import ConfigBox from "@/Components/v1/ConfigBox/index.jsx"; import ConfigBox from "@/Components/v1/ConfigBox/index.jsx";
import { Box, Stack, Typography } from "@mui/material"; import { Box, Stack, Typography } from "@mui/material";
import { CustomThreshold } from "./CustomThreshold/index.jsx"; import { CustomThreshold } from "./CustomThreshold/index.jsx";
import { capitalizeFirstLetter } from "../../../../../Utils/stringUtils.js"; import { capitalizeFirstLetter } from "../../../../Utils/stringUtils.js";
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import PropTypes from "prop-types"; import PropTypes from "prop-types";
@@ -1,5 +1,5 @@
import { Box, Stack, Tooltip, Typography } from "@mui/material"; import { Box, Stack, Tooltip, Typography } from "@mui/material";
import { useMonitorUtils } from "../../../../../Hooks/v1/useMonitorUtils.js"; import { useMonitorUtils } from "../../../../Hooks/useMonitorUtils.js";
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import PulseDot from "@/Components/v1/Animated/PulseDot.jsx"; import PulseDot from "@/Components/v1/Animated/PulseDot.jsx";
@@ -1,7 +1,4 @@
import { import { useCreateMonitor, useUpdateMonitor } from "../../../../Hooks/monitorHooks.js";
useCreateMonitor,
useUpdateMonitor,
} from "../../../../../Hooks/v1/monitorHooks.js";
const useInfrastructureSubmit = () => { const useInfrastructureSubmit = () => {
const [createMonitor, isCreating] = useCreateMonitor(); const [createMonitor, isCreating] = useCreateMonitor();
const [updateMonitor, isUpdating] = useUpdateMonitor(); const [updateMonitor, isUpdating] = useUpdateMonitor();
@@ -1,6 +1,6 @@
import { useState } from "react"; import { useState } from "react";
import { infrastructureMonitorValidation } from "../../../../../Validation/validation.js"; import { infrastructureMonitorValidation } from "../../../../Validation/validation.js";
import { createToast } from "../../../../../Utils/toastUtils.jsx"; import { createToast } from "../../../../Utils/toastUtils.jsx";
const useValidateInfrastructureForm = () => { const useValidateInfrastructureForm = () => {
const [errors, setErrors] = useState({}); const [errors, setErrors] = useState({});
@@ -13,8 +13,8 @@ import CustomAlertsSection from "./Components/CustomAlertsSection.jsx";
import DiskSelection from "./Components/DiskSelection.jsx"; import DiskSelection from "./Components/DiskSelection.jsx";
// Utils // Utils
import NotificationsConfig from "@/Components/v1/NotificationConfig/index.jsx"; import NotificationsConfig from "@/Components/v1/NotificationConfig/index.jsx";
import { useGetNotificationsByTeamId } from "../../../../Hooks/v1/useNotifications.js"; import { useGetNotificationsByTeamId } from "../../../Hooks/useNotifications.js";
import { networkService } from "../../../../Utils/NetworkService"; import { networkService } from "../../../Utils/NetworkService.js";
import { useParams } from "react-router-dom"; import { useParams } from "react-router-dom";
import { useState, useEffect } from "react"; import { useState, useEffect } from "react";
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
@@ -24,7 +24,7 @@ import {
useFetchGlobalSettings, useFetchGlobalSettings,
useFetchHardwareMonitorById, useFetchHardwareMonitorById,
usePauseMonitor, usePauseMonitor,
} from "../../../../Hooks/v1/monitorHooks.js"; } from "../../../Hooks/monitorHooks.js";
import useInfrastructureMonitorForm from "./hooks/useInfrastructureMonitorForm.jsx"; import useInfrastructureMonitorForm from "./hooks/useInfrastructureMonitorForm.jsx";
import useValidateInfrastructureForm from "./hooks/useValidateInfrastructureForm.jsx"; import useValidateInfrastructureForm from "./hooks/useValidateInfrastructureForm.jsx";
import useInfrastructureSubmit from "./hooks/useInfrastructureSubmit.jsx"; import useInfrastructureSubmit from "./hooks/useInfrastructureSubmit.jsx";
@@ -150,7 +150,8 @@ const CreateInfrastructureMonitor = () => {
const handleRemove = async (event) => { const handleRemove = async (event) => {
event.preventDefault(); event.preventDefault();
await deleteMonitor({ monitor, redirect: "/infrastructure" }); const TEMP_MONITOR = { id: monitor._id };
await deleteMonitor({ monitor: TEMP_MONITOR, redirect: "/infrastructure" });
}; };
const isBusy = const isBusy =
@@ -4,7 +4,7 @@ import StatusBoxes from "@/Components/v1/StatusBoxes/index.jsx";
import StatBox from "@/Components/v1/StatBox/index.jsx"; import StatBox from "@/Components/v1/StatBox/index.jsx";
//Utils //Utils
import { useMonitorUtils } from "../../../../../../Hooks/v1/useMonitorUtils.js"; import { useMonitorUtils } from "../../../../../Hooks/useMonitorUtils.js";
import { useHardwareUtils } from "../../Hooks/useHardwareUtils.jsx"; import { useHardwareUtils } from "../../Hooks/useHardwareUtils.jsx";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
@@ -13,8 +13,8 @@ import TabContext from "@mui/lab/TabContext";
// Utils // Utils
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
import { useIsAdmin } from "../../../../Hooks/v1/useIsAdmin.js"; import { useIsAdmin } from "@/Hooks/useIsAdmin.js";
import { useFetchHardwareMonitorById } from "../../../../Hooks/v1/monitorHooks.js"; import { useFetchHardwareMonitorById } from "../../../Hooks/monitorHooks.js";
import { useState } from "react"; import { useState } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { useParams } from "react-router-dom"; import { useParams } from "react-router-dom";
@@ -7,12 +7,12 @@ import { Stack } from "@mui/material";
import { InfrastructureMenu } from "../MonitorsTableMenu/index.jsx"; import { InfrastructureMenu } from "../MonitorsTableMenu/index.jsx";
import LoadingSpinner from "../../../../Uptime/Monitors/Components/LoadingSpinner/index.jsx"; import LoadingSpinner from "../../../../Uptime/Monitors/Components/LoadingSpinner/index.jsx";
// Assets // Assets
import CPUChipIcon from "../../../../../../assets/icons/cpu-chip.svg?react"; import CPUChipIcon from "@/assets/icons/cpu-chip.svg?react";
import CustomGauge from "@/Components/v1/Charts/CustomGauge/index.jsx"; import CustomGauge from "@/Components/v1/Charts/CustomGauge/index.jsx";
// Utils // Utils
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
import { useMonitorUtils } from "../../../../../../Hooks/v1/useMonitorUtils.js"; import { useMonitorUtils } from "../../../../../Hooks/useMonitorUtils.js";
import { useNavigate } from "react-router-dom"; import { useNavigate } from "react-router-dom";
import PropTypes from "prop-types"; import PropTypes from "prop-types";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
@@ -115,7 +115,7 @@ const MonitorsTable = ({
: theme.palette.success.main; : theme.palette.success.main;
return { return {
id: monitor._id, id: monitor.id,
name: monitor.name, name: monitor.name,
url: monitor.url, url: monitor.url,
processor, processor,
@@ -3,13 +3,13 @@
import { useRef, useState } from "react"; import { useRef, useState } from "react";
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
import { useNavigate } from "react-router-dom"; import { useNavigate } from "react-router-dom";
import { createToast } from "../../../../../../Utils/toastUtils.jsx"; import { createToast } from "@/Utils/toastUtils.jsx";
import { IconButton, Menu, MenuItem } from "@mui/material"; import { IconButton, Menu, MenuItem } from "@mui/material";
import Settings from "../../../../../../assets/icons/settings-bold.svg?react"; import Settings from "@/assets/icons/settings-bold.svg?react";
import PropTypes from "prop-types"; import PropTypes from "prop-types";
import Dialog from "@/Components/v1/Dialog/index.jsx"; import Dialog from "@/Components/v1/Dialog/index.jsx";
import { networkService } from "../../../../../../Utils/NetworkService.js"; import { networkService } from "@/Utils/NetworkService.js";
import { usePauseMonitor } from "../../../../../../Hooks/v1/monitorHooks.js"; import { usePauseMonitor } from "@/Hooks/monitorHooks.js";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
/** /**
@@ -11,11 +11,12 @@ import SearchComponent from "../../Uptime/Monitors/Components/SearchComponent/in
// Utils // Utils
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
import { useEffect, useState } from "react"; import { useEffect, useState } from "react";
import { useIsAdmin } from "../../../../Hooks/v1/useIsAdmin.js"; import { useIsAdmin } from "@/Hooks/useIsAdmin.js";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { useFetchMonitorsByTeamId } from "../../../../Hooks/v1/monitorHooks.js"; import { useFetchMonitorsWithChecks } from "@/Hooks/monitorHooks.js";
import { useDispatch, useSelector } from "react-redux"; import { useDispatch, useSelector } from "react-redux";
import { setRowsPerPage } from "../../../../Features/UI/uiSlice.js"; import { setRowsPerPage } from "../../../Features/UI/uiSlice.js";
// Constants // Constants
const TYPES = ["hardware"]; const TYPES = ["hardware"];
const BREADCRUMBS = [{ name: `infrastructure`, path: "/infrastructure" }]; const BREADCRUMBS = [{ name: `infrastructure`, path: "/infrastructure" }];
@@ -70,14 +71,14 @@ const InfrastructureMonitors = () => {
const field = toFilterStatus !== undefined ? "status" : undefined; const field = toFilterStatus !== undefined ? "status" : undefined;
const [monitors, summary, isLoading, networkError] = useFetchMonitorsByTeamId({ const [monitors, count, isLoading, networkError] = useFetchMonitorsWithChecks({
limit: 1,
types: TYPES, types: TYPES,
page, limit: 1,
page: page,
field: field, field: field,
filter: toFilterStatus ?? search, filter: toFilterStatus ?? search,
rowsPerPage, rowsPerPage: rowsPerPage,
updateTrigger, monitorUpdateTrigger: updateTrigger,
}); });
return ( return (
@@ -99,7 +100,7 @@ const InfrastructureMonitors = () => {
<Stack direction={"row"}> <Stack direction={"row"}>
<MonitorCountHeader <MonitorCountHeader
isLoading={isLoading} isLoading={isLoading}
monitorCount={summary?.totalMonitors ?? 0} monitorCount={count || 0}
/> />
<Filter <Filter
selectedStatus={selectedStatus} selectedStatus={selectedStatus}
@@ -122,7 +123,7 @@ const InfrastructureMonitors = () => {
isSearching={isSearching} isSearching={isSearching}
/> />
<Pagination <Pagination
itemCount={summary?.totalMonitors} itemCount={count || 0}
paginationLabel={t("monitors")} paginationLabel={t("monitors")}
page={page} page={page}
rowsPerPage={rowsPerPage} rowsPerPage={rowsPerPage}
@@ -7,7 +7,7 @@ import CircularProgress from "@mui/material/CircularProgress";
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
import PropTypes from "prop-types"; import PropTypes from "prop-types";
import { getHumanReadableDuration } from "../../../../../../Utils/timeUtils.js"; import { getHumanReadableDuration } from "../../../../../Utils/timeUtils.js";
import { formatBytes } from "../../utils/utils.js"; import { formatBytes } from "../../utils/utils.js";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
@@ -6,8 +6,8 @@ import StatBox from "@/Components/v1/StatBox/index.jsx";
import StatusBoxes from "@/Components/v1/StatusBoxes/index.jsx"; import StatusBoxes from "@/Components/v1/StatusBoxes/index.jsx";
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { useFetchDiagnostics } from "../../../../Hooks/v1/logHooks.js"; import { useFetchDiagnostics } from "../../../Hooks/logHooks.js";
import { getHumanReadableDuration } from "../../../../Utils/timeUtils.js"; import { getHumanReadableDuration } from "../../../Utils/timeUtils.js";
import { formatBytes, getPercentage } from "./utils/utils.js"; import { formatBytes, getPercentage } from "./utils/utils.js";
const Diagnostics = () => { const Diagnostics = () => {
Loaded 100 of 324 files, more files were not shown because too many files have changed in this diff. Show more