Compare commits
857
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
98943ad461 | ||
|
|
c670653ab3 | ||
|
|
e75606aad3 | ||
|
|
07b0483352 | ||
|
|
8555e7c122 | ||
|
|
734ec41ca0 | ||
|
|
5152336591 | ||
|
|
78b920aaf6 | ||
|
|
2d84fae470 | ||
|
|
97e4b105a2 | ||
|
|
a053386f4a | ||
|
|
e0991e28e5 | ||
|
|
0f26648855 | ||
|
|
6a0f3426b3 | ||
|
|
16e8035299 | ||
|
|
31b09c316a | ||
|
|
8f2072e497 | ||
|
|
514570da78 | ||
|
|
ea68e660fc | ||
|
|
527543d79f | ||
|
|
1c390a8baf | ||
|
|
43ac5b57cf | ||
|
|
1558b27497 | ||
|
|
9caa6c830f | ||
|
|
ea115ede53 | ||
|
|
8470631162 | ||
|
|
597732e109 | ||
|
|
9974fa4010 | ||
|
|
b0686c0576 | ||
|
|
a148f56b22 | ||
|
|
3b25b37c22 | ||
|
|
1e04345aa0 | ||
|
|
174c3cd47a | ||
|
|
0e149fa477 | ||
|
|
5b4a99af3d | ||
|
|
2ecdc2096e | ||
|
|
6e66a18535 | ||
|
|
bd6aa0fa3a | ||
|
|
4e678a4ce7 | ||
|
|
5999315791 | ||
|
|
0c8b8a9358 | ||
|
|
dfe62bd301 | ||
|
|
747ff824cc | ||
|
|
f12c544751 | ||
|
|
278ced2a6c | ||
|
|
88d539b2a4 | ||
|
|
f0b152fc8f | ||
|
|
dc0e198a8e | ||
|
|
0a5067ef46 | ||
|
|
4f0017c031 | ||
|
|
f0b2292f0a | ||
|
|
d74d79c332 | ||
|
|
1a096b66f7 | ||
|
|
7cb866ce4a | ||
|
|
c54582ca70 | ||
|
|
362034ba26 | ||
|
|
b536099d03 | ||
|
|
04fef2ef75 | ||
|
|
a89e5ed565 | ||
|
|
ca153b65a9 | ||
|
|
cc188b2ba3 | ||
|
|
18018ceef1 | ||
|
|
189f309631 | ||
|
|
97dd3ec9cb | ||
|
|
b4c929963f | ||
|
|
4ecc737438 | ||
|
|
bc58f6e08e | ||
|
|
4f3bcd4624 | ||
|
|
d469590ef3 | ||
|
|
35eba6897a | ||
|
|
667dc55fc8 | ||
|
|
f2d2687d2a | ||
|
|
4e3e580179 | ||
|
|
4080ac8c2c | ||
|
|
0a408f8cfd | ||
|
|
e3921beac4 | ||
|
|
4c284493ba | ||
|
|
0fcceeb7a6 | ||
|
|
f799d46025 | ||
|
|
a80df60fc1 | ||
|
|
cbec0fa065 | ||
|
|
40e5550e0f | ||
|
|
90fd9930db | ||
|
|
f10f7385b0 | ||
|
|
2d85abf030 | ||
|
|
3c0c470ca3 | ||
|
|
4c5cae8722 | ||
|
|
8650f30d12 | ||
|
|
09e37f4356 | ||
|
|
6bc8a521c9 | ||
|
|
a1e6eaa9d0 | ||
|
|
bbb61a6f88 | ||
|
|
c1d2041482 | ||
|
|
7aa05c7f85 | ||
|
|
539866e119 | ||
|
|
6f0ff1583e | ||
|
|
12b61d17f2 | ||
|
|
7426418629 | ||
|
|
3566da7515 | ||
|
|
b451489bd8 | ||
|
|
d4a0489275 | ||
|
|
080c91284d | ||
|
|
dadc74373c | ||
|
|
6fdea04416 | ||
|
|
67963823d9 | ||
|
|
ab12a9bd3a | ||
|
|
3b25c50247 | ||
|
|
63e42b7276 | ||
|
|
090d002578 | ||
|
|
ae7524f507 | ||
|
|
54d71bef61 | ||
|
|
a77c74b17c | ||
|
|
f2363a7a09 | ||
|
|
69f95723f1 | ||
|
|
1fefb038f0 | ||
|
|
85190992c7 | ||
|
|
efe87b599f | ||
|
|
ed1bcf97da | ||
|
|
56ead03416 | ||
|
|
a912a5ebb8 | ||
|
|
0fd4173816 | ||
|
|
75d3644b36 | ||
|
|
853e21623e | ||
|
|
57c3bf3240 | ||
|
|
6be1eb0a3e | ||
|
|
9d70623e0f | ||
|
|
43fe66022b | ||
|
|
294fb13005 | ||
|
|
8028cab487 | ||
|
|
8160ab4a3c | ||
|
|
6063532c79 | ||
|
|
83b628c8f9 | ||
|
|
88a91022c3 | ||
|
|
5822a363a9 | ||
|
|
464b16ec9d | ||
|
|
d54c90d511 | ||
|
|
3a5783fe91 | ||
|
|
479f22ac69 | ||
|
|
30202b2249 | ||
|
|
888910abb2 | ||
|
|
874d1b277a | ||
|
|
f34520cdbf | ||
|
|
f420044b64 | ||
|
|
53d5ae2251 | ||
|
|
bcc57c7135 | ||
|
|
6b67f4977f | ||
|
|
87255071f4 | ||
|
|
cbf1f97591 | ||
|
|
7a881fda03 | ||
|
|
50fd66ef56 | ||
|
|
f9b677b1ad | ||
|
|
b7a6d50c73 | ||
|
|
04bd7f0e2e | ||
|
|
2e7aba788d | ||
|
|
e1665b29af | ||
|
|
17450e2537 | ||
|
|
270293a2b5 | ||
|
|
a7c5b0c7fb | ||
|
|
e804c35c3a | ||
|
|
5c4133097d | ||
|
|
85f93cd6d2 | ||
|
|
d4db32e392 | ||
|
|
791b9fc7a2 | ||
|
|
206c5577a6 | ||
|
|
cbd0530d85 | ||
|
|
45ef2438de | ||
|
|
ec818eaacb | ||
|
|
91bb60f2ff | ||
|
|
443ad46fa7 | ||
|
|
f685c9cd5d | ||
|
|
0263c17618 | ||
|
|
5a12e36c7e | ||
|
|
67da6c61cf | ||
|
|
f538f61464 | ||
|
|
f6971ede69 | ||
|
|
e69283e3ed | ||
|
|
084eed85bf | ||
|
|
9a42fb031f | ||
|
|
943e88c54d | ||
|
|
24ce64b439 | ||
|
|
841d25ce3e | ||
|
|
84e4ea7b64 | ||
|
|
4b92dbd19b | ||
|
|
5eb1d54d65 | ||
|
|
a0aee182de | ||
|
|
2dca5ccb67 | ||
|
|
348eea5475 | ||
|
|
2a3683c74a | ||
|
|
806d7ae456 | ||
|
|
cac502573f | ||
|
|
830318edc3 | ||
|
|
86a55e3cfe | ||
|
|
796960aeb2 | ||
|
|
a25ff03b71 | ||
|
|
22ae6b4be6 | ||
|
|
0b5e28c296 | ||
|
|
c5c91e28f8 | ||
|
|
3ba3e4b865 | ||
|
|
77fa394004 | ||
|
|
c0ba278e47 | ||
|
|
73f41906b0 | ||
|
|
cb5af2741d | ||
|
|
af4ef87966 | ||
|
|
a154ad11b5 | ||
|
|
1bfd1c9119 | ||
|
|
fc98192bcf | ||
|
|
b1db74d96f | ||
|
|
c1258d3cdf | ||
|
|
6ffa5ac648 | ||
|
|
6395e8a10e | ||
|
|
2852d2cdce | ||
|
|
363baef7b1 | ||
|
|
a1973a6d2b | ||
|
|
12f02d6eea | ||
|
|
a6c291c8ef | ||
|
|
227dc9e7e8 | ||
|
|
38ef9ccad3 | ||
|
|
353b97e7d3 | ||
|
|
9b871ffb52 | ||
|
|
cb392eaaba | ||
|
|
dcf5a77923 | ||
|
|
ec03addba6 | ||
|
|
eefdb8d253 | ||
|
|
e539f40612 | ||
|
|
c18159afd3 | ||
|
|
5596e45ff3 | ||
|
|
bde13f4fa7 | ||
|
|
7f1c996632 | ||
|
|
396d5b369b | ||
|
|
bb8cc8b464 | ||
|
|
66efa25e2b | ||
|
|
7bef6dc0e6 | ||
|
|
1c341a4e3d | ||
|
|
f41f2322cf | ||
|
|
b653f26c96 | ||
|
|
ece1dadb78 | ||
|
|
1f003c4d48 | ||
|
|
5a468d717a | ||
|
|
975d134dd8 | ||
|
|
7a66b5310b | ||
|
|
fcfad945a0 | ||
|
|
6b4032ecfe | ||
|
|
41d6c092d4 | ||
|
|
f9e366e181 | ||
|
|
07705e9823 | ||
|
|
c48049e0af | ||
|
|
f3ba8c9815 | ||
|
|
f88e4ee6f4 | ||
|
|
53f420cf56 | ||
|
|
589825c1c5 | ||
|
|
300b1b2238 | ||
|
|
6efc05879a | ||
|
|
20dccb140e | ||
|
|
8dfedb8a52 | ||
|
|
d48cdaca9c | ||
|
|
36a53ee80b | ||
|
|
4400ca703d | ||
|
|
c1d0cb568d | ||
|
|
81e73e5adf | ||
|
|
7a84d06a79 | ||
|
|
63d2bb97ee | ||
|
|
0af7cfe714 | ||
|
|
d190f5ab02 | ||
|
|
8cfe1d3c1a | ||
|
|
1bf4c75418 | ||
|
|
7771a0ce35 | ||
|
|
fcd9e78367 | ||
|
|
6f9fefddd2 | ||
|
|
5731283c46 | ||
|
|
420ff292d9 | ||
|
|
290ee7d2df | ||
|
|
50c644231e | ||
|
|
5729b0a263 | ||
|
|
4f3f5408ef | ||
|
|
de7038d6c3 | ||
|
|
4119189c71 | ||
|
|
fd66affea8 | ||
|
|
839dc201df | ||
|
|
bbb0716251 | ||
|
|
bbdfc00eb9 | ||
|
|
ba498534e6 | ||
|
|
f51bf36ddd | ||
|
|
716479c5bb | ||
|
|
f9c85e2d76 | ||
|
|
e26f3facf1 | ||
|
|
fd5f493345 | ||
|
|
e5bb736530 | ||
|
|
d71d16ecd0 | ||
|
|
389716fa77 | ||
|
|
1bcb2ddf91 | ||
|
|
b61077bd3f | ||
|
|
1cffd51bd3 | ||
|
|
451e352458 | ||
|
|
a07e41d8f1 | ||
|
|
90e9b41973 | ||
|
|
1819df5117 | ||
|
|
6380dcc6ba | ||
|
|
6cb45ea6de | ||
|
|
67f74dd7de | ||
|
|
8f58ceafab | ||
|
|
c7aa45cd77 | ||
|
|
d0727f91dd | ||
|
|
967b2b200b | ||
|
|
d71c7c6ee1 | ||
|
|
6daa79f0ed | ||
|
|
93a5eff562 | ||
|
|
11c95f885d | ||
|
|
174665e70a | ||
|
|
64de01437e | ||
|
|
a64885e609 | ||
|
|
e354fa7ebf | ||
|
|
04cf47544a | ||
|
|
e1dfd98840 | ||
|
|
4ce4a124d6 | ||
|
|
f564636cb4 | ||
|
|
3208cc9e2c | ||
|
|
79dfa886f1 | ||
|
|
8af8efbe3b | ||
|
|
71bd1fa28f | ||
|
|
14a08a303b | ||
|
|
4645bde025 | ||
|
|
a2569c50c7 | ||
|
|
f7ae11997d | ||
|
|
0b7a41dc78 | ||
|
|
d42d5f2325 | ||
|
|
369d16c7c3 | ||
|
|
6e8172c126 | ||
|
|
794018a6ab | ||
|
|
8d6bc7bc0b | ||
|
|
30631d6ff8 | ||
|
|
56c5ad419a | ||
|
|
b852293447 | ||
|
|
d877ecf061 | ||
|
|
73e90bfab6 | ||
|
|
a55163de56 | ||
|
|
f5c6abad1b | ||
|
|
3dbbe035a8 | ||
|
|
9904626526 | ||
|
|
61f3aa1d1c | ||
|
|
a0a8ceb0db | ||
|
|
c2dece862c | ||
|
|
69018a4944 | ||
|
|
363d89e4f4 | ||
|
|
f8bb01190e | ||
|
|
00cf0b6521 | ||
|
|
a11d551a99 | ||
|
|
b35be1ecfc | ||
|
|
9d64de57b3 | ||
|
|
de6c4d9c3e | ||
|
|
e0e79fb0da | ||
|
|
3339b6b67f | ||
|
|
b511cde849 | ||
|
|
ce322a8e28 | ||
|
|
d25ca473de | ||
|
|
5292ca8988 | ||
|
|
c98cba2eef | ||
|
|
6b89db131d | ||
|
|
995ae5252d | ||
|
|
e6c268f14e | ||
|
|
5aef405414 | ||
|
|
a5112a7955 | ||
|
|
5404b65ce2 | ||
|
|
34dfe33c29 | ||
|
|
1e24c8841e | ||
|
|
0c04c06781 | ||
|
|
7441169a0e | ||
|
|
3520e5adf4 | ||
|
|
227e0128f9 | ||
|
|
2359255ef7 | ||
|
|
b074f2401f | ||
|
|
eee3caf021 | ||
|
|
f9848e4e1e | ||
|
|
8bd608bee0 | ||
|
|
ea589d6be4 | ||
|
|
5a0078cf92 | ||
|
|
f4a5bd65ad | ||
|
|
4766594413 | ||
|
|
9962866ba5 | ||
|
|
82cc289f53 | ||
|
|
117c22fae4 | ||
|
|
e0cabdb4fc | ||
|
|
155a2577d0 | ||
|
|
d627a25b40 | ||
|
|
b8a5af9c10 | ||
|
|
5b43d9d173 | ||
|
|
801b716a03 | ||
|
|
fdc3983328 | ||
|
|
0cf85f8b3b | ||
|
|
0ea4a5024a | ||
|
|
09513696ee | ||
|
|
b0da1f4259 | ||
|
|
5b96075c03 | ||
|
|
36e02e0a9a | ||
|
|
9fa0113f2b | ||
|
|
371e8cc154 | ||
|
|
7b4286646b | ||
|
|
2a8d2cb06a | ||
|
|
147eff3ede | ||
|
|
81c7c992e2 | ||
|
|
35488fed3e | ||
|
|
760abe69ed | ||
|
|
d242382abf | ||
|
|
ef61a63da0 | ||
|
|
3fa370765e | ||
|
|
3b5e793f8f | ||
|
|
b34dbec3cf | ||
|
|
90eee474d2 | ||
|
|
63416ceb4b | ||
|
|
eb8c9bea76 | ||
|
|
63b4779961 | ||
|
|
d2040495d6 | ||
|
|
f436e15569 | ||
|
|
952c70fca4 | ||
|
|
4957209307 | ||
|
|
cc9850c975 | ||
|
|
c6ac48b4ff | ||
|
|
82584d85c7 | ||
|
|
ffd67150eb | ||
|
|
44079f2eb8 | ||
|
|
f03ded4109 | ||
|
|
fa520e5f88 | ||
|
|
e9fbb472f4 | ||
|
|
de236f03eb | ||
|
|
4f043fe1d4 | ||
|
|
102bd0a5f8 | ||
|
|
118372630e | ||
|
|
27dea6a08e | ||
|
|
dd259fea89 | ||
|
|
9af25a19e5 | ||
|
|
6101fe1bfa | ||
|
|
795146c79b | ||
|
|
a69091bb28 | ||
|
|
6160806963 | ||
|
|
c1b2bda623 | ||
|
|
c0e4893f96 | ||
|
|
476ff39a17 | ||
|
|
f467ef1411 | ||
|
|
36b02e5e66 | ||
|
|
f6fd8729c3 | ||
|
|
cdfc87da09 | ||
|
|
427e5a18ea | ||
|
|
f696b4ef9b | ||
|
|
69d050ff61 | ||
|
|
7afdcb8ebc | ||
|
|
3cf7243c93 | ||
|
|
4ed0033a41 | ||
|
|
bafd82a691 | ||
|
|
adb2a383cf | ||
|
|
e91a54b75c | ||
|
|
33dfedb4d3 | ||
|
|
dde54a4e45 | ||
|
|
5f17520ba0 | ||
|
|
bebb5d6942 | ||
|
|
7c9410f9d7 | ||
|
|
348ca0dd02 | ||
|
|
1d36f40caf | ||
|
|
9006707e57 | ||
|
|
be82a7ee2d | ||
|
|
fd33b903ed | ||
|
|
ab25531758 | ||
|
|
f7f764fd68 | ||
|
|
3b0326457f | ||
|
|
7d6bc4b2dc | ||
|
|
c2487f0134 | ||
|
|
a86588f080 | ||
|
|
4e9839e2e5 | ||
|
|
487f6b222d | ||
|
|
391f42ee53 | ||
|
|
cff5508614 | ||
|
|
a0ebf7d224 | ||
|
|
ec9c79fc94 | ||
|
|
3e8d4cb49b | ||
|
|
288ac08cd6 | ||
|
|
ba35230919 | ||
|
|
048e53ea15 | ||
|
|
e498bd60b1 | ||
|
|
a4cf53ee15 | ||
|
|
3a77c6d7fa | ||
|
|
b47f3710fe | ||
|
|
9c92542653 | ||
|
|
173a4e17d2 | ||
|
|
70b197675e | ||
|
|
11dcccc085 | ||
|
|
e3e08da259 | ||
|
|
6447c315ce | ||
|
|
cb5b8e0673 | ||
|
|
f1a6afb860 | ||
|
|
5c52a208b9 | ||
|
|
4fdc0bde5c | ||
|
|
3d4ebe9588 | ||
|
|
88bb8ef2d3 | ||
|
|
64dc381e0f | ||
|
|
af82dec2ad | ||
|
|
62ea7b0e5b | ||
|
|
8747c38f40 | ||
|
|
d633fc5ccb | ||
|
|
0d7a35367f | ||
|
|
af141ec772 | ||
|
|
5784fec3d1 | ||
|
|
7436c2b5df | ||
|
|
2055943876 | ||
|
|
95cd33ac06 | ||
|
|
2a591ee503 | ||
|
|
f5aa24d77e | ||
|
|
7874439e4c | ||
|
|
7140d436a5 | ||
|
|
ba0c89fc6c | ||
|
|
d91e87f484 | ||
|
|
bf15018173 | ||
|
|
b5caabed20 | ||
|
|
8814596d6e | ||
|
|
c60d07c3a0 | ||
|
|
54ecf02d9a | ||
|
|
1ab31d19f3 | ||
|
|
2f2ce34373 | ||
|
|
0f764ca084 | ||
|
|
8b2ee8d937 | ||
|
|
ed80837810 | ||
|
|
d82877b28d | ||
|
|
cf67c82f5e | ||
|
|
5a7b51bfec | ||
|
|
206dcae196 | ||
|
|
56bfbe2c77 | ||
|
|
8aac3086b8 | ||
|
|
9255500bfc | ||
|
|
e99b87fc1e | ||
|
|
ec953ff262 | ||
|
|
68559741ba | ||
|
|
74a7f0a701 | ||
|
|
75bcf9df58 | ||
|
|
6b5fd8d17f | ||
|
|
a1069f487b | ||
|
|
86a2171988 | ||
|
|
420164d616 | ||
|
|
f0a6fc4fdf | ||
|
|
e306499bce | ||
|
|
1472a09718 | ||
|
|
1c01dcaf31 | ||
|
|
e7e4ce7f57 | ||
|
|
93c24d2f5c | ||
|
|
cdbaad5bd9 | ||
|
|
b1b27be731 | ||
|
|
01f005ca41 | ||
|
|
1326a6222b | ||
|
|
aea0b34533 | ||
|
|
d4af86f26c | ||
|
|
940247b7bf | ||
|
|
2b0c523047 | ||
|
|
4ad09fad4f | ||
|
|
665eb9a67f | ||
|
|
d1faeab042 | ||
|
|
76fa99f7bd | ||
|
|
77764c51ee | ||
|
|
8a986d2e58 | ||
|
|
e57b161be9 | ||
|
|
8de06df8c4 | ||
|
|
8e359cf145 | ||
|
|
52e598a66e | ||
|
|
0a60cc0363 | ||
|
|
75788f7cb5 | ||
|
|
b58a7ad053 | ||
|
|
f763126b38 | ||
|
|
e79bf28bdc | ||
|
|
d0b3bc60df | ||
|
|
117a2e00c4 | ||
|
|
f8e88623a8 | ||
|
|
705475e971 | ||
|
|
2b0a51520a | ||
|
|
55145a38ff | ||
|
|
25d1039376 | ||
|
|
7a6b0d5da4 | ||
|
|
e090d3cfd3 | ||
|
|
1c1ac25857 | ||
|
|
3ce40b1ab8 | ||
|
|
1494df9eb3 | ||
|
|
a70959e4a6 | ||
|
|
b6f48a910f | ||
|
|
e4d101237e | ||
|
|
7556086f71 | ||
|
|
7b619e6b31 | ||
|
|
76ab2695db | ||
|
|
418068e702 | ||
|
|
12b28ffb3f | ||
|
|
526fa24eab | ||
|
|
a13f6a34c4 | ||
|
|
f659876845 | ||
|
|
643a743d70 | ||
|
|
ab4cc80628 | ||
|
|
fb3795bd70 | ||
|
|
5c14c68899 | ||
|
|
5a878e89d0 | ||
|
|
bdb07220ed | ||
|
|
641d5e6dda | ||
|
|
b24339f232 | ||
|
|
ff324fe6e7 | ||
|
|
fee9b8a0de | ||
|
|
ad9488f54e | ||
|
|
ed77fc3a9d | ||
|
|
babd8e672f | ||
|
|
8ceac493ef | ||
|
|
fee808789f | ||
|
|
dd03c554c9 | ||
|
|
3ab4fcb277 | ||
|
|
11e3cac440 | ||
|
|
1d7f3b15a4 | ||
|
|
b7ad3c036b | ||
|
|
7b2ff593a4 | ||
|
|
916f3c0921 | ||
|
|
846f1dfa6c | ||
|
|
3f631ff382 | ||
|
|
43a370e162 | ||
|
|
64320c7aca | ||
|
|
61cedfb2b7 | ||
|
|
a9ce980d03 | ||
|
|
8409f08a2d | ||
|
|
ef2cccf16e | ||
|
|
0285302ecc | ||
|
|
668ea7418d | ||
|
|
b12bdfcc22 | ||
|
|
65de627870 | ||
|
|
03d1dcaefb | ||
|
|
14768bde28 | ||
|
|
9555ff43c7 | ||
|
|
75acb1ade6 | ||
|
|
fd12ca6e21 | ||
|
|
ff2f84d46b | ||
|
|
1ffce112d1 | ||
|
|
382df34f06 | ||
|
|
124f300362 | ||
|
|
f782899768 | ||
|
|
cdb83bb47d | ||
|
|
72bcc0d020 | ||
|
|
ac901b46c3 | ||
|
|
c1b3d325f6 | ||
|
|
7cad2fec27 | ||
|
|
7edc2a71d8 | ||
|
|
913f7a9e42 | ||
|
|
dd98757b2a | ||
|
|
1e3ee23120 | ||
|
|
74d8e0a892 | ||
|
|
50af063f64 | ||
|
|
80a66d74ca | ||
|
|
6c2908681a | ||
|
|
90593c0d7c | ||
|
|
8fb958e772 | ||
|
|
fc39ab3fb9 | ||
|
|
58e7ef2527 | ||
|
|
fec32380ae | ||
|
|
3b8d87bd17 | ||
|
|
131ced10fc | ||
|
|
886752effd | ||
|
|
a5d54a637e | ||
|
|
1b4edf16fb | ||
|
|
4042d34585 | ||
|
|
135c3ff454 | ||
|
|
f8d5791fab | ||
|
|
ffa4b1695b | ||
|
|
98214ff578 | ||
|
|
57ceac0c24 | ||
|
|
a526bc5a3e | ||
|
|
fac4516353 | ||
|
|
4db13fb924 | ||
|
|
c97ee22e66 | ||
|
|
98737f92af | ||
|
|
74637f9d2a | ||
|
|
69dbc2fe7a | ||
|
|
d157e200f6 | ||
|
|
594540cff5 | ||
|
|
8e47e8cd3d | ||
|
|
c5d7625a06 | ||
|
|
7763c5e288 | ||
|
|
957988d977 | ||
|
|
0c04c06d4e | ||
|
|
a7ef014b92 | ||
|
|
3822d971cb | ||
|
|
eb65c41d15 | ||
|
|
0c3fdbc539 | ||
|
|
7cb985116e | ||
|
|
2297494d21 | ||
|
|
19a61b6ce4 | ||
|
|
492aed200a | ||
|
|
be2f33b5d1 | ||
|
|
5d48cecee8 | ||
|
|
f0bfe1a152 | ||
|
|
d2ff386f97 | ||
|
|
42eaa75437 | ||
|
|
7fb4e75956 | ||
|
|
87c549960e | ||
|
|
4ac0f1e87f | ||
|
|
5465bee630 | ||
|
|
60a3d46e59 | ||
|
|
e100d54eed | ||
|
|
848d50ec43 | ||
|
|
a9a8686295 | ||
|
|
30a9309bd8 | ||
|
|
ab64cd192b | ||
|
|
5fc2c8c14b | ||
|
|
ea7ce450f1 | ||
|
|
ce77b43705 | ||
|
|
bd2ba804ee | ||
|
|
bd75f7b0fc | ||
|
|
32e4f7514d | ||
|
|
c9e1d35daf | ||
|
|
3be6ae91f2 | ||
|
|
931104fbcf | ||
|
|
1d5cec94a5 | ||
|
|
faeec01a6d | ||
|
|
b8db987579 | ||
|
|
1fad85d48d | ||
|
|
eb70c9f5f0 | ||
|
|
ce025df7b7 | ||
|
|
daf5797fed | ||
|
|
0baa7d9891 | ||
|
|
f6cd0f668f | ||
|
|
9ae83cc34d | ||
|
|
06ebb76948 | ||
|
|
3a8ba154b2 | ||
|
|
089801109e | ||
|
|
a8a4b5c2b4 | ||
|
|
089bda2de0 | ||
|
|
e18e2e26da | ||
|
|
104cf194ac | ||
|
|
de7cdb4aef | ||
|
|
6bdf9891e8 | ||
|
|
27d37ece7d | ||
|
|
b9afca3608 | ||
|
|
b796464241 | ||
|
|
97a14ed926 | ||
|
|
5018c56d0d | ||
|
|
c7799ca7dc | ||
|
|
78b5cc9c6f | ||
|
|
ab3e6cdff9 | ||
|
|
1cc01e6952 | ||
|
|
fb90f193b1 | ||
|
|
1bacab89bb | ||
|
|
7378f2e33b | ||
|
|
d0bb2b2ad5 | ||
|
|
376da7c70e | ||
|
|
d58e5cf7ee | ||
|
|
e02eb2e30c | ||
|
|
c4906d069a | ||
|
|
d4ed535454 | ||
|
|
f9d0ab5e07 | ||
|
|
0a5efc75cd | ||
|
|
aae1fefb31 | ||
|
|
86bb28e239 | ||
|
|
16b68b3d00 | ||
|
|
a700f446fd | ||
|
|
2246f227d1 | ||
|
|
29fbf0a362 | ||
|
|
8a1fc94c31 | ||
|
|
abadc99bf1 | ||
|
|
7af7647bbf | ||
|
|
9a24090337 | ||
|
|
d81a4ef0ee | ||
|
|
cfb1830b55 | ||
|
|
f7c094317a | ||
|
|
56e0ac9640 | ||
|
|
61651a0f4d | ||
|
|
7c3a05077c | ||
|
|
2d29bce97b | ||
|
|
4f45baab00 | ||
|
|
6def64d38e | ||
|
|
32b31076e6 | ||
|
|
91a4911d42 | ||
|
|
7298faac2b | ||
|
|
711253beb2 | ||
|
|
a380389386 | ||
|
|
f6b97c691e | ||
|
|
f31ff994fe | ||
|
|
a46ef5c9dd | ||
|
|
0018c452bb | ||
|
|
6c6fc28f6e | ||
|
|
575cf31c78 | ||
|
|
938d9b6642 | ||
|
|
9d68d35ca8 | ||
|
|
8033eea267 | ||
|
|
469c4d7e99 | ||
|
|
5159d43cad | ||
|
|
c5bbb7aa2c | ||
|
|
4317d1a47e | ||
|
|
a1c04ba35e | ||
|
|
95ad3e71ca | ||
|
|
8bf3875d9a | ||
|
|
080a33fac7 | ||
|
|
851d722746 | ||
|
|
3b22ce75db | ||
|
|
5dbfb3b8c5 | ||
|
|
735054b4e1 | ||
|
|
3ae2f857d4 | ||
|
|
220abb8579 | ||
|
|
468a67f937 | ||
|
|
99b3e3c516 | ||
|
|
8d48b2cc8a | ||
|
|
d63731fced | ||
|
|
7a352cdcb3 | ||
|
|
4744c05f07 | ||
|
|
c6cf7a4639 | ||
|
|
7f2318da01 | ||
|
|
fc9018e314 | ||
|
|
c30d6019df | ||
|
|
b57ed47592 | ||
|
|
6234be17cd | ||
|
|
5cab842f0a | ||
|
|
ca84c60614 | ||
|
|
09fbc6b0b2 | ||
|
|
f8b1998564 | ||
|
|
4d254b004d | ||
|
|
1d5f2427ed | ||
|
|
0249f89a8c | ||
|
|
ce0aaa7ac7 | ||
|
|
b7db3f96ba | ||
|
|
ad5ab82c3b | ||
|
|
0567569faa | ||
|
|
a8f111b399 | ||
|
|
7c2f789a31 | ||
|
|
77c76b6b6d | ||
|
|
60a90ce424 | ||
|
|
3f581ae1b0 | ||
|
|
277aff3898 | ||
|
|
0c5b9a863b | ||
|
|
cb1e10f0a9 | ||
|
|
659162d60c | ||
|
|
28ef465b3a | ||
|
|
e29f7af858 | ||
|
|
17b84cbe8a | ||
|
|
4d89213e1c | ||
|
|
879cbb8886 | ||
|
|
5957479d03 | ||
|
|
d7bc9bdb90 | ||
|
|
811a6bf222 | ||
|
|
6d0c560948 | ||
|
|
f4b76baaa2 | ||
|
|
76f4e974db | ||
|
|
66e5441bdf | ||
|
|
68f4adfbfe | ||
|
|
35a712eafb | ||
|
|
2d12fbdff1 | ||
|
|
c0ff162ed9 | ||
|
|
059408f098 | ||
|
|
b118a321b9 | ||
|
|
b3b6f1d834 | ||
|
|
1383d8b59a | ||
|
|
990aed9f2e | ||
|
|
003d419a64 | ||
|
|
7368cb2567 | ||
|
|
f945a27011 | ||
|
|
72882fded9 | ||
|
|
0030394008 | ||
|
|
bfb299cfca | ||
|
|
b06d5c10ea | ||
|
|
2a0d4195a1 | ||
|
|
11ff99613a | ||
|
|
0b646ee64f | ||
|
|
23126a92cd | ||
|
|
f767125acd | ||
|
|
d8ed9abebf |
No files matched your search
@@ -0,0 +1,40 @@
|
|||||||
|
name: Build Check (Client & Server)
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-client:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Node
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 22
|
||||||
|
|
||||||
|
- name: Install client dependencies
|
||||||
|
working-directory: client
|
||||||
|
run: npm install
|
||||||
|
|
||||||
|
- name: Check client build
|
||||||
|
working-directory: client
|
||||||
|
run: npm run build
|
||||||
|
build-server:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Node
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 22
|
||||||
|
|
||||||
|
- name: Install server dependencies
|
||||||
|
working-directory: server
|
||||||
|
run: npm install
|
||||||
|
|
||||||
|
- name: Check server build
|
||||||
|
working-directory: server
|
||||||
|
run: npm run build
|
||||||
@@ -88,3 +88,4 @@ jobs:
|
|||||||
docker compose down
|
docker compose down
|
||||||
docker compose pull
|
docker compose pull
|
||||||
docker compose up -d
|
docker compose up -d
|
||||||
|
docker system prune -af
|
||||||
@@ -1 +1,6 @@
|
|||||||
|
.idea
|
||||||
.vscode
|
.vscode
|
||||||
|
.VSCodeCounter
|
||||||
|
*.sh
|
||||||
|
mongo
|
||||||
|
node_modules/
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
echo "Running lint-staged..."
|
||||||
|
cd client && npx lint-staged && cd ..
|
||||||
|
cd server && npx lint-staged && cd ..
|
||||||
@@ -0,0 +1,145 @@
|
|||||||
|
# CLAUDE.md
|
||||||
|
|
||||||
|
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
||||||
|
|
||||||
|
## Project Overview
|
||||||
|
|
||||||
|
Checkmate is an open-source uptime and infrastructure monitoring application. It monitors server hardware, uptime, response times, and incidents with real-time alerts. The companion agent [Capture](https://github.com/bluewave-labs/capture) provides infrastructure metrics (CPU, RAM, disk, temperature).
|
||||||
|
|
||||||
|
## Development Commands
|
||||||
|
|
||||||
|
### Client (React/Vite)
|
||||||
|
```bash
|
||||||
|
cd client
|
||||||
|
npm install
|
||||||
|
npm run dev # Start dev server at http://localhost:5173
|
||||||
|
npm run build # TypeScript check + production build
|
||||||
|
npm run lint # ESLint (strict, max-warnings 0)
|
||||||
|
npm run format # Prettier formatting
|
||||||
|
npm run format-check # Check formatting
|
||||||
|
```
|
||||||
|
|
||||||
|
### Server (Node.js/Express)
|
||||||
|
```bash
|
||||||
|
cd server
|
||||||
|
npm install
|
||||||
|
npm run dev # Start with hot-reload (nodemon + tsx) at http://localhost:52345
|
||||||
|
npm run build # TypeScript compile + path alias resolution
|
||||||
|
npm run test # Run Mocha tests with c8 coverage
|
||||||
|
npm run lint # ESLint v9
|
||||||
|
npm run lint-fix # Auto-fix lint issues
|
||||||
|
npm run format # Prettier formatting
|
||||||
|
```
|
||||||
|
|
||||||
|
### Docker Development
|
||||||
|
```bash
|
||||||
|
cd docker/dev
|
||||||
|
./build_images.sh
|
||||||
|
docker run -d -p 27017:27017 -v uptime_mongo_data:/data/db --name uptime_database_mongo mongo:6.0
|
||||||
|
```
|
||||||
|
|
||||||
|
## Environment Setup
|
||||||
|
|
||||||
|
### Server `.env` (minimum required)
|
||||||
|
```env
|
||||||
|
CLIENT_HOST="http://localhost:5173"
|
||||||
|
JWT_SECRET="my_secret_key_change_this"
|
||||||
|
DB_CONNECTION_STRING="mongodb://localhost:27017/uptime_db"
|
||||||
|
TOKEN_TTL="99d"
|
||||||
|
ORIGIN="localhost"
|
||||||
|
LOG_LEVEL="debug"
|
||||||
|
```
|
||||||
|
|
||||||
|
### Client `.env`
|
||||||
|
```env
|
||||||
|
VITE_APP_API_BASE_URL="http://localhost:52345/api/v1"
|
||||||
|
VITE_APP_LOG_LEVEL="debug"
|
||||||
|
```
|
||||||
|
|
||||||
|
## Architecture
|
||||||
|
|
||||||
|
### Monorepo Structure
|
||||||
|
- `/client` - React 18 + TypeScript + Vite + MUI frontend
|
||||||
|
- `/server` - Node.js 20+ + Express + TypeScript backend
|
||||||
|
- `/docker` - Multi-environment Docker configs (dev, staging, prod, arm, mono)
|
||||||
|
|
||||||
|
### Backend Layers
|
||||||
|
```
|
||||||
|
server/src/
|
||||||
|
├── controllers/ # Route handlers (authController, monitorController, etc.)
|
||||||
|
├── service/ # Business logic
|
||||||
|
│ ├── business/ # Core monitoring logic
|
||||||
|
│ ├── infrastructure/ # Server/system utilities
|
||||||
|
│ └── system/ # App-level settings
|
||||||
|
├── db/
|
||||||
|
│ ├── models/ # Mongoose schemas (Monitor, Check, Incident, User, etc.)
|
||||||
|
│ ├── migration/ # Database migrations (run on startup)
|
||||||
|
│ └── modules/ # Database-specific modules
|
||||||
|
├── middleware/v1/ # verifyJWT, rateLimiter, sanitization, responseHandler
|
||||||
|
├── routes/v1/ # API route definitions
|
||||||
|
├── validation/ # Joi input validation schemas
|
||||||
|
└── repositories/ # Data access layer
|
||||||
|
```
|
||||||
|
|
||||||
|
### Frontend Structure
|
||||||
|
```
|
||||||
|
client/src/
|
||||||
|
├── Components/ # Reusable UI components
|
||||||
|
├── Pages/ # Page components (Auth, Uptime, Infrastructure, Incidents, etc.)
|
||||||
|
├── Features/ # Redux slices (Auth, UI)
|
||||||
|
├── Hooks/ # Custom React hooks
|
||||||
|
├── Utils/ # Utilities (NetworkService.js is main API client)
|
||||||
|
├── Validation/ # Input validation
|
||||||
|
└── locales/ # i18n translations
|
||||||
|
```
|
||||||
|
|
||||||
|
### API
|
||||||
|
- Base URL: `/api/v1`
|
||||||
|
- Documentation: `http://localhost:52345/api-docs` (Swagger UI)
|
||||||
|
- OpenAPI spec: `/server/openapi.json`
|
||||||
|
|
||||||
|
### Key Technologies
|
||||||
|
- **State Management**: Redux Toolkit + Redux-Persist
|
||||||
|
- **Data Fetching**: SWR + Axios
|
||||||
|
- **Database**: MongoDB with Mongoose ODM
|
||||||
|
- **Queue/Cache**: Redis + BullMQ + Pulse (cron scheduling)
|
||||||
|
- **i18n**: i18next + react-i18next (translations via PoEditor)
|
||||||
|
|
||||||
|
## Code Conventions
|
||||||
|
|
||||||
|
### Internationalization
|
||||||
|
All user-facing strings must use the translation function:
|
||||||
|
```javascript
|
||||||
|
t('your.key') // Never hardcode UI strings
|
||||||
|
```
|
||||||
|
|
||||||
|
### Branching
|
||||||
|
- Always branch from `develop` (not master)
|
||||||
|
- Use descriptive names: `feat/add-alerts`, `fix/login-error`
|
||||||
|
- PRs target `develop` branch
|
||||||
|
|
||||||
|
### Formatting
|
||||||
|
- **Client**: Prettier with `printWidth: 90`, tabs, double quotes
|
||||||
|
- **Server**: Prettier with `printWidth: 150`, tabs, double quotes
|
||||||
|
- Both use ESLint with strict settings
|
||||||
|
|
||||||
|
### Testing
|
||||||
|
Server tests use Mocha + Chai + Sinon:
|
||||||
|
```bash
|
||||||
|
npm test # Run all tests with coverage
|
||||||
|
npm test -- --grep "pattern" # Run specific tests
|
||||||
|
```
|
||||||
|
Test files: `server/tests/**/*.test.js`
|
||||||
|
|
||||||
|
## Database Models
|
||||||
|
|
||||||
|
Key Mongoose models in `/server/src/db/models/`:
|
||||||
|
- **Monitor** - Monitoring configuration (website, infrastructure, port, etc.)
|
||||||
|
- **Check** - Individual monitoring check results
|
||||||
|
- **Incident** - Downtime incidents
|
||||||
|
- **User** - User accounts
|
||||||
|
- **Team** - Team/workspace management
|
||||||
|
- **StatusPage** - Public status pages
|
||||||
|
- **Notification** - Alert configuration (email, Discord, Slack, webhooks)
|
||||||
|
- **MaintenanceWindow** - Scheduled maintenance periods
|
||||||
|
- **AppSettings** - Global application settings
|
||||||
+191
-12
@@ -6,10 +6,35 @@ We truly appreciate all kinds of contributions — code, ideas, translations or
|
|||||||
|
|
||||||
Before you start, please take a moment to read the relevant section. It helps us review and accept contributions faster, and makes the whole process smoother for everyone. 💚
|
Before you start, please take a moment to read the relevant section. It helps us review and accept contributions faster, and makes the whole process smoother for everyone. 💚
|
||||||
|
|
||||||
PS: **We work closely with contributors on our [Discord channel](https://discord.com/invite/NAb6H3UTjK)**. You’ll find community members, core maintainers, and first-timers helping each other out.
|
PS: **We work closely with contributors on our [Discord channel](https://discord.com/invite/NAb6H3UTjK)**. You'll find community members, core maintainers, and first-timers helping each other out.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
||||||
|
## 🚀 Quick Setup Checklist
|
||||||
|
|
||||||
|
Before you dive in, make sure you have these installed:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Check Node.js (v16+ required)
|
||||||
|
node --version
|
||||||
|
|
||||||
|
# Check npm
|
||||||
|
npm --version
|
||||||
|
|
||||||
|
# Check Docker
|
||||||
|
docker --version
|
||||||
|
|
||||||
|
# Check Git
|
||||||
|
git --version
|
||||||
|
```
|
||||||
|
|
||||||
|
**New to contributing?** Start here:
|
||||||
|
1. Pick a [`good-first-issue`](https://github.com/bluewave-labs/checkmate/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22)
|
||||||
|
2. Comment that you'd like to work on it
|
||||||
|
3. Follow the [setup guide](#set-up-checkmate-locally) below
|
||||||
|
4. Join our [Discord](https://discord.com/invite/NAb6H3UTjK) if you get stuck
|
||||||
|
|
||||||
## Table of contents
|
## Table of contents
|
||||||
|
|
||||||
- [How do I...?](#how-do-i)
|
- [How do I...?](#how-do-i)
|
||||||
@@ -32,12 +57,12 @@ PS: **We work closely with contributors on our [Discord channel](https://discord
|
|||||||
|
|
||||||
### Get help or ask a question?
|
### Get help or ask a question?
|
||||||
|
|
||||||
Ask anything in our [Discord server](https://discord.com/invite/NAb6H3UTjK) — we’re friendly and happy to help. [Our core contributors](https://github.com/bluewave-labs/checkmate?tab=readme-ov-file#-contributing) are active and ready to support you. You can also use [GitHub Discussions](https://github.com/bluewave-labs/Checkmate/discussions) section to ask your questions.
|
Ask anything in our [Discord server](https://discord.com/invite/NAb6H3UTjK) — we're friendly and happy to help. [Our core contributors](https://github.com/bluewave-labs/checkmate?tab=readme-ov-file#-contributing) are active and ready to support you. You can also use [GitHub Discussions](https://github.com/bluewave-labs/Checkmate/discussions) section to ask your questions.
|
||||||
|
|
||||||
### Report a bug?
|
### Report a bug?
|
||||||
|
|
||||||
1. Search [existing issues](https://github.com/bluewave-labs/checkmate/issues).
|
1. Search [existing issues](https://github.com/bluewave-labs/checkmate/issues).
|
||||||
2. If it’s not listed, open a **new issue**.
|
2. If it's not listed, open a **new issue**.
|
||||||
3. Include as much detail as possible: what happened, what you expected, and steps to reproduce. Logs and screenshots help.
|
3. Include as much detail as possible: what happened, what you expected, and steps to reproduce. Logs and screenshots help.
|
||||||
|
|
||||||
### Suggest a new feature?
|
### Suggest a new feature?
|
||||||
@@ -48,19 +73,175 @@ Ask anything in our [Discord server](https://discord.com/invite/NAb6H3UTjK) —
|
|||||||
|
|
||||||
### Set up Checkmate locally?
|
### Set up Checkmate locally?
|
||||||
|
|
||||||
Frontend & backend:
|
#### Prerequisites
|
||||||
|
|
||||||
|
- Node.js (with npm)
|
||||||
|
- Docker
|
||||||
|
- Git
|
||||||
|
|
||||||
|
#### Step 1: Clone the Repository
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git clone https://github.com/bluewave-labs/Checkmate.git
|
||||||
|
cd Checkmate
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Step 2: Set Up Docker Containers (MongoDB)
|
||||||
|
|
||||||
|
Navigate to the Docker dev directory:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd docker/dev
|
||||||
|
```
|
||||||
|
|
||||||
|
Build the Docker images:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./build_images.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
Run MongoDB container:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker run -d -p 27017:27017 -v uptime_mongo_data:/data/db --name uptime_database_mongo mongo:6.0
|
||||||
|
```
|
||||||
|
|
||||||
|
Navigate back to the root directory:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd ../..
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Step 3: Set Up the Backend (Server)
|
||||||
|
|
||||||
|
Navigate to the server directory:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd server
|
||||||
|
```
|
||||||
|
|
||||||
|
Install dependencies:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npm install
|
npm install
|
||||||
|
```
|
||||||
|
|
||||||
|
Create a `.env` file in the `server` directory with the following minimum required configuration:
|
||||||
|
|
||||||
|
```env
|
||||||
|
CLIENT_HOST="http://localhost:5173"
|
||||||
|
JWT_SECRET="my_secret_key_change_this"
|
||||||
|
DB_CONNECTION_STRING="mongodb://localhost:27017/uptime_db"
|
||||||
|
TOKEN_TTL="99d"
|
||||||
|
ORIGIN="localhost"
|
||||||
|
LOG_LEVEL="debug"
|
||||||
|
```
|
||||||
|
|
||||||
|
**Environment Variables Explained:**
|
||||||
|
|
||||||
|
- `CLIENT_HOST`: Frontend URL (default: http://localhost:5173)
|
||||||
|
- `JWT_SECRET`: Secret key for JWT tokens (change to something secure)
|
||||||
|
- `DB_CONNECTION_STRING`: MongoDB connection URL
|
||||||
|
- `ORIGIN`: Origin for CORS purposes
|
||||||
|
- `TOKEN_TTL`: Token time to live (in vercel/ms format)
|
||||||
|
- `LOG_LEVEL`: Debug level (debug, info, warn, error)
|
||||||
|
|
||||||
|
Start the backend server:
|
||||||
|
|
||||||
|
```bash
|
||||||
npm run dev
|
npm run dev
|
||||||
```
|
```
|
||||||
|
|
||||||
By default, the frontend expects the backend on `http://localhost:3001`. Update configs if needed.
|
The server will run at `http://localhost:52345`.
|
||||||
|
|
||||||
|
#### Step 4: Set Up the Frontend (Client)
|
||||||
|
|
||||||
|
Open a new terminal window and navigate to the client directory from the root:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd client
|
||||||
|
```
|
||||||
|
|
||||||
|
Install dependencies:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npm install
|
||||||
|
```
|
||||||
|
|
||||||
|
Create a `.env` file in the `client` directory:
|
||||||
|
|
||||||
|
```env
|
||||||
|
VITE_APP_API_BASE_URL="http://localhost:52345/api/v1"
|
||||||
|
VITE_APP_LOG_LEVEL="debug"
|
||||||
|
```
|
||||||
|
|
||||||
|
**Environment Variables Explained:**
|
||||||
|
|
||||||
|
- `VITE_APP_API_BASE_URL`: Backend API URL
|
||||||
|
- `VITE_APP_LOG_LEVEL`: Log level (none, error, warn, debug, info)
|
||||||
|
|
||||||
|
Start the frontend:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npm run dev
|
||||||
|
```
|
||||||
|
|
||||||
|
The client will run at `http://localhost:5173`.
|
||||||
|
|
||||||
|
#### Step 5: Access the Application
|
||||||
|
|
||||||
|
Open your browser and navigate to:
|
||||||
|
|
||||||
|
- **Frontend**: http://localhost:5173
|
||||||
|
- **Backend API**: http://localhost:52345
|
||||||
|
- **API Documentation**: http://localhost:52345/api-docs
|
||||||
|
|
||||||
|
#### Managing Docker Containers
|
||||||
|
|
||||||
|
Stop containers:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker stop uptime_database_mongo
|
||||||
|
```
|
||||||
|
|
||||||
|
Start containers:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker start uptime_database_mongo
|
||||||
|
```
|
||||||
|
|
||||||
|
Remove containers (if needed):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker rm uptime_database_mongo
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Troubleshooting
|
||||||
|
|
||||||
|
**Port already in use:**
|
||||||
|
|
||||||
|
- Check if another service is using ports 5173, 52345, 27017, or 6379
|
||||||
|
- Stop the conflicting service or change the port in `.env` files
|
||||||
|
|
||||||
|
**MongoDB connection issues:**
|
||||||
|
|
||||||
|
- Verify container is running: `docker ps`
|
||||||
|
- Check container logs: `docker logs uptime_database_mongo`
|
||||||
|
|
||||||
|
**Module not found errors:**
|
||||||
|
|
||||||
|
- Ensure you ran `npm install` in both `client` and `server` directories
|
||||||
|
|
||||||
|
**Need more help?**
|
||||||
|
|
||||||
|
- Check the [full documentation](https://docs.checkmate.so)
|
||||||
|
- Ask on [Discord](https://discord.com/invite/NAb6H3UTjK)
|
||||||
|
|
||||||
### Start contributing code?
|
### Start contributing code?
|
||||||
|
|
||||||
1. Pick or open an issue (check `good-first-issue`s first)
|
1. Pick or open an issue (check `good-first-issue`s first)
|
||||||
2. (optional but highly suggested) Read a detailed structure of [Checkmate](https://deepwiki.com/bluewave-labs/Checkmate) if you would like to deep dive into the architecture.
|
2. (optional but highly suggested) Read a detailed structure of [Checkmate](https://deepwiki.com/bluewave-labs/Checkmate) if you would like to deep dive into the architecture.
|
||||||
3. Ask to be assigned. If there is alrady someone assigned and it's been more than 7 days, you can raise the flag and ask to be assigned as well.
|
3. Ask to be assigned. If there is already someone assigned and it's been more than 7 days, you can raise the flag and ask to be assigned as well.
|
||||||
4. Create a branch from `develop`.
|
4. Create a branch from `develop`.
|
||||||
5. Write your code.
|
5. Write your code.
|
||||||
6. Run and test locally.
|
6. Run and test locally.
|
||||||
@@ -75,6 +256,7 @@ Docs live in [checkmate-documentation](https://github.com/bluewave-labs/checkmat
|
|||||||
### Help with translations?
|
### Help with translations?
|
||||||
|
|
||||||
We use [PoEditor](https://poeditor.com) for translations. You can:
|
We use [PoEditor](https://poeditor.com) for translations. You can:
|
||||||
|
|
||||||
- [Sign up and join your language team](https://poeditor.com/join/project/lRUoGZFCsJ).
|
- [Sign up and join your language team](https://poeditor.com/join/project/lRUoGZFCsJ).
|
||||||
- Translate UI strings.
|
- Translate UI strings.
|
||||||
- Ask questions on Discord in the relevant #translations channel.
|
- Ask questions on Discord in the relevant #translations channel.
|
||||||
@@ -84,6 +266,7 @@ Make sure all new UI strings in code use `t('key')`.
|
|||||||
### Submit a pull request?
|
### Submit a pull request?
|
||||||
|
|
||||||
Follow the [pull request checklist](#pull-request-checklist). Your PR should:
|
Follow the [pull request checklist](#pull-request-checklist). Your PR should:
|
||||||
|
|
||||||
- Be focused on one issue.
|
- Be focused on one issue.
|
||||||
- Be tested locally.
|
- Be tested locally.
|
||||||
- Use our linting and translation rules.
|
- Use our linting and translation rules.
|
||||||
@@ -123,7 +306,6 @@ If one or more of these are missing, we may ask you to update your pull request
|
|||||||
|
|
||||||
## Branching model
|
## Branching model
|
||||||
|
|
||||||
|
|
||||||
- Code contributions should go to the `develop` branch.
|
- Code contributions should go to the `develop` branch.
|
||||||
- `master` is used for stable releases.
|
- `master` is used for stable releases.
|
||||||
- Use descriptive branch names, like `fix/login-error` or `feat/add-alerts`.
|
- Use descriptive branch names, like `fix/login-error` or `feat/add-alerts`.
|
||||||
@@ -137,13 +319,10 @@ If one or more of these are missing, we may ask you to update your pull request
|
|||||||
|
|
||||||
## Thank you
|
## Thank you
|
||||||
|
|
||||||
Thanks for making Checkmate better. We mean it. Whether it’s your first pull request or your 50th, we’re excited to build with you.
|
Thanks for making Checkmate better. We mean it. Whether it's your first pull request or your 50th, we're excited to build with you.
|
||||||
|
|
||||||
|
PS: feel free to introduce yourself on [Discord](https://discord.gg/NAb6H3UTjK) and say hi.
|
||||||
PS: feel free to introduce yourself on [Discord](https://discord.gg/YOUR-DISCORD-LINK) and say hi.
|
|
||||||
|
|
||||||
-- Checkmate team
|
-- Checkmate team
|
||||||
|
|
||||||
Also make sure you read the [document about how to make a good pull request](/PULLREQUESTS.md).
|
Also make sure you read the [document about how to make a good pull request](/PULLREQUESTS.md).
|
||||||
|
|
||||||
|
|
||||||
+11325
File diff suppressed because it is too large.
Load diff
@@ -52,7 +52,7 @@ Usage instructions can be found [here](https://docs.checkmate.so/checkmate-2.1).
|
|||||||
|
|
||||||
See installation instructions in [Checkmate documentation portal](https://docs.checkmate.so/checkmate-2.1/users-guide/quickstart).
|
See installation instructions in [Checkmate documentation portal](https://docs.checkmate.so/checkmate-2.1/users-guide/quickstart).
|
||||||
|
|
||||||
Alternatively, you can also use [Coolify](https://coolify.io/), [Elestio](https://elest.io/open-source/checkmate), [K8s](./charts/helm/checkmate/INSTALLATION.md), [Sive Host](https://sive.host) (South Africa) or [Pikapods](https://www.pikapods.com/) to quickly spin off a Checkmate instance. If you would like to monitor your server infrastructure, you'll need [Capture agent](https://github.com/bluewave-labs/capture). Capture repository also contains the installation instructions.
|
Alternatively, you can also use [Elestio](https://elest.io/open-source/checkmate), [K8s](./charts/helm/checkmate/INSTALLATION.md), [Sive Host](https://sive.host) (South Africa) or [Pikapods](https://www.pikapods.com/) to quickly spin off a Checkmate instance. If you would like to monitor your server infrastructure, you'll need [Capture agent](https://github.com/bluewave-labs/capture). Capture repository also contains the installation instructions.
|
||||||
|
|
||||||
### Using a Custom CA
|
### Using a Custom CA
|
||||||
|
|
||||||
@@ -79,9 +79,8 @@ You can see the memory footprint of MongoDB and Redis on the same server (398Mb
|
|||||||
|
|
||||||
If you have any questions, suggestions or comments, you have several options:
|
If you have any questions, suggestions or comments, you have several options:
|
||||||
|
|
||||||
- [Discord channel](https://discord.gg/NAb6H3UTjK)
|
- [Discord channel](https://discord.gg/NAb6H3UTjK) (preferred)
|
||||||
- [GitHub Discussions](https://github.com/bluewave-labs/bluewave-uptime/discussions)
|
- [GitHub Discussions](https://github.com/bluewave-labs/bluewave-uptime/discussions) (we check here from time to time)
|
||||||
- [Reddit group](https://www.reddit.com/r/CheckmateMonitoring/)
|
|
||||||
|
|
||||||
Feel free to ask questions or share your ideas - we'd love to hear from you!
|
Feel free to ask questions or share your ideas - we'd love to hear from you!
|
||||||
|
|
||||||
@@ -91,6 +90,7 @@ Feel free to ask questions or share your ideas - we'd love to hear from you!
|
|||||||
- Website monitoring
|
- Website monitoring
|
||||||
- Page speed monitoring
|
- Page speed monitoring
|
||||||
- Infrastructure monitoring (memory, disk usage, CPU performance, network etc) - requires [Capture](https://github.com/bluewave-labs/capture) agent
|
- Infrastructure monitoring (memory, disk usage, CPU performance, network etc) - requires [Capture](https://github.com/bluewave-labs/capture) agent
|
||||||
|
- Selective disk monitoring with mountpoint selection
|
||||||
- Docker monitoring
|
- Docker monitoring
|
||||||
- Ping monitoring
|
- Ping monitoring
|
||||||
- SSL monitoring
|
- SSL monitoring
|
||||||
@@ -162,6 +162,7 @@ Here's how you can contribute:
|
|||||||
4. Open an issue if you believe you've encountered a bug.
|
4. Open an issue if you believe you've encountered a bug.
|
||||||
5. Check for good-first-issue's if you are a newcomer.
|
5. Check for good-first-issue's if you are a newcomer.
|
||||||
6. Make a pull request to add new features/make quality-of-life improvements/fix bugs.
|
6. Make a pull request to add new features/make quality-of-life improvements/fix bugs.
|
||||||
|
7. Check out this interactive walkthrough of the `Checkmate` codebase on CodeCanvas [here](https://www.code-canvas.com/?session=unauthenticatedGithub&repo=Checkmate&owner=bluewave-labs&branch=develop&OnboardingTutorial=true). To refine existing dataflow simulation or create new ones, follow the quick tutorial [here](https://docs.code-canvas.com/updating-diagram).
|
||||||
|
|
||||||
<a href="https://github.com/bluewave-labs/checkmate/graphs/contributors">
|
<a href="https://github.com/bluewave-labs/checkmate/graphs/contributors">
|
||||||
<img src="https://contrib.rocks/image?repo=bluewave-labs/checkmate" />
|
<img src="https://contrib.rocks/image?repo=bluewave-labs/checkmate" />
|
||||||
|
|||||||
@@ -21,7 +21,12 @@ cd checkmate/charts/helm/checkmate
|
|||||||
Edit `values.yaml` to update:
|
Edit `values.yaml` to update:
|
||||||
- `client.ingress.host` and `server.ingress.host` with your domain names
|
- `client.ingress.host` and `server.ingress.host` with your domain names
|
||||||
- `server.protocol` (usually http or https)
|
- `server.protocol` (usually http or https)
|
||||||
|
- **If upgrading**: Migrate persistence settings from flat structure to nested:
|
||||||
|
- Old: `persistence.mongodbSize` → New: `persistence.mongo.size`
|
||||||
|
- Old: `persistence.redisSize` → New: `persistence.redis.size`
|
||||||
|
- Add: `persistence.mongo.storageClass` and `persistence.redis.storageClass` (leave empty for default)
|
||||||
- Secrets under the `secrets` section (`JWT_SECRET`, email credentials, API keys, etc.) — replace all change_me values
|
- Secrets under the `secrets` section (`JWT_SECRET`, email credentials, API keys, etc.) — replace all change_me values
|
||||||
|
- **For TLS/HTTPS**: Configure ingress TLS settings (see section below)
|
||||||
|
|
||||||
### 3. Deploy the Helm chart
|
### 3. Deploy the Helm chart
|
||||||
```bash
|
```bash
|
||||||
@@ -37,3 +42,75 @@ kubectl get svc
|
|||||||
```
|
```
|
||||||
|
|
||||||
Once all pods are `Running` and `Ready`, you can access Checkmate via the configured ingress hosts.
|
Once all pods are `Running` and `Ready`, you can access Checkmate via the configured ingress hosts.
|
||||||
|
|
||||||
|
## Enabling TLS/HTTPS with cert-manager
|
||||||
|
|
||||||
|
If you have [cert-manager](https://cert-manager.io/) installed in your cluster, you can enable automatic TLS certificate provisioning using Let's Encrypt or other certificate issuers.
|
||||||
|
|
||||||
|
### Prerequisites
|
||||||
|
- cert-manager installed in your cluster
|
||||||
|
- A ClusterIssuer or Issuer configured (e.g., `letsencrypt-prod`)
|
||||||
|
|
||||||
|
### Configuration
|
||||||
|
|
||||||
|
Edit `values.yaml` to enable TLS (and update protocols to https):
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
client:
|
||||||
|
protocol: https
|
||||||
|
ingress:
|
||||||
|
enabled: true
|
||||||
|
host: checkmate.example.com
|
||||||
|
className: nginx
|
||||||
|
annotations:
|
||||||
|
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
||||||
|
tls:
|
||||||
|
enabled: true
|
||||||
|
secretName: checkmate-client-tls
|
||||||
|
|
||||||
|
server:
|
||||||
|
protocol: https
|
||||||
|
ingress:
|
||||||
|
enabled: true
|
||||||
|
host: checkmate.example.com
|
||||||
|
className: nginx
|
||||||
|
annotations:
|
||||||
|
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
||||||
|
tls:
|
||||||
|
enabled: true
|
||||||
|
secretName: checkmate-server-tls
|
||||||
|
```
|
||||||
|
|
||||||
|
### Alternative: Using --set flags
|
||||||
|
|
||||||
|
You can also enable TLS during installation using Helm's `--set` flags:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
helm install checkmate ./charts/helm/checkmate \
|
||||||
|
--set client.protocol=https \
|
||||||
|
--set server.protocol=https \
|
||||||
|
--set client.ingress.annotations."cert-manager\.io/cluster-issuer"="letsencrypt-prod" \
|
||||||
|
--set client.ingress.tls.enabled=true \
|
||||||
|
--set client.ingress.tls.secretName=checkmate-client-tls \
|
||||||
|
--set server.ingress.annotations."cert-manager\.io/cluster-issuer"="letsencrypt-prod" \
|
||||||
|
--set server.ingress.tls.enabled=true \
|
||||||
|
--set server.ingress.tls.secretName=checkmate-server-tls
|
||||||
|
```
|
||||||
|
|
||||||
|
### Verification
|
||||||
|
|
||||||
|
After deployment, cert-manager will automatically create the TLS secrets. You can verify the certificate status:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Check certificates
|
||||||
|
kubectl get certificates
|
||||||
|
|
||||||
|
# Check certificate details
|
||||||
|
kubectl describe certificate checkmate-client-tls
|
||||||
|
kubectl describe certificate checkmate-server-tls
|
||||||
|
|
||||||
|
# Verify the secrets were created
|
||||||
|
kubectl get secrets | grep checkmate-tls
|
||||||
|
```
|
||||||
|
|
||||||
|
The ingress will automatically use these secrets to enable HTTPS access to your Checkmate instance.
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
{{- if eq .Values.client.ingress.host "change_me" }}
|
|
||||||
{{- fail "client.ingress.host must be overridden and not set to 'change_me'" }}
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
{{- if eq .Values.server.ingress.host "change_me" }}
|
|
||||||
{{- fail "server.ingress.host must be overridden and not set to 'change_me'" }}
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
{{- $protocol := .Values.server.protocol }}
|
|
||||||
{{- if not (or (eq $protocol "http") (eq $protocol "https")) }}
|
|
||||||
{{- fail "server.protocol must be either 'http' or 'https'" }}
|
|
||||||
{{- end }}
|
|
||||||
@@ -1,17 +1,25 @@
|
|||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: client
|
name: checkmate-client
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: client
|
app: checkmate-client
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
app: client
|
app: checkmate-client
|
||||||
spec:
|
spec:
|
||||||
|
{{- with .Values.client.affinity }}
|
||||||
|
affinity:
|
||||||
|
{{- tpl ( . | toYaml) $ | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.client.tolerations }}
|
||||||
|
tolerations:
|
||||||
|
{{- tpl ( . | toYaml) $ | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
containers:
|
containers:
|
||||||
- name: client
|
- name: client
|
||||||
image: {{ .Values.client.image }}
|
image: {{ .Values.client.image }}
|
||||||
@@ -20,3 +28,17 @@ spec:
|
|||||||
env:
|
env:
|
||||||
- name: UPTIME_APP_API_BASE_URL
|
- name: UPTIME_APP_API_BASE_URL
|
||||||
value: "{{ .Values.server.protocol }}://{{ .Values.server.ingress.host }}/api/v1"
|
value: "{{ .Values.server.protocol }}://{{ .Values.server.ingress.host }}/api/v1"
|
||||||
|
- name: UPTIME_APP_CLIENT_HOST
|
||||||
|
value: "{{ .Values.client.protocol }}://{{ .Values.client.ingress.host }}"
|
||||||
|
volumeMounts:
|
||||||
|
- name: config-volume
|
||||||
|
mountPath: /etc/nginx/conf.d/default.conf
|
||||||
|
subPath: default.conf
|
||||||
|
{{- with .Values.client.resources }}
|
||||||
|
resources:
|
||||||
|
{{- tpl ( . | toYaml) $ | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
volumes:
|
||||||
|
- name: config-volume
|
||||||
|
configMap:
|
||||||
|
name: checkmate-server-nginx-cm
|
||||||
@@ -2,10 +2,21 @@
|
|||||||
apiVersion: networking.k8s.io/v1
|
apiVersion: networking.k8s.io/v1
|
||||||
kind: Ingress
|
kind: Ingress
|
||||||
metadata:
|
metadata:
|
||||||
name: client-ingress
|
name: checkmate-client-ingress
|
||||||
|
{{- if .Values.client.ingress.annotations }}
|
||||||
annotations:
|
annotations:
|
||||||
nginx.ingress.kubernetes.io/rewrite-target: /
|
{{- range $key, $value := .Values.client.ingress.annotations }}
|
||||||
|
{{ $key }}: {{ $value | quote }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
spec:
|
spec:
|
||||||
|
ingressClassName: {{ .Values.client.ingress.className }}
|
||||||
|
{{- if .Values.client.ingress.tls.enabled }}
|
||||||
|
tls:
|
||||||
|
- hosts:
|
||||||
|
- {{ .Values.client.ingress.host }}
|
||||||
|
secretName: {{ default (printf "%s-client-tls" .Release.Name) .Values.client.ingress.tls.secretName }}
|
||||||
|
{{- end }}
|
||||||
rules:
|
rules:
|
||||||
- host: {{ .Values.client.ingress.host }}
|
- host: {{ .Values.client.ingress.host }}
|
||||||
http:
|
http:
|
||||||
@@ -14,7 +25,7 @@ spec:
|
|||||||
pathType: Prefix
|
pathType: Prefix
|
||||||
backend:
|
backend:
|
||||||
service:
|
service:
|
||||||
name: client
|
name: checkmate-client
|
||||||
port:
|
port:
|
||||||
number: {{ .Values.client.port }}
|
number: {{ .Values.client.port }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: client
|
name: checkmate-client
|
||||||
spec:
|
spec:
|
||||||
selector:
|
selector:
|
||||||
app: client
|
app: checkmate-client
|
||||||
ports:
|
ports:
|
||||||
- port: {{ .Values.client.port }}
|
- port: {{ .Values.client.port }}
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: mongodb
|
|
||||||
spec:
|
|
||||||
replicas: 1
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: mongodb
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: mongodb
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: mongodb
|
|
||||||
image: {{ .Values.mongodb.image }}
|
|
||||||
ports:
|
|
||||||
- containerPort: {{ .Values.mongodb.port }}
|
|
||||||
command: ["mongod", "--quiet", "--bind_ip_all"]
|
|
||||||
volumeMounts:
|
|
||||||
- name: mongodb-data
|
|
||||||
mountPath: /data/db
|
|
||||||
volumes:
|
|
||||||
- name: mongodb-data
|
|
||||||
persistentVolumeClaim:
|
|
||||||
claimName: mongodb-pvc
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: PersistentVolumeClaim
|
|
||||||
metadata:
|
|
||||||
name: mongodb-pvc
|
|
||||||
spec:
|
|
||||||
accessModes:
|
|
||||||
- ReadWriteOnce
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
storage: {{ .Values.persistence.mongodbSize }}
|
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: mongodb
|
name: checkmate-mongodb
|
||||||
spec:
|
spec:
|
||||||
selector:
|
selector:
|
||||||
app: mongodb
|
app: checkmate-mongodb
|
||||||
ports:
|
ports:
|
||||||
- port: {{ .Values.mongodb.port }}
|
- port: {{ .Values.mongodb.port }}
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: StatefulSet
|
||||||
|
metadata:
|
||||||
|
name: checkmate-mongodb
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: checkmate-mongodb
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: checkmate-mongodb
|
||||||
|
spec:
|
||||||
|
{{- with .Values.mongodb.affinity }}
|
||||||
|
affinity:
|
||||||
|
{{- tpl ( . | toYaml) $ | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.mongodb.tolerations }}
|
||||||
|
tolerations:
|
||||||
|
{{- tpl ( . | toYaml) $ | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
containers:
|
||||||
|
- name: mongodb
|
||||||
|
image: {{ .Values.mongodb.image }}
|
||||||
|
ports:
|
||||||
|
- containerPort: {{ .Values.mongodb.port }}
|
||||||
|
command: ["mongod", "--quiet", "--bind_ip_all"]
|
||||||
|
volumeMounts:
|
||||||
|
- name: checkmate-mongo-persistent-storage
|
||||||
|
mountPath: /data/db
|
||||||
|
{{- with .Values.mongodb.resources }}
|
||||||
|
resources:
|
||||||
|
{{- tpl ( . | toYaml) $ | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
volumeClaimTemplates:
|
||||||
|
- metadata:
|
||||||
|
name: checkmate-mongo-persistent-storage
|
||||||
|
spec:
|
||||||
|
storageClassName: {{ .Values.persistence.mongo.storageClass | quote }}
|
||||||
|
accessModes: ["ReadWriteOnce"]
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: {{ .Values.persistence.mongo.size | default "5Gi" | quote }}
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
{{- if eq .Values.client.ingress.host "change_me" }}
|
||||||
|
{{- fail "client.ingress.host must be overridden and not set to 'change_me'" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if eq .Values.server.ingress.host "change_me" }}
|
||||||
|
{{- fail "server.ingress.host must be overridden and not set to 'change_me'" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- $serverProtocol := .Values.server.protocol }}
|
||||||
|
{{- if not (or (eq $serverProtocol "http") (eq $serverProtocol "https")) }}
|
||||||
|
{{- fail "server.protocol must be either 'http' or 'https'" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- $clientProtocol := .Values.client.protocol }}
|
||||||
|
{{- if not (or (eq $clientProtocol "http") (eq $clientProtocol "https")) }}
|
||||||
|
{{- fail "client.protocol must be either 'http' or 'https'" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/* Enforce protocol when TLS is enabled to avoid mixed-content */}}
|
||||||
|
{{- if and .Values.client.ingress.tls.enabled (ne $clientProtocol "https") }}
|
||||||
|
{{- fail "client.ingress.tls.enabled is true but client.protocol is not 'https'. Set client.protocol: https to avoid mixed content." }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if and .Values.server.ingress.tls.enabled (ne $serverProtocol "https") }}
|
||||||
|
{{- fail "server.ingress.tls.enabled is true but server.protocol is not 'https'. Set server.protocol: https to ensure correct API base URL." }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/* If client runs on https, API must also be https to avoid mixed content */}}
|
||||||
|
{{- if and (eq $clientProtocol "https") (ne $serverProtocol "https") }}
|
||||||
|
{{- fail "client.protocol is 'https' but server.protocol is not. Set server.protocol: https to prevent browser mixed-content issues." }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/* Fail early if TLS enabled without cert-manager annotations (cluster-issuer or issuer) */}}
|
||||||
|
{{- $cAnn := .Values.client.ingress.annotations | default dict }}
|
||||||
|
{{- $sAnn := .Values.server.ingress.annotations | default dict }}
|
||||||
|
|
||||||
|
{{- $clientHasIssuer := or (hasKey $cAnn "cert-manager.io/cluster-issuer") (hasKey $cAnn "cert-manager.io/issuer") }}
|
||||||
|
{{- $serverHasIssuer := or (hasKey $sAnn "cert-manager.io/cluster-issuer") (hasKey $sAnn "cert-manager.io/issuer") }}
|
||||||
|
|
||||||
|
{{- if and .Values.client.ingress.tls.enabled (not $clientHasIssuer) }}
|
||||||
|
{{- fail "client.ingress.tls.enabled is true but no cert-manager issuer annotation found. Add 'cert-manager.io/cluster-issuer' or 'cert-manager.io/issuer'." }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if and .Values.server.ingress.tls.enabled (not $serverHasIssuer) }}
|
||||||
|
{{- fail "server.ingress.tls.enabled is true but no cert-manager issuer annotation found. Add 'cert-manager.io/cluster-issuer' or 'cert-manager.io/issuer'." }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/* Secret name can be omitted; we default to <release>-client|server-tls in templates */}}
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: redis
|
|
||||||
spec:
|
|
||||||
replicas: 1
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: redis
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: redis
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: redis
|
|
||||||
image: {{ .Values.redis.image }}
|
|
||||||
ports:
|
|
||||||
- containerPort: {{ .Values.redis.port }}
|
|
||||||
volumeMounts:
|
|
||||||
- name: redis-data
|
|
||||||
mountPath: /data
|
|
||||||
volumes:
|
|
||||||
- name: redis-data
|
|
||||||
persistentVolumeClaim:
|
|
||||||
claimName: redis-pvc
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: PersistentVolumeClaim
|
|
||||||
metadata:
|
|
||||||
name: redis-pvc
|
|
||||||
spec:
|
|
||||||
accessModes:
|
|
||||||
- ReadWriteOnce
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
storage: {{ .Values.persistence.redisSize }}
|
|
||||||
@@ -1,9 +1,11 @@
|
|||||||
|
{{- if .Values.redis.enabled }}
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: redis
|
name: checkmate-redis
|
||||||
spec:
|
spec:
|
||||||
selector:
|
selector:
|
||||||
app: redis
|
app: checkmate-redis
|
||||||
ports:
|
ports:
|
||||||
- port: {{ .Values.redis.port }}
|
- port: {{ .Values.redis.port }}
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
{{- if .Values.redis.enabled }}
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: StatefulSet
|
||||||
|
metadata:
|
||||||
|
name: checkmate-redis
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: checkmate-redis
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: checkmate-redis
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: redis
|
||||||
|
image: {{ .Values.redis.image }}
|
||||||
|
ports:
|
||||||
|
- containerPort: {{ .Values.redis.port }}
|
||||||
|
volumeMounts:
|
||||||
|
- name: redis-data
|
||||||
|
mountPath: /data
|
||||||
|
volumeClaimTemplates:
|
||||||
|
- metadata:
|
||||||
|
name: checkmate-redis-persistent-storage
|
||||||
|
spec:
|
||||||
|
storageClassName: {{ .Values.persistence.redis.storageClass | quote }}
|
||||||
|
accessModes: ["ReadWriteOnce"]
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: {{ .Values.persistence.redis.size | default "1Gi" | quote }}
|
||||||
|
{{- end }}
|
||||||
@@ -4,10 +4,6 @@
|
|||||||
{{- fail "secrets.JWT_SECRET must be overridden and cannot be 'change_me'" }}
|
{{- fail "secrets.JWT_SECRET must be overridden and cannot be 'change_me'" }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- if or (not $secrets.REFRESH_TOKEN_SECRET) (eq $secrets.REFRESH_TOKEN_SECRET "change_me") }}
|
|
||||||
{{- fail "secrets.REFRESH_TOKEN_SECRET must be overridden and cannot be 'change_me'" }}
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Secret
|
kind: Secret
|
||||||
metadata:
|
metadata:
|
||||||
|
|||||||
@@ -1,17 +1,25 @@
|
|||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: server
|
name: checkmate-server
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: server
|
app: checkmate-server
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
app: server
|
app: checkmate-server
|
||||||
spec:
|
spec:
|
||||||
|
{{- with .Values.server.affinity }}
|
||||||
|
affinity:
|
||||||
|
{{- tpl ( . | toYaml) $ | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.server.tolerations }}
|
||||||
|
tolerations:
|
||||||
|
{{- tpl ( . | toYaml) $ | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
containers:
|
containers:
|
||||||
- name: server
|
- name: server
|
||||||
image: {{ .Values.server.image }}
|
image: {{ .Values.server.image }}
|
||||||
@@ -20,3 +28,10 @@ spec:
|
|||||||
envFrom:
|
envFrom:
|
||||||
- secretRef:
|
- secretRef:
|
||||||
name: checkmate-secrets
|
name: checkmate-secrets
|
||||||
|
{{- with .Values.server.resources }}
|
||||||
|
resources:
|
||||||
|
{{- tpl ( . | toYaml) $ | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
env:
|
||||||
|
- name: CLIENT_HOST
|
||||||
|
value: "{{ .Values.client.protocol }}://{{ .Values.client.ingress.host }}"
|
||||||
@@ -2,24 +2,37 @@
|
|||||||
apiVersion: networking.k8s.io/v1
|
apiVersion: networking.k8s.io/v1
|
||||||
kind: Ingress
|
kind: Ingress
|
||||||
metadata:
|
metadata:
|
||||||
name: server-ingress
|
name: checkmate-server-ingress
|
||||||
|
{{- if .Values.server.ingress.annotations }}
|
||||||
annotations:
|
annotations:
|
||||||
nginx.ingress.kubernetes.io/rewrite-target: /
|
{{- range $key, $value := .Values.server.ingress.annotations }}
|
||||||
nginx.ingress.kubernetes.io/enable-cors: "true"
|
{{ $key }}: {{ $value | quote }}
|
||||||
nginx.ingress.kubernetes.io/cors-allow-origin: "http://{{ .Values.client.ingress.host }},https://{{ .Values.client.ingress.host }}"
|
{{- end }}
|
||||||
nginx.ingress.kubernetes.io/cors-allow-methods: "GET, PUT, POST, DELETE, PATCH, OPTIONS"
|
{{- end }}
|
||||||
nginx.ingress.kubernetes.io/cors-allow-headers: "DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization"
|
{{/*#annotations:
|
||||||
nginx.ingress.kubernetes.io/cors-allow-credentials: "true"
|
#nginx.ingress.kubernetes.io/rewrite-target: /
|
||||||
|
#nginx.ingress.kubernetes.io/enable-cors: "true"
|
||||||
|
#nginx.ingress.kubernetes.io/cors-allow-origin: "http://{{ .Values.client.ingress.host }},https://{{ .Values.client.ingress.host }}"
|
||||||
|
#nginx.ingress.kubernetes.io/cors-allow-methods: "GET, PUT, POST, DELETE, PATCH, OPTIONS"
|
||||||
|
#nginx.ingress.kubernetes.io/cors-allow-headers: "DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization"
|
||||||
|
#nginx.ingress.kubernetes.io/cors-allow-credentials: "true"*/}}
|
||||||
spec:
|
spec:
|
||||||
|
ingressClassName: {{ .Values.server.ingress.className }}
|
||||||
|
{{- if .Values.server.ingress.tls.enabled }}
|
||||||
|
tls:
|
||||||
|
- hosts:
|
||||||
|
- {{ .Values.server.ingress.host }}
|
||||||
|
secretName: {{ default (printf "%s-server-tls" .Release.Name) .Values.server.ingress.tls.secretName }}
|
||||||
|
{{- end }}
|
||||||
rules:
|
rules:
|
||||||
- host: {{ .Values.server.ingress.host }}
|
- host: {{ .Values.server.ingress.host }}
|
||||||
http:
|
http:
|
||||||
paths:
|
paths:
|
||||||
- path: /
|
- path: /api/v1
|
||||||
pathType: Prefix
|
pathType: Prefix
|
||||||
backend:
|
backend:
|
||||||
service:
|
service:
|
||||||
name: server
|
name: checkmate-server
|
||||||
port:
|
port:
|
||||||
number: {{ .Values.server.port }}
|
number: {{ .Values.server.port }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: checkmate-server-nginx-cm
|
||||||
|
data:
|
||||||
|
default.conf: |
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
listen [::]:80;
|
||||||
|
|
||||||
|
server_name checkmate-demo.bluewavelabs.ca;
|
||||||
|
server_tokens off;
|
||||||
|
|
||||||
|
location /.well-known/acme-challenge/ {
|
||||||
|
root /var/www/certbot;
|
||||||
|
}
|
||||||
|
|
||||||
|
location / {
|
||||||
|
root /usr/share/nginx/html;
|
||||||
|
index index.html index.htm;
|
||||||
|
try_files $uri $uri/ /index.html;
|
||||||
|
}
|
||||||
|
|
||||||
|
# location /api/ {
|
||||||
|
# proxy_pass http://{{ .Values.server.ingress.host }}:5000/api/;
|
||||||
|
# proxy_http_version 1.1;
|
||||||
|
# proxy_set_header Host $host;
|
||||||
|
# proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
# proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
# }
|
||||||
|
|
||||||
|
location /api-docs/ {
|
||||||
|
proxy_pass http://{{ .Values.server.ingress.host }}:5000/api-docs/;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: server
|
name: checkmate-server
|
||||||
spec:
|
spec:
|
||||||
selector:
|
selector:
|
||||||
app: server
|
app: checkmate-server
|
||||||
ports:
|
ports:
|
||||||
- port: {{ .Values.server.port }}
|
- port: {{ .Values.server.port }}
|
||||||
@@ -1,41 +1,70 @@
|
|||||||
client:
|
client:
|
||||||
image: ghcr.io/bluewave-labs/checkmate-client:v2.3
|
image: ghcr.io/bluewave-labs/checkmate-client:v3.2.0
|
||||||
port: 80
|
port: 80
|
||||||
|
protocol: http
|
||||||
ingress:
|
ingress:
|
||||||
enabled: true
|
enabled: true
|
||||||
host: change_me
|
host: change_me
|
||||||
|
className: nginx
|
||||||
|
annotations: {}
|
||||||
|
# Example annotations for cert-manager:
|
||||||
|
# annotations:
|
||||||
|
# cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
||||||
|
tls:
|
||||||
|
enabled: false
|
||||||
|
# secretName: {{ .Release.Name }}-client-tls # Optional; defaults to <release>-client-tls if omitted
|
||||||
|
# Note: when enabling TLS, also set client.protocol: https and add
|
||||||
|
# a cert-manager issuer annotation (e.g. cert-manager.io/cluster-issuer: "letsencrypt-prod").
|
||||||
|
# The secret will be automatically created by cert-manager when using the cert-manager.io/cluster-issuer annotation
|
||||||
|
|
||||||
server:
|
server:
|
||||||
image: ghcr.io/bluewave-labs/checkmate-backend:v2.3
|
image: ghcr.io/bluewave-labs/checkmate-backend:v3.2.0
|
||||||
port: 52345
|
port: 52345
|
||||||
protocol: change_me
|
protocol: http
|
||||||
ingress:
|
ingress:
|
||||||
enabled: true
|
enabled: true
|
||||||
host: change_me
|
host: change_me
|
||||||
|
className: nginx
|
||||||
|
annotations: {}
|
||||||
|
# Example annotations for cert-manager:
|
||||||
|
# annotations:
|
||||||
|
# cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
||||||
|
tls:
|
||||||
|
enabled: false
|
||||||
|
# secretName: {{ .Release.Name }}-server-tls # Optional; defaults to <release>-server-tls if omitted
|
||||||
|
# Note: when enabling TLS, also set server.protocol: https and add
|
||||||
|
# a cert-manager issuer annotation (e.g. cert-manager.io/cluster-issuer: "letsencrypt-prod").
|
||||||
|
# The secret will be automatically created by cert-manager when using the cert-manager.io/cluster-issuer annotation
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
|
enabled: false
|
||||||
image: redis:7.2
|
image: redis:7.2
|
||||||
port: 6379
|
port: 6379
|
||||||
|
|
||||||
mongodb:
|
mongodb:
|
||||||
image: mongo:7.0
|
image: ghcr.io/bluewave-labs/checkmate-mongo:v3.2.0
|
||||||
port: 27017
|
port: 27017
|
||||||
|
|
||||||
secrets:
|
secrets:
|
||||||
JWT_SECRET: change_me
|
JWT_SECRET: change_me
|
||||||
REFRESH_TOKEN_SECRET: change_me
|
# REFRESH_TOKEN_SECRET: change_me
|
||||||
SYSTEM_EMAIL_ADDRESS: test@example.com
|
# SYSTEM_EMAIL_ADDRESS: test@example.com
|
||||||
SYSTEM_EMAIL_PASSWORD: change_me
|
# SYSTEM_EMAIL_PASSWORD: change_me
|
||||||
SYSTEM_EMAIL_HOST: smtp.example.com
|
# SYSTEM_EMAIL_HOST: smtp.example.com
|
||||||
SYSTEM_EMAIL_PORT: "587"
|
# SYSTEM_EMAIL_PORT: "587"
|
||||||
PAGESPEED_API_KEY: change_me
|
# PAGESPEED_API_KEY: change_me
|
||||||
DB_CONNECTION_STRING: mongodb://mongodb:27017/uptime_db
|
DB_CONNECTION_STRING: mongodb://checkmate-mongodb.namespace.svc:27017/uptime_db
|
||||||
REDIS_HOST: redis
|
CLIENT_HOST: change_me
|
||||||
REDIS_PORT: "6379"
|
# REDIS_HOST: redis
|
||||||
DB_TYPE: MongoDB
|
# REDIS_PORT: "6379"
|
||||||
TOKEN_TTL: 99d
|
# DB_TYPE: MongoDB
|
||||||
REFRESH_TOKEN_TTL: 99d
|
# TOKEN_TTL: 99d
|
||||||
|
# REFRESH_TOKEN_TTL: 99d
|
||||||
|
|
||||||
persistence:
|
persistence:
|
||||||
mongodbSize: 5Gi
|
mongo:
|
||||||
redisSize: 1Gi
|
size: 5Gi
|
||||||
|
storageClass: ""
|
||||||
|
redis:
|
||||||
|
size: 1Gi
|
||||||
|
storageClass: ""
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
VITE_APP_API_BASE_URL=UPTIME_APP_API_BASE_URL
|
VITE_APP_API_BASE_URL=UPTIME_APP_API_BASE_URL
|
||||||
|
VITE_APP_API_V2_BASE_URL=UPTIME_APP_API_V2_BASE_URL
|
||||||
VITE_APP_CLIENT_HOST=UPTIME_APP_CLIENT_HOST
|
VITE_APP_CLIENT_HOST=UPTIME_APP_CLIENT_HOST
|
||||||
VITE_APP_LOG_LEVEL=UPTIME_APP_LOG_LEVEL
|
VITE_APP_LOG_LEVEL=UPTIME_APP_LOG_LEVEL
|
||||||
@@ -29,3 +29,4 @@ dist-ssr
|
|||||||
# Scripts
|
# Scripts
|
||||||
*.sh
|
*.sh
|
||||||
!env.sh
|
!env.sh
|
||||||
|
.env.development
|
||||||
Generated
+1749
-1611
File diff suppressed because it is too large.
Load diff
+22
-17
@@ -5,32 +5,40 @@
|
|||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build": "vite build",
|
"build": "tsc -b && vite build",
|
||||||
"build-dev": "vite build --mode development",
|
"build-dev": "tsc -b && vite build --mode development",
|
||||||
"lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0",
|
"lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0",
|
||||||
"preview": "vite preview",
|
"preview": "vite preview",
|
||||||
"format": "prettier --write .",
|
"format": "prettier --write .",
|
||||||
"format-check": "prettier --check ."
|
"format-check": "prettier --check ."
|
||||||
},
|
},
|
||||||
|
"lint-staged": {
|
||||||
|
"**/*": "npm run format"
|
||||||
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@emotion/react": "^11.13.3",
|
"@emotion/react": "^11.13.3",
|
||||||
"@emotion/styled": "^11.13.0",
|
"@emotion/styled": "^11.13.0",
|
||||||
"@hello-pangea/dnd": "^18.0.0",
|
"@hello-pangea/dnd": "^18.0.0",
|
||||||
"@mui/icons-material": "6.4.11",
|
"@hookform/resolvers": "5.2.2",
|
||||||
"@mui/lab": "6.0.0-dev.240424162023-9968b4889d",
|
"@mui/lab": "7.0.0",
|
||||||
"@mui/material": "6.4.11",
|
"@mui/material": "7.3.7",
|
||||||
"@mui/x-charts": "^7.5.1",
|
"@mui/x-charts": "7.29.1",
|
||||||
"@mui/x-date-pickers": "7.29.0",
|
"@mui/x-date-pickers": "7.29.4",
|
||||||
"@reduxjs/toolkit": "2.7.0",
|
"@reduxjs/toolkit": "2.7.0",
|
||||||
"axios": "^1.7.4",
|
"axios": "^1.7.4",
|
||||||
"dayjs": "1.11.13",
|
"dayjs": "1.11.13",
|
||||||
"flag-icons": "7.3.2",
|
"flag-icons": "7.3.2",
|
||||||
"html2canvas": "^1.4.1",
|
"html2canvas": "^1.4.1",
|
||||||
|
"human-interval": "2.0.1",
|
||||||
"i18next": "25.4.2",
|
"i18next": "25.4.2",
|
||||||
"joi": "17.13.3",
|
"joi": "17.13.3",
|
||||||
"mui-color-input": "^6.0.0",
|
"lucide-react": "^0.562.0",
|
||||||
|
"mui-color-input": "^7.0.0",
|
||||||
|
"pretty-bytes": "^7.1.0",
|
||||||
|
"pretty-ms": "^9.3.0",
|
||||||
"react": "18.3.1",
|
"react": "18.3.1",
|
||||||
"react-dom": "^18.2.0",
|
"react-dom": "^18.2.0",
|
||||||
|
"react-hook-form": "^7.63.0",
|
||||||
"react-i18next": "^15.4.0",
|
"react-i18next": "^15.4.0",
|
||||||
"react-icons": "5.5.0",
|
"react-icons": "5.5.0",
|
||||||
"react-redux": "9.2.0",
|
"react-redux": "9.2.0",
|
||||||
@@ -39,17 +47,12 @@
|
|||||||
"react-toastify": "^10.0.5",
|
"react-toastify": "^10.0.5",
|
||||||
"recharts": "2.15.2",
|
"recharts": "2.15.2",
|
||||||
"redux-persist": "6.0.0",
|
"redux-persist": "6.0.0",
|
||||||
"vite-plugin-svgr": "^4.2.0"
|
"swr": "^2.3.6",
|
||||||
},
|
"vite-plugin-svgr": "^4.2.0",
|
||||||
"unusedDepencies": {
|
"zod": "^4.1.11"
|
||||||
"@solana/wallet-adapter-base": "0.9.25",
|
|
||||||
"@solana/wallet-adapter-material-ui": "0.16.35",
|
|
||||||
"@solana/wallet-adapter-react": "0.15.37",
|
|
||||||
"@solana/wallet-adapter-react-ui": "0.9.37",
|
|
||||||
"@solana/wallet-adapter-wallets": "0.19.34",
|
|
||||||
"@solana/web3.js": "1.98.0"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@types/node": "24.5.2",
|
||||||
"@types/react": "^18.2.66",
|
"@types/react": "^18.2.66",
|
||||||
"@types/react-dom": "^18.2.22",
|
"@types/react-dom": "^18.2.22",
|
||||||
"@vitejs/plugin-react": "^4.2.1",
|
"@vitejs/plugin-react": "^4.2.1",
|
||||||
@@ -57,7 +60,9 @@
|
|||||||
"eslint-plugin-react": "^7.34.1",
|
"eslint-plugin-react": "^7.34.1",
|
||||||
"eslint-plugin-react-hooks": "^5.0.0",
|
"eslint-plugin-react-hooks": "^5.0.0",
|
||||||
"eslint-plugin-react-refresh": "^0.4.6",
|
"eslint-plugin-react-refresh": "^0.4.6",
|
||||||
|
"lint-staged": "^16.2.7",
|
||||||
"prettier": "^3.3.3",
|
"prettier": "^3.3.3",
|
||||||
|
"typescript": "5.9.3",
|
||||||
"vite": "6.3.6"
|
"vite": "6.3.6"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+23
-12
@@ -9,8 +9,7 @@ import { CssBaseline, GlobalStyles } from "@mui/material";
|
|||||||
import { logger } from "./Utils/Logger"; // Import the logger
|
import { logger } from "./Utils/Logger"; // Import the logger
|
||||||
import { networkService } from "./main";
|
import { networkService } from "./main";
|
||||||
import { Routes } from "./Routes";
|
import { Routes } from "./Routes";
|
||||||
import WalletProvider from "./Components/WalletProvider";
|
import AppLayout from "@/Components/v1/Layouts/AppLayout";
|
||||||
import AppLayout from "./Components/Layouts/AppLayout";
|
|
||||||
|
|
||||||
function App() {
|
function App() {
|
||||||
const mode = useSelector((state) => state.ui.mode);
|
const mode = useSelector((state) => state.ui.mode);
|
||||||
@@ -23,17 +22,29 @@ function App() {
|
|||||||
};
|
};
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
return (
|
const theme = mode === "light" ? lightTheme : darkTheme;
|
||||||
/* Extract Themeprovider, baseline and global styles to Styles */
|
|
||||||
<ThemeProvider theme={mode === "light" ? lightTheme : darkTheme}>
|
|
||||||
<WalletProvider>
|
|
||||||
<CssBaseline />
|
|
||||||
|
|
||||||
<AppLayout>
|
return (
|
||||||
<Routes />
|
<ThemeProvider theme={theme}>
|
||||||
</AppLayout>
|
<CssBaseline />
|
||||||
<ToastContainer />
|
<GlobalStyles
|
||||||
</WalletProvider>
|
styles={{
|
||||||
|
body: {
|
||||||
|
backgroundColor: theme.palette.background.main,
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<AppLayout>
|
||||||
|
<Routes />
|
||||||
|
</AppLayout>
|
||||||
|
<ToastContainer
|
||||||
|
newestOnTop={true}
|
||||||
|
theme={mode}
|
||||||
|
style={{
|
||||||
|
"--toastify-color-progress-light": "#7C8BA1",
|
||||||
|
"--toastify-color-progress-dark": "#7C8BA1",
|
||||||
|
}}
|
||||||
|
/>
|
||||||
</ThemeProvider>
|
</ThemeProvider>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,99 +0,0 @@
|
|||||||
import { Checkbox, FormControl, ListItemText, MenuItem, Select } from "@mui/material";
|
|
||||||
import { useTheme } from "@emotion/react";
|
|
||||||
import PropTypes from "prop-types";
|
|
||||||
import AddCircleOutlineIcon from "@mui/icons-material/AddCircleOutline";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A reusable filter header component that displays a dropdown menu with selectable options.
|
|
||||||
*
|
|
||||||
* @component
|
|
||||||
* @param {Object} props - The component props.
|
|
||||||
* @param {string} props.header - The header text to display when no options are selected.
|
|
||||||
* @param {Array} props.options - An array of options to display in the dropdown menu. Each option should have a `value` and `label`.
|
|
||||||
* @param {Array} [props.value] - The currently selected values.
|
|
||||||
* @param {Function} props.onChange - The callback function to handle changes in the selected values.
|
|
||||||
* @param {boolean} [props.multiple=true] - Whether multiple options can be selected.
|
|
||||||
* @returns {JSX.Element} The rendered FilterHeader component.
|
|
||||||
*/
|
|
||||||
|
|
||||||
const FilterHeader = ({ header, options, value, onChange, multiple = true }) => {
|
|
||||||
const theme = useTheme();
|
|
||||||
|
|
||||||
const controlledValue = value === undefined ? [] : value; // Ensure value is always treated as an array for controlled component purposes
|
|
||||||
|
|
||||||
return (
|
|
||||||
<FormControl
|
|
||||||
sx={{ minWidth: "10%" }}
|
|
||||||
size="small"
|
|
||||||
>
|
|
||||||
<Select
|
|
||||||
multiple={multiple}
|
|
||||||
IconComponent={(props) => (
|
|
||||||
<AddCircleOutlineIcon
|
|
||||||
{...props}
|
|
||||||
sx={{ fontSize: "medium" }}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
displayEmpty
|
|
||||||
value={controlledValue}
|
|
||||||
onChange={onChange}
|
|
||||||
renderValue={(selected) => {
|
|
||||||
if (!selected?.length) {
|
|
||||||
return header;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
header +
|
|
||||||
" | " +
|
|
||||||
selected
|
|
||||||
.map((value) => options.find((option) => option.value === value)?.label)
|
|
||||||
.filter(Boolean)
|
|
||||||
.join(", ")
|
|
||||||
);
|
|
||||||
}}
|
|
||||||
MenuProps={{
|
|
||||||
anchorOrigin: {
|
|
||||||
vertical: "bottom",
|
|
||||||
horizontal: "left",
|
|
||||||
},
|
|
||||||
transformOrigin: {
|
|
||||||
vertical: "top",
|
|
||||||
horizontal: "left",
|
|
||||||
},
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{options.map((option) => (
|
|
||||||
<MenuItem
|
|
||||||
key={option.value}
|
|
||||||
value={option.value}
|
|
||||||
sx={{
|
|
||||||
height: theme.spacing(17),
|
|
||||||
padding: 0,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Checkbox
|
|
||||||
checked={controlledValue.includes(option.value)}
|
|
||||||
size="small"
|
|
||||||
/>
|
|
||||||
<ListItemText primary={option.label} />
|
|
||||||
</MenuItem>
|
|
||||||
))}
|
|
||||||
</Select>
|
|
||||||
</FormControl>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
FilterHeader.propTypes = {
|
|
||||||
header: PropTypes.string.isRequired,
|
|
||||||
options: PropTypes.arrayOf(
|
|
||||||
PropTypes.shape({
|
|
||||||
value: PropTypes.string.isRequired,
|
|
||||||
label: PropTypes.string.isRequired,
|
|
||||||
})
|
|
||||||
).isRequired,
|
|
||||||
value: PropTypes.arrayOf(PropTypes.string),
|
|
||||||
onChange: PropTypes.func.isRequired,
|
|
||||||
multiple: PropTypes.bool,
|
|
||||||
};
|
|
||||||
|
|
||||||
export default FilterHeader;
|
|
||||||
@@ -16,7 +16,7 @@ const langMap = {
|
|||||||
const LanguageSelector = () => {
|
const LanguageSelector = () => {
|
||||||
const { i18n } = useTranslation();
|
const { i18n } = useTranslation();
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const { language } = useSelector((state) => state.ui);
|
const { language = "en" } = useSelector((state) => state.ui);
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
const handleChange = (event) => {
|
const handleChange = (event) => {
|
||||||
const newLang = event.target.value;
|
const newLang = event.target.value;
|
||||||
|
|||||||
@@ -1,22 +0,0 @@
|
|||||||
import Sidebar from "../../Sidebar";
|
|
||||||
import { Outlet } from "react-router";
|
|
||||||
import { Stack } from "@mui/material";
|
|
||||||
|
|
||||||
import "./index.css";
|
|
||||||
|
|
||||||
const HomeLayout = () => {
|
|
||||||
return (
|
|
||||||
<Stack
|
|
||||||
className="home-layout"
|
|
||||||
flexDirection="row"
|
|
||||||
gap={14}
|
|
||||||
>
|
|
||||||
<Sidebar />
|
|
||||||
<Stack className="home-content-wrapper">
|
|
||||||
<Outlet />
|
|
||||||
</Stack>
|
|
||||||
</Stack>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default HomeLayout;
|
|
||||||
@@ -1,116 +0,0 @@
|
|||||||
import * as React from "react";
|
|
||||||
import Button from "@mui/material/Button";
|
|
||||||
import ButtonGroup from "@mui/material/ButtonGroup";
|
|
||||||
import ArrowDropDownIcon from "@mui/icons-material/ArrowDropDown";
|
|
||||||
import ClickAwayListener from "@mui/material/ClickAwayListener";
|
|
||||||
import Grow from "@mui/material/Grow";
|
|
||||||
import Paper from "@mui/material/Paper";
|
|
||||||
import Popper from "@mui/material/Popper";
|
|
||||||
import MenuItem from "@mui/material/MenuItem";
|
|
||||||
import MenuList from "@mui/material/MenuList";
|
|
||||||
import { useNavigate } from "react-router-dom";
|
|
||||||
import { useTranslation } from "react-i18next";
|
|
||||||
import { createToast } from "../../Utils/toastUtils";
|
|
||||||
import { useExportMonitors } from "../../Hooks/monitorHooks";
|
|
||||||
|
|
||||||
const MonitorActions = ({ isLoading }) => {
|
|
||||||
const [open, setOpen] = React.useState(false);
|
|
||||||
const anchorRef = React.useRef(null);
|
|
||||||
const [selectedIndex, setSelectedIndex] = React.useState(0);
|
|
||||||
const navigate = useNavigate();
|
|
||||||
const { t } = useTranslation();
|
|
||||||
const [exportMonitors, isExporting] = useExportMonitors();
|
|
||||||
|
|
||||||
const options = [t("monitorActions.import"), t("monitorActions.export")];
|
|
||||||
|
|
||||||
const handleClick = async () => {
|
|
||||||
if (selectedIndex === 0) {
|
|
||||||
// Import
|
|
||||||
navigate("/uptime/bulk-import");
|
|
||||||
} else {
|
|
||||||
// Export
|
|
||||||
const [success, error] = await exportMonitors();
|
|
||||||
if (!success) {
|
|
||||||
createToast({ body: error || t("export.failed") });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleMenuItemClick = (event, index) => {
|
|
||||||
setSelectedIndex(index);
|
|
||||||
setOpen(false);
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleToggle = () => {
|
|
||||||
setOpen((prevOpen) => !prevOpen);
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleClose = (event) => {
|
|
||||||
if (anchorRef.current && anchorRef.current.contains(event.target)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
setOpen(false);
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
|
||||||
<React.Fragment>
|
|
||||||
<ButtonGroup
|
|
||||||
variant="contained"
|
|
||||||
color="accent"
|
|
||||||
ref={anchorRef}
|
|
||||||
aria-label="Monitor actions"
|
|
||||||
disabled={isLoading || isExporting}
|
|
||||||
>
|
|
||||||
<Button onClick={handleClick}>{options[selectedIndex]}</Button>
|
|
||||||
<Button
|
|
||||||
size="small"
|
|
||||||
aria-controls={open ? "split-button-menu" : undefined}
|
|
||||||
aria-expanded={open ? "true" : undefined}
|
|
||||||
aria-label="select monitor action"
|
|
||||||
aria-haspopup="menu"
|
|
||||||
onClick={handleToggle}
|
|
||||||
>
|
|
||||||
<ArrowDropDownIcon />
|
|
||||||
</Button>
|
|
||||||
</ButtonGroup>
|
|
||||||
<Popper
|
|
||||||
sx={{ zIndex: 1 }}
|
|
||||||
open={open}
|
|
||||||
anchorEl={anchorRef.current}
|
|
||||||
role={undefined}
|
|
||||||
transition
|
|
||||||
disablePortal
|
|
||||||
>
|
|
||||||
{({ TransitionProps, placement }) => (
|
|
||||||
<Grow
|
|
||||||
{...TransitionProps}
|
|
||||||
style={{
|
|
||||||
transformOrigin: placement === "bottom" ? "center top" : "center bottom",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Paper>
|
|
||||||
<ClickAwayListener onClickAway={handleClose}>
|
|
||||||
<MenuList
|
|
||||||
id="split-button-menu"
|
|
||||||
autoFocusItem
|
|
||||||
>
|
|
||||||
{options.map((option, index) => (
|
|
||||||
<MenuItem
|
|
||||||
key={option}
|
|
||||||
selected={index === selectedIndex}
|
|
||||||
onClick={(event) => handleMenuItemClick(event, index)}
|
|
||||||
>
|
|
||||||
{option}
|
|
||||||
</MenuItem>
|
|
||||||
))}
|
|
||||||
</MenuList>
|
|
||||||
</ClickAwayListener>
|
|
||||||
</Paper>
|
|
||||||
</Grow>
|
|
||||||
)}
|
|
||||||
</Popper>
|
|
||||||
</React.Fragment>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default MonitorActions;
|
|
||||||
@@ -1,52 +0,0 @@
|
|||||||
import { Stack, Typography } from "@mui/material";
|
|
||||||
import PropTypes from "prop-types";
|
|
||||||
import { useTheme } from "@emotion/react";
|
|
||||||
import SkeletonLayout from "./skeleton";
|
|
||||||
|
|
||||||
const MonitorCountHeader = ({
|
|
||||||
isLoading = false,
|
|
||||||
monitorCount,
|
|
||||||
heading = "monitors",
|
|
||||||
sx,
|
|
||||||
children,
|
|
||||||
}) => {
|
|
||||||
const theme = useTheme();
|
|
||||||
if (isLoading) return <SkeletonLayout />;
|
|
||||||
|
|
||||||
if (monitorCount === 1) {
|
|
||||||
heading = "monitor";
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Stack
|
|
||||||
direction="row"
|
|
||||||
alignItems="center"
|
|
||||||
display="flex"
|
|
||||||
width="fit-content"
|
|
||||||
height={theme.spacing(18)}
|
|
||||||
gap={theme.spacing(2)}
|
|
||||||
mt={theme.spacing(2)}
|
|
||||||
px={theme.spacing(4)}
|
|
||||||
pt={theme.spacing(2)}
|
|
||||||
pb={theme.spacing(3)}
|
|
||||||
borderRadius={theme.spacing(1)}
|
|
||||||
sx={{
|
|
||||||
...sx,
|
|
||||||
backgroundColor: theme.palette.secondary.main,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{monitorCount} <Typography component="h2">{heading}</Typography>
|
|
||||||
{children}
|
|
||||||
</Stack>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
MonitorCountHeader.propTypes = {
|
|
||||||
isLoading: PropTypes.bool,
|
|
||||||
monitorCount: PropTypes.number,
|
|
||||||
heading: PropTypes.string,
|
|
||||||
children: PropTypes.node,
|
|
||||||
sx: PropTypes.object,
|
|
||||||
};
|
|
||||||
|
|
||||||
export default MonitorCountHeader;
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
import { Stack, Skeleton } from "@mui/material";
|
|
||||||
import { useTheme } from "@emotion/react";
|
|
||||||
|
|
||||||
const SkeletonLayout = () => {
|
|
||||||
const theme = useTheme();
|
|
||||||
return (
|
|
||||||
<Stack
|
|
||||||
direction="row"
|
|
||||||
alignItems="center"
|
|
||||||
gap={theme.spacing(2)}
|
|
||||||
>
|
|
||||||
<Skeleton
|
|
||||||
variant="text"
|
|
||||||
width={100}
|
|
||||||
height={32}
|
|
||||||
/>
|
|
||||||
<Skeleton
|
|
||||||
variant="circular"
|
|
||||||
width={40}
|
|
||||||
height={40}
|
|
||||||
/>
|
|
||||||
</Stack>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default SkeletonLayout;
|
|
||||||
@@ -1,141 +0,0 @@
|
|||||||
import Stack from "@mui/material/Stack";
|
|
||||||
import Status from "./status";
|
|
||||||
import Skeleton from "./skeleton";
|
|
||||||
import Button from "@mui/material/Button";
|
|
||||||
import { Tooltip } from "@mui/material";
|
|
||||||
import SettingsOutlinedIcon from "@mui/icons-material/SettingsOutlined";
|
|
||||||
import PauseOutlinedIcon from "@mui/icons-material/PauseOutlined";
|
|
||||||
import PlayArrowOutlinedIcon from "@mui/icons-material/PlayArrowOutlined";
|
|
||||||
import EmailIcon from "@mui/icons-material/Email";
|
|
||||||
|
|
||||||
// Utils
|
|
||||||
import PropTypes from "prop-types";
|
|
||||||
import { useNavigate } from "react-router-dom";
|
|
||||||
import { useTheme } from "@mui/material/styles";
|
|
||||||
import { usePauseMonitor } from "../../Hooks/monitorHooks";
|
|
||||||
import { useSendTestEmail } from "../../Hooks/useSendTestEmail";
|
|
||||||
import { useTranslation } from "react-i18next";
|
|
||||||
import { useTestAllNotifications } from "../../Hooks/useNotifications";
|
|
||||||
/**
|
|
||||||
* MonitorDetailsControlHeader component displays the control header for monitor details.
|
|
||||||
* It includes status display, pause/resume button, and a configure button for admins.
|
|
||||||
*
|
|
||||||
* @component
|
|
||||||
* @param {Object} props - Component props
|
|
||||||
* @param {string} props.path - The base path for navigation
|
|
||||||
* @param {boolean} [props.isLoading=false] - Flag indicating if the data is loading
|
|
||||||
* @param {boolean} [props.isAdmin=false] - Flag indicating if the user is an admin
|
|
||||||
* @param {Object} props.monitor - The monitor object containing details
|
|
||||||
* @param {Function} props.triggerUpdate - Function to trigger an update
|
|
||||||
* @returns {JSX.Element} The rendered component
|
|
||||||
*/
|
|
||||||
const MonitorDetailsControlHeader = ({
|
|
||||||
path,
|
|
||||||
isLoading = false,
|
|
||||||
isAdmin = false,
|
|
||||||
monitor,
|
|
||||||
triggerUpdate,
|
|
||||||
}) => {
|
|
||||||
const navigate = useNavigate();
|
|
||||||
const theme = useTheme();
|
|
||||||
const { t } = useTranslation();
|
|
||||||
const [pauseMonitor, isPausing, error] = usePauseMonitor();
|
|
||||||
|
|
||||||
const isTestNotificationsDisabled = monitor?.notifications?.length === 0;
|
|
||||||
|
|
||||||
const tooltipTitle = isTestNotificationsDisabled ? t("testNotificationsDisabled") : "";
|
|
||||||
|
|
||||||
// const [isSending, emailError, sendTestEmail] = useSendTestEmail();
|
|
||||||
|
|
||||||
const [testAllNotifications, isSending, errorAllNotifications] =
|
|
||||||
useTestAllNotifications();
|
|
||||||
|
|
||||||
if (isLoading) {
|
|
||||||
return <Skeleton />;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Stack
|
|
||||||
direction="row"
|
|
||||||
justifyContent="space-between"
|
|
||||||
>
|
|
||||||
<Status monitor={monitor} />
|
|
||||||
|
|
||||||
<Stack
|
|
||||||
direction="row"
|
|
||||||
gap={theme.spacing(2)}
|
|
||||||
>
|
|
||||||
<Tooltip
|
|
||||||
key={monitor?._id}
|
|
||||||
placement="bottom"
|
|
||||||
title={tooltipTitle}
|
|
||||||
>
|
|
||||||
<span>
|
|
||||||
<Button
|
|
||||||
variant="contained"
|
|
||||||
color="secondary"
|
|
||||||
loading={isSending}
|
|
||||||
startIcon={<EmailIcon />}
|
|
||||||
disabled={isTestNotificationsDisabled}
|
|
||||||
onClick={() => {
|
|
||||||
testAllNotifications({ monitorId: monitor?._id });
|
|
||||||
}}
|
|
||||||
sx={{
|
|
||||||
whiteSpace: "nowrap",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{t("sendTestNotifications")}
|
|
||||||
</Button>
|
|
||||||
</span>
|
|
||||||
</Tooltip>
|
|
||||||
<Button
|
|
||||||
variant="contained"
|
|
||||||
color="secondary"
|
|
||||||
onClick={(e) => {
|
|
||||||
navigate(`/incidents/${monitor?._id}`);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{t("menu.incidents")}
|
|
||||||
</Button>
|
|
||||||
{isAdmin && (
|
|
||||||
<Button
|
|
||||||
variant="contained"
|
|
||||||
color="secondary"
|
|
||||||
loading={isPausing}
|
|
||||||
startIcon={
|
|
||||||
monitor?.isActive ? <PauseOutlinedIcon /> : <PlayArrowOutlinedIcon />
|
|
||||||
}
|
|
||||||
onClick={() => {
|
|
||||||
pauseMonitor({
|
|
||||||
monitorId: monitor?._id,
|
|
||||||
triggerUpdate,
|
|
||||||
});
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{monitor?.isActive ? "Pause" : "Resume"}
|
|
||||||
</Button>
|
|
||||||
)}
|
|
||||||
{isAdmin && (
|
|
||||||
<Button
|
|
||||||
variant="contained"
|
|
||||||
color="secondary"
|
|
||||||
startIcon={<SettingsOutlinedIcon />}
|
|
||||||
onClick={() => navigate(`/${path}/configure/${monitor._id}`)}
|
|
||||||
>
|
|
||||||
Configure
|
|
||||||
</Button>
|
|
||||||
)}
|
|
||||||
</Stack>
|
|
||||||
</Stack>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
MonitorDetailsControlHeader.propTypes = {
|
|
||||||
path: PropTypes.string,
|
|
||||||
isLoading: PropTypes.bool,
|
|
||||||
isAdmin: PropTypes.bool,
|
|
||||||
monitor: PropTypes.object,
|
|
||||||
triggerUpdate: PropTypes.func,
|
|
||||||
};
|
|
||||||
|
|
||||||
export default MonitorDetailsControlHeader;
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
import { Stack, Skeleton } from "@mui/material";
|
|
||||||
|
|
||||||
const SkeletonLayout = () => {
|
|
||||||
return (
|
|
||||||
<Stack
|
|
||||||
direction="row"
|
|
||||||
justifyContent="space-between"
|
|
||||||
>
|
|
||||||
<Skeleton
|
|
||||||
height={40}
|
|
||||||
variant="rounded"
|
|
||||||
width="15%"
|
|
||||||
/>
|
|
||||||
<Skeleton
|
|
||||||
height={40}
|
|
||||||
variant="rounded"
|
|
||||||
width="15%"
|
|
||||||
/>
|
|
||||||
</Stack>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default SkeletonLayout;
|
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
// Components
|
|
||||||
import Stack from "@mui/material/Stack";
|
|
||||||
import PulseDot from "../../Components/Animated/PulseDot";
|
|
||||||
import Typography from "@mui/material/Typography";
|
|
||||||
import Dot from "../../Components/Dot";
|
|
||||||
// Utils
|
|
||||||
import { formatDurationRounded } from "../../Utils/timeUtils";
|
|
||||||
import PropTypes from "prop-types";
|
|
||||||
import { useTheme } from "@emotion/react";
|
|
||||||
import { useMonitorUtils } from "../../Hooks/useMonitorUtils";
|
|
||||||
import { formatMonitorUrl } from "../../Utils/utils";
|
|
||||||
/**
|
|
||||||
* Status component displays the status information of a monitor.
|
|
||||||
* It includes the monitor's name, URL, and check interval.
|
|
||||||
*
|
|
||||||
* @component
|
|
||||||
* @param {Object} props - Component props
|
|
||||||
* @param {Object} props.monitor - The monitor object containing details
|
|
||||||
* @param {string} props.monitor.name - The name of the monitor
|
|
||||||
* @param {string} props.monitor.url - The URL of the monitor
|
|
||||||
* @param {number} props.monitor.interval - The interval at which the monitor checks
|
|
||||||
* @returns {JSX.Element} The rendered component
|
|
||||||
*/
|
|
||||||
const Status = ({ monitor }) => {
|
|
||||||
const theme = useTheme();
|
|
||||||
const { statusColor, determineState } = useMonitorUtils();
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Stack>
|
|
||||||
<Typography variant="monitorName">{monitor?.name}</Typography>
|
|
||||||
<Stack
|
|
||||||
direction="row"
|
|
||||||
alignItems={"center"}
|
|
||||||
gap={theme.spacing(4)}
|
|
||||||
>
|
|
||||||
<PulseDot color={statusColor[determineState(monitor)]} />
|
|
||||||
<Typography variant="monitorUrl">{formatMonitorUrl(monitor?.url)}</Typography>
|
|
||||||
<Dot />
|
|
||||||
<Typography>
|
|
||||||
Checking every {formatDurationRounded(monitor?.interval)}.
|
|
||||||
</Typography>
|
|
||||||
</Stack>
|
|
||||||
</Stack>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
Status.propTypes = {
|
|
||||||
monitor: PropTypes.object,
|
|
||||||
};
|
|
||||||
|
|
||||||
export default Status;
|
|
||||||
@@ -1,125 +0,0 @@
|
|||||||
// Components
|
|
||||||
import Stack from "@mui/material/Stack";
|
|
||||||
import Typography from "@mui/material/Typography";
|
|
||||||
import Divider from "@mui/material/Divider";
|
|
||||||
import DeleteOutlineRoundedIcon from "@mui/icons-material/DeleteOutlineRounded";
|
|
||||||
import Search from "../Inputs/Search";
|
|
||||||
|
|
||||||
// Utils
|
|
||||||
import { useState, useEffect } from "react";
|
|
||||||
import { useTheme } from "@mui/material/styles";
|
|
||||||
import PropTypes from "prop-types";
|
|
||||||
|
|
||||||
const NotificationConfig = ({
|
|
||||||
notifications,
|
|
||||||
setMonitor,
|
|
||||||
setNotifications,
|
|
||||||
//FieldWrapper's props
|
|
||||||
gap,
|
|
||||||
labelMb,
|
|
||||||
labelFontWeight,
|
|
||||||
labelVariant,
|
|
||||||
labelSx = {},
|
|
||||||
sx = {},
|
|
||||||
}) => {
|
|
||||||
// Local state
|
|
||||||
const [notificationsSearch, setNotificationsSearch] = useState("");
|
|
||||||
const [selectedNotifications, setSelectedNotifications] = useState([]);
|
|
||||||
|
|
||||||
const handleSearch = (value) => {
|
|
||||||
setSelectedNotifications(value);
|
|
||||||
setMonitor((prev) => {
|
|
||||||
return {
|
|
||||||
...prev,
|
|
||||||
notifications: value.map((notification) => notification._id),
|
|
||||||
};
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
// Handlers
|
|
||||||
const handleDelete = (id) => {
|
|
||||||
const updatedNotifications = selectedNotifications.filter(
|
|
||||||
(notification) => notification._id !== id
|
|
||||||
);
|
|
||||||
|
|
||||||
setSelectedNotifications(updatedNotifications);
|
|
||||||
setMonitor((prev) => {
|
|
||||||
return {
|
|
||||||
...prev,
|
|
||||||
notifications: updatedNotifications.map((notification) => notification._id),
|
|
||||||
};
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
// Setup
|
|
||||||
const theme = useTheme();
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (setNotifications) {
|
|
||||||
const toSet = setNotifications.map((notification) => {
|
|
||||||
return notifications.find((n) => n._id === notification);
|
|
||||||
});
|
|
||||||
setSelectedNotifications(toSet);
|
|
||||||
}
|
|
||||||
}, [setNotifications, notifications]);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Stack gap={theme.spacing(6)}>
|
|
||||||
<Search
|
|
||||||
type="notifications"
|
|
||||||
label="Notifications"
|
|
||||||
options={notifications}
|
|
||||||
filteredBy="notificationName"
|
|
||||||
multiple={true}
|
|
||||||
value={selectedNotifications}
|
|
||||||
inputValue={notificationsSearch}
|
|
||||||
handleInputChange={setNotificationsSearch}
|
|
||||||
handleChange={(value) => {
|
|
||||||
handleSearch(value);
|
|
||||||
}}
|
|
||||||
labelMb={labelMb}
|
|
||||||
labelVariant={labelVariant}
|
|
||||||
labelFontWeight={labelFontWeight}
|
|
||||||
labelSx={labelSx}
|
|
||||||
gap={gap}
|
|
||||||
sx={{
|
|
||||||
...sx,
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<Stack
|
|
||||||
flex={1}
|
|
||||||
width="100%"
|
|
||||||
>
|
|
||||||
{selectedNotifications.map((notification, index) => (
|
|
||||||
<Stack
|
|
||||||
direction="row"
|
|
||||||
alignItems="center"
|
|
||||||
key={notification._id}
|
|
||||||
width="100%"
|
|
||||||
>
|
|
||||||
<Typography
|
|
||||||
flexGrow={1} // <-- This will take up all available horizontal space
|
|
||||||
>
|
|
||||||
{notification.notificationName}
|
|
||||||
</Typography>
|
|
||||||
<DeleteOutlineRoundedIcon
|
|
||||||
onClick={() => {
|
|
||||||
handleDelete(notification._id);
|
|
||||||
}}
|
|
||||||
sx={{ cursor: "pointer" }}
|
|
||||||
/>
|
|
||||||
{index < selectedNotifications.length - 1 && <Divider />}
|
|
||||||
</Stack>
|
|
||||||
))}
|
|
||||||
</Stack>
|
|
||||||
</Stack>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
NotificationConfig.propTypes = {
|
|
||||||
notifications: PropTypes.array,
|
|
||||||
setMonitor: PropTypes.func,
|
|
||||||
setNotifications: PropTypes.array,
|
|
||||||
};
|
|
||||||
|
|
||||||
export default NotificationConfig;
|
|
||||||
-419
@@ -1,419 +0,0 @@
|
|||||||
import { useState, useMemo, useEffect, useCallback } from "react";
|
|
||||||
import { useTranslation } from "react-i18next";
|
|
||||||
import PropTypes from "prop-types";
|
|
||||||
|
|
||||||
import {
|
|
||||||
Dialog,
|
|
||||||
DialogContent,
|
|
||||||
DialogActions,
|
|
||||||
Button,
|
|
||||||
Typography,
|
|
||||||
Box,
|
|
||||||
Tabs,
|
|
||||||
Tab,
|
|
||||||
Stack,
|
|
||||||
} from "@mui/material";
|
|
||||||
import { useTheme } from "@emotion/react";
|
|
||||||
import TabPanel from "./TabPanel";
|
|
||||||
import TabComponent from "./TabComponent";
|
|
||||||
import useNotifications from "../Hooks/useNotification";
|
|
||||||
|
|
||||||
// Define constants for notification types to avoid magic values
|
|
||||||
const NOTIFICATION_TYPES = {
|
|
||||||
SLACK: "slack",
|
|
||||||
DISCORD: "discord",
|
|
||||||
TELEGRAM: "telegram",
|
|
||||||
WEBHOOK: "webhook",
|
|
||||||
};
|
|
||||||
|
|
||||||
// Define constants for field IDs
|
|
||||||
const FIELD_IDS = {
|
|
||||||
WEBHOOK: "webhook",
|
|
||||||
TOKEN: "token",
|
|
||||||
CHAT_ID: "chatId",
|
|
||||||
URL: "url",
|
|
||||||
};
|
|
||||||
|
|
||||||
const NotificationIntegrationModal = ({
|
|
||||||
open,
|
|
||||||
onClose,
|
|
||||||
monitor,
|
|
||||||
setMonitor,
|
|
||||||
// Optional prop to configure available notification types
|
|
||||||
notificationTypes = null,
|
|
||||||
}) => {
|
|
||||||
const { t } = useTranslation();
|
|
||||||
const theme = useTheme();
|
|
||||||
const [tabValue, setTabValue] = useState(0);
|
|
||||||
|
|
||||||
const [loading, _, sendTestNotification] = useNotifications();
|
|
||||||
|
|
||||||
// Helper to get the field state key with error handling
|
|
||||||
const getFieldKey = useCallback(
|
|
||||||
(typeId, fieldId) => {
|
|
||||||
if (typeof typeId !== "string" || typeId === "") {
|
|
||||||
throw new Error(t("errorInvalidTypeId"));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (typeof fieldId !== "string" || fieldId === "") {
|
|
||||||
throw new Error(t("errorInvalidFieldId"));
|
|
||||||
}
|
|
||||||
|
|
||||||
return `${typeId}${fieldId.charAt(0).toUpperCase() + fieldId.slice(1)}`;
|
|
||||||
},
|
|
||||||
[t]
|
|
||||||
);
|
|
||||||
|
|
||||||
// Define notification types
|
|
||||||
const DEFAULT_NOTIFICATION_TYPES = [
|
|
||||||
{
|
|
||||||
id: NOTIFICATION_TYPES.SLACK,
|
|
||||||
label: t("notifications.slack.label"),
|
|
||||||
description: t("notifications.slack.description"),
|
|
||||||
fields: [
|
|
||||||
{
|
|
||||||
id: FIELD_IDS.WEBHOOK,
|
|
||||||
label: t("notifications.slack.webhookLabel"),
|
|
||||||
placeholder: t("notifications.slack.webhookPlaceholder"),
|
|
||||||
type: "text",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: NOTIFICATION_TYPES.DISCORD,
|
|
||||||
label: t("notifications.discord.label"),
|
|
||||||
description: t("notifications.discord.description"),
|
|
||||||
fields: [
|
|
||||||
{
|
|
||||||
id: FIELD_IDS.WEBHOOK,
|
|
||||||
label: t("notifications.discord.webhookLabel"),
|
|
||||||
placeholder: t("notifications.discord.webhookPlaceholder"),
|
|
||||||
type: "text",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: NOTIFICATION_TYPES.TELEGRAM,
|
|
||||||
label: t("notifications.telegram.label"),
|
|
||||||
description: t("notifications.telegram.description"),
|
|
||||||
fields: [
|
|
||||||
{
|
|
||||||
id: FIELD_IDS.TOKEN,
|
|
||||||
label: t("notifications.telegram.tokenLabel"),
|
|
||||||
placeholder: t("notifications.telegram.tokenPlaceholder"),
|
|
||||||
type: "text",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: FIELD_IDS.CHAT_ID,
|
|
||||||
label: t("notifications.telegram.chatIdLabel"),
|
|
||||||
placeholder: t("notifications.telegram.chatIdPlaceholder"),
|
|
||||||
type: "text",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: NOTIFICATION_TYPES.WEBHOOK,
|
|
||||||
label: t("notifications.webhook.label"),
|
|
||||||
description: t("notifications.webhook.description"),
|
|
||||||
fields: [
|
|
||||||
{
|
|
||||||
id: FIELD_IDS.URL,
|
|
||||||
label: t("notifications.webhook.urlLabel"),
|
|
||||||
placeholder: t("notifications.webhook.urlPlaceholder"),
|
|
||||||
type: "text",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
// Use provided notification types or default to our translated ones
|
|
||||||
const activeNotificationTypes = notificationTypes || DEFAULT_NOTIFICATION_TYPES;
|
|
||||||
|
|
||||||
// Memoized function to initialize integrations state
|
|
||||||
const initialIntegrationsState = useMemo(() => {
|
|
||||||
const state = {};
|
|
||||||
|
|
||||||
activeNotificationTypes.forEach((type) => {
|
|
||||||
// Add enabled flag for each notification type
|
|
||||||
state[type.id] = false;
|
|
||||||
|
|
||||||
// Add state for each field in the notification type
|
|
||||||
type.fields.forEach((field) => {
|
|
||||||
const fieldKey = getFieldKey(type.id, field.id);
|
|
||||||
state[fieldKey] = "";
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
return state;
|
|
||||||
}, [activeNotificationTypes, getFieldKey]); // Only recompute when these dependencies change
|
|
||||||
|
|
||||||
const [integrations, setIntegrations] = useState(initialIntegrationsState);
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (open) {
|
|
||||||
const extractNotificationValues = () => {
|
|
||||||
const values = {};
|
|
||||||
|
|
||||||
if (!monitor?.notifications || !Array.isArray(monitor.notifications)) {
|
|
||||||
return values;
|
|
||||||
}
|
|
||||||
|
|
||||||
monitor.notifications.forEach((notification) => {
|
|
||||||
// Handle notification based on its structure
|
|
||||||
if (notification.type === "webhook" && notification.platform) {
|
|
||||||
if (typeof notification.config === "undefined") return;
|
|
||||||
const platform = notification.platform;
|
|
||||||
values[platform] = true; // Set platform as enabled
|
|
||||||
|
|
||||||
// Extract configuration based on platform
|
|
||||||
switch (platform) {
|
|
||||||
case NOTIFICATION_TYPES.SLACK:
|
|
||||||
case NOTIFICATION_TYPES.DISCORD:
|
|
||||||
if (notification.config.webhookUrl) {
|
|
||||||
values[getFieldKey(platform, FIELD_IDS.WEBHOOK)] =
|
|
||||||
notification.config.webhookUrl;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case NOTIFICATION_TYPES.TELEGRAM:
|
|
||||||
if (notification.config.botToken) {
|
|
||||||
values[getFieldKey(platform, FIELD_IDS.TOKEN)] =
|
|
||||||
notification.config.botToken;
|
|
||||||
}
|
|
||||||
if (notification.config.chatId) {
|
|
||||||
values[getFieldKey(platform, FIELD_IDS.CHAT_ID)] =
|
|
||||||
notification.config.chatId;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case NOTIFICATION_TYPES.WEBHOOK:
|
|
||||||
if (notification.config.webhookUrl) {
|
|
||||||
values[getFieldKey(platform, FIELD_IDS.URL)] =
|
|
||||||
notification.config.webhookUrl;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
return values;
|
|
||||||
};
|
|
||||||
|
|
||||||
const extractedValues = extractNotificationValues();
|
|
||||||
setIntegrations((prev) => ({
|
|
||||||
...prev,
|
|
||||||
...extractedValues,
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
}, [open, monitor, getFieldKey]);
|
|
||||||
|
|
||||||
const handleChangeTab = (event, newValue) => {
|
|
||||||
setTabValue(newValue);
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleIntegrationChange = (type, checked) => {
|
|
||||||
setIntegrations((prev) => ({
|
|
||||||
...prev,
|
|
||||||
[type]: checked,
|
|
||||||
}));
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleInputChange = (type, value) => {
|
|
||||||
setIntegrations((prev) => ({
|
|
||||||
...prev,
|
|
||||||
[type]: value,
|
|
||||||
}));
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleTestNotification = async (type) => {
|
|
||||||
// Get the notification type details
|
|
||||||
const notificationType = activeNotificationTypes.find((t) => t.id === type);
|
|
||||||
|
|
||||||
if (typeof notificationType === "undefined") {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Prepare config object based on notification type
|
|
||||||
const config = {};
|
|
||||||
|
|
||||||
// Add each field value to the config object
|
|
||||||
notificationType.fields.forEach((field) => {
|
|
||||||
const fieldKey = getFieldKey(type, field.id);
|
|
||||||
config[field.id] = integrations[fieldKey];
|
|
||||||
});
|
|
||||||
|
|
||||||
await sendTestNotification(type, config);
|
|
||||||
};
|
|
||||||
|
|
||||||
// In NotificationIntegrationModal.jsx, update the handleSave function:
|
|
||||||
|
|
||||||
const handleSave = () => {
|
|
||||||
// Get existing notifications
|
|
||||||
const notifications = [...(monitor?.notifications || [])];
|
|
||||||
|
|
||||||
// Get all notification types IDs
|
|
||||||
const existingTypes = activeNotificationTypes.map((type) => type.id);
|
|
||||||
|
|
||||||
// Filter out notifications that are configurable in this modal
|
|
||||||
const filteredNotifications = notifications.filter((notification) => {
|
|
||||||
if (notification.platform) {
|
|
||||||
return !existingTypes.includes(notification.platform);
|
|
||||||
}
|
|
||||||
|
|
||||||
return !existingTypes.includes(notification.type);
|
|
||||||
});
|
|
||||||
|
|
||||||
// Add each enabled notification with its configured fields
|
|
||||||
activeNotificationTypes.forEach((type) => {
|
|
||||||
if (integrations[type.id]) {
|
|
||||||
let notificationObject = {
|
|
||||||
type: "webhook",
|
|
||||||
platform: type.id, // Set platform to identify the specific service
|
|
||||||
config: {},
|
|
||||||
};
|
|
||||||
|
|
||||||
// Configure based on notification type
|
|
||||||
switch (type.id) {
|
|
||||||
case "slack":
|
|
||||||
case "discord":
|
|
||||||
notificationObject.config.webhookUrl =
|
|
||||||
integrations[getFieldKey(type.id, "webhook")];
|
|
||||||
break;
|
|
||||||
case "telegram":
|
|
||||||
notificationObject.config.botToken =
|
|
||||||
integrations[getFieldKey(type.id, "token")];
|
|
||||||
notificationObject.config.chatId =
|
|
||||||
integrations[getFieldKey(type.id, "chatId")];
|
|
||||||
break;
|
|
||||||
case "webhook":
|
|
||||||
notificationObject.config.webhookUrl =
|
|
||||||
integrations[getFieldKey(type.id, "url")];
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
filteredNotifications.push(notificationObject);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// Update monitor with new notifications
|
|
||||||
setMonitor((prev) => ({
|
|
||||||
...prev,
|
|
||||||
notifications: filteredNotifications,
|
|
||||||
}));
|
|
||||||
|
|
||||||
onClose();
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Dialog
|
|
||||||
open={open}
|
|
||||||
onClose={onClose}
|
|
||||||
fullWidth
|
|
||||||
maxWidth="md"
|
|
||||||
sx={{
|
|
||||||
"& .MuiDialog-paper": {
|
|
||||||
width: `calc(80% - ${theme.spacing(40)})`,
|
|
||||||
maxWidth: `${theme.breakpoints.values.md - 70}px`,
|
|
||||||
},
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<DialogContent>
|
|
||||||
<Stack
|
|
||||||
direction="row"
|
|
||||||
sx={{
|
|
||||||
height: `calc(30vh - ${theme.spacing(20)})`,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{/* Left sidebar with tabs */}
|
|
||||||
<Box
|
|
||||||
sx={{
|
|
||||||
borderRight: 1,
|
|
||||||
borderColor: theme.palette.primary.lowContrast,
|
|
||||||
width: "30%",
|
|
||||||
maxWidth: theme.spacing(120),
|
|
||||||
pr: theme.spacing(10),
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Typography variant="h2">
|
|
||||||
{t("notifications.addOrEditNotifications")}
|
|
||||||
</Typography>
|
|
||||||
|
|
||||||
<Tabs
|
|
||||||
orientation="vertical"
|
|
||||||
variant="scrollable"
|
|
||||||
value={tabValue}
|
|
||||||
onChange={handleChangeTab}
|
|
||||||
aria-label="Notification tabs"
|
|
||||||
>
|
|
||||||
{activeNotificationTypes.map((type) => (
|
|
||||||
<Tab
|
|
||||||
key={type.id}
|
|
||||||
label={type.label}
|
|
||||||
orientation="vertical"
|
|
||||||
disableRipple
|
|
||||||
/>
|
|
||||||
))}
|
|
||||||
</Tabs>
|
|
||||||
</Box>
|
|
||||||
|
|
||||||
{/* Right side content */}
|
|
||||||
<Box
|
|
||||||
sx={{
|
|
||||||
flex: 1,
|
|
||||||
pl: theme.spacing(7.5),
|
|
||||||
overflowY: "auto",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{activeNotificationTypes.map((type, index) => (
|
|
||||||
<TabPanel
|
|
||||||
key={type.id}
|
|
||||||
value={tabValue}
|
|
||||||
index={index}
|
|
||||||
>
|
|
||||||
<TabComponent
|
|
||||||
type={type}
|
|
||||||
integrations={integrations}
|
|
||||||
handleIntegrationChange={handleIntegrationChange}
|
|
||||||
handleInputChange={handleInputChange}
|
|
||||||
handleTestNotification={handleTestNotification}
|
|
||||||
isLoading={loading}
|
|
||||||
/>
|
|
||||||
</TabPanel>
|
|
||||||
))}
|
|
||||||
</Box>
|
|
||||||
</Stack>
|
|
||||||
</DialogContent>
|
|
||||||
<DialogActions
|
|
||||||
sx={{
|
|
||||||
p: theme.spacing(4),
|
|
||||||
display: "flex",
|
|
||||||
justifyContent: "flex-end",
|
|
||||||
mb: theme.spacing(5),
|
|
||||||
mr: theme.spacing(5),
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Button
|
|
||||||
variant="contained"
|
|
||||||
color="accent"
|
|
||||||
onClick={handleSave}
|
|
||||||
loading={loading}
|
|
||||||
sx={{
|
|
||||||
width: "auto",
|
|
||||||
minWidth: theme.spacing(60),
|
|
||||||
px: theme.spacing(8),
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{t("commonSave")}
|
|
||||||
</Button>
|
|
||||||
</DialogActions>
|
|
||||||
</Dialog>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
NotificationIntegrationModal.propTypes = {
|
|
||||||
open: PropTypes.bool.isRequired,
|
|
||||||
onClose: PropTypes.func.isRequired,
|
|
||||||
monitor: PropTypes.object.isRequired,
|
|
||||||
setMonitor: PropTypes.func.isRequired,
|
|
||||||
notificationTypes: PropTypes.array,
|
|
||||||
};
|
|
||||||
|
|
||||||
export default NotificationIntegrationModal;
|
|
||||||
@@ -1,115 +0,0 @@
|
|||||||
import React from "react";
|
|
||||||
import { Typography, Box, Button, CircularProgress } from "@mui/material";
|
|
||||||
import { useTranslation } from "react-i18next";
|
|
||||||
import { useTheme } from "@emotion/react";
|
|
||||||
import TextInput from "../../../Components/Inputs/TextInput";
|
|
||||||
import Checkbox from "../../../Components/Inputs/Checkbox";
|
|
||||||
|
|
||||||
const TabComponent = ({
|
|
||||||
type,
|
|
||||||
integrations,
|
|
||||||
handleIntegrationChange,
|
|
||||||
handleInputChange,
|
|
||||||
handleTestNotification,
|
|
||||||
isLoading,
|
|
||||||
}) => {
|
|
||||||
const theme = useTheme();
|
|
||||||
const { t } = useTranslation();
|
|
||||||
|
|
||||||
// Helper to get the field state key (e.g., slackWebhook, telegramToken)
|
|
||||||
const getFieldKey = (typeId, fieldId) => {
|
|
||||||
return `${typeId}${fieldId.charAt(0).toUpperCase() + fieldId.slice(1)}`;
|
|
||||||
};
|
|
||||||
|
|
||||||
// Check if all fields have values to enable test button
|
|
||||||
const areAllFieldsFilled = () => {
|
|
||||||
return type.fields.every((field) => {
|
|
||||||
const fieldKey = getFieldKey(type.id, field.id);
|
|
||||||
return integrations[fieldKey];
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<Typography
|
|
||||||
variant="subtitle1"
|
|
||||||
component="h4"
|
|
||||||
sx={{
|
|
||||||
fontWeight: "bold",
|
|
||||||
color: theme.palette.primary.contrastTextSecondary,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{type.label}
|
|
||||||
</Typography>
|
|
||||||
|
|
||||||
<Typography
|
|
||||||
sx={{
|
|
||||||
mt: theme.spacing(0.5),
|
|
||||||
mb: theme.spacing(1.5),
|
|
||||||
color: theme.palette.primary.contrastTextTertiary,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{type.description}
|
|
||||||
</Typography>
|
|
||||||
|
|
||||||
<Box sx={{ pl: theme.spacing(1.5) }}>
|
|
||||||
<Checkbox
|
|
||||||
id={`enable-${type.id}`}
|
|
||||||
label={t("notifications.enableNotifications", { platform: type.label })}
|
|
||||||
isChecked={integrations[type.id]}
|
|
||||||
onChange={(e) => handleIntegrationChange(type.id, e.target.checked)}
|
|
||||||
disabled={isLoading}
|
|
||||||
/>
|
|
||||||
</Box>
|
|
||||||
|
|
||||||
{type.fields.map((field) => {
|
|
||||||
const fieldKey = getFieldKey(type.id, field.id);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Box
|
|
||||||
key={field.id}
|
|
||||||
sx={{ mt: theme.spacing(1) }}
|
|
||||||
>
|
|
||||||
<Typography
|
|
||||||
sx={{
|
|
||||||
mb: theme.spacing(2),
|
|
||||||
fontWeight: "bold",
|
|
||||||
color: theme.palette.primary.contrastTextSecondary,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{field.label}
|
|
||||||
</Typography>
|
|
||||||
|
|
||||||
<TextInput
|
|
||||||
id={`${type.id}-${field.id}`}
|
|
||||||
type={field.type}
|
|
||||||
placeholder={field.placeholder}
|
|
||||||
value={integrations[fieldKey]}
|
|
||||||
onChange={(e) => handleInputChange(fieldKey, e.target.value)}
|
|
||||||
disabled={!integrations[type.id] || isLoading}
|
|
||||||
/>
|
|
||||||
</Box>
|
|
||||||
);
|
|
||||||
})}
|
|
||||||
|
|
||||||
<Box sx={{ mt: theme.spacing(1) }}>
|
|
||||||
<Button
|
|
||||||
variant="text"
|
|
||||||
color="info"
|
|
||||||
onClick={() => handleTestNotification(type.id)}
|
|
||||||
disabled={!integrations[type.id] || !areAllFieldsFilled() || isLoading}
|
|
||||||
>
|
|
||||||
{isLoading ? (
|
|
||||||
<CircularProgress
|
|
||||||
size={theme.spacing(8)}
|
|
||||||
sx={{ mr: theme.spacing(1), color: theme.palette.accent.main }}
|
|
||||||
/>
|
|
||||||
) : null}
|
|
||||||
{t("notifications.testNotification")}
|
|
||||||
</Button>
|
|
||||||
</Box>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default TabComponent;
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
import React from "react";
|
|
||||||
import PropTypes from "prop-types";
|
|
||||||
import { Box } from "@mui/material";
|
|
||||||
import { useTheme } from "@emotion/react";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* TabPanel component that displays content for the selected tab.
|
|
||||||
*
|
|
||||||
* @component
|
|
||||||
* @param {Object} props - The component props.
|
|
||||||
* @param {React.ReactNode} props.children - The content to be displayed when this tab panel is selected.
|
|
||||||
* @param {number} props.value - The currently selected tab value.
|
|
||||||
* @param {number} props.index - The index of this specific tab panel.
|
|
||||||
* @param {Object} props.other - Any additional props to be spread to the root element.
|
|
||||||
* @returns {React.ReactElement|null} The rendered tab panel or null if not selected.
|
|
||||||
*/
|
|
||||||
function TabPanel({ children, value, index, ...other }) {
|
|
||||||
const theme = useTheme();
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div
|
|
||||||
role="tabpanel"
|
|
||||||
hidden={value !== index}
|
|
||||||
id={`notification-tabpanel-${index}`}
|
|
||||||
aria-labelledby={`notification-tab-${index}`}
|
|
||||||
{...other}
|
|
||||||
>
|
|
||||||
{value === index && <Box sx={{ pt: theme.spacing(3) }}>{children}</Box>}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
TabPanel.propTypes = {
|
|
||||||
children: PropTypes.node,
|
|
||||||
|
|
||||||
index: PropTypes.number.isRequired,
|
|
||||||
|
|
||||||
value: PropTypes.number.isRequired,
|
|
||||||
};
|
|
||||||
|
|
||||||
export default TabPanel;
|
|
||||||
@@ -1,129 +0,0 @@
|
|||||||
import { useState } from "react";
|
|
||||||
import { useTranslation } from "react-i18next";
|
|
||||||
import { networkService } from "../../../Utils/NetworkService";
|
|
||||||
import { createToast } from "../../../Utils/toastUtils";
|
|
||||||
|
|
||||||
// Define constants for notification types to avoid magic values
|
|
||||||
const NOTIFICATION_TYPES = {
|
|
||||||
SLACK: "slack",
|
|
||||||
DISCORD: "discord",
|
|
||||||
TELEGRAM: "telegram",
|
|
||||||
WEBHOOK: "webhook",
|
|
||||||
};
|
|
||||||
|
|
||||||
// Define constants for field IDs
|
|
||||||
const FIELD_IDS = {
|
|
||||||
WEBHOOK: "webhook",
|
|
||||||
TOKEN: "token",
|
|
||||||
CHAT_ID: "chatId",
|
|
||||||
URL: "url",
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Custom hook for notification-related operations
|
|
||||||
*/
|
|
||||||
const useNotifications = () => {
|
|
||||||
const [loading, setLoading] = useState(false);
|
|
||||||
const [error, setError] = useState(undefined);
|
|
||||||
const { t } = useTranslation();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Send a test notification
|
|
||||||
* @param {string} type - The notification type (slack, discord, telegram, webhook)
|
|
||||||
* @param {object} config - Configuration object with necessary params
|
|
||||||
*/
|
|
||||||
const sendTestNotification = async (type, config) => {
|
|
||||||
setLoading(true);
|
|
||||||
setError(undefined);
|
|
||||||
|
|
||||||
// Validation based on notification type
|
|
||||||
let payload = { platform: type };
|
|
||||||
let isValid = true;
|
|
||||||
let errorMessage = "";
|
|
||||||
|
|
||||||
switch (type) {
|
|
||||||
case NOTIFICATION_TYPES.SLACK:
|
|
||||||
payload.webhookUrl = config.webhook;
|
|
||||||
if (typeof payload.webhookUrl === "undefined" || payload.webhookUrl === "") {
|
|
||||||
isValid = false;
|
|
||||||
errorMessage = t("notifications.slack.webhookRequired");
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case NOTIFICATION_TYPES.DISCORD:
|
|
||||||
payload.webhookUrl = config.webhook;
|
|
||||||
if (typeof payload.webhookUrl === "undefined" || payload.webhookUrl === "") {
|
|
||||||
isValid = false;
|
|
||||||
errorMessage = t("notifications.discord.webhookRequired");
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case NOTIFICATION_TYPES.TELEGRAM:
|
|
||||||
payload.botToken = config.token;
|
|
||||||
payload.chatId = config.chatId;
|
|
||||||
if (
|
|
||||||
typeof payload.botToken === "undefined" ||
|
|
||||||
payload.botToken === "" ||
|
|
||||||
typeof payload.chatId === "undefined" ||
|
|
||||||
payload.chatId === ""
|
|
||||||
) {
|
|
||||||
isValid = false;
|
|
||||||
errorMessage = t("notifications.telegram.fieldsRequired");
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case NOTIFICATION_TYPES.WEBHOOK:
|
|
||||||
payload.webhookUrl = config.url;
|
|
||||||
payload.platform = NOTIFICATION_TYPES.SLACK;
|
|
||||||
if (typeof payload.webhookUrl === "undefined" || payload.webhookUrl === "") {
|
|
||||||
isValid = false;
|
|
||||||
errorMessage = t("notifications.webhook.urlRequired");
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
isValid = false;
|
|
||||||
errorMessage = t("notifications.unsupportedType");
|
|
||||||
}
|
|
||||||
|
|
||||||
// If validation fails, show error and return
|
|
||||||
if (isValid === false) {
|
|
||||||
createToast({
|
|
||||||
body: errorMessage,
|
|
||||||
variant: "error",
|
|
||||||
});
|
|
||||||
setLoading(false);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
const response = await networkService.testNotification({
|
|
||||||
platform: type,
|
|
||||||
payload: payload,
|
|
||||||
});
|
|
||||||
|
|
||||||
if (response.data.success === true) {
|
|
||||||
createToast({
|
|
||||||
body: t("notifications.testSuccess"),
|
|
||||||
variant: "info",
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
throw new Error(response.data.msg || t("notifications.testFailed"));
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
const errorMsg =
|
|
||||||
error.response?.data?.msg || error.message || t("notifications.networkError");
|
|
||||||
createToast({
|
|
||||||
body: `${t("notifications.testFailed")}: ${errorMsg}`,
|
|
||||||
variant: "error",
|
|
||||||
});
|
|
||||||
setError(errorMsg);
|
|
||||||
} finally {
|
|
||||||
setLoading(false);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
return [loading, error, sendTestNotification];
|
|
||||||
};
|
|
||||||
|
|
||||||
export default useNotifications;
|
|
||||||
Whitespace-only changes.
+13
-9
@@ -2,17 +2,17 @@
|
|||||||
import IconButton from "@mui/material/IconButton";
|
import IconButton from "@mui/material/IconButton";
|
||||||
import Menu from "@mui/material/Menu";
|
import Menu from "@mui/material/Menu";
|
||||||
import MenuItem from "@mui/material/MenuItem";
|
import MenuItem from "@mui/material/MenuItem";
|
||||||
import Settings from "../../assets/icons/settings-bold.svg?react";
|
import Icon from "../Icon";
|
||||||
import Dialog from "../../Components/Dialog";
|
import Dialog from "../Dialog/index.jsx";
|
||||||
|
|
||||||
// Utils
|
// Utils
|
||||||
import { useState } from "react";
|
import { 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";
|
import { createToast } from "../../../Utils/toastUtils.jsx";
|
||||||
|
|
||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
import { usePauseMonitor, useDeleteMonitor } from "../../Hooks/monitorHooks";
|
import { usePauseMonitor, useDeleteMonitor } from "../../../Hooks/monitorHooks.js";
|
||||||
|
|
||||||
const ActionsMenu = ({
|
const ActionsMenu = ({
|
||||||
monitor,
|
monitor,
|
||||||
@@ -31,7 +31,7 @@ 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 };
|
||||||
await deleteMonitor({ monitor });
|
await deleteMonitor({ monitor });
|
||||||
updateRowCallback();
|
updateRowCallback();
|
||||||
};
|
};
|
||||||
@@ -39,7 +39,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 +72,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": {
|
||||||
@@ -83,7 +83,10 @@ const ActionsMenu = ({
|
|||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Settings />
|
<Icon
|
||||||
|
name="Settings"
|
||||||
|
size={20}
|
||||||
|
/>
|
||||||
</IconButton>
|
</IconButton>
|
||||||
|
|
||||||
<Menu
|
<Menu
|
||||||
@@ -197,6 +200,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 +214,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,
|
||||||
File renamed without changes.
@@ -1,10 +1,7 @@
|
|||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
import { useTheme } from "@emotion/react";
|
import { useTheme } from "@emotion/react";
|
||||||
import { Box, Button, IconButton, Stack, Typography } from "@mui/material";
|
import { Box, Button, IconButton, Stack, Typography } from "@mui/material";
|
||||||
import InfoOutlinedIcon from "@mui/icons-material/InfoOutlined";
|
import Icon from "../Icon";
|
||||||
import ErrorOutlineOutlinedIcon from "@mui/icons-material/ErrorOutlineOutlined";
|
|
||||||
import WarningAmberOutlinedIcon from "@mui/icons-material/WarningAmberOutlined";
|
|
||||||
import CloseIcon from "@mui/icons-material/Close";
|
|
||||||
import "./index.css";
|
import "./index.css";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -13,9 +10,24 @@ import "./index.css";
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
const icons = {
|
const icons = {
|
||||||
info: <InfoOutlinedIcon />,
|
info: (
|
||||||
error: <ErrorOutlineOutlinedIcon />,
|
<Icon
|
||||||
warning: <WarningAmberOutlinedIcon />,
|
name="Info"
|
||||||
|
size={24}
|
||||||
|
/>
|
||||||
|
),
|
||||||
|
error: (
|
||||||
|
<Icon
|
||||||
|
name="AlertCircle"
|
||||||
|
size={24}
|
||||||
|
/>
|
||||||
|
),
|
||||||
|
warning: (
|
||||||
|
<Icon
|
||||||
|
name="AlertTriangle"
|
||||||
|
size={24}
|
||||||
|
/>
|
||||||
|
),
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -97,10 +109,9 @@ const Alert = ({ variant, title, body, isToast, hasIcon = true, onClick }) => {
|
|||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<CloseIcon
|
<Icon
|
||||||
sx={{
|
name="X"
|
||||||
fontSize: "20px",
|
size={20}
|
||||||
}}
|
|
||||||
/>
|
/>
|
||||||
</IconButton>
|
</IconButton>
|
||||||
)}
|
)}
|
||||||
File renamed without changes.
+10
-9
@@ -1,27 +1,28 @@
|
|||||||
import LeftArrow from "../../assets/icons/left-arrow.svg?react";
|
import Icon from "../Icon";
|
||||||
import LeftArrowDouble from "../../assets/icons/left-arrow-double.svg?react";
|
|
||||||
import LeftArrowLong from "../../assets/icons/left-arrow-long.svg?react";
|
|
||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
|
|
||||||
const ArrowLeft = ({ type, color = "#667085", ...props }) => {
|
const ArrowLeft = ({ type, color = "#667085", ...props }) => {
|
||||||
if (type === "double") {
|
if (type === "double") {
|
||||||
return (
|
return (
|
||||||
<LeftArrowDouble
|
<Icon
|
||||||
style={{ color }}
|
name="ChevronsLeft"
|
||||||
|
color={color}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
} else if (type === "long") {
|
} else if (type === "long") {
|
||||||
return (
|
return (
|
||||||
<LeftArrowLong
|
<Icon
|
||||||
style={{ color }}
|
name="ArrowLeft"
|
||||||
|
color={color}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return (
|
return (
|
||||||
<LeftArrow
|
<Icon
|
||||||
style={{ color }}
|
name="ChevronLeft"
|
||||||
|
color={color}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
+7
-6
@@ -1,19 +1,20 @@
|
|||||||
import RightArrow from "../../assets/icons/right-arrow.svg?react";
|
import Icon from "../Icon";
|
||||||
import RightArrowDouble from "../../assets/icons/right-arrow-double.svg?react";
|
|
||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
|
|
||||||
const ArrowRight = ({ type, color = "#667085", ...props }) => {
|
const ArrowRight = ({ type, color = "#667085", ...props }) => {
|
||||||
if (type === "double") {
|
if (type === "double") {
|
||||||
return (
|
return (
|
||||||
<RightArrowDouble
|
<Icon
|
||||||
style={{ color }}
|
name="ChevronsRight"
|
||||||
|
color={color}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return (
|
return (
|
||||||
<RightArrow
|
<Icon
|
||||||
style={{ color }}
|
name="ChevronRight"
|
||||||
|
color={color}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
+1
-1
@@ -2,7 +2,7 @@ import PropTypes from "prop-types";
|
|||||||
import { Box, Breadcrumbs as MUIBreadcrumbs } from "@mui/material";
|
import { Box, Breadcrumbs as MUIBreadcrumbs } 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 ArrowRight from "../ArrowRight";
|
import ArrowRight from "../ArrowRight/index.jsx";
|
||||||
import "./index.css";
|
import "./index.css";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
File renamed without changes.
+1
-1
@@ -61,7 +61,7 @@ import {
|
|||||||
Tooltip,
|
Tooltip,
|
||||||
ResponsiveContainer,
|
ResponsiveContainer,
|
||||||
} from "recharts";
|
} from "recharts";
|
||||||
import { createGradient } from "../Utils/gradientUtils";
|
import { createGradient } from "../Utils/gradientUtils.jsx";
|
||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
import { useTheme } from "@mui/material";
|
import { useTheme } from "@mui/material";
|
||||||
import { useId } from "react";
|
import { useId } from "react";
|
||||||
File renamed without changes.
+3
-3
@@ -1,6 +1,6 @@
|
|||||||
import { useTheme } from "@emotion/react";
|
import { useTheme } from "@emotion/react";
|
||||||
import { Box, Stack, Tooltip, Typography } from "@mui/material";
|
import { Box, Stack, Tooltip, Typography } from "@mui/material";
|
||||||
import { formatDateWithTz } from "../../../Utils/timeUtils";
|
import { formatDateWithTz } from "../../../../Utils/timeUtilsLegacy.js";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import "./index.css";
|
import "./index.css";
|
||||||
import { useSelector } from "react-redux";
|
import { useSelector } from "react-redux";
|
||||||
@@ -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),
|
||||||
/*
|
/*
|
||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
import { Typography, Stack } from "@mui/material";
|
import { Typography, Stack } from "@mui/material";
|
||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
import { useTheme } from "@emotion/react";
|
import { useTheme } from "@emotion/react";
|
||||||
import IconBox from "../../IconBox";
|
import IconBox from "../../IconBox/index.jsx";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* `EmptyView` is a functional React component that displays an empty state view with an optional icon, header, and message.
|
* `EmptyView` is a functional React component that displays an empty state view with an optional icon, header, and message.
|
||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
import { Stack, Typography } from "@mui/material";
|
import { Stack, Typography } from "@mui/material";
|
||||||
import { useTheme } from "@emotion/react";
|
import { useTheme } from "@emotion/react";
|
||||||
import IconBox from "../../IconBox";
|
import IconBox from "../../IconBox/index.jsx";
|
||||||
import EmptyView from "./EmptyView";
|
import EmptyView from "./EmptyView.jsx";
|
||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
|
|
||||||
const ChartBox = ({
|
const ChartBox = ({
|
||||||
File renamed without changes.
File renamed without changes.
+1
-1
@@ -5,7 +5,7 @@ import { Stack, Box, Tooltip, Typography } from "@mui/material";
|
|||||||
import { useTheme } from "@emotion/react";
|
import { useTheme } from "@emotion/react";
|
||||||
import { useState, useEffect } from "react";
|
import { useState, useEffect } from "react";
|
||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
import { formatDateWithTz } from "../../../Utils/timeUtils";
|
import { formatDateWithTz } from "../../../../Utils/timeUtilsLegacy.js";
|
||||||
import { useSelector } from "react-redux";
|
import { useSelector } from "react-redux";
|
||||||
|
|
||||||
const PlaceholderCheck = ({ daysToShow }) => {
|
const PlaceholderCheck = ({ daysToShow }) => {
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
import { Stack, Typography } from "@mui/material";
|
import { Stack, Typography } from "@mui/material";
|
||||||
import { useTheme } from "@emotion/react";
|
import { useTheme } from "@emotion/react";
|
||||||
import IconBox from "../../IconBox";
|
import IconBox from "../../IconBox/index.jsx";
|
||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
|
|
||||||
const LegendBox = ({ children, icon, header, sx }) => {
|
const LegendBox = ({ children, icon, header, sx }) => {
|
||||||
File renamed without changes.
+2
-2
@@ -12,11 +12,11 @@ import { Box, Stack, Typography } from "@mui/material";
|
|||||||
import { useTheme } from "@emotion/react";
|
import { useTheme } from "@emotion/react";
|
||||||
import { useMemo, useState } from "react";
|
import { useMemo, useState } from "react";
|
||||||
import { useSelector } from "react-redux";
|
import { useSelector } from "react-redux";
|
||||||
import { formatDateWithTz } from "../../../Utils/timeUtils";
|
import { formatDateWithTz } from "../../../../Utils/timeUtilsLegacy.js";
|
||||||
import {
|
import {
|
||||||
tooltipDateFormatLookup,
|
tooltipDateFormatLookup,
|
||||||
tickDateFormatLookup,
|
tickDateFormatLookup,
|
||||||
} from "../Utils/chartUtilFunctions";
|
} from "../Utils/chartUtilFunctions.js";
|
||||||
|
|
||||||
import "./index.css";
|
import "./index.css";
|
||||||
const CustomToolTip = ({ active, payload, label, dateRange }) => {
|
const CustomToolTip = ({ active, payload, label, dateRange }) => {
|
||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
import { useTheme } from "@emotion/react";
|
import { useTheme } from "@emotion/react";
|
||||||
import { Box, Stack, Tooltip, Typography } from "@mui/material";
|
import { Box, Stack, Tooltip, Typography } from "@mui/material";
|
||||||
import { formatDateWithTz } from "../../../Utils/timeUtils";
|
import { formatDateWithTz } from "../../../../Utils/timeUtilsLegacy.js";
|
||||||
import { useEffect, useState, forwardRef } from "react";
|
import { useEffect, useState, forwardRef } from "react";
|
||||||
import { useSelector } from "react-redux";
|
import { useSelector } from "react-redux";
|
||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
@@ -148,7 +148,7 @@ const StatusPageBarChart = ({ checks = [] }) => {
|
|||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
placement="top"
|
placement="top"
|
||||||
key={`check-${check?._id}`}
|
key={`check-${check?.id}`}
|
||||||
slotProps={{
|
slotProps={{
|
||||||
popper: {
|
popper: {
|
||||||
className: "bar-tooltip",
|
className: "bar-tooltip",
|
||||||
File renamed without changes.
+2
-2
@@ -2,9 +2,9 @@ import PropTypes from "prop-types";
|
|||||||
import { useSelector } from "react-redux";
|
import { useSelector } from "react-redux";
|
||||||
import { useTheme } from "@mui/material";
|
import { useTheme } from "@mui/material";
|
||||||
import { Text } from "recharts";
|
import { Text } from "recharts";
|
||||||
import { formatDateWithTz } from "../../../Utils/timeUtils";
|
import { formatDateWithTz } from "../../../../Utils/timeUtilsLegacy.js";
|
||||||
import { Box, Stack, Typography } from "@mui/material";
|
import { Box, Stack, Typography } from "@mui/material";
|
||||||
import { tickDateFormatLookup, tooltipDateFormatLookup } from "./chartUtilFunctions";
|
import { tickDateFormatLookup, tooltipDateFormatLookup } from "./chartUtilFunctions.js";
|
||||||
/**
|
/**
|
||||||
* Custom tick component for rendering time with timezone.
|
* Custom tick component for rendering time with timezone.
|
||||||
*
|
*
|
||||||
File renamed without changes.
@@ -1,7 +1,6 @@
|
|||||||
import "./check.css";
|
import "./check.css";
|
||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
import CheckGrey from "../../assets/icons/check.svg?react";
|
import Icon from "../Icon";
|
||||||
import CheckOutlined from "../../assets/icons/check-outlined.svg?react";
|
|
||||||
import { Box, Stack, Typography } from "@mui/material";
|
import { Box, Stack, Typography } from "@mui/material";
|
||||||
import { useTheme } from "@emotion/react";
|
import { useTheme } from "@emotion/react";
|
||||||
|
|
||||||
@@ -35,16 +34,16 @@ const Check = ({ text, noHighlightText, variant = "info", outlined = false }) =>
|
|||||||
alignItems="center"
|
alignItems="center"
|
||||||
>
|
>
|
||||||
{outlined ? (
|
{outlined ? (
|
||||||
<CheckOutlined alt="check" />
|
<Icon
|
||||||
|
name="CheckCircle"
|
||||||
|
size={20}
|
||||||
|
/>
|
||||||
) : (
|
) : (
|
||||||
<Box
|
<Icon
|
||||||
lineHeight={0}
|
name="Check"
|
||||||
sx={{
|
size={16}
|
||||||
"& svg > path": { fill: colors[variant] },
|
color={colors[variant]}
|
||||||
}}
|
/>
|
||||||
>
|
|
||||||
<CheckGrey alt="form checks" />
|
|
||||||
</Box>
|
|
||||||
)}
|
)}
|
||||||
<Typography
|
<Typography
|
||||||
component="span"
|
component="span"
|
||||||
@@ -57,7 +56,14 @@ const Check = ({ text, noHighlightText, variant = "info", outlined = false }) =>
|
|||||||
fontWeight: 450,
|
fontWeight: 450,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{noHighlightText && <Typography component="span">{noHighlightText}</Typography>}{" "}
|
{noHighlightText && (
|
||||||
|
<Typography
|
||||||
|
component="span"
|
||||||
|
sx={{ color: "inherit" }}
|
||||||
|
>
|
||||||
|
{noHighlightText}
|
||||||
|
</Typography>
|
||||||
|
)}{" "}
|
||||||
{text}
|
{text}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Stack>
|
</Stack>
|
||||||
File renamed without changes.
File renamed without changes.
+12
-5
@@ -8,9 +8,8 @@ import IconButton from "@mui/material/IconButton";
|
|||||||
import Container from "@mui/material/Container";
|
import Container from "@mui/material/Container";
|
||||||
import MenuItem from "@mui/material/MenuItem";
|
import MenuItem from "@mui/material/MenuItem";
|
||||||
import Drawer from "@mui/material/Drawer";
|
import Drawer from "@mui/material/Drawer";
|
||||||
import MenuIcon from "@mui/icons-material/Menu";
|
import Icon from "../Icon";
|
||||||
import CloseRoundedIcon from "@mui/icons-material/CloseRounded";
|
import ThemeSwitch from "../ThemeSwitch/index.jsx";
|
||||||
import ThemeSwitch from "../ThemeSwitch";
|
|
||||||
import { useTheme } from "@mui/material/styles";
|
import { useTheme } from "@mui/material/styles";
|
||||||
import { useSelector } from "react-redux";
|
import { useSelector } from "react-redux";
|
||||||
import { useLocation, useNavigate } from "react-router-dom";
|
import { useLocation, useNavigate } from "react-router-dom";
|
||||||
@@ -153,7 +152,11 @@ const AppAppBar = () => {
|
|||||||
aria-label="Menu button"
|
aria-label="Menu button"
|
||||||
onClick={toggleDrawer(true)}
|
onClick={toggleDrawer(true)}
|
||||||
>
|
>
|
||||||
<MenuIcon sx={{ color: theme.palette.text.primary }} />
|
<Icon
|
||||||
|
name="Menu"
|
||||||
|
size={24}
|
||||||
|
color={theme.palette.text.primary}
|
||||||
|
/>
|
||||||
</IconButton>
|
</IconButton>
|
||||||
<Drawer
|
<Drawer
|
||||||
anchor="top"
|
anchor="top"
|
||||||
@@ -176,7 +179,11 @@ const AppAppBar = () => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<IconButton onClick={toggleDrawer(false)}>
|
<IconButton onClick={toggleDrawer(false)}>
|
||||||
<CloseRoundedIcon sx={{ color: theme.palette.text.primary }} />
|
<Icon
|
||||||
|
name="X"
|
||||||
|
size={24}
|
||||||
|
color={theme.palette.text.primary}
|
||||||
|
/>
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
File renamed without changes.
File renamed without changes.
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
import { Box, Stack, Typography } from "@mui/material";
|
import { Box, Stack, Typography } from "@mui/material";
|
||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
import { useTheme } from "@emotion/react";
|
import { useTheme } from "@emotion/react";
|
||||||
import ConfigBox from "../ConfigBox";
|
import ConfigBox from "../ConfigBox/index.jsx";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ConfigRow is a styled container used to layout content in a row format with specific padding, border, and spacing.
|
* ConfigRow is a styled container used to layout content in a row format with specific padding, border, and spacing.
|
||||||
File renamed without changes.
@@ -1,6 +1,6 @@
|
|||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
import { Button, Stack } from "@mui/material";
|
import { Button, Stack } from "@mui/material";
|
||||||
import { GenericDialog } from "./genericDialog";
|
import { GenericDialog } from "./genericDialog.jsx";
|
||||||
import { useTheme } from "@emotion/react";
|
import { useTheme } from "@emotion/react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
File renamed without changes.
File renamed without changes.
+3
-3
@@ -1,8 +1,8 @@
|
|||||||
import { useTheme } from "@emotion/react";
|
import { useTheme } from "@emotion/react";
|
||||||
import Box from "@mui/material/Box";
|
import Box from "@mui/material/Box";
|
||||||
import Background from "../../assets/Images/background-grid.svg?react";
|
import Background from "../../../assets/Images/background-grid.svg?react";
|
||||||
import OutputAnimation from "../../assets/Animations/output.gif";
|
import OutputAnimation from "../../../assets/Animations/output.gif";
|
||||||
import DarkmodeOutput from "../../assets/Animations/darkmodeOutput.gif";
|
import DarkmodeOutput from "../../../assets/Animations/darkmodeOutput.gif";
|
||||||
import { useSelector } from "react-redux";
|
import { useSelector } from "react-redux";
|
||||||
const FallbackBackground = () => {
|
const FallbackBackground = () => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
+1
-1
@@ -2,7 +2,7 @@ import PropTypes from "prop-types";
|
|||||||
import { useTheme } from "@mui/material/styles";
|
import { useTheme } from "@mui/material/styles";
|
||||||
import Box from "@mui/material/Box";
|
import Box from "@mui/material/Box";
|
||||||
import Stack from "@mui/material/Stack";
|
import Stack from "@mui/material/Stack";
|
||||||
import Check from "../Check/Check";
|
import Check from "../Check/Check.jsx";
|
||||||
const FallbackCheckList = ({ checks, type }) => {
|
const FallbackCheckList = ({ checks, type }) => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
return (
|
return (
|
||||||
File renamed without changes.
+1
-1
@@ -3,7 +3,7 @@ import { useTheme } from "@mui/material/styles";
|
|||||||
import Link from "@mui/material/Link";
|
import Link from "@mui/material/Link";
|
||||||
import { Link as RouterLink } from "react-router-dom";
|
import { Link as RouterLink } from "react-router-dom";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import Alert from "../Alert";
|
import Alert from "../Alert/index.jsx";
|
||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
|
|
||||||
const renderWarningMessage = (t) => {
|
const renderWarningMessage = (t) => {
|
||||||
File renamed without changes.
File renamed without changes.
+5
-5
@@ -2,11 +2,11 @@ import PropTypes from "prop-types";
|
|||||||
import { useTheme } from "@emotion/react";
|
import { useTheme } from "@emotion/react";
|
||||||
import { Box, Stack } from "@mui/material";
|
import { Box, Stack } from "@mui/material";
|
||||||
import "./index.css";
|
import "./index.css";
|
||||||
import FallbackTitle from "./FallbackTitle";
|
import FallbackTitle from "./FallbackTitle.jsx";
|
||||||
import FallbackCheckList from "./FallbackCheckList";
|
import FallbackCheckList from "./FallbackCheckList.jsx";
|
||||||
import FallbackActionButtons from "./FallBackActionButtons";
|
import FallbackActionButtons from "./FallBackActionButtons.jsx";
|
||||||
import FallbackBackground from "./FallbackBackground";
|
import FallbackBackground from "./FallbackBackground.jsx";
|
||||||
import FallbackContainer from "./FallbackContainer";
|
import FallbackContainer from "./FallbackContainer.jsx";
|
||||||
/**
|
/**
|
||||||
* Fallback component to display a fallback UI with a title, a list of checks, and a navigation button.
|
* Fallback component to display a fallback UI with a title, a list of checks, and a navigation button.
|
||||||
*
|
*
|
||||||
File renamed without changes.
+4
-4
@@ -1,8 +1,8 @@
|
|||||||
import { useTheme } from "@emotion/react";
|
import { useTheme } from "@emotion/react";
|
||||||
import { Box, Stack } from "@mui/material";
|
import { Box, Stack } from "@mui/material";
|
||||||
import OutputAnimation from "../../assets/Animations/output.gif";
|
import OutputAnimation from "../../../assets/Animations/output.gif";
|
||||||
import DarkmodeOutput from "../../assets/Animations/darkmodeOutput.gif";
|
import DarkmodeOutput from "../../../assets/Animations/darkmodeOutput.gif";
|
||||||
import Background from "../../assets/Images/background-grid.svg?react";
|
import Background from "../../../assets/Images/background-grid.svg?react";
|
||||||
import { useSelector } from "react-redux";
|
import { useSelector } from "react-redux";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -40,13 +40,13 @@ const GenericFallback = ({ children }) => {
|
|||||||
<Box
|
<Box
|
||||||
component="img"
|
component="img"
|
||||||
src={mode === "light" ? OutputAnimation : DarkmodeOutput}
|
src={mode === "light" ? OutputAnimation : DarkmodeOutput}
|
||||||
Background="transparent"
|
|
||||||
alt="Loading animation"
|
alt="Loading animation"
|
||||||
sx={{
|
sx={{
|
||||||
zIndex: 1,
|
zIndex: 1,
|
||||||
border: "none",
|
border: "none",
|
||||||
borderRadius: theme.spacing(8),
|
borderRadius: theme.spacing(8),
|
||||||
width: "100%",
|
width: "100%",
|
||||||
|
backgroundColor: "transparent",
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<Box
|
<Box
|
||||||
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
|
|
||||||
import { logger } from "../../Utils/Logger";
|
import { logger } from "../../../Utils/Logger.js";
|
||||||
import { networkService } from "../../main";
|
import { networkService } from "../../../main.jsx";
|
||||||
|
|
||||||
const withAdminCheck = (WrappedComponent) => {
|
const withAdminCheck = (WrappedComponent) => {
|
||||||
const WithAdminCheck = (props) => {
|
const WithAdminCheck = (props) => {
|
||||||
File renamed without changes.
@@ -1,7 +1,8 @@
|
|||||||
import { Stack, Typography } from "@mui/material";
|
import { Stack, Typography } from "@mui/material";
|
||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
import { useTheme } from "@emotion/react";
|
import { useTheme } from "@emotion/react";
|
||||||
import Dot from "../Dot";
|
import Dot from "../Dot/index.jsx";
|
||||||
|
import { StatusLabel } from "@/Components/v1/Label/index.jsx";
|
||||||
/**
|
/**
|
||||||
* Host component.
|
* Host component.
|
||||||
* This subcomponent receives a params object and displays the host details.
|
* This subcomponent receives a params object and displays the host details.
|
||||||
@@ -14,7 +15,7 @@ import Dot from "../Dot";
|
|||||||
* @param {number} params.percentage - The percentage to display.
|
* @param {number} params.percentage - The percentage to display.
|
||||||
* @returns {React.ElementType} Returns a div element with the host details.
|
* @returns {React.ElementType} Returns a div element with the host details.
|
||||||
*/
|
*/
|
||||||
const Host = ({ url, title, percentageColor, percentage, showURL }) => {
|
const Host = ({ url, title, percentageColor, percentage, showURL, status }) => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
return (
|
return (
|
||||||
<Stack>
|
<Stack>
|
||||||
@@ -24,19 +25,34 @@ const Host = ({ url, title, percentageColor, percentage, showURL }) => {
|
|||||||
alignItems="center"
|
alignItems="center"
|
||||||
gap={theme.spacing(4)}
|
gap={theme.spacing(4)}
|
||||||
>
|
>
|
||||||
{title}
|
<Typography
|
||||||
|
component="span"
|
||||||
|
sx={{
|
||||||
|
fontWeight: 500,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{title}
|
||||||
|
</Typography>
|
||||||
|
|
||||||
{percentageColor && percentage && (
|
{percentageColor && percentage && (
|
||||||
<>
|
<>
|
||||||
<Dot />
|
<Dot />
|
||||||
<Typography
|
<Typography
|
||||||
component="span"
|
component="span"
|
||||||
sx={{
|
sx={{
|
||||||
color: percentageColor,
|
|
||||||
fontWeight: 500,
|
fontWeight: 500,
|
||||||
|
color: percentageColor,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{percentage}%
|
{percentage}%
|
||||||
</Typography>
|
</Typography>
|
||||||
|
{status && (
|
||||||
|
<StatusLabel
|
||||||
|
status={status}
|
||||||
|
text={status}
|
||||||
|
customStyles={{ textTransform: "capitalize" }}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</Stack>
|
</Stack>
|
||||||
@@ -51,6 +67,7 @@ Host.propTypes = {
|
|||||||
percentage: PropTypes.string,
|
percentage: PropTypes.string,
|
||||||
url: PropTypes.string,
|
url: PropTypes.string,
|
||||||
showURL: PropTypes.bool,
|
showURL: PropTypes.bool,
|
||||||
|
status: PropTypes.string,
|
||||||
};
|
};
|
||||||
|
|
||||||
export default Host;
|
export default Host;
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
import { useTheme } from "@mui/material";
|
import { useTheme } from "@mui/material";
|
||||||
import { BaseLabel } from "../Label";
|
import { BaseLabel } from "../Label/index.jsx";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @component
|
* @component
|
||||||
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
import i18n from "../../Utils/i18n";
|
import i18n from "../../../Utils/i18n.js";
|
||||||
import { useSelector } from "react-redux";
|
import { useSelector } from "react-redux";
|
||||||
import { useEffect } from "react";
|
import { useEffect } from "react";
|
||||||
const I18nLoader = () => {
|
const I18nLoader = () => {
|
||||||
const language = useSelector((state) => state.ui.language);
|
const language = useSelector((state) => state.ui.language ?? "en");
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (language && i18n.language !== language) {
|
if (language && i18n.language !== language) {
|
||||||
@@ -0,0 +1,120 @@
|
|||||||
|
/**
|
||||||
|
* Maps legacy icon names to Lucide icon names
|
||||||
|
* Use: import { iconMap } from './iconMap'; LucideIcons[iconMap['monitors']]
|
||||||
|
*/
|
||||||
|
export const iconMap = {
|
||||||
|
// Navigation/Sidebar icons
|
||||||
|
monitors: "Globe",
|
||||||
|
incidents: "AlertTriangle",
|
||||||
|
integrations: "Link",
|
||||||
|
"page-speed": "Gauge",
|
||||||
|
settings: "Settings",
|
||||||
|
notifications: "Bell",
|
||||||
|
maintenance: "Wrench",
|
||||||
|
"status-pages": "Wifi",
|
||||||
|
docs: "FileText",
|
||||||
|
discussions: "MessageCircle",
|
||||||
|
support: "HelpCircle",
|
||||||
|
changeLog: "Code",
|
||||||
|
logs: "Database",
|
||||||
|
|
||||||
|
// User icons
|
||||||
|
user: "User",
|
||||||
|
"user-two": "Users",
|
||||||
|
"user-edit": "UserPen",
|
||||||
|
groups: "Users",
|
||||||
|
lock: "Lock",
|
||||||
|
key: "Key",
|
||||||
|
logout: "LogOut",
|
||||||
|
|
||||||
|
// Action icons
|
||||||
|
edit: "Pencil",
|
||||||
|
"trash-bin": "Trash2",
|
||||||
|
search: "Search",
|
||||||
|
"close-icon": "X",
|
||||||
|
check: "Check",
|
||||||
|
"check-icon": "CheckCircle",
|
||||||
|
"check-outlined": "CheckCircle",
|
||||||
|
|
||||||
|
// Arrow icons
|
||||||
|
"left-arrow": "ChevronLeft",
|
||||||
|
"right-arrow": "ChevronRight",
|
||||||
|
"up-arrow": "ChevronUp",
|
||||||
|
"down-arrow": "ChevronDown",
|
||||||
|
"left-arrow-double": "ChevronsLeft",
|
||||||
|
"right-arrow-double": "ChevronsRight",
|
||||||
|
"left-arrow-long": "ArrowLeft",
|
||||||
|
"top-right-arrow": "ArrowUpRight",
|
||||||
|
"open-in-new-page": "ExternalLink",
|
||||||
|
"selector-vertical": "ChevronsUpDown",
|
||||||
|
|
||||||
|
// Status/Alert icons
|
||||||
|
"alert-icon": "Bell",
|
||||||
|
"warning-icon": "AlertCircle",
|
||||||
|
"history-icon": "History",
|
||||||
|
|
||||||
|
// Data/Chart icons
|
||||||
|
dashboard: "LayoutGrid",
|
||||||
|
"monitor-graph-line": "TrendingUp",
|
||||||
|
"response-time-icon": "TrendingUp",
|
||||||
|
"uptime-icon": "Activity",
|
||||||
|
"speedometer-icon": "Gauge",
|
||||||
|
"spedometer-icon": "Gauge",
|
||||||
|
"ruler-icon": "Ruler",
|
||||||
|
"performance-report": "Layers",
|
||||||
|
"average-response-icon": "BarChart3",
|
||||||
|
"distributed-uptime": "Network",
|
||||||
|
|
||||||
|
// Misc icons
|
||||||
|
calendar: "Calendar",
|
||||||
|
"calendar-check": "CalendarCheck",
|
||||||
|
"clock-snooze": "Clock",
|
||||||
|
mail: "Mail",
|
||||||
|
email: "Mail",
|
||||||
|
folder: "Folder",
|
||||||
|
"dots-vertical": "MoreVertical",
|
||||||
|
"pause-icon": "PauseCircle",
|
||||||
|
"resume-icon": "PlayCircle",
|
||||||
|
"checkbox-filled": "CheckSquare",
|
||||||
|
"checkbox-outline": "Square",
|
||||||
|
"radio-checked": "Circle",
|
||||||
|
"cpu-chip": "Cpu",
|
||||||
|
certificate: "Award",
|
||||||
|
"interval-check": "RefreshCw",
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* MUI icon to Lucide mapping
|
||||||
|
*/
|
||||||
|
export const muiToLucideMap = {
|
||||||
|
AddCircleOutline: "PlusCircle",
|
||||||
|
ArrowDownwardRounded: "ArrowDown",
|
||||||
|
ArrowUpwardRounded: "ArrowUp",
|
||||||
|
ArrowDropDown: "ChevronDown",
|
||||||
|
ArrowOutward: "ExternalLink",
|
||||||
|
CheckCircle: "CheckCircle2",
|
||||||
|
Clear: "X",
|
||||||
|
Close: "X",
|
||||||
|
CloseRounded: "X",
|
||||||
|
CloudUpload: "Upload",
|
||||||
|
Delete: "Trash2",
|
||||||
|
DeleteOutlineRounded: "Trash2",
|
||||||
|
Email: "Mail",
|
||||||
|
ErrorOutline: "AlertTriangle",
|
||||||
|
ErrorOutlineOutlined: "AlertTriangle",
|
||||||
|
Image: "ImageIcon",
|
||||||
|
InfoOutlined: "Info",
|
||||||
|
KeyboardArrowDown: "ChevronDown",
|
||||||
|
Menu: "Menu",
|
||||||
|
PauseCircleOutline: "PauseCircle",
|
||||||
|
PauseOutlined: "Pause",
|
||||||
|
PlayArrowOutlined: "Play",
|
||||||
|
PlayCircleOutlineRounded: "PlayCircle",
|
||||||
|
RadioButtonChecked: "Circle",
|
||||||
|
ReorderRounded: "GripVertical",
|
||||||
|
SettingsOutlined: "Settings",
|
||||||
|
Share: "Share2",
|
||||||
|
Visibility: "Eye",
|
||||||
|
VisibilityOff: "EyeOff",
|
||||||
|
WarningAmberOutlined: "AlertTriangle",
|
||||||
|
};
|
||||||
Loaded 100 of 846 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user