mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 08:42:13 +02:00
Compare commits
572 Commits
greenlock-
...
ext-postgr
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e9bdbb3414 | ||
|
|
3b65d1f4d6 | ||
|
|
ed0f92f480 | ||
|
|
6cc0f9deaf | ||
|
|
06be3d2f58 | ||
|
|
da8045271f | ||
|
|
cfc45efadf | ||
|
|
6b92440c74 | ||
|
|
c2d3123263 | ||
|
|
3a277db0d5 | ||
|
|
f084058b67 | ||
|
|
9dbe33bfcc | ||
|
|
085e1a5d76 | ||
|
|
9a3fa080ea | ||
|
|
db3d1e90f2 | ||
|
|
c02d8d8d8c | ||
|
|
1fad1d7c29 | ||
|
|
ef610e104a | ||
|
|
8f7bec00d4 | ||
|
|
ae2a70eb64 | ||
|
|
e56e6a7f8d | ||
|
|
1141d47df7 | ||
|
|
9dea2c3bdd | ||
|
|
9b465badda | ||
|
|
073f84fe00 | ||
|
|
c6850f5a0b | ||
|
|
636de9cd57 | ||
|
|
79ace6d183 | ||
|
|
366b195152 | ||
|
|
bc687bdcdd | ||
|
|
bc205a8686 | ||
|
|
e095715a52 | ||
|
|
e634ae0c1e | ||
|
|
ee080271e5 | ||
|
|
f07346a719 | ||
|
|
ace95bf75a | ||
|
|
4c53dc15e3 | ||
|
|
ac286e0903 | ||
|
|
6595202093 | ||
|
|
1ff5150765 | ||
|
|
13be411fc0 | ||
|
|
9d596c00da | ||
|
|
6a285df796 | ||
|
|
a053cc53eb | ||
|
|
14647f6bd5 | ||
|
|
bc1d629576 | ||
|
|
c19b4e7040 | ||
|
|
fca2c74817 | ||
|
|
737c785e73 | ||
|
|
25edb45e10 | ||
|
|
17308692b0 | ||
|
|
6785e62edd | ||
|
|
a1c761f618 | ||
|
|
29686f8167 | ||
|
|
235fd6722e | ||
|
|
7286825f82 | ||
|
|
e344c6d3d1 | ||
|
|
2751beae1d | ||
|
|
f1919d3964 | ||
|
|
de261142e5 | ||
|
|
0bfc28fedc | ||
|
|
a59e4cb76b | ||
|
|
ebb9c58758 | ||
|
|
ee2df1a132 | ||
|
|
b33dc0ff69 | ||
|
|
80c3bb9dda | ||
|
|
283fbda8ee | ||
|
|
a67c70396f | ||
|
|
3aeb22a253 | ||
|
|
070031d703 | ||
|
|
a30104fe06 | ||
|
|
76677233df | ||
|
|
e1054c2572 | ||
|
|
e3e684352f | ||
|
|
f9472a1308 | ||
|
|
2113022d11 | ||
|
|
f21cb43b5b | ||
|
|
5e7285fa66 | ||
|
|
ff1195c837 | ||
|
|
2f5f147ab4 | ||
|
|
f4005ee351 | ||
|
|
549e41119c | ||
|
|
0f76e075ce | ||
|
|
7212b93836 | ||
|
|
aca335aa8f | ||
|
|
1053f52b2b | ||
|
|
4ef8a8d0f9 | ||
|
|
8d183ceee6 | ||
|
|
d2a58fbe97 | ||
|
|
9b115da0be | ||
|
|
e46133d678 | ||
|
|
c9bf2e3bf1 | ||
|
|
2c16b5ab7d | ||
|
|
f7339723cd | ||
|
|
c2e04e94e2 | ||
|
|
bbb2f8d154 | ||
|
|
4ab9e8b398 | ||
|
|
d0e6153758 | ||
|
|
f308407f68 | ||
|
|
93ba752e8c | ||
|
|
230d345406 | ||
|
|
7e51da56f6 | ||
|
|
cab9fd08fa | ||
|
|
461f69b11e | ||
|
|
ad7a5bddcb | ||
|
|
a64feacb5c | ||
|
|
a27b51ea94 | ||
|
|
a0f7324c01 | ||
|
|
c3b0302cbe | ||
|
|
0c264bcd32 | ||
|
|
abc7a43d1b | ||
|
|
05e9282d7f | ||
|
|
75d2a01a5a | ||
|
|
8d02eddfc6 | ||
|
|
33d38611e2 | ||
|
|
31335ee6b5 | ||
|
|
6eb228d0b8 | ||
|
|
0ef82aef01 | ||
|
|
f644ac117f | ||
|
|
08ddfb1017 | ||
|
|
68724478da | ||
|
|
ca621bf41c | ||
|
|
c470abf36c | ||
|
|
39bd722cf5 | ||
|
|
3851827afb | ||
|
|
cd5c333d97 | ||
|
|
fee16520df | ||
|
|
025648482e | ||
|
|
89a3d3a6ac | ||
|
|
e4da9c5212 | ||
|
|
1e61fec929 | ||
|
|
6a76665c79 | ||
|
|
2d3d0449e5 | ||
|
|
fee5132e7e | ||
|
|
2dbb91ba24 | ||
|
|
9a37c4b031 | ||
|
|
d3d64979e0 | ||
|
|
c6efe40f3b | ||
|
|
d0ace48aeb | ||
|
|
faf0641503 | ||
|
|
4fcc066971 | ||
|
|
e37347a611 | ||
|
|
95dbeaddba | ||
|
|
5a12e70742 | ||
|
|
ab0b7bb6ec | ||
|
|
c9874df43f | ||
|
|
594a44392d | ||
|
|
5b9232c785 | ||
|
|
06b7f5c236 | ||
|
|
f20f833720 | ||
|
|
91c37a2a9e | ||
|
|
937879aa68 | ||
|
|
df77fdac74 | ||
|
|
28917b3fcb | ||
|
|
853715b17c | ||
|
|
5bdc381925 | ||
|
|
c499df2812 | ||
|
|
5ef5dbf562 | ||
|
|
332aa47e63 | ||
|
|
cb1ddfe0df | ||
|
|
d5bb29f9b4 | ||
|
|
5f851b6936 | ||
|
|
5fa7c5baaa | ||
|
|
557c3f1427 | ||
|
|
a14614b7de | ||
|
|
cc1c968d3c | ||
|
|
1830f031e9 | ||
|
|
5d8dd6ef3c | ||
|
|
d0b63b5c8b | ||
|
|
e94cc8083a | ||
|
|
847f426bc6 | ||
|
|
74bcadb2e7 | ||
|
|
3e255e6dd1 | ||
|
|
eb5cf5a3cb | ||
|
|
df7bd46428 | ||
|
|
e6dadd0673 | ||
|
|
ee8706e75b | ||
|
|
da70359945 | ||
|
|
3622021e57 | ||
|
|
5aeada377a | ||
|
|
d34a493724 | ||
|
|
5f7dcf7433 | ||
|
|
39407795a2 | ||
|
|
63dfb56da3 | ||
|
|
ed8714cc34 | ||
|
|
dedda5b53b | ||
|
|
df2af5858c | ||
|
|
e25d38ee74 | ||
|
|
2b0dd6687d | ||
|
|
22f08a4c47 | ||
|
|
fda11d81c0 | ||
|
|
18e68b3505 | ||
|
|
a8a550809d | ||
|
|
dbacf998ff | ||
|
|
0d41d97b8d | ||
|
|
36ecf78c4c | ||
|
|
3eb0eb4289 | ||
|
|
01c214b51e | ||
|
|
f756df1e5f | ||
|
|
e2a7f7efc5 | ||
|
|
3bf4137db2 | ||
|
|
f592e852f2 | ||
|
|
a5f05376b0 | ||
|
|
89e08614f4 | ||
|
|
631c22aa64 | ||
|
|
0c4ad712b0 | ||
|
|
0e4f54d048 | ||
|
|
80ede00ced | ||
|
|
40b9573324 | ||
|
|
e09f856c92 | ||
|
|
9db5aa56e6 | ||
|
|
f8c43136e9 | ||
|
|
3fb804c4e7 | ||
|
|
dad1f1a464 | ||
|
|
95e9eacc83 | ||
|
|
14b5da110f | ||
|
|
b66cd889c0 | ||
|
|
d323c70a51 | ||
|
|
8962ecf42a | ||
|
|
31f92c3611 | ||
|
|
6bed753de3 | ||
|
|
4017e7ce0e | ||
|
|
ccaaaa1823 | ||
|
|
7d7fa2b8f1 | ||
|
|
2ca57ac8bf | ||
|
|
a75f655f72 | ||
|
|
6ca38a1adb | ||
|
|
46a095569d | ||
|
|
cec38190fd | ||
|
|
ca746d1436 | ||
|
|
2f6133bba0 | ||
|
|
d1f62d3c66 | ||
|
|
db2c6b0ea5 | ||
|
|
a2033b94dd | ||
|
|
d23c62d30a | ||
|
|
6ca5b9572e | ||
|
|
f5f62d905b | ||
|
|
876de677cd | ||
|
|
19cb221f33 | ||
|
|
f0f774ecdb | ||
|
|
e333c2d43b | ||
|
|
4cdb832b34 | ||
|
|
367715c077 | ||
|
|
945eb3d11b | ||
|
|
b4c4273485 | ||
|
|
1c319bb432 | ||
|
|
6fc8bc3628 | ||
|
|
33e9c8fbe7 | ||
|
|
6f4da22874 | ||
|
|
772341a15c | ||
|
|
387fdd7b15 | ||
|
|
16bad74c4d | ||
|
|
054242df60 | ||
|
|
3d4aecb896 | ||
|
|
26c8712fce | ||
|
|
ab090ab016 | ||
|
|
4653711b58 | ||
|
|
9aa1876e70 | ||
|
|
40d9aff56a | ||
|
|
3c88a1b879 | ||
|
|
149baf17ef | ||
|
|
424cfa2094 | ||
|
|
d114c52d6f | ||
|
|
213e2111a5 | ||
|
|
31837ef1f5 | ||
|
|
b906ff1dce | ||
|
|
cc4d6514cc | ||
|
|
005256084e | ||
|
|
67b542d828 | ||
|
|
c147c49465 | ||
|
|
9428d08def | ||
|
|
79f27550df | ||
|
|
21d62eab18 | ||
|
|
f011559cd2 | ||
|
|
4bb5a29963 | ||
|
|
e771172b79 | ||
|
|
9476327a6a | ||
|
|
7c14931bb9 | ||
|
|
2ad245083d | ||
|
|
81da1546d9 | ||
|
|
a48f472c52 | ||
|
|
2a9b3db168 | ||
|
|
bbc95a3a1d | ||
|
|
0bbb35ff43 | ||
|
|
7edd8f197a | ||
|
|
1ad239a9fe | ||
|
|
eeae73b7a4 | ||
|
|
026997a679 | ||
|
|
aa83db3e48 | ||
|
|
5725c6a17a | ||
|
|
79171c93d9 | ||
|
|
5073a15bf1 | ||
|
|
9285e9b401 | ||
|
|
b6adf3fb40 | ||
|
|
164e6062c9 | ||
|
|
1ebc8a9d91 | ||
|
|
3205453608 | ||
|
|
be3d4b2ce0 | ||
|
|
7c8aabe3e8 | ||
|
|
b0c62ed827 | ||
|
|
80a1827455 | ||
|
|
bbb1b2e944 | ||
|
|
f70878317a | ||
|
|
f5184db0fa | ||
|
|
19128a50d2 | ||
|
|
8fbb3774d1 | ||
|
|
441efb3d1a | ||
|
|
180491fa57 | ||
|
|
7269e93967 | ||
|
|
a754ec094b | ||
|
|
d9e097eeb2 | ||
|
|
53d7aab558 | ||
|
|
dcf2584987 | ||
|
|
d18310ec69 | ||
|
|
f61d603e21 | ||
|
|
52a44a8383 | ||
|
|
be848d37a2 | ||
|
|
df3a7e1a99 | ||
|
|
a6e9f7cd1e | ||
|
|
2e29a63f7b | ||
|
|
c153c8c656 | ||
|
|
61cbaaf4f0 | ||
|
|
70aae76ae3 | ||
|
|
972bc9c4cf | ||
|
|
fb902170e2 | ||
|
|
286429b58f | ||
|
|
b799ce08a9 | ||
|
|
b30bb4c95e | ||
|
|
0e3eb81ae4 | ||
|
|
b997520977 | ||
|
|
29675f2624 | ||
|
|
fb83476795 | ||
|
|
0420586a0e | ||
|
|
900f76f8c8 | ||
|
|
082c5732c0 | ||
|
|
20c03c5fd9 | ||
|
|
5adb8f0d38 | ||
|
|
a54037408e | ||
|
|
4c0cf60c42 | ||
|
|
6aac72a226 | ||
|
|
d1424840d8 | ||
|
|
0a90736338 | ||
|
|
6c2144d77e | ||
|
|
e208b7cc78 | ||
|
|
69ff3dfe17 | ||
|
|
29d2abf226 | ||
|
|
1cf7cc4664 | ||
|
|
d29991117a | ||
|
|
0bf8713b60 | ||
|
|
dcc9d4fdf2 | ||
|
|
db32292d33 | ||
|
|
2b66c52907 | ||
|
|
d6b1edb8cb | ||
|
|
c7f62fac65 | ||
|
|
db0aee6c0f | ||
|
|
1f53ecb093 | ||
|
|
d0325f2d7d | ||
|
|
a1461a4019 | ||
|
|
d3096510bd | ||
|
|
8dac1a845a | ||
|
|
da26400aa7 | ||
|
|
c909d02a5d | ||
|
|
58e817cecd | ||
|
|
f9a784422d | ||
|
|
6494ab9a71 | ||
|
|
a3cf038d38 | ||
|
|
99a88ea6d7 | ||
|
|
d46604da53 | ||
|
|
4a05ee22be | ||
|
|
28e809c493 | ||
|
|
610373525b | ||
|
|
e84d1c2960 | ||
|
|
17cb699751 | ||
|
|
c3bf383e89 | ||
|
|
a3e5288737 | ||
|
|
14cf0d9343 | ||
|
|
4ed613bf2c | ||
|
|
f07da41cca | ||
|
|
fe2300146d | ||
|
|
207108dc2d | ||
|
|
b728256c63 | ||
|
|
0e5b71070c | ||
|
|
4c4bc92a14 | ||
|
|
40dccbb382 | ||
|
|
eedb7173db | ||
|
|
917d12d7f0 | ||
|
|
11a9cfcb98 | ||
|
|
172c3dacbe | ||
|
|
a9381e09c1 | ||
|
|
f0816f6fa5 | ||
|
|
ad95971f46 | ||
|
|
bb59a365b7 | ||
|
|
503dcffa87 | ||
|
|
42a91415da | ||
|
|
09c6160a15 | ||
|
|
0638b797b3 | ||
|
|
c6020a8eb6 | ||
|
|
2023f37ab7 | ||
|
|
65f024c3f6 | ||
|
|
06936f0065 | ||
|
|
41a2e2cdbe | ||
|
|
96cfe4c1fd | ||
|
|
0096860584 | ||
|
|
da90c9b733 | ||
|
|
5cef1bacb7 | ||
|
|
9560883954 | ||
|
|
f84a8d6d7a | ||
|
|
aea1ec24ef | ||
|
|
7c250a25e3 | ||
|
|
e7799adc1c | ||
|
|
2c949150ef | ||
|
|
983892d8b3 | ||
|
|
054234116b | ||
|
|
d6aafa8493 | ||
|
|
b5407b47b2 | ||
|
|
f84bec7e66 | ||
|
|
43354d850b | ||
|
|
1977dc3e62 | ||
|
|
c2bd27b0f9 | ||
|
|
264c0f0347 | ||
|
|
0de98ae262 | ||
|
|
573a12075b | ||
|
|
0a85e245d7 | ||
|
|
41d01cceee | ||
|
|
dcd9aeccb3 | ||
|
|
c59ebc2373 | ||
|
|
643f4acddd | ||
|
|
b3fb21af59 | ||
|
|
2164f45a68 | ||
|
|
8a4afe992c | ||
|
|
f35e50bab3 | ||
|
|
63064c587c | ||
|
|
edd11ffade | ||
|
|
97e1688b50 | ||
|
|
b7e97a29ee | ||
|
|
f0acbc6eb0 | ||
|
|
fdf6e3dfa3 | ||
|
|
b59b8257cc | ||
|
|
9bde353e93 | ||
|
|
a2c2867469 | ||
|
|
bd3ba94da8 | ||
|
|
8e6800c17b | ||
|
|
e481e043dd | ||
|
|
a4e6552c91 | ||
|
|
6ce5cde46e | ||
|
|
22014c81c4 | ||
|
|
bff63cdf58 | ||
|
|
5f9d57a099 | ||
|
|
ca100f9de9 | ||
|
|
68dbb010aa | ||
|
|
5cd213a750 | ||
|
|
26683914bc | ||
|
|
8a5adfd589 | ||
|
|
d2eefeabba | ||
|
|
1148b59416 | ||
|
|
848c0c8100 | ||
|
|
21f40961cf | ||
|
|
2f74fbe0a8 | ||
|
|
571784a523 | ||
|
|
7c60fe8009 | ||
|
|
07f99b8796 | ||
|
|
1a2fe1d16d | ||
|
|
a28a041c8d | ||
|
|
cfcce00060 | ||
|
|
da0fa045e6 | ||
|
|
859f62bf93 | ||
|
|
6a1cc1bd8b | ||
|
|
5b9abe8aea | ||
|
|
d0ec483a0f | ||
|
|
c03a3d6f56 | ||
|
|
8761dbd75b | ||
|
|
5541922b25 | ||
|
|
8693ab065e | ||
|
|
fe4daa7937 | ||
|
|
20d7f2f8b4 | ||
|
|
7f94f3d4d4 | ||
|
|
bc46370f7c | ||
|
|
b3346a9702 | ||
|
|
f793f7dd16 | ||
|
|
766f1f6178 | ||
|
|
9f76748037 | ||
|
|
469e06280a | ||
|
|
aede9af03d | ||
|
|
0bc7cf345f | ||
|
|
95c7b10ce0 | ||
|
|
daceab164c | ||
|
|
2d28fbaf85 | ||
|
|
8d2cbe49ad | ||
|
|
86f262583c | ||
|
|
4e748d1626 | ||
|
|
1dbea8e636 | ||
|
|
3991acf5fc | ||
|
|
1285830a9b | ||
|
|
96d3243205 | ||
|
|
08cbdb15d0 | ||
|
|
f59284e4d6 | ||
|
|
0c5d0e81a5 | ||
|
|
82829a5b97 | ||
|
|
d3c188a804 | ||
|
|
85ffc36fad | ||
|
|
8d34e9ccbe | ||
|
|
c6643d7f7c | ||
|
|
1433823efe | ||
|
|
bd5902ed6d | ||
|
|
b64666f0ff | ||
|
|
9706cced86 | ||
|
|
49cb3024ef | ||
|
|
2fec007c5f | ||
|
|
0f40f5f730 | ||
|
|
120ca78760 | ||
|
|
d50fdf3464 | ||
|
|
34ddb8efdb | ||
|
|
3724cce4f0 | ||
|
|
d864992bdb | ||
|
|
3515752a95 | ||
|
|
53d66db8cb | ||
|
|
548250f837 | ||
|
|
b3b343d4aa | ||
|
|
69a8f438f7 | ||
|
|
7b571f15a9 | ||
|
|
d783eaea9d | ||
|
|
2e5aafe151 | ||
|
|
dea938bcbb | ||
|
|
7c16b14ab4 | ||
|
|
e22ff26dc0 | ||
|
|
75bd6ca6ed | ||
|
|
f0bdb76999 | ||
|
|
a9e9d14f69 | ||
|
|
21daac0400 | ||
|
|
3cdf71906b | ||
|
|
0714161460 | ||
|
|
78b7252743 | ||
|
|
2ba406f802 | ||
|
|
48ebfc17dd | ||
|
|
9d180a2dcb | ||
|
|
0f2a970ede | ||
|
|
4ab3c99fe4 | ||
|
|
ae2e452d27 | ||
|
|
825d733f92 | ||
|
|
27039bc646 | ||
|
|
1bb1d80b09 | ||
|
|
983f587ce4 | ||
|
|
e1f9325512 | ||
|
|
96c27c86ca | ||
|
|
a172596e46 | ||
|
|
3d30e9356a | ||
|
|
7c04ecec35 | ||
|
|
80511a5f8d | ||
|
|
6692fb00b8 | ||
|
|
83e207a7de | ||
|
|
d62aa7f5a6 | ||
|
|
8a130f96e2 | ||
|
|
66a470ebe1 | ||
|
|
30a59aa21e | ||
|
|
7a6a5c141b | ||
|
|
c4bf458074 | ||
|
|
ae873e296c | ||
|
|
4a973d7107 | ||
|
|
9bbf460b97 | ||
|
|
c348a8bd05 | ||
|
|
76d8f5d5ef | ||
|
|
72ac305aad | ||
|
|
1ac05450e7 | ||
|
|
67165375ac | ||
|
|
6325e36bd0 | ||
|
|
e6375087cd | ||
|
|
737e234ec0 | ||
|
|
1427d52c9f | ||
|
|
8377285a27 | ||
|
|
7414c6563d | ||
|
|
0669e96a5d | ||
|
|
c092adfa3d |
@@ -113,6 +113,7 @@
|
||||
"no-console": "error",
|
||||
"no-undef": "error",
|
||||
"no-empty": "error",
|
||||
"no-control-regex": "off",
|
||||
"prefer-arrow-callback": "error",
|
||||
"constructor-super": "error",
|
||||
"no-case-declarations": "error",
|
||||
|
||||
15
.github/workflows/build.yml
vendored
15
.github/workflows/build.yml
vendored
@@ -179,21 +179,6 @@ jobs:
|
||||
- name: build docker image
|
||||
run: sudo docker build -f ./StatusPage/Dockerfile .
|
||||
|
||||
docker-build-infrastructure-agent:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CI_PIPELINE_ID: ${{github.run_number}}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Preinstall
|
||||
run: npm run prerun
|
||||
|
||||
# build image for mail service
|
||||
- name: build docker image
|
||||
run: sudo docker build -f ./InfrastructureAgent/Dockerfile .
|
||||
|
||||
docker-build-test-server:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
|
||||
12
.github/workflows/compile.yml
vendored
12
.github/workflows/compile.yml
vendored
@@ -111,14 +111,10 @@ jobs:
|
||||
env:
|
||||
CI_PIPELINE_ID: ${{github.run_number}}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
- run: cd Common && npm install
|
||||
- run: cd Model && npm install
|
||||
- run: cd CommonServer && npm install
|
||||
- run: cd InfrastructureAgent && npm install && npm run compile && npm run dep-check
|
||||
- uses: actions/checkout@v4
|
||||
# Setup Go
|
||||
- uses: actions/setup-go@v5
|
||||
- run: cd InfrastructureAgent && go build .
|
||||
|
||||
|
||||
compile-admin-dashboard:
|
||||
|
||||
162
.github/workflows/release.yml
vendored
162
.github/workflows/release.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
||||
- run: echo "Build number is ${{ steps.buildnumber.outputs.build_number }}"
|
||||
|
||||
github-release:
|
||||
needs: generate-build-number
|
||||
needs: [generate-build-number]
|
||||
runs-on: ubuntu-latest
|
||||
if: github.ref == 'refs/heads/release'
|
||||
permissions:
|
||||
@@ -46,7 +46,7 @@ jobs:
|
||||
|
||||
helm-chart-deploy:
|
||||
runs-on: ubuntu-latest
|
||||
needs: generate-build-number
|
||||
needs: [generate-build-number, github-release]
|
||||
env:
|
||||
CI_COMMIT_AUTHOR: Continuous Integration
|
||||
steps:
|
||||
@@ -92,7 +92,7 @@ jobs:
|
||||
git push origin master
|
||||
|
||||
nginx-docker-image-deploy:
|
||||
needs: generate-build-number
|
||||
needs: [generate-build-number, github-release]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Docker Meta
|
||||
@@ -152,7 +152,7 @@ jobs:
|
||||
APP_VERSION=7.0.${{needs.generate-build-number.outputs.build_number}}
|
||||
|
||||
e2e-docker-image-deploy:
|
||||
needs: generate-build-number
|
||||
needs: [generate-build-number, github-release]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Docker Meta
|
||||
@@ -212,7 +212,7 @@ jobs:
|
||||
APP_VERSION=7.0.${{needs.generate-build-number.outputs.build_number}}
|
||||
|
||||
isolated-vm-docker-image-deploy:
|
||||
needs: generate-build-number
|
||||
needs: [generate-build-number, github-release]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Docker Meta
|
||||
@@ -272,7 +272,7 @@ jobs:
|
||||
APP_VERSION=7.0.${{needs.generate-build-number.outputs.build_number}}
|
||||
|
||||
test-server-docker-image-deploy:
|
||||
needs: generate-build-number
|
||||
needs: [generate-build-number, github-release]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Docker Meta
|
||||
@@ -332,7 +332,7 @@ jobs:
|
||||
APP_VERSION=7.0.${{needs.generate-build-number.outputs.build_number}}
|
||||
|
||||
otel-collector-docker-image-deploy:
|
||||
needs: generate-build-number
|
||||
needs: [generate-build-number, github-release]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Docker Meta
|
||||
@@ -394,7 +394,7 @@ jobs:
|
||||
|
||||
|
||||
status-page-docker-image-deploy:
|
||||
needs: generate-build-number
|
||||
needs: [generate-build-number, github-release]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Docker Meta
|
||||
@@ -454,7 +454,7 @@ jobs:
|
||||
APP_VERSION=7.0.${{needs.generate-build-number.outputs.build_number}}
|
||||
|
||||
test-docker-image-deploy:
|
||||
needs: generate-build-number
|
||||
needs: [generate-build-number, github-release]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Docker Meta
|
||||
@@ -514,7 +514,7 @@ jobs:
|
||||
APP_VERSION=7.0.${{needs.generate-build-number.outputs.build_number}}
|
||||
|
||||
ingestor-docker-image-deploy:
|
||||
needs: generate-build-number
|
||||
needs: [generate-build-number, github-release]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Docker Meta
|
||||
@@ -574,7 +574,7 @@ jobs:
|
||||
APP_VERSION=7.0.${{needs.generate-build-number.outputs.build_number}}
|
||||
|
||||
probe-docker-image-deploy:
|
||||
needs: generate-build-number
|
||||
needs: [generate-build-number, github-release]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Docker Meta
|
||||
@@ -635,7 +635,7 @@ jobs:
|
||||
|
||||
|
||||
haraka-docker-image-deploy:
|
||||
needs: generate-build-number
|
||||
needs: [generate-build-number, github-release]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Docker Meta
|
||||
@@ -695,7 +695,7 @@ jobs:
|
||||
APP_VERSION=7.0.${{needs.generate-build-number.outputs.build_number}}
|
||||
|
||||
admin-dashboard-docker-image-deploy:
|
||||
needs: generate-build-number
|
||||
needs: [generate-build-number, github-release]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Docker Meta
|
||||
@@ -756,7 +756,7 @@ jobs:
|
||||
|
||||
|
||||
dashboard-docker-image-deploy:
|
||||
needs: generate-build-number
|
||||
needs: [generate-build-number, github-release]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Docker Meta
|
||||
@@ -816,7 +816,7 @@ jobs:
|
||||
APP_VERSION=7.0.${{needs.generate-build-number.outputs.build_number}}
|
||||
|
||||
app-docker-image-deploy:
|
||||
needs: generate-build-number
|
||||
needs: [generate-build-number, github-release]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Docker Meta
|
||||
@@ -876,7 +876,7 @@ jobs:
|
||||
APP_VERSION=7.0.${{needs.generate-build-number.outputs.build_number}}
|
||||
|
||||
accounts-docker-image-deploy:
|
||||
needs: generate-build-number
|
||||
needs: [generate-build-number, github-release]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Docker Meta
|
||||
@@ -935,39 +935,10 @@ jobs:
|
||||
GIT_SHA=${{ github.sha }}
|
||||
APP_VERSION=7.0.${{needs.generate-build-number.outputs.build_number}}
|
||||
|
||||
# We dont need any of this because we are using the npm package
|
||||
# infrastructure-agent-macos-binary-release:
|
||||
# runs-on: macos-latest
|
||||
# steps:
|
||||
# - uses: actions/checkout@v2
|
||||
# - uses: actions/setup-node@v2
|
||||
# with:
|
||||
# node-version: 21.6.2
|
||||
# - run: cd InfrastructureAgent && bash Scripts/Build/Mac.sh
|
||||
|
||||
# We dont need any of this because we are using the npm package
|
||||
# infrastructure-agent-windows-binary-release:
|
||||
# runs-on: windows-latest
|
||||
# steps:
|
||||
# - uses: actions/checkout@v2
|
||||
# - uses: actions/setup-node@v2
|
||||
# with:
|
||||
# node-version: 21.6.2
|
||||
# - run: cd InfrastructureAgent && ./Scripts/Build/Windows.ps1
|
||||
|
||||
# We dont need any of this because we are using the npm package
|
||||
# infrastructure-agent-linux-binary-release:
|
||||
# runs-on: ubuntu-latest
|
||||
# steps:
|
||||
# - uses: actions/checkout@v2
|
||||
# - uses: actions/setup-node@v2
|
||||
# with:
|
||||
# node-version: 21.6.2
|
||||
# - run: cd InfrastructureAgent && bash ./Scripts/Build/Linux.sh
|
||||
|
||||
publish-npm-packages:
|
||||
runs-on: ubuntu-latest
|
||||
needs: generate-build-number
|
||||
needs: [generate-build-number, github-release]
|
||||
env:
|
||||
CI_PIPELINE_ID: ${{github.run_number}}
|
||||
NPM_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}
|
||||
@@ -980,90 +951,35 @@ jobs:
|
||||
- name: Publish Infrastructure Agent
|
||||
run: bash ./Scripts/NPM/PublishAllPackages.sh
|
||||
|
||||
infrastructure-agent-docker-image-deploy:
|
||||
needs: generate-build-number
|
||||
infrastructure-agent-deploy:
|
||||
needs: [generate-build-number, github-release]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Docker Meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v4
|
||||
with:
|
||||
images: |
|
||||
oneuptime/infrastructure-agent
|
||||
ghcr.io/oneuptime/infrastructure-agent
|
||||
tags: |
|
||||
type=raw,value=release,enable=true
|
||||
type=semver,value=7.0.${{needs.generate-build-number.outputs.build_number}},pattern={{version}},enable=true
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.ref }}
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
|
||||
- uses: actions/setup-node@v2
|
||||
- name: Install GoReleaser
|
||||
uses: goreleaser/goreleaser-action@v5
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
install-only: true
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
- name: Show GoReleaser version
|
||||
run: goreleaser -v
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Generate Dockerfile from Dockerfile.tpl
|
||||
run: npm run prerun
|
||||
|
||||
# Build and deploy infrastructure-agent.
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v2.2.0
|
||||
- name: Run GoReleaser
|
||||
run: cd InfrastructureAgent && export GORELEASER_CURRENT_TAG=7.0.${{needs.generate-build-number.outputs.build_number}} && goreleaser release --clean --snapshot
|
||||
|
||||
# Upload binaries to github release
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v2.2.0
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
file: ./InfrastructureAgent/Dockerfile
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
build-args: |
|
||||
GIT_SHA=${{ github.sha }}
|
||||
APP_VERSION=7.0.${{needs.generate-build-number.outputs.build_number}}
|
||||
|
||||
test-e2e:
|
||||
runs-on: ubuntu-latest
|
||||
# Needs all the jobs to be done before this job
|
||||
needs: [e2e-docker-image-deploy, test-docker-image-deploy, test-server-docker-image-deploy, otel-collector-docker-image-deploy, status-page-docker-image-deploy, ingestor-docker-image-deploy, probe-docker-image-deploy, haraka-docker-image-deploy, admin-dashboard-docker-image-deploy, dashboard-docker-image-deploy, app-docker-image-deploy, accounts-docker-image-deploy, infrastructure-agent-docker-image-deploy, publish-npm-packages]
|
||||
env:
|
||||
CI_PIPELINE_ID: ${{github.run_number}}
|
||||
steps:
|
||||
# Docker compose needs a lot of space to build images, so we need to free up some space first in the GitHub Actions runner
|
||||
- name: Free Disk Space (Ubuntu)
|
||||
uses: jlumbroso/free-disk-space@main
|
||||
with:
|
||||
# this might remove tools that are actually needed,
|
||||
# if set to "true" but frees about 6 GB
|
||||
tool-cache: false
|
||||
android: true
|
||||
dotnet: true
|
||||
haskell: true
|
||||
large-packages: true
|
||||
docker-images: true
|
||||
swap-storage: true
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
- run: npm run start
|
||||
- run: cd E2E && npm install && npm run test
|
||||
|
||||
files: |
|
||||
InfrastructureAgent/dist/*
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
draft: false
|
||||
prerelease: false
|
||||
tag_name: 7.0.${{needs.generate-build-number.outputs.build_number}}
|
||||
|
||||
65
.github/workflows/test-release.yaml
vendored
65
.github/workflows/test-release.yaml
vendored
@@ -877,72 +877,9 @@ jobs:
|
||||
APP_VERSION=7.0.${{needs.generate-build-number.outputs.build_number}}
|
||||
|
||||
|
||||
infrastructure-agent-docker-image-deploy:
|
||||
needs: generate-build-number
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Docker Meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v4
|
||||
with:
|
||||
images: |
|
||||
oneuptime/infrastructure
|
||||
ghcr.io/oneuptime/infrastructure
|
||||
tags: |
|
||||
type=raw,value=test,enable=true
|
||||
type=semver,value=7.0.${{needs.generate-build-number.outputs.build_number}}-test,pattern={{version}},enable=true
|
||||
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.ref }}
|
||||
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Generate Dockerfile from Dockerfile.tpl
|
||||
run: npm run prerun
|
||||
|
||||
# Build and deploy infrastructure.
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v2.2.0
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v2.2.0
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
file: ./InfrastructureAgent/Dockerfile
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
build-args: |
|
||||
GIT_SHA=${{ github.sha }}
|
||||
APP_VERSION=7.0.${{needs.generate-build-number.outputs.build_number}}
|
||||
|
||||
|
||||
|
||||
test-helm-chart:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [ infrastructure-agent-docker-image-deploy, isolated-vm-docker-image-deploy, test-server-docker-image-deploy, test-docker-image-deploy, ingestor-docker-image-deploy, probe-docker-image-deploy, haraka-docker-image-deploy, dashboard-docker-image-deploy, admin-dashboard-docker-image-deploy, app-docker-image-deploy, accounts-docker-image-deploy, otel-collector-docker-image-deploy, status-page-docker-image-deploy, nginx-docker-image-deploy, e2e-docker-image-deploy]
|
||||
needs: [isolated-vm-docker-image-deploy, test-server-docker-image-deploy, test-docker-image-deploy, ingestor-docker-image-deploy, probe-docker-image-deploy, haraka-docker-image-deploy, dashboard-docker-image-deploy, admin-dashboard-docker-image-deploy, app-docker-image-deploy, accounts-docker-image-deploy, otel-collector-docker-image-deploy, status-page-docker-image-deploy, nginx-docker-image-deploy, e2e-docker-image-deploy]
|
||||
env:
|
||||
CI_PIPELINE_ID: ${{github.run_number}}
|
||||
steps:
|
||||
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -111,3 +111,5 @@ InfrastructureAgent/daemon.pid
|
||||
App/greenlock/.greenlockrc
|
||||
App/greenlock/greenlock.d/config.json
|
||||
App/greenlock/greenlock.d/config.json.bak
|
||||
Examples/otel-dotnet/bin/Debug/net6.0/Grpc.Core.Api.dll.txt
|
||||
InfrastructureAgent/oneuptime-infrastructure-agent
|
||||
|
||||
@@ -50,4 +50,7 @@ marketing/*/*
|
||||
licenses/*
|
||||
certifications/*
|
||||
ApiReference/public/assets/*
|
||||
JavaScriptSDK/src/cli/server-monitor/out/scripts/prettify/*
|
||||
JavaScriptSDK/src/cli/server-monitor/out/scripts/prettify/*
|
||||
|
||||
|
||||
CommonServer/Tests/TestingUtils/__mocks__/Stripe.mock.ts
|
||||
@@ -4,5 +4,9 @@
|
||||
"semi": true,
|
||||
"singleQuote": true,
|
||||
"bracketSpacing": true,
|
||||
"arrowParens": "avoid"
|
||||
"arrowParens": "avoid",
|
||||
"plugins": ["@trivago/prettier-plugin-sort-imports"],
|
||||
"importOrderSeparation": true,
|
||||
"importOrderSortSpecifiers": true,
|
||||
"importOrderParserPlugins": ["typescript", "decorators", "dynamicImport", "jsx"]
|
||||
}
|
||||
21
.vscode/launch.json
vendored
21
.vscode/launch.json
vendored
@@ -19,6 +19,14 @@
|
||||
}
|
||||
],
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Debug Infrastructure Agent",
|
||||
"type": "go",
|
||||
"request": "launch",
|
||||
"mode": "debug",
|
||||
"program": "./InfrastructureAgent",
|
||||
"args": ["start"],
|
||||
},
|
||||
{
|
||||
"name": "Node.js - Debug Current File",
|
||||
"type": "node",
|
||||
@@ -208,19 +216,6 @@
|
||||
"debug:test"
|
||||
],
|
||||
},
|
||||
{
|
||||
"name": "Probe: Debug Tests",
|
||||
"type": "node",
|
||||
"restart": true,
|
||||
"autoAttachChildProcesses": true,
|
||||
"request": "launch",
|
||||
"cwd": "${workspaceRoot}/Probe",
|
||||
"runtimeExecutable": "npm",
|
||||
"runtimeArgs": [
|
||||
"run-script",
|
||||
"debug:test"
|
||||
],
|
||||
},
|
||||
{
|
||||
"name": "Accounts: Debug Local Files",
|
||||
"type": "node",
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
# Pull base image nodejs image.
|
||||
FROM node:21.7.2-alpine3.18
|
||||
FROM node:21.7.3-alpine3.18
|
||||
RUN mkdir /tmp/npm && chmod 2777 /tmp/npm && chown 1000:1000 /tmp/npm && npm config set cache /tmp/npm --global
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import App from 'CommonServer/Utils/StartServer';
|
||||
import { PromiseVoidFunction } from 'Common/Types/FunctionTypes';
|
||||
import Express, { ExpressApplication } from 'CommonServer/Utils/Express';
|
||||
import logger from 'CommonServer/Utils/Logger';
|
||||
import App from 'CommonServer/Utils/StartServer';
|
||||
|
||||
export const APP_NAME: string = 'accounts';
|
||||
|
||||
@@ -30,7 +30,7 @@ const init: PromiseVoidFunction = async (): Promise<void> => {
|
||||
|
||||
init().catch((err: Error) => {
|
||||
logger.error(err);
|
||||
logger.info('Exiting node process');
|
||||
logger.error('Exiting node process');
|
||||
process.exit(1);
|
||||
});
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"watch": ["webpack.config.js"],
|
||||
"exec": "export DEBUG=express:* && printenv > /usr/src/app/dev-env/.env && echo 'HOST=localhost' >> /usr/src/app/dev-env/.env && echo 'USE_HTTPS=false' >> /usr/src/app/dev-env/.env && webpack-dev-server --port=3003 --mode=development"
|
||||
"exec": "export DEBUG=express:* && printenv > /usr/src/app/dev-env/.env && echo 'USE_HTTPS=false' >> /usr/src/app/dev-env/.env && webpack-dev-server --port=3003 --mode=development"
|
||||
}
|
||||
141
Accounts/package-lock.json
generated
141
Accounts/package-lock.json
generated
@@ -16,9 +16,9 @@
|
||||
"express": "^4.19.2",
|
||||
"file-loader": "^6.2.0",
|
||||
"Model": "file:../Model",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.1.0",
|
||||
"react-router-dom": "^6.22.3",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"react-router-dom": "^6.23.1",
|
||||
"sass-loader": "^13.3.3",
|
||||
"style-loader": "^3.3.4",
|
||||
"ts-loader": "^9.5.1",
|
||||
@@ -35,19 +35,19 @@
|
||||
}
|
||||
},
|
||||
"../Common": {
|
||||
"name": "common",
|
||||
"name": "@oneuptime/common",
|
||||
"version": "1.0.0",
|
||||
"license": "MIT",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@types/crypto-js": "^4.2.2",
|
||||
"@types/uuid": "^8.3.4",
|
||||
"axios": "^1.6.7",
|
||||
"axios": "^1.6.8",
|
||||
"crypto-js": "^4.1.1",
|
||||
"json5": "^2.2.3",
|
||||
"moment": "^2.30.1",
|
||||
"moment-timezone": "^0.5.45",
|
||||
"posthog-js": "^1.104.4",
|
||||
"reflect-metadata": "^0.2.1",
|
||||
"posthog-js": "^1.116.6",
|
||||
"reflect-metadata": "^0.2.2",
|
||||
"slugify": "^1.6.5",
|
||||
"typeorm": "^0.3.20",
|
||||
"uuid": "^8.3.2"
|
||||
@@ -61,49 +61,46 @@
|
||||
}
|
||||
},
|
||||
"../CommonServer": {
|
||||
"name": "common-server",
|
||||
"name": "@oneuptime/common-server",
|
||||
"version": "1.0.0",
|
||||
"license": "MIT",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@clickhouse/client": "^0.2.7",
|
||||
"@elastic/elasticsearch": "^8.11.0",
|
||||
"@clickhouse/client": "^0.2.10",
|
||||
"@elastic/elasticsearch": "^8.12.1",
|
||||
"@opentelemetry/api": "^1.7.0",
|
||||
"@opentelemetry/api-logs": "^0.48.0",
|
||||
"@opentelemetry/exporter-logs-otlp-http": "^0.48.0",
|
||||
"@opentelemetry/exporter-metrics-otlp-proto": "^0.48.0",
|
||||
"@opentelemetry/exporter-trace-otlp-proto": "^0.48.0",
|
||||
"@opentelemetry/api-logs": "^0.49.1",
|
||||
"@opentelemetry/auto-instrumentations-node": "^0.43.0",
|
||||
"@opentelemetry/exporter-logs-otlp-http": "^0.49.1",
|
||||
"@opentelemetry/exporter-metrics-otlp-proto": "^0.49.1",
|
||||
"@opentelemetry/exporter-trace-otlp-proto": "^0.49.1",
|
||||
"@opentelemetry/id-generator-aws-xray": "^1.2.1",
|
||||
"@opentelemetry/instrumentation-express": "^0.35.0",
|
||||
"@opentelemetry/instrumentation-http": "^0.48.0",
|
||||
"@opentelemetry/sdk-logs": "^0.48.0",
|
||||
"@opentelemetry/sdk-logs": "^0.49.1",
|
||||
"@opentelemetry/sdk-metrics": "^1.21.0",
|
||||
"@opentelemetry/sdk-node": "^0.48.0",
|
||||
"@opentelemetry/sdk-trace-node": "^1.21.0",
|
||||
"@socket.io/redis-adapter": "^8.2.1",
|
||||
"acme-client": "^5.3.0",
|
||||
"airtable": "^0.12.2",
|
||||
"axios": "^1.6.4",
|
||||
"bullmq": "^5.3.3",
|
||||
"Common": "file:../Common",
|
||||
"cookie-parser": "^1.4.6",
|
||||
"cors": "^2.8.5",
|
||||
"cron-parser": "^4.8.1",
|
||||
"dotenv": "^16.4.1",
|
||||
"ejs": "^3.1.8",
|
||||
"express": "^4.17.3",
|
||||
"dotenv": "^16.4.4",
|
||||
"ejs": "^3.1.10",
|
||||
"express": "^4.19.2",
|
||||
"ioredis": "^5.3.2",
|
||||
"json2csv": "^5.0.7",
|
||||
"jsonwebtoken": "^9.0.0",
|
||||
"markdown-it": "^13.0.1",
|
||||
"Model": "file:../Model",
|
||||
"node-cron": "^3.0.3",
|
||||
"nodemailer": "^6.9.9",
|
||||
"nodemailer": "^6.9.10",
|
||||
"pg": "^8.7.3",
|
||||
"socket.io": "^4.7.2",
|
||||
"socket.io": "^4.7.4",
|
||||
"stripe": "^10.17.0",
|
||||
"twilio": "^4.19.3",
|
||||
"twilio": "^4.22.0",
|
||||
"typeorm": "^0.3.20",
|
||||
"typeorm-extension": "^2.2.13",
|
||||
"vm2": "^3.9.14"
|
||||
"typeorm-extension": "^2.2.13"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@faker-js/faker": "^6.3.1",
|
||||
@@ -124,43 +121,48 @@
|
||||
}
|
||||
},
|
||||
"../CommonUI": {
|
||||
"name": "common-ui",
|
||||
"name": "@oneuptime/common-ui",
|
||||
"version": "1.0.0",
|
||||
"license": "MIT",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.24.1",
|
||||
"@monaco-editor/react": "^4.4.6",
|
||||
"@opentelemetry/api": "^1.7.0",
|
||||
"@opentelemetry/context-zone": "^1.21.0",
|
||||
"@opentelemetry/exporter-trace-otlp-http": "^0.48.0",
|
||||
"@opentelemetry/instrumentation": "^0.48.0",
|
||||
"@opentelemetry/instrumentation-fetch": "^0.48.0",
|
||||
"@opentelemetry/instrumentation-xml-http-request": "^0.48.0",
|
||||
"@nivo/core": "^0.85.1",
|
||||
"@nivo/line": "^0.85.1",
|
||||
"@opentelemetry/api": "^1.8.0",
|
||||
"@opentelemetry/context-zone": "^1.22.0",
|
||||
"@opentelemetry/exporter-trace-otlp-http": "^0.49.1",
|
||||
"@opentelemetry/instrumentation": "^0.49.1",
|
||||
"@opentelemetry/instrumentation-fetch": "^0.49.1",
|
||||
"@opentelemetry/instrumentation-xml-http-request": "^0.49.1",
|
||||
"@opentelemetry/resources": "^1.21.0",
|
||||
"@opentelemetry/sdk-trace-web": "^1.21.0",
|
||||
"@opentelemetry/semantic-conventions": "^1.21.0",
|
||||
"@tippyjs/react": "^4.2.6",
|
||||
"@types/react-highlight": "^0.12.8",
|
||||
"Common": "file:../Common",
|
||||
"formik": "^2.2.9",
|
||||
"history": "^5.3.0",
|
||||
"lodash": "^4.17.21",
|
||||
"Model": "file:../Model",
|
||||
"moment-timezone": "^0.5.44",
|
||||
"moment-timezone": "^0.5.45",
|
||||
"prop-types": "^15.8.1",
|
||||
"react": "^18.2.0",
|
||||
"react-beautiful-dnd": "^13.1.1",
|
||||
"react-big-calendar": "^1.8.7",
|
||||
"react-big-calendar": "^1.11.2",
|
||||
"react-color": "^2.19.3",
|
||||
"react-dom": "^18.1.0",
|
||||
"react-dropzone": "^14.2.2",
|
||||
"react-error-boundary": "^4.0.12",
|
||||
"react-error-boundary": "^4.0.13",
|
||||
"react-highlight": "^0.15.0",
|
||||
"react-markdown": "^8.0.3",
|
||||
"react-router-dom": "^6.21.3",
|
||||
"react-router-dom": "^6.22.3",
|
||||
"react-select": "^5.4.0",
|
||||
"react-spinners": "^0.13.6",
|
||||
"react-toggle": "^4.1.3",
|
||||
"reactflow": "^11.10.3",
|
||||
"reactflow": "^11.10.4",
|
||||
"remark-gfm": "^3.0.1",
|
||||
"socket.io-client": "^4.7.4",
|
||||
"socket.io-client": "^4.7.5",
|
||||
"tippy.js": "^6.3.7",
|
||||
"universal-cookie": "^4.0.4",
|
||||
"use-async-effect": "^2.2.6"
|
||||
@@ -186,9 +188,9 @@
|
||||
}
|
||||
},
|
||||
"../Model": {
|
||||
"name": "model",
|
||||
"name": "@oneuptime/model",
|
||||
"version": "1.0.0",
|
||||
"license": "ISC",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"Common": "file:../Common",
|
||||
"typeorm": "^0.3.20"
|
||||
@@ -265,9 +267,10 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@remix-run/router": {
|
||||
"version": "1.15.3",
|
||||
"resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.15.3.tgz",
|
||||
"integrity": "sha512-Oy8rmScVrVxWZVOpEF57ovlnhpZ8CCPlnIIumVcV9nFdiSIrus99+Lw78ekXyGvVDlIsFJbSfmSovJUhCWYV3w==",
|
||||
"version": "1.16.1",
|
||||
"resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.16.1.tgz",
|
||||
"integrity": "sha512-es2g3dq6Nb07iFxGk5GuHN20RwBZOsuDQN7izWIisUcv9r+d2C5jQxqmgkdebXgReWfiyUabcki6Fg77mSNrig==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
}
|
||||
@@ -2062,9 +2065,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/react": {
|
||||
"version": "18.2.0",
|
||||
"resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz",
|
||||
"integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==",
|
||||
"version": "18.3.1",
|
||||
"resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz",
|
||||
"integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==",
|
||||
"dependencies": {
|
||||
"loose-envify": "^1.1.0"
|
||||
},
|
||||
@@ -2073,23 +2076,24 @@
|
||||
}
|
||||
},
|
||||
"node_modules/react-dom": {
|
||||
"version": "18.2.0",
|
||||
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz",
|
||||
"integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==",
|
||||
"version": "18.3.1",
|
||||
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz",
|
||||
"integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==",
|
||||
"dependencies": {
|
||||
"loose-envify": "^1.1.0",
|
||||
"scheduler": "^0.23.0"
|
||||
"scheduler": "^0.23.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "^18.2.0"
|
||||
"react": "^18.3.1"
|
||||
}
|
||||
},
|
||||
"node_modules/react-router": {
|
||||
"version": "6.22.3",
|
||||
"resolved": "https://registry.npmjs.org/react-router/-/react-router-6.22.3.tgz",
|
||||
"integrity": "sha512-dr2eb3Mj5zK2YISHK++foM9w4eBnO23eKnZEDs7c880P6oKbrjz/Svg9+nxqtHQK+oMW4OtjZca0RqPglXxguQ==",
|
||||
"version": "6.23.1",
|
||||
"resolved": "https://registry.npmjs.org/react-router/-/react-router-6.23.1.tgz",
|
||||
"integrity": "sha512-fzcOaRF69uvqbbM7OhvQyBTFDVrrGlsFdS3AL+1KfIBtGETibHzi3FkoTRyiDJnWNc2VxrfvR+657ROHjaNjqQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@remix-run/router": "1.15.3"
|
||||
"@remix-run/router": "1.16.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
@@ -2099,12 +2103,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/react-router-dom": {
|
||||
"version": "6.22.3",
|
||||
"resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.22.3.tgz",
|
||||
"integrity": "sha512-7ZILI7HjcE+p31oQvwbokjk6OA/bnFxrhJ19n82Ex9Ph8fNAq+Hm/7KchpMGlTgWhUxRHMMCut+vEtNpWpowKw==",
|
||||
"version": "6.23.1",
|
||||
"resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.23.1.tgz",
|
||||
"integrity": "sha512-utP+K+aSTtEdbWpC+4gxhdlPFwuEfDKq8ZrPFU65bbRJY+l706qjR7yaidBpo3MSeA/fzwbXWbKBI6ftOnP3OQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@remix-run/router": "1.15.3",
|
||||
"react-router": "6.22.3"
|
||||
"@remix-run/router": "1.16.1",
|
||||
"react-router": "6.23.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
@@ -2187,9 +2192,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/scheduler": {
|
||||
"version": "0.23.0",
|
||||
"resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz",
|
||||
"integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==",
|
||||
"version": "0.23.2",
|
||||
"resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz",
|
||||
"integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==",
|
||||
"dependencies": {
|
||||
"loose-envify": "^1.1.0"
|
||||
}
|
||||
|
||||
@@ -34,9 +34,9 @@
|
||||
"express": "^4.19.2",
|
||||
"file-loader": "^6.2.0",
|
||||
"Model": "file:../Model",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.1.0",
|
||||
"react-router-dom": "^6.22.3",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"react-router-dom": "^6.23.1",
|
||||
"sass-loader": "^13.3.3",
|
||||
"style-loader": "^3.3.4",
|
||||
"ts-loader": "^9.5.1",
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
import React, { ReactElement } from 'react';
|
||||
import {
|
||||
Routes,
|
||||
Route,
|
||||
useNavigate,
|
||||
useLocation,
|
||||
useParams,
|
||||
} from 'react-router-dom';
|
||||
import ForgotPasswordPage from './Pages/ForgotPassword';
|
||||
import LoginPage from './Pages/Login';
|
||||
import NotFound from './Pages/NotFound';
|
||||
import ForgotPasswordPage from './Pages/ForgotPassword';
|
||||
import RegisterPage from './Pages/Register';
|
||||
import Navigation from 'CommonUI/src/Utils/Navigation';
|
||||
import VerifyEmail from './Pages/VerifyEmail';
|
||||
import ResetPasswordPage from './Pages/ResetPassword';
|
||||
import VerifyEmail from './Pages/VerifyEmail';
|
||||
import Navigation from 'CommonUI/src/Utils/Navigation';
|
||||
import React, { ReactElement } from 'react';
|
||||
import {
|
||||
Route,
|
||||
Routes,
|
||||
useLocation,
|
||||
useNavigate,
|
||||
useParams,
|
||||
} from 'react-router-dom';
|
||||
|
||||
function App(): ReactElement {
|
||||
Navigation.setNavigateHook(useNavigate());
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
import App from './App';
|
||||
import Telemetry from 'CommonUI/src/Utils/Telemetry';
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom/client';
|
||||
import App from './App';
|
||||
import { BrowserRouter } from 'react-router-dom';
|
||||
|
||||
import Telemetry from 'CommonUI/src/Utils/Telemetry';
|
||||
|
||||
Telemetry.init({
|
||||
serviceName: 'Accounts',
|
||||
});
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import React, { useState } from 'react';
|
||||
import ModelForm, { FormType } from 'CommonUI/src/Components/Forms/ModelForm';
|
||||
import User from 'Model/Models/User';
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import OneUptimeLogo from 'CommonUI/src/Images/logos/OneUptimeSVG/3-transparent.svg';
|
||||
import Link from 'CommonUI/src/Components/Link/Link';
|
||||
import { FORGOT_PASSWORD_API_URL } from '../Utils/ApiPaths';
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import URL from 'Common/Types/API/URL';
|
||||
import ModelForm, { FormType } from 'CommonUI/src/Components/Forms/ModelForm';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import Link from 'CommonUI/src/Components/Link/Link';
|
||||
import OneUptimeLogo from 'CommonUI/src/Images/logos/OneUptimeSVG/3-transparent.svg';
|
||||
import User from 'Model/Models/User';
|
||||
import React, { useState } from 'react';
|
||||
|
||||
const ForgotPassword: () => JSX.Element = () => {
|
||||
const apiUrl: URL = FORGOT_PASSWORD_API_URL;
|
||||
|
||||
@@ -1,19 +1,20 @@
|
||||
import React, { useState } from 'react';
|
||||
import User from 'Model/Models/User';
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import OneUptimeLogo from 'CommonUI/src/Images/logos/OneUptimeSVG/3-transparent.svg';
|
||||
import Link from 'CommonUI/src/Components/Link/Link';
|
||||
import ModelForm, { FormType } from 'CommonUI/src/Components/Forms/ModelForm';
|
||||
import { LOGIN_API_URL } from '../Utils/ApiPaths';
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import URL from 'Common/Types/API/URL';
|
||||
import { JSONObject } from 'Common/Types/JSON';
|
||||
import LoginUtil from '../Utils/Login';
|
||||
import UserUtil from 'CommonUI/src/Utils/User';
|
||||
import Navigation from 'CommonUI/src/Utils/Navigation';
|
||||
import { DASHBOARD_URL } from 'CommonUI/src/Config';
|
||||
import Alert, { AlertType } from 'CommonUI/src/Components/Alerts/Alert';
|
||||
import ModelForm, { FormType } from 'CommonUI/src/Components/Forms/ModelForm';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import Link from 'CommonUI/src/Components/Link/Link';
|
||||
import { DASHBOARD_URL } from 'CommonUI/src/Config';
|
||||
import OneUptimeLogo from 'CommonUI/src/Images/logos/OneUptimeSVG/3-transparent.svg';
|
||||
import UiAnalytics from 'CommonUI/src/Utils/Analytics';
|
||||
import LoginUtil from 'CommonUI/src/Utils/Login';
|
||||
import Navigation from 'CommonUI/src/Utils/Navigation';
|
||||
import UserUtil from 'CommonUI/src/Utils/User';
|
||||
import User from 'Model/Models/User';
|
||||
import React, { useState } from 'react';
|
||||
import useAsyncEffect from 'use-async-effect';
|
||||
|
||||
const LoginPage: () => JSX.Element = () => {
|
||||
const apiUrl: URL = LOGIN_API_URL;
|
||||
@@ -28,6 +29,16 @@ const LoginPage: () => JSX.Element = () => {
|
||||
|
||||
const [showSsoTip, setShowSSOTip] = useState<boolean>(false);
|
||||
|
||||
const [initialValues, setInitialValues] = React.useState<JSONObject>({});
|
||||
|
||||
useAsyncEffect(async () => {
|
||||
if (Navigation.getQueryStringByName('email')) {
|
||||
setInitialValues({
|
||||
email: Navigation.getQueryStringByName('email'),
|
||||
});
|
||||
}
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div className="flex min-h-full flex-col justify-center py-12 sm:px-6 lg:px-8">
|
||||
<div className="">
|
||||
@@ -66,9 +77,13 @@ const LoginPage: () => JSX.Element = () => {
|
||||
field: {
|
||||
email: true,
|
||||
},
|
||||
title: 'Email',
|
||||
fieldType: FormFieldSchemaType.Email,
|
||||
placeholder: 'jeff@example.com',
|
||||
required: true,
|
||||
disabled: Boolean(
|
||||
initialValues && initialValues['email']
|
||||
),
|
||||
title: 'Email',
|
||||
dataTestId: 'email',
|
||||
},
|
||||
{
|
||||
@@ -108,7 +123,7 @@ const LoginPage: () => JSX.Element = () => {
|
||||
}}
|
||||
maxPrimaryButtonWidth={true}
|
||||
footer={
|
||||
<div className="actions pointer text-center mt-4 hover:underline fw-semibold">
|
||||
<div className="actions text-center mt-4 hover:underline fw-semibold">
|
||||
<div>
|
||||
{!showSsoTip && (
|
||||
<div
|
||||
@@ -123,11 +138,9 @@ const LoginPage: () => JSX.Element = () => {
|
||||
|
||||
{showSsoTip && (
|
||||
<div className="text-gray-500 text-sm">
|
||||
Please sign in with your username
|
||||
and password. Once you have signed
|
||||
in, you'll be able to sign in
|
||||
via SSO that's configured for
|
||||
your project.
|
||||
Please sign in with your SSO
|
||||
provider like Okta, Auth0, Entra ID
|
||||
or any other SAML 2.0 provider.
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -1,26 +1,26 @@
|
||||
import React, { useState } from 'react';
|
||||
import ModelForm, { FormType } from 'CommonUI/src/Components/Forms/ModelForm';
|
||||
import User from 'Model/Models/User';
|
||||
import Link from 'CommonUI/src/Components/Link/Link';
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import OneUptimeLogo from 'CommonUI/src/Images/logos/OneUptimeSVG/3-transparent.svg';
|
||||
import LoginUtil from '../Utils/Login';
|
||||
import { JSONObject } from 'Common/Types/JSON';
|
||||
import UserUtil from 'CommonUI/src/Utils/User';
|
||||
import Navigation from 'CommonUI/src/Utils/Navigation';
|
||||
import { BILLING_ENABLED, DASHBOARD_URL } from 'CommonUI/src/Config';
|
||||
import URL from 'Common/Types/API/URL';
|
||||
import { SIGNUP_API_URL } from '../Utils/ApiPaths';
|
||||
import Fields from 'CommonUI/src/Components/Forms/Types/Fields';
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import URL from 'Common/Types/API/URL';
|
||||
import Dictionary from 'Common/Types/Dictionary';
|
||||
import { JSONObject } from 'Common/Types/JSON';
|
||||
import ErrorMessage from 'CommonUI/src/Components/ErrorMessage/ErrorMessage';
|
||||
import ModelForm, { FormType } from 'CommonUI/src/Components/Forms/ModelForm';
|
||||
import Fields from 'CommonUI/src/Components/Forms/Types/Fields';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import Link from 'CommonUI/src/Components/Link/Link';
|
||||
import PageLoader from 'CommonUI/src/Components/Loader/PageLoader';
|
||||
import { BILLING_ENABLED, DASHBOARD_URL } from 'CommonUI/src/Config';
|
||||
import OneUptimeLogo from 'CommonUI/src/Images/logos/OneUptimeSVG/3-transparent.svg';
|
||||
import BaseAPI from 'CommonUI/src/Utils/API/API';
|
||||
import UiAnalytics from 'CommonUI/src/Utils/Analytics';
|
||||
import LocalStorage from 'CommonUI/src/Utils/LocalStorage';
|
||||
import Reseller from 'Model/Models/Reseller';
|
||||
import LoginUtil from 'CommonUI/src/Utils/Login';
|
||||
import ModelAPI, { ListResult } from 'CommonUI/src/Utils/ModelAPI/ModelAPI';
|
||||
import BaseAPI from 'CommonUI/src/Utils/API/API';
|
||||
import ErrorMessage from 'CommonUI/src/Components/ErrorMessage/ErrorMessage';
|
||||
import PageLoader from 'CommonUI/src/Components/Loader/PageLoader';
|
||||
import Navigation from 'CommonUI/src/Utils/Navigation';
|
||||
import UserUtil from 'CommonUI/src/Utils/User';
|
||||
import Reseller from 'Model/Models/Reseller';
|
||||
import User from 'Model/Models/User';
|
||||
import React, { useState } from 'react';
|
||||
import useAsyncEffect from 'use-async-effect';
|
||||
|
||||
const RegisterPage: () => JSX.Element = () => {
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
import React, { useState } from 'react';
|
||||
import ModelForm, { FormType } from 'CommonUI/src/Components/Forms/ModelForm';
|
||||
import User from 'Model/Models/User';
|
||||
import Link from 'CommonUI/src/Components/Link/Link';
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import OneUptimeLogo from 'CommonUI/src/Images/logos/OneUptimeSVG/3-transparent.svg';
|
||||
|
||||
import URL from 'Common/Types/API/URL';
|
||||
import { RESET_PASSWORD_API_URL } from '../Utils/ApiPaths';
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import URL from 'Common/Types/API/URL';
|
||||
import ModelForm, { FormType } from 'CommonUI/src/Components/Forms/ModelForm';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import Link from 'CommonUI/src/Components/Link/Link';
|
||||
import OneUptimeLogo from 'CommonUI/src/Images/logos/OneUptimeSVG/3-transparent.svg';
|
||||
import Navigation from 'CommonUI/src/Utils/Navigation';
|
||||
import User from 'Model/Models/User';
|
||||
import React, { useState } from 'react';
|
||||
|
||||
const RegisterPage: () => JSX.Element = () => {
|
||||
const apiUrl: URL = RESET_PASSWORD_API_URL;
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { VERIFY_EMAIL_API_URL } from '../Utils/ApiPaths';
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import OneUptimeLogo from 'CommonUI/src/Images/logos/OneUptimeSVG/3-transparent.svg';
|
||||
import URL from 'Common/Types/API/URL';
|
||||
import { PromiseVoidFunction } from 'Common/Types/FunctionTypes';
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
import { FormType } from 'CommonUI/src/Components/Forms/ModelForm';
|
||||
import Link from 'CommonUI/src/Components/Link/Link';
|
||||
import PageLoader from 'CommonUI/src/Components/Loader/PageLoader';
|
||||
import ModelAPI from 'CommonUI/src/Utils/ModelAPI/ModelAPI';
|
||||
import EmailVerificationToken from 'Model/Models/EmailVerificationToken';
|
||||
import { VERIFY_EMAIL_API_URL } from '../Utils/ApiPaths';
|
||||
import { FormType } from 'CommonUI/src/Components/Forms/ModelForm';
|
||||
import Navigation from 'CommonUI/src/Utils/Navigation';
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
import URL from 'Common/Types/API/URL';
|
||||
import OneUptimeLogo from 'CommonUI/src/Images/logos/OneUptimeSVG/3-transparent.svg';
|
||||
import API from 'CommonUI/src/Utils/API/API';
|
||||
import { PromiseVoidFunction } from 'Common/Types/FunctionTypes';
|
||||
import ModelAPI from 'CommonUI/src/Utils/ModelAPI/ModelAPI';
|
||||
import Navigation from 'CommonUI/src/Utils/Navigation';
|
||||
import EmailVerificationToken from 'Model/Models/EmailVerificationToken';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
|
||||
const VerifyEmail: () => JSX.Element = () => {
|
||||
const apiUrl: URL = VERIFY_EMAIL_API_URL;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
# Pull base image nodejs image.
|
||||
FROM node:21.7.2-alpine3.18
|
||||
FROM node:21.7.3-alpine3.18
|
||||
RUN mkdir /tmp/npm && chmod 2777 /tmp/npm && chown 1000:1000 /tmp/npm && npm config set cache /tmp/npm --global
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import App from 'CommonServer/Utils/StartServer';
|
||||
import { PromiseVoidFunction } from 'Common/Types/FunctionTypes';
|
||||
import Express, { ExpressApplication } from 'CommonServer/Utils/Express';
|
||||
import logger from 'CommonServer/Utils/Logger';
|
||||
import { PromiseVoidFunction } from 'Common/Types/FunctionTypes';
|
||||
import App from 'CommonServer/Utils/StartServer';
|
||||
|
||||
export const APP_NAME: string = 'admin';
|
||||
|
||||
@@ -31,7 +31,7 @@ const init: PromiseVoidFunction = async (): Promise<void> => {
|
||||
|
||||
init().catch((err: Error) => {
|
||||
logger.error(err);
|
||||
logger.info('Exiting node process');
|
||||
logger.error('Exiting node process');
|
||||
process.exit(1);
|
||||
});
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"watch": ["webpack.config.js"],
|
||||
"exec": "export DEBUG=express:* && printenv > /usr/src/app/dev-env/.env && echo 'HOST=localhost' >> /usr/src/app/dev-env/.env && echo 'USE_HTTPS=false' >> /usr/src/app/dev-env/.env && webpack-dev-server --port=3158 --mode=development"
|
||||
"exec": "export DEBUG=express:* && printenv > /usr/src/app/dev-env/.env && echo 'USE_HTTPS=false' >> /usr/src/app/dev-env/.env && webpack-dev-server --port=3158 --mode=development"
|
||||
}
|
||||
164
AdminDashboard/package-lock.json
generated
164
AdminDashboard/package-lock.json
generated
@@ -14,9 +14,9 @@
|
||||
"dotenv": "^16.4.5",
|
||||
"file-loader": "^6.2.0",
|
||||
"Model": "file:../Model",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.1.0",
|
||||
"react-router-dom": "^6.22.2",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"react-router-dom": "^6.23.1",
|
||||
"style-loader": "^3.3.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -35,21 +35,21 @@
|
||||
}
|
||||
},
|
||||
"../Common": {
|
||||
"name": "common",
|
||||
"name": "@oneuptime/common",
|
||||
"version": "1.0.0",
|
||||
"license": "MIT",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@types/crypto-js": "^4.1.1",
|
||||
"@types/crypto-js": "^4.2.2",
|
||||
"@types/uuid": "^8.3.4",
|
||||
"axios": "^1.6.2",
|
||||
"axios": "^1.6.8",
|
||||
"crypto-js": "^4.1.1",
|
||||
"json5": "^2.2.3",
|
||||
"moment": "^2.29.2",
|
||||
"moment-timezone": "^0.5.40",
|
||||
"posthog-js": "^1.77.0",
|
||||
"reflect-metadata": "^0.1.13",
|
||||
"moment": "^2.30.1",
|
||||
"moment-timezone": "^0.5.45",
|
||||
"posthog-js": "^1.130.1",
|
||||
"reflect-metadata": "^0.2.2",
|
||||
"slugify": "^1.6.5",
|
||||
"typeorm": "^0.3.6",
|
||||
"typeorm": "^0.3.20",
|
||||
"uuid": "^8.3.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -61,40 +61,47 @@
|
||||
}
|
||||
},
|
||||
"../CommonServer": {
|
||||
"name": "common-server",
|
||||
"name": "@oneuptime/common-server",
|
||||
"version": "1.0.0",
|
||||
"license": "MIT",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@clickhouse/client": "^0.2.1",
|
||||
"@elastic/elasticsearch": "^8.1.0",
|
||||
"@clickhouse/client": "^0.2.10",
|
||||
"@elastic/elasticsearch": "^8.12.1",
|
||||
"@opentelemetry/api": "^1.7.0",
|
||||
"@opentelemetry/auto-instrumentations-node": "^0.40.1",
|
||||
"@opentelemetry/sdk-node": "^0.45.1",
|
||||
"@socket.io/redis-adapter": "^8.2.1",
|
||||
"@opentelemetry/api-logs": "^0.49.1",
|
||||
"@opentelemetry/auto-instrumentations-node": "^0.43.0",
|
||||
"@opentelemetry/exporter-logs-otlp-http": "^0.49.1",
|
||||
"@opentelemetry/exporter-metrics-otlp-proto": "^0.49.1",
|
||||
"@opentelemetry/exporter-trace-otlp-proto": "^0.49.1",
|
||||
"@opentelemetry/id-generator-aws-xray": "^1.2.1",
|
||||
"@opentelemetry/sdk-logs": "^0.49.1",
|
||||
"@opentelemetry/sdk-metrics": "^1.21.0",
|
||||
"@opentelemetry/sdk-node": "^0.48.0",
|
||||
"@opentelemetry/sdk-trace-node": "^1.21.0",
|
||||
"acme-client": "^5.3.0",
|
||||
"airtable": "^0.12.2",
|
||||
"axios": "^1.6.2",
|
||||
"bullmq": "^3.6.6",
|
||||
"bullmq": "^5.3.3",
|
||||
"Common": "file:../Common",
|
||||
"cookie-parser": "^1.4.6",
|
||||
"cors": "^2.8.5",
|
||||
"cron-parser": "^4.8.1",
|
||||
"dotenv": "^16.0.0",
|
||||
"ejs": "^3.1.8",
|
||||
"express": "^4.17.3",
|
||||
"dotenv": "^16.4.4",
|
||||
"ejs": "^3.1.10",
|
||||
"express": "^4.19.2",
|
||||
"ioredis": "^5.3.2",
|
||||
"json2csv": "^5.0.7",
|
||||
"jsonwebtoken": "^9.0.0",
|
||||
"markdown-it": "^13.0.1",
|
||||
"marked": "^12.0.2",
|
||||
"Model": "file:../Model",
|
||||
"nodemailer": "^6.7.3",
|
||||
"node-cron": "^3.0.3",
|
||||
"nodemailer": "^6.9.10",
|
||||
"pg": "^8.7.3",
|
||||
"socket.io": "^4.7.2",
|
||||
"redis-semaphore": "^5.5.1",
|
||||
"socket.io": "^4.7.4",
|
||||
"stripe": "^10.17.0",
|
||||
"twilio": "^4.19.3",
|
||||
"typeorm": "^0.3.10",
|
||||
"typeorm-extension": "^2.2.13",
|
||||
"vm2": "^3.9.14",
|
||||
"winston": "^3.6.0"
|
||||
"twilio": "^4.22.0",
|
||||
"typeorm": "^0.3.20",
|
||||
"typeorm-extension": "^2.2.13"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@faker-js/faker": "^6.3.1",
|
||||
@@ -105,8 +112,8 @@
|
||||
"@types/jest": "^27.4.1",
|
||||
"@types/json2csv": "^5.0.3",
|
||||
"@types/jsonwebtoken": "^8.5.9",
|
||||
"@types/markdown-it": "^12.2.3",
|
||||
"@types/node": "^17.0.22",
|
||||
"@types/node-cron": "^3.0.7",
|
||||
"@types/nodemailer": "^6.4.7",
|
||||
"jest": "^27.5.1",
|
||||
"jest-mock-extended": "^3.0.5",
|
||||
@@ -114,34 +121,48 @@
|
||||
}
|
||||
},
|
||||
"../CommonUI": {
|
||||
"name": "common-ui",
|
||||
"name": "@oneuptime/common-ui",
|
||||
"version": "1.0.0",
|
||||
"license": "MIT",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.24.1",
|
||||
"@monaco-editor/react": "^4.4.6",
|
||||
"@nivo/core": "^0.86.0",
|
||||
"@nivo/line": "^0.86.0",
|
||||
"@opentelemetry/api": "^1.8.0",
|
||||
"@opentelemetry/context-zone": "^1.23.0",
|
||||
"@opentelemetry/exporter-trace-otlp-http": "^0.51.0",
|
||||
"@opentelemetry/instrumentation": "^0.51.0",
|
||||
"@opentelemetry/instrumentation-fetch": "^0.51.0",
|
||||
"@opentelemetry/instrumentation-xml-http-request": "^0.51.0",
|
||||
"@opentelemetry/resources": "^1.23.0",
|
||||
"@opentelemetry/sdk-trace-web": "^1.23.0",
|
||||
"@opentelemetry/semantic-conventions": "^1.23.0",
|
||||
"@tippyjs/react": "^4.2.6",
|
||||
"@types/react-highlight": "^0.12.8",
|
||||
"Common": "file:../Common",
|
||||
"formik": "^2.2.9",
|
||||
"formik": "^2.4.6",
|
||||
"history": "^5.3.0",
|
||||
"lodash": "^4.17.21",
|
||||
"Model": "file:../Model",
|
||||
"moment-timezone": "^0.5.43",
|
||||
"moment-timezone": "^0.5.45",
|
||||
"prop-types": "^15.8.1",
|
||||
"react": "^18.2.0",
|
||||
"react": "^18.3.1",
|
||||
"react-beautiful-dnd": "^13.1.1",
|
||||
"react-big-calendar": "^1.8.5",
|
||||
"react-big-calendar": "^1.11.2",
|
||||
"react-color": "^2.19.3",
|
||||
"react-dom": "^18.1.0",
|
||||
"react-dom": "^18.3.1",
|
||||
"react-dropzone": "^14.2.2",
|
||||
"react-error-boundary": "^4.0.11",
|
||||
"react-error-boundary": "^4.0.13",
|
||||
"react-highlight": "^0.15.0",
|
||||
"react-markdown": "^8.0.3",
|
||||
"react-router-dom": "^6.3.0",
|
||||
"react-router-dom": "^6.22.3",
|
||||
"react-select": "^5.4.0",
|
||||
"react-spinners": "^0.13.6",
|
||||
"react-toggle": "^4.1.3",
|
||||
"reactflow": "^11.5.3",
|
||||
"reactflow": "^11.11.1",
|
||||
"remark-gfm": "^3.0.1",
|
||||
"socket.io-client": "^4.7.2",
|
||||
"socket.io-client": "^4.7.5",
|
||||
"tippy.js": "^6.3.7",
|
||||
"universal-cookie": "^4.0.4",
|
||||
"use-async-effect": "^2.2.6"
|
||||
@@ -167,12 +188,12 @@
|
||||
}
|
||||
},
|
||||
"../Model": {
|
||||
"name": "model",
|
||||
"name": "@oneuptime/model",
|
||||
"version": "1.0.0",
|
||||
"license": "ISC",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"Common": "file:../Common",
|
||||
"typeorm": "^0.3.17"
|
||||
"typeorm": "^0.3.20"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "^27.4.1",
|
||||
@@ -4009,9 +4030,10 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@remix-run/router": {
|
||||
"version": "1.15.2",
|
||||
"resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.15.2.tgz",
|
||||
"integrity": "sha512-+Rnav+CaoTE5QJc4Jcwh5toUpnVLKYbpU6Ys0zqbakqbaLQHeglLVHPfxOiQqdNmUy5C2lXz5dwC6tQNX2JW2Q==",
|
||||
"version": "1.16.1",
|
||||
"resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.16.1.tgz",
|
||||
"integrity": "sha512-es2g3dq6Nb07iFxGk5GuHN20RwBZOsuDQN7izWIisUcv9r+d2C5jQxqmgkdebXgReWfiyUabcki6Fg77mSNrig==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
}
|
||||
@@ -16705,9 +16727,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/react": {
|
||||
"version": "18.2.0",
|
||||
"resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz",
|
||||
"integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==",
|
||||
"version": "18.3.1",
|
||||
"resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz",
|
||||
"integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==",
|
||||
"dependencies": {
|
||||
"loose-envify": "^1.1.0"
|
||||
},
|
||||
@@ -16900,15 +16922,15 @@
|
||||
}
|
||||
},
|
||||
"node_modules/react-dom": {
|
||||
"version": "18.2.0",
|
||||
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz",
|
||||
"integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==",
|
||||
"version": "18.3.1",
|
||||
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz",
|
||||
"integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==",
|
||||
"dependencies": {
|
||||
"loose-envify": "^1.1.0",
|
||||
"scheduler": "^0.23.0"
|
||||
"scheduler": "^0.23.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "^18.2.0"
|
||||
"react": "^18.3.1"
|
||||
}
|
||||
},
|
||||
"node_modules/react-error-overlay": {
|
||||
@@ -16936,11 +16958,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/react-router": {
|
||||
"version": "6.22.2",
|
||||
"resolved": "https://registry.npmjs.org/react-router/-/react-router-6.22.2.tgz",
|
||||
"integrity": "sha512-YD3Dzprzpcq+tBMHBS822tCjnWD3iIZbTeSXMY9LPSG541EfoBGyZ3bS25KEnaZjLcmQpw2AVLkFyfgXY8uvcw==",
|
||||
"version": "6.23.1",
|
||||
"resolved": "https://registry.npmjs.org/react-router/-/react-router-6.23.1.tgz",
|
||||
"integrity": "sha512-fzcOaRF69uvqbbM7OhvQyBTFDVrrGlsFdS3AL+1KfIBtGETibHzi3FkoTRyiDJnWNc2VxrfvR+657ROHjaNjqQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@remix-run/router": "1.15.2"
|
||||
"@remix-run/router": "1.16.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
@@ -16950,12 +16973,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/react-router-dom": {
|
||||
"version": "6.22.2",
|
||||
"resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.22.2.tgz",
|
||||
"integrity": "sha512-WgqxD2qySEIBPZ3w0sHH+PUAiamDeszls9tzqMPBDA1YYVucTBXLU7+gtRfcSnhe92A3glPnvSxK2dhNoAVOIQ==",
|
||||
"version": "6.23.1",
|
||||
"resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.23.1.tgz",
|
||||
"integrity": "sha512-utP+K+aSTtEdbWpC+4gxhdlPFwuEfDKq8ZrPFU65bbRJY+l706qjR7yaidBpo3MSeA/fzwbXWbKBI6ftOnP3OQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@remix-run/router": "1.15.2",
|
||||
"react-router": "6.22.2"
|
||||
"@remix-run/router": "1.16.1",
|
||||
"react-router": "6.23.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
@@ -17681,9 +17705,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/scheduler": {
|
||||
"version": "0.23.0",
|
||||
"resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz",
|
||||
"integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==",
|
||||
"version": "0.23.2",
|
||||
"resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz",
|
||||
"integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==",
|
||||
"dependencies": {
|
||||
"loose-envify": "^1.1.0"
|
||||
}
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
"dotenv": "^16.4.5",
|
||||
"file-loader": "^6.2.0",
|
||||
"Model": "file:../Model",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.1.0",
|
||||
"react-router-dom": "^6.22.3",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"react-router-dom": "^6.23.1",
|
||||
"style-loader": "^3.3.4"
|
||||
},
|
||||
"scripts": {
|
||||
|
||||
@@ -1,29 +1,28 @@
|
||||
import React from 'react';
|
||||
import {
|
||||
Routes,
|
||||
Route as PageRoute,
|
||||
useNavigate,
|
||||
useLocation,
|
||||
useParams,
|
||||
} from 'react-router-dom';
|
||||
import Navigation from 'CommonUI/src/Utils/Navigation';
|
||||
import User from 'CommonUI/src/Utils/User';
|
||||
import URL from 'Common/Types/API/URL';
|
||||
import { ACCOUNTS_URL, DASHBOARD_URL } from 'CommonUI/src/Config';
|
||||
import MasterPage from './Components/MasterPage/MasterPage';
|
||||
import RouteMap from './Utils/RouteMap';
|
||||
import PageMap from './Utils/PageMap';
|
||||
import Init from './Pages/Init/Init';
|
||||
import Projects from './Pages/Projects/Index';
|
||||
import Users from './Pages/Users/Index';
|
||||
import Logout from './Pages/Logout/Logout';
|
||||
|
||||
import Projects from './Pages/Projects/Index';
|
||||
import SettingsAPIKey from './Pages/Settings/APIKey/Index';
|
||||
import SettingsAuthentication from './Pages/Settings/Authentication/Index';
|
||||
import SettingsCallSMS from './Pages/Settings/CallSMS/Index';
|
||||
// Settings Pages.
|
||||
import SettingsEmail from './Pages/Settings/Email/Index';
|
||||
import SettingsCallSMS from './Pages/Settings/CallSMS/Index';
|
||||
import SettingsProbes from './Pages/Settings/Probes/Index';
|
||||
import SettingsAuthentication from './Pages/Settings/Authentication/Index';
|
||||
import SettingsAPIKey from './Pages/Settings/APIKey/Index';
|
||||
import Users from './Pages/Users/Index';
|
||||
import PageMap from './Utils/PageMap';
|
||||
import RouteMap from './Utils/RouteMap';
|
||||
import URL from 'Common/Types/API/URL';
|
||||
import { ACCOUNTS_URL, DASHBOARD_URL } from 'CommonUI/src/Config';
|
||||
import Navigation from 'CommonUI/src/Utils/Navigation';
|
||||
import User from 'CommonUI/src/Utils/User';
|
||||
import React from 'react';
|
||||
import {
|
||||
Route as PageRoute,
|
||||
Routes,
|
||||
useLocation,
|
||||
useNavigate,
|
||||
useParams,
|
||||
} from 'react-router-dom';
|
||||
|
||||
const App: () => JSX.Element = () => {
|
||||
Navigation.setNavigateHook(useNavigate());
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import React from 'react';
|
||||
import Footer from 'CommonUI/src/Components/Footer/Footer';
|
||||
import URL from 'Common/Types/API/URL';
|
||||
import API from 'Common/Utils/API';
|
||||
import { HOST, HTTP_PROTOCOL } from 'CommonUI/src/Config';
|
||||
import { JSONObject } from 'Common/Types/JSON';
|
||||
import BadDataException from 'Common/Types/Exception/BadDataException';
|
||||
import ConfirmModal from 'CommonUI/src/Components/Modal/ConfirmModal';
|
||||
import Dictionary from 'Common/Types/Dictionary';
|
||||
import HTTPResponse from 'Common/Types/API/HTTPResponse';
|
||||
import URL from 'Common/Types/API/URL';
|
||||
import Dictionary from 'Common/Types/Dictionary';
|
||||
import BadDataException from 'Common/Types/Exception/BadDataException';
|
||||
import { PromiseVoidFunction } from 'Common/Types/FunctionTypes';
|
||||
import { JSONObject } from 'Common/Types/JSON';
|
||||
import API from 'Common/Utils/API';
|
||||
import Footer from 'CommonUI/src/Components/Footer/Footer';
|
||||
import ConfirmModal from 'CommonUI/src/Components/Modal/ConfirmModal';
|
||||
import { HOST, HTTP_PROTOCOL } from 'CommonUI/src/Config';
|
||||
import React from 'react';
|
||||
|
||||
const DashboardFooter: () => JSX.Element = () => {
|
||||
const [showAboutModal, setShowAboutModal] = React.useState<boolean>(false);
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import React, { FunctionComponent, ReactElement } from 'react';
|
||||
import Help from './Help';
|
||||
import Header from 'CommonUI/src/Components/Header/Header';
|
||||
import Logo from './Logo';
|
||||
import Button, { ButtonStyleType } from 'CommonUI/src/Components/Button/Button';
|
||||
import Navigation from 'CommonUI/src/Utils/Navigation';
|
||||
import { DASHBOARD_URL } from 'CommonUI/src/Config';
|
||||
import UserProfile from './UserProfile';
|
||||
import Button, { ButtonStyleType } from 'CommonUI/src/Components/Button/Button';
|
||||
import Header from 'CommonUI/src/Components/Header/Header';
|
||||
import { DASHBOARD_URL } from 'CommonUI/src/Config';
|
||||
import Navigation from 'CommonUI/src/Utils/Navigation';
|
||||
import React, { FunctionComponent, ReactElement } from 'react';
|
||||
|
||||
const DashboardHeader: FunctionComponent = (): ReactElement => {
|
||||
return (
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import React, { ReactElement, useState } from 'react';
|
||||
import URL from 'Common/Types/API/URL';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import HeaderIconDropdownButton from 'CommonUI/src/Components/Header/HeaderIconDropdownButton';
|
||||
import IconDropdownItem from 'CommonUI/src/Components/Header/IconDropdown/IconDropdownItem';
|
||||
import IconDropdownMenu from 'CommonUI/src/Components/Header/IconDropdown/IconDropdownMenu';
|
||||
import IconDropdownRow from 'CommonUI/src/Components/Header/IconDropdown/IconDropdownRow';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import URL from 'Common/Types/API/URL';
|
||||
import React, { ReactElement, useState } from 'react';
|
||||
|
||||
const Help: () => JSX.Element = (): ReactElement => {
|
||||
const [isDropdownVisible, setIsDropdownVisible] = useState<boolean>(false);
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
// Tailwind
|
||||
|
||||
import React, { FunctionComponent, ReactElement } from 'react';
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import Image from 'CommonUI/src/Components/Image/Image';
|
||||
import OneUptimeLogo from 'CommonUI/src/Images/logos/OneUptimeSVG/3-transparent.svg';
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import React, { FunctionComponent, ReactElement } from 'react';
|
||||
|
||||
export interface ComponentProps {
|
||||
onClick: () => void;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import React, { ReactElement, useState } from 'react';
|
||||
import HeaderIconDropdownButton from 'CommonUI/src/Components/Header/HeaderIconDropdownButton';
|
||||
import Notifications from 'CommonUI/src/Components/Header/Notifications/Notifications';
|
||||
import NotificationItem from 'CommonUI/src/Components/Header/Notifications/NotificationItem';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import HeaderIconDropdownButton from 'CommonUI/src/Components/Header/HeaderIconDropdownButton';
|
||||
import NotificationItem from 'CommonUI/src/Components/Header/Notifications/NotificationItem';
|
||||
import Notifications from 'CommonUI/src/Components/Header/Notifications/Notifications';
|
||||
import React, { ReactElement, useState } from 'react';
|
||||
|
||||
const DashboardHeader: () => JSX.Element = (): ReactElement => {
|
||||
const [isDropdownVisible, setIsDropdownVisible] = useState<boolean>(false);
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
import SubscriptionPlan from 'Common/Types/Billing/SubscriptionPlan';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import { FormType } from 'CommonUI/src/Components/Forms/ModelForm';
|
||||
import Field from 'CommonUI/src/Components/Forms/Types/Field';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import ProjectPicker from 'CommonUI/src/Components/Header/ProjectPicker/ProjectPicker';
|
||||
import ModelFormModal from 'CommonUI/src/Components/ModelFormModal/ModelFormModal';
|
||||
import { RadioButton } from 'CommonUI/src/Components/RadioButtons/GroupRadioButtons';
|
||||
import Toggle from 'CommonUI/src/Components/Toggle/Toggle';
|
||||
import { BILLING_ENABLED, getAllEnvVars } from 'CommonUI/src/Config';
|
||||
import { GetReactElementFunction } from 'CommonUI/src/Types/FunctionTypes';
|
||||
import ProjectUtil from 'CommonUI/src/Utils/Project';
|
||||
import Project from 'Model/Models/Project';
|
||||
import React, {
|
||||
FunctionComponent,
|
||||
ReactElement,
|
||||
useState,
|
||||
useEffect,
|
||||
useState,
|
||||
} from 'react';
|
||||
import ProjectPicker from 'CommonUI/src/Components/Header/ProjectPicker/ProjectPicker';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import Project from 'Model/Models/Project';
|
||||
import ModelFormModal from 'CommonUI/src/Components/ModelFormModal/ModelFormModal';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import { FormType } from 'CommonUI/src/Components/Forms/ModelForm';
|
||||
import ProjectUtil from 'CommonUI/src/Utils/Project';
|
||||
import { BILLING_ENABLED, getAllEnvVars } from 'CommonUI/src/Config';
|
||||
import SubscriptionPlan from 'Common/Types/Billing/SubscriptionPlan';
|
||||
import Field from 'CommonUI/src/Components/Forms/Types/Field';
|
||||
import { RadioButton } from 'CommonUI/src/Components/RadioButtons/GroupRadioButtons';
|
||||
import Toggle from 'CommonUI/src/Components/Toggle/Toggle';
|
||||
import { GetReactElementFunction } from 'CommonUI/src/Types/FunctionTypes';
|
||||
|
||||
export interface ComponentProps {
|
||||
projects: Array<Project>;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { FunctionComponent, ReactElement } from 'react';
|
||||
import SearchBox from 'CommonUI/src/Components/Header/SearchBox';
|
||||
import Project from 'Model/Models/Project';
|
||||
import React, { FunctionComponent, ReactElement } from 'react';
|
||||
|
||||
export interface ComponentProps {
|
||||
onChange: (search: string) => void;
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
import React, { FunctionComponent, ReactElement, useState } from 'react';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import RouteMap, { RouteUtil } from '../../Utils/RouteMap';
|
||||
import PageMap from '../../Utils/PageMap';
|
||||
import BlankProfilePic from 'CommonUI/src/Images/users/blank-profile.svg';
|
||||
import RouteMap, { RouteUtil } from '../../Utils/RouteMap';
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import HeaderIconDropdownButton from 'CommonUI/src/Components/Header/HeaderIconDropdownButton';
|
||||
import IconDropdownItem from 'CommonUI/src/Components/Header/IconDropdown/IconDropdownItem';
|
||||
import IconDropdownMenu from 'CommonUI/src/Components/Header/IconDropdown/IconDropdownMenu';
|
||||
import Navigation from 'CommonUI/src/Utils/Navigation';
|
||||
import { DASHBOARD_URL } from 'CommonUI/src/Config';
|
||||
import BlankProfilePic from 'CommonUI/src/Images/users/blank-profile.svg';
|
||||
import Navigation from 'CommonUI/src/Utils/Navigation';
|
||||
import User from 'CommonUI/src/Utils/User';
|
||||
import React, { FunctionComponent, ReactElement, useState } from 'react';
|
||||
|
||||
const DashboardUserProfile: FunctionComponent = (): ReactElement => {
|
||||
const [isDropdownVisible, setIsDropdownVisible] = useState<boolean>(false);
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import MasterPage from 'CommonUI/src/Components/MasterPage/MasterPage';
|
||||
import Footer from '../Footer/Footer';
|
||||
import Header from '../Header/Header';
|
||||
import NavBar from '../NavBar/NavBar';
|
||||
import React, { FunctionComponent, ReactElement } from 'react';
|
||||
import MasterPage from 'CommonUI/src/Components/MasterPage/MasterPage';
|
||||
import TopAlert from 'CommonUI/src/Components/TopAlert/TopAlert';
|
||||
import React, { FunctionComponent, ReactElement } from 'react';
|
||||
|
||||
export interface ComponentProps {
|
||||
children: ReactElement | Array<ReactElement>;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import React, { FunctionComponent, ReactElement } from 'react';
|
||||
import NavBar from 'CommonUI/src/Components/Navbar/NavBar';
|
||||
import NavBarItem from 'CommonUI/src/Components/Navbar/NavBarItem';
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import PageMap from '../../Utils/PageMap';
|
||||
import RouteMap, { RouteUtil } from '../../Utils/RouteMap';
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import NavBar from 'CommonUI/src/Components/Navbar/NavBar';
|
||||
import NavBarItem from 'CommonUI/src/Components/Navbar/NavBarItem';
|
||||
import React, { FunctionComponent, ReactElement } from 'react';
|
||||
|
||||
const DashboardNavbar: FunctionComponent = (): ReactElement => {
|
||||
return (
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import App from './App';
|
||||
import Telemetry from 'CommonUI/src/Utils/Telemetry';
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom/client';
|
||||
import App from './App';
|
||||
import { BrowserRouter } from 'react-router-dom';
|
||||
import Telemetry from 'CommonUI/src/Utils/Telemetry';
|
||||
|
||||
Telemetry.init({
|
||||
serviceName: 'AdminDashboard',
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import PageMap from '../../Utils/PageMap';
|
||||
import RouteMap from '../../Utils/RouteMap';
|
||||
import PageLoader from 'CommonUI/src/Components/Loader/PageLoader';
|
||||
import Page from 'CommonUI/src/Components/Page/Page';
|
||||
import Navigation from 'CommonUI/src/Utils/Navigation';
|
||||
import React, { FunctionComponent, ReactElement, useEffect } from 'react';
|
||||
import RouteMap from '../../Utils/RouteMap';
|
||||
import PageMap from '../../Utils/PageMap';
|
||||
|
||||
const Init: FunctionComponent = (): ReactElement => {
|
||||
useEffect(() => {
|
||||
|
||||
@@ -1,16 +1,15 @@
|
||||
import React, { FunctionComponent, ReactElement, useEffect } from 'react';
|
||||
|
||||
import Page from 'CommonUI/src/Components/Page/Page';
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import RouteMap, { RouteUtil } from '../../Utils/RouteMap';
|
||||
import PageMap from '../../Utils/PageMap';
|
||||
import RouteMap, { RouteUtil } from '../../Utils/RouteMap';
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import { PromiseVoidFunction } from 'Common/Types/FunctionTypes';
|
||||
import ErrorMessage from 'CommonUI/src/Components/ErrorMessage/ErrorMessage';
|
||||
import PageLoader from 'CommonUI/src/Components/Loader/PageLoader';
|
||||
import UserUtil from 'CommonUI/src/Utils/User';
|
||||
import Navigation from 'CommonUI/src/Utils/Navigation';
|
||||
import Page from 'CommonUI/src/Components/Page/Page';
|
||||
import { ACCOUNTS_URL } from 'CommonUI/src/Config';
|
||||
import UiAnalytics from 'CommonUI/src/Utils/Analytics';
|
||||
import ErrorMessage from 'CommonUI/src/Components/ErrorMessage/ErrorMessage';
|
||||
import { PromiseVoidFunction } from 'Common/Types/FunctionTypes';
|
||||
import Navigation from 'CommonUI/src/Utils/Navigation';
|
||||
import UserUtil from 'CommonUI/src/Utils/User';
|
||||
import React, { FunctionComponent, ReactElement, useEffect } from 'react';
|
||||
|
||||
const Logout: FunctionComponent = (): ReactElement => {
|
||||
const [error, setError] = React.useState<string | null>(null);
|
||||
|
||||
@@ -1,26 +1,26 @@
|
||||
import AdminModelAPI from '../../Utils/ModelAPI';
|
||||
import PageMap from '../../Utils/PageMap';
|
||||
import RouteMap, { RouteUtil } from '../../Utils/RouteMap';
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import SubscriptionPlan from 'Common/Types/Billing/SubscriptionPlan';
|
||||
import Field from 'CommonUI/src/Components/Forms/Types/Field';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import ModelTable from 'CommonUI/src/Components/ModelTable/ModelTable';
|
||||
import Page from 'CommonUI/src/Components/Page/Page';
|
||||
import { RadioButton } from 'CommonUI/src/Components/RadioButtons/GroupRadioButtons';
|
||||
import Toggle from 'CommonUI/src/Components/Toggle/Toggle';
|
||||
import FieldType from 'CommonUI/src/Components/Types/FieldType';
|
||||
import { BILLING_ENABLED, getAllEnvVars } from 'CommonUI/src/Config';
|
||||
import { GetReactElementFunction } from 'CommonUI/src/Types/FunctionTypes';
|
||||
import Navigation from 'CommonUI/src/Utils/Navigation';
|
||||
import Project from 'Model/Models/Project';
|
||||
import User from 'Model/Models/User';
|
||||
import React, {
|
||||
FunctionComponent,
|
||||
ReactElement,
|
||||
useEffect,
|
||||
useState,
|
||||
} from 'react';
|
||||
import PageMap from '../../Utils/PageMap';
|
||||
import RouteMap, { RouteUtil } from '../../Utils/RouteMap';
|
||||
import ModelTable from 'CommonUI/src/Components/ModelTable/ModelTable';
|
||||
import FieldType from 'CommonUI/src/Components/Types/FieldType';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import Navigation from 'CommonUI/src/Utils/Navigation';
|
||||
import Project from 'Model/Models/Project';
|
||||
import User from 'Model/Models/User';
|
||||
import { BILLING_ENABLED, getAllEnvVars } from 'CommonUI/src/Config';
|
||||
import Field from 'CommonUI/src/Components/Forms/Types/Field';
|
||||
import SubscriptionPlan from 'Common/Types/Billing/SubscriptionPlan';
|
||||
import { RadioButton } from 'CommonUI/src/Components/RadioButtons/GroupRadioButtons';
|
||||
import Toggle from 'CommonUI/src/Components/Toggle/Toggle';
|
||||
import AdminModelAPI from '../../Utils/ModelAPI';
|
||||
import { GetReactElementFunction } from 'CommonUI/src/Types/FunctionTypes';
|
||||
|
||||
const Projects: FunctionComponent = (): ReactElement => {
|
||||
const [isSubscriptionPlanYearly, setIsSubscriptionPlanYearly] =
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import CardModelDetail from 'CommonUI/src/Components/ModelDetail/CardModelDetail';
|
||||
import Page from 'CommonUI/src/Components/Page/Page';
|
||||
import React, { FunctionComponent, ReactElement } from 'react';
|
||||
import PageMap from '../../../Utils/PageMap';
|
||||
import RouteMap, { RouteUtil } from '../../../Utils/RouteMap';
|
||||
import DashboardSideMenu from '../SideMenu';
|
||||
import GlobalConfig from 'Model/Models/GlobalConfig';
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import CardModelDetail from 'CommonUI/src/Components/ModelDetail/CardModelDetail';
|
||||
import Page from 'CommonUI/src/Components/Page/Page';
|
||||
import FieldType from 'CommonUI/src/Components/Types/FieldType';
|
||||
import GlobalConfig from 'Model/Models/GlobalConfig';
|
||||
import React, { FunctionComponent, ReactElement } from 'react';
|
||||
|
||||
const Settings: FunctionComponent = (): ReactElement => {
|
||||
return (
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import CardModelDetail from 'CommonUI/src/Components/ModelDetail/CardModelDetail';
|
||||
import Page from 'CommonUI/src/Components/Page/Page';
|
||||
import React, { FunctionComponent, ReactElement } from 'react';
|
||||
import PageMap from '../../../Utils/PageMap';
|
||||
import RouteMap, { RouteUtil } from '../../../Utils/RouteMap';
|
||||
import DashboardSideMenu from '../SideMenu';
|
||||
import GlobalConfig from 'Model/Models/GlobalConfig';
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import CardModelDetail from 'CommonUI/src/Components/ModelDetail/CardModelDetail';
|
||||
import Page from 'CommonUI/src/Components/Page/Page';
|
||||
import FieldType from 'CommonUI/src/Components/Types/FieldType';
|
||||
import GlobalConfig from 'Model/Models/GlobalConfig';
|
||||
import React, { FunctionComponent, ReactElement } from 'react';
|
||||
|
||||
const Settings: FunctionComponent = (): ReactElement => {
|
||||
return (
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import CardModelDetail from 'CommonUI/src/Components/ModelDetail/CardModelDetail';
|
||||
import Page from 'CommonUI/src/Components/Page/Page';
|
||||
import React, { FunctionComponent, ReactElement } from 'react';
|
||||
import PageMap from '../../../Utils/PageMap';
|
||||
import RouteMap, { RouteUtil } from '../../../Utils/RouteMap';
|
||||
import DashboardSideMenu from '../SideMenu';
|
||||
import GlobalConfig from 'Model/Models/GlobalConfig';
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import CardModelDetail from 'CommonUI/src/Components/ModelDetail/CardModelDetail';
|
||||
import Page from 'CommonUI/src/Components/Page/Page';
|
||||
import FieldType from 'CommonUI/src/Components/Types/FieldType';
|
||||
import GlobalConfig from 'Model/Models/GlobalConfig';
|
||||
import React, { FunctionComponent, ReactElement } from 'react';
|
||||
|
||||
const Settings: FunctionComponent = (): ReactElement => {
|
||||
return (
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import CardModelDetail from 'CommonUI/src/Components/ModelDetail/CardModelDetail';
|
||||
import Page from 'CommonUI/src/Components/Page/Page';
|
||||
import React, { FunctionComponent, ReactElement, useEffect } from 'react';
|
||||
import PageMap from '../../../Utils/PageMap';
|
||||
import RouteMap, { RouteUtil } from '../../../Utils/RouteMap';
|
||||
import DashboardSideMenu from '../SideMenu';
|
||||
import GlobalConfig, { EmailServerType } from 'Model/Models/GlobalConfig';
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
import FieldType from 'CommonUI/src/Components/Types/FieldType';
|
||||
import ModelAPI from 'CommonUI/src/Utils/ModelAPI/ModelAPI';
|
||||
import PageLoader from 'CommonUI/src/Components/Loader/PageLoader';
|
||||
import ErrorMessage from 'CommonUI/src/Components/ErrorMessage/ErrorMessage';
|
||||
import DropdownUtil from 'CommonUI/src/Utils/Dropdown';
|
||||
import Pill from 'CommonUI/src/Components/Pill/Pill';
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import { Green, Red } from 'Common/Types/BrandColors';
|
||||
import { PromiseVoidFunction } from 'Common/Types/FunctionTypes';
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
import ErrorMessage from 'CommonUI/src/Components/ErrorMessage/ErrorMessage';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import PageLoader from 'CommonUI/src/Components/Loader/PageLoader';
|
||||
import CardModelDetail from 'CommonUI/src/Components/ModelDetail/CardModelDetail';
|
||||
import Page from 'CommonUI/src/Components/Page/Page';
|
||||
import Pill from 'CommonUI/src/Components/Pill/Pill';
|
||||
import FieldType from 'CommonUI/src/Components/Types/FieldType';
|
||||
import DropdownUtil from 'CommonUI/src/Utils/Dropdown';
|
||||
import ModelAPI from 'CommonUI/src/Utils/ModelAPI/ModelAPI';
|
||||
import GlobalConfig, { EmailServerType } from 'Model/Models/GlobalConfig';
|
||||
import React, { FunctionComponent, ReactElement, useEffect } from 'react';
|
||||
|
||||
const Settings: FunctionComponent = (): ReactElement => {
|
||||
const [emailServerType, setemailServerType] =
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import Page from 'CommonUI/src/Components/Page/Page';
|
||||
import React, { FunctionComponent, ReactElement, useState } from 'react';
|
||||
import AdminModelAPI from '../../../Utils/ModelAPI';
|
||||
import PageMap from '../../../Utils/PageMap';
|
||||
import RouteMap, { RouteUtil } from '../../../Utils/RouteMap';
|
||||
import DashboardSideMenu from '../SideMenu';
|
||||
import ModelTable from 'CommonUI/src/Components/ModelTable/ModelTable';
|
||||
import Probe from 'Model/Models/Probe';
|
||||
import FieldType from 'CommonUI/src/Components/Types/FieldType';
|
||||
import OneUptimeDate from 'Common/Types/Date';
|
||||
import { Green, Red } from 'Common/Types/BrandColors';
|
||||
import Statusbubble from 'CommonUI/src/Components/StatusBubble/StatusBubble';
|
||||
import ProbeElement from 'CommonUI/src/Components/Probe/Probe';
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import IsNull from 'Common/Types/BaseDatabase/IsNull';
|
||||
import Banner from 'CommonUI/src/Components/Banner/Banner';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import { ButtonStyleType } from 'CommonUI/src/Components/Button/Button';
|
||||
import ConfirmModal from 'CommonUI/src/Components/Modal/ConfirmModal';
|
||||
import AdminModelAPI from '../../../Utils/ModelAPI';
|
||||
import { Green, Red } from 'Common/Types/BrandColors';
|
||||
import OneUptimeDate from 'Common/Types/Date';
|
||||
import { ErrorFunction, VoidFunction } from 'Common/Types/FunctionTypes';
|
||||
import Banner from 'CommonUI/src/Components/Banner/Banner';
|
||||
import { ButtonStyleType } from 'CommonUI/src/Components/Button/Button';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import ConfirmModal from 'CommonUI/src/Components/Modal/ConfirmModal';
|
||||
import ModelTable from 'CommonUI/src/Components/ModelTable/ModelTable';
|
||||
import Page from 'CommonUI/src/Components/Page/Page';
|
||||
import ProbeElement from 'CommonUI/src/Components/Probe/Probe';
|
||||
import Statusbubble from 'CommonUI/src/Components/StatusBubble/StatusBubble';
|
||||
import FieldType from 'CommonUI/src/Components/Types/FieldType';
|
||||
import Probe from 'Model/Models/Probe';
|
||||
import React, { FunctionComponent, ReactElement, useState } from 'react';
|
||||
|
||||
const Settings: FunctionComponent = (): ReactElement => {
|
||||
const [showKeyModal, setShowKeyModal] = useState<boolean>(false);
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import React, { ReactElement } from 'react';
|
||||
import PageMap from '../../Utils/PageMap';
|
||||
import RouteMap, { RouteUtil } from '../../Utils/RouteMap';
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import SideMenu from 'CommonUI/src/Components/SideMenu/SideMenu';
|
||||
import SideMenuItem from 'CommonUI/src/Components/SideMenu/SideMenuItem';
|
||||
import SideMenuSection from 'CommonUI/src/Components/SideMenu/SideMenuSection';
|
||||
import RouteMap, { RouteUtil } from '../../Utils/RouteMap';
|
||||
import PageMap from '../../Utils/PageMap';
|
||||
import React, { ReactElement } from 'react';
|
||||
|
||||
const DashboardSideMenu: () => JSX.Element = (): ReactElement => {
|
||||
return (
|
||||
|
||||
@@ -1,15 +1,31 @@
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import Page from 'CommonUI/src/Components/Page/Page';
|
||||
import React, { FunctionComponent, ReactElement } from 'react';
|
||||
import PageMap from '../../Utils/PageMap';
|
||||
import RouteMap, { RouteUtil } from '../../Utils/RouteMap';
|
||||
import ModelTable from 'CommonUI/src/Components/ModelTable/ModelTable';
|
||||
import FieldType from 'CommonUI/src/Components/Types/FieldType';
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import { ErrorFunction } from 'Common/Types/FunctionTypes';
|
||||
import { ButtonStyleType } from 'CommonUI/src/Components/Button/Button';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import ConfirmModal from 'CommonUI/src/Components/Modal/ConfirmModal';
|
||||
import ModelTable from 'CommonUI/src/Components/ModelTable/ModelTable';
|
||||
import Page from 'CommonUI/src/Components/Page/Page';
|
||||
import FieldType from 'CommonUI/src/Components/Types/FieldType';
|
||||
import API from 'CommonUI/src/Utils/API/API';
|
||||
import ModelAPI from 'CommonUI/src/Utils/ModelAPI/ModelAPI';
|
||||
import Navigation from 'CommonUI/src/Utils/Navigation';
|
||||
import User from 'Model/Models/User';
|
||||
import React, { FunctionComponent, ReactElement, useState } from 'react';
|
||||
|
||||
const Users: FunctionComponent = (): ReactElement => {
|
||||
const [showConfirmVerifyEmailModal, setShowConfirmVerifyEmailModal] =
|
||||
useState<boolean>(false);
|
||||
const [selectedUser, setSelectedUser] = useState<User | null>(null);
|
||||
const [error, setError] = useState<string | null>(null);
|
||||
|
||||
const [isConfimModalLoading, setIsConfirmModalLoading] =
|
||||
useState<boolean>(false);
|
||||
|
||||
const [refreshItemsTrigger, setRefreshItemsTrigger] =
|
||||
useState<boolean>(false);
|
||||
|
||||
return (
|
||||
<Page
|
||||
title={'Users'}
|
||||
@@ -34,6 +50,7 @@ const Users: FunctionComponent = (): ReactElement => {
|
||||
isDeleteable={false}
|
||||
isEditable={false}
|
||||
showViewIdButton={true}
|
||||
refreshToggle={refreshItemsTrigger}
|
||||
isCreateable={true}
|
||||
name="Users"
|
||||
isViewable={false}
|
||||
@@ -41,6 +58,30 @@ const Users: FunctionComponent = (): ReactElement => {
|
||||
title: 'Users',
|
||||
description: 'Here is a list of users in OneUptime.',
|
||||
}}
|
||||
actionButtons={[
|
||||
{
|
||||
title: 'Verify Email',
|
||||
buttonStyleType: ButtonStyleType.NORMAL,
|
||||
isVisible: (item: User) => {
|
||||
return !item.isEmailVerified;
|
||||
},
|
||||
onClick: async (
|
||||
item: User,
|
||||
onCompleteAction: VoidFunction,
|
||||
onError: ErrorFunction
|
||||
) => {
|
||||
try {
|
||||
setSelectedUser(item);
|
||||
setShowConfirmVerifyEmailModal(true);
|
||||
|
||||
onCompleteAction();
|
||||
} catch (err) {
|
||||
onCompleteAction();
|
||||
onError(err as Error);
|
||||
}
|
||||
},
|
||||
},
|
||||
]}
|
||||
noItemsMessage={'No users found.'}
|
||||
formFields={[
|
||||
{
|
||||
@@ -111,6 +152,13 @@ const Users: FunctionComponent = (): ReactElement => {
|
||||
title: 'Email',
|
||||
type: FieldType.Email,
|
||||
},
|
||||
{
|
||||
field: {
|
||||
isEmailVerified: true,
|
||||
},
|
||||
title: 'Email Verified',
|
||||
type: FieldType.Boolean,
|
||||
},
|
||||
{
|
||||
field: {
|
||||
createdAt: true,
|
||||
@@ -120,6 +168,53 @@ const Users: FunctionComponent = (): ReactElement => {
|
||||
},
|
||||
]}
|
||||
/>
|
||||
|
||||
{error ? (
|
||||
<ConfirmModal
|
||||
title={`Error`}
|
||||
description={error}
|
||||
submitButtonText={'Close'}
|
||||
onSubmit={async () => {
|
||||
setError(null);
|
||||
}}
|
||||
submitButtonType={ButtonStyleType.NORMAL}
|
||||
/>
|
||||
) : (
|
||||
<></>
|
||||
)}
|
||||
|
||||
{showConfirmVerifyEmailModal && selectedUser ? (
|
||||
<ConfirmModal
|
||||
title={`Verify Email`}
|
||||
description={`Are you sure you want to verify the email - ${selectedUser.email}?`}
|
||||
isLoading={isConfimModalLoading}
|
||||
submitButtonText={'Verify Email'}
|
||||
onClose={async () => {
|
||||
setShowConfirmVerifyEmailModal(false);
|
||||
setSelectedUser(null);
|
||||
}}
|
||||
onSubmit={async () => {
|
||||
try {
|
||||
setIsConfirmModalLoading(true);
|
||||
await ModelAPI.updateById<User>({
|
||||
modelType: User,
|
||||
id: selectedUser.id!,
|
||||
data: {
|
||||
isEmailVerified: true,
|
||||
},
|
||||
});
|
||||
} catch (err) {
|
||||
setError(API.getFriendlyMessage(err as Error));
|
||||
}
|
||||
|
||||
setRefreshItemsTrigger(!refreshItemsTrigger);
|
||||
setIsConfirmModalLoading(false);
|
||||
setShowConfirmVerifyEmailModal(false);
|
||||
}}
|
||||
/>
|
||||
) : (
|
||||
<></>
|
||||
)}
|
||||
</Page>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import Dictionary from 'Common/Types/Dictionary';
|
||||
import PageMap from './PageMap';
|
||||
import RouteParams from './RouteParams';
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import Dictionary from 'Common/Types/Dictionary';
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
|
||||
const RouteMap: Dictionary<Route> = {
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
import AuthenticationServiceHandler from './Service/Authentication';
|
||||
import DataTypeServiceHandler from './Service/DataType';
|
||||
import ErrorServiceHandler from './Service/Errors';
|
||||
import IntroductionServiceHandler from './Service/Introduction';
|
||||
import ModelServiceHandler from './Service/Model';
|
||||
import PageNotFoundServiceHandler from './Service/PageNotFound';
|
||||
import PaginationServiceHandler from './Service/Pagination';
|
||||
import PermissionServiceHandler from './Service/Permissions';
|
||||
import StatusServiceHandler from './Service/Status';
|
||||
import { StaticPath } from './Utils/Config';
|
||||
import ResourceUtil, { ModelDocumentation } from './Utils/Resources';
|
||||
import Dictionary from 'Common/Types/Dictionary';
|
||||
import FeatureSet from 'CommonServer/Types/FeatureSet';
|
||||
import Express, {
|
||||
ExpressApplication,
|
||||
ExpressRequest,
|
||||
ExpressResponse,
|
||||
ExpressStatic,
|
||||
} from 'CommonServer/Utils/Express';
|
||||
import ResourceUtil, { ModelDocumentation } from './Utils/Resources';
|
||||
import IntroductionServiceHandler from './Service/Introduction';
|
||||
import ErrorServiceHandler from './Service/Errors';
|
||||
import PermissionServiceHandler from './Service/Permissions';
|
||||
import AuthenticationServiceHandler from './Service/Authentication';
|
||||
import PageNotFoundServiceHandler from './Service/PageNotFound';
|
||||
import ModelServiceHandler from './Service/Model';
|
||||
import PaginationServiceHandler from './Service/Pagination';
|
||||
import StatusServiceHandler from './Service/Status';
|
||||
import DataTypeServiceHandler from './Service/DataType';
|
||||
import Dictionary from 'Common/Types/Dictionary';
|
||||
import { StaticPath } from './Utils/Config';
|
||||
import FeatureSet from 'CommonServer/Types/FeatureSet';
|
||||
|
||||
const APIReferenceFeatureSet: FeatureSet = {
|
||||
init: async (): Promise<void> => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { ExpressRequest, ExpressResponse } from 'CommonServer/Utils/Express';
|
||||
import ResourceUtil, { ModelDocumentation } from '../Utils/Resources';
|
||||
import { ViewsPath } from '../Utils/Config';
|
||||
import ResourceUtil, { ModelDocumentation } from '../Utils/Resources';
|
||||
import { ExpressRequest, ExpressResponse } from 'CommonServer/Utils/Express';
|
||||
|
||||
const Resources: Array<ModelDocumentation> = ResourceUtil.getResources();
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { CodeExamplesPath, ViewsPath } from '../Utils/Config';
|
||||
import ResourceUtil, { ModelDocumentation } from '../Utils/Resources';
|
||||
import LocalCache from 'CommonServer/Infrastructure/LocalCache';
|
||||
import { ExpressRequest, ExpressResponse } from 'CommonServer/Utils/Express';
|
||||
import LocalFile from 'CommonServer/Utils/LocalFile';
|
||||
import ResourceUtil, { ModelDocumentation } from '../Utils/Resources';
|
||||
import { CodeExamplesPath, ViewsPath } from '../Utils/Config';
|
||||
|
||||
const Resources: Array<ModelDocumentation> = ResourceUtil.getResources();
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { ExpressRequest, ExpressResponse } from 'CommonServer/Utils/Express';
|
||||
import ResourceUtil, { ModelDocumentation } from '../Utils/Resources';
|
||||
import { ViewsPath } from '../Utils/Config';
|
||||
import ResourceUtil, { ModelDocumentation } from '../Utils/Resources';
|
||||
import { ExpressRequest, ExpressResponse } from 'CommonServer/Utils/Express';
|
||||
|
||||
const Resources: Array<ModelDocumentation> = ResourceUtil.getResources();
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { ExpressRequest, ExpressResponse } from 'CommonServer/Utils/Express';
|
||||
import ResourceUtil, { ModelDocumentation } from '../Utils/Resources';
|
||||
import { ViewsPath } from '../Utils/Config';
|
||||
import ResourceUtil, { ModelDocumentation } from '../Utils/Resources';
|
||||
import { ExpressRequest, ExpressResponse } from 'CommonServer/Utils/Express';
|
||||
|
||||
const Resources: Array<ModelDocumentation> = ResourceUtil.getResources();
|
||||
const FeaturedResources: Array<ModelDocumentation> =
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
import { CodeExamplesPath, ViewsPath } from '../Utils/Config';
|
||||
import ResourceUtil, { ModelDocumentation } from '../Utils/Resources';
|
||||
import PageNotFoundServiceHandler from './PageNotFound';
|
||||
import { AppApiRoute } from 'Common/ServiceRoute';
|
||||
import { ColumnAccessControl } from 'Common/Types/BaseDatabase/AccessControl';
|
||||
import { getTableColumns } from 'Common/Types/Database/TableColumn';
|
||||
import Dictionary from 'Common/Types/Dictionary';
|
||||
@@ -6,13 +10,9 @@ import Permission, {
|
||||
PermissionHelper,
|
||||
PermissionProps,
|
||||
} from 'Common/Types/Permission';
|
||||
import { AppApiRoute } from 'Common/ServiceRoute';
|
||||
import LocalCache from 'CommonServer/Infrastructure/LocalCache';
|
||||
import { ExpressRequest, ExpressResponse } from 'CommonServer/Utils/Express';
|
||||
import LocalFile from 'CommonServer/Utils/LocalFile';
|
||||
import ResourceUtil, { ModelDocumentation } from '../Utils/Resources';
|
||||
import PageNotFoundServiceHandler from './PageNotFound';
|
||||
import { CodeExamplesPath, ViewsPath } from '../Utils/Config';
|
||||
|
||||
const Resources: Array<ModelDocumentation> = ResourceUtil.getResources();
|
||||
const ResourceDictionary: Dictionary<ModelDocumentation> =
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { ExpressRequest, ExpressResponse } from 'CommonServer/Utils/Express';
|
||||
import ResourceUtil, { ModelDocumentation } from '../Utils/Resources';
|
||||
import { ViewsPath } from '../Utils/Config';
|
||||
import ResourceUtil, { ModelDocumentation } from '../Utils/Resources';
|
||||
import { ExpressRequest, ExpressResponse } from 'CommonServer/Utils/Express';
|
||||
|
||||
const Resources: Array<ModelDocumentation> = ResourceUtil.getResources();
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { ExpressRequest, ExpressResponse } from 'CommonServer/Utils/Express';
|
||||
import ResourceUtil, { ModelDocumentation } from '../Utils/Resources';
|
||||
import LocalFile from 'CommonServer/Utils/LocalFile';
|
||||
import LocalCache from 'CommonServer/Infrastructure/LocalCache';
|
||||
import { CodeExamplesPath, ViewsPath } from '../Utils/Config';
|
||||
import ResourceUtil, { ModelDocumentation } from '../Utils/Resources';
|
||||
import LocalCache from 'CommonServer/Infrastructure/LocalCache';
|
||||
import { ExpressRequest, ExpressResponse } from 'CommonServer/Utils/Express';
|
||||
import LocalFile from 'CommonServer/Utils/LocalFile';
|
||||
|
||||
const Resources: Array<ModelDocumentation> = ResourceUtil.getResources();
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { ViewsPath } from '../Utils/Config';
|
||||
import ResourceUtil, { ModelDocumentation } from '../Utils/Resources';
|
||||
import { PermissionHelper, PermissionProps } from 'Common/Types/Permission';
|
||||
import { ExpressRequest, ExpressResponse } from 'CommonServer/Utils/Express';
|
||||
import ResourceUtil, { ModelDocumentation } from '../Utils/Resources';
|
||||
import { ViewsPath } from '../Utils/Config';
|
||||
|
||||
const Resources: Array<ModelDocumentation> = ResourceUtil.getResources();
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { ExpressRequest, ExpressResponse } from 'CommonServer/Utils/Express';
|
||||
import ResourceUtil, { ModelDocumentation } from '../Utils/Resources';
|
||||
import { ViewsPath } from '../Utils/Config';
|
||||
import ResourceUtil, { ModelDocumentation } from '../Utils/Resources';
|
||||
import { ExpressRequest, ExpressResponse } from 'CommonServer/Utils/Express';
|
||||
|
||||
const Resources: Array<ModelDocumentation> = ResourceUtil.getResources();
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import BaseModel from 'Common/Models/BaseModel';
|
||||
import Models from 'Model/Models/Index';
|
||||
import ArrayUtil from 'Common/Types/ArrayUtil';
|
||||
import Dictionary from 'Common/Types/Dictionary';
|
||||
import { IsBillingEnabled } from 'CommonServer/EnvironmentConfig';
|
||||
import Models from 'Model/Models/Index';
|
||||
|
||||
export interface ModelDocumentation {
|
||||
name: string;
|
||||
|
||||
@@ -1,453 +1,364 @@
|
||||
import User from 'Model/Models/User';
|
||||
import UserService, {
|
||||
Service as UserServiceType,
|
||||
} from 'CommonServer/Services/UserService';
|
||||
|
||||
import BillingPaymentMethodAPI from 'CommonServer/API/BillingPaymentMethodAPI';
|
||||
|
||||
import BaseAPI from 'CommonServer/API/BaseAPI';
|
||||
import BaseAnalyticsAPI from 'CommonServer/API/BaseAnalyticsAPI';
|
||||
import BillingInvoiceAPI from 'CommonServer/API/BillingInvoiceAPI';
|
||||
|
||||
import Express, { ExpressApplication } from 'CommonServer/Utils/Express';
|
||||
|
||||
import ProjectAPI from 'CommonServer/API/ProjectAPI';
|
||||
|
||||
import GlobalConfigAPI from 'CommonServer/API/GlobalConfigAPI';
|
||||
|
||||
import ShortLink from 'Model/Models/ShortLink';
|
||||
import ShortLinkService, {
|
||||
Service as ShortLinkServiceType,
|
||||
} from 'CommonServer/Services/ShortLinkService';
|
||||
|
||||
import IncidentOwnerTeam from 'Model/Models/IncidentOwnerTeam';
|
||||
import IncidentOwnerTeamService, {
|
||||
Service as IncidentOwnerTeamServiceType,
|
||||
} from 'CommonServer/Services/IncidentOwnerTeamService';
|
||||
|
||||
import StatusPageHistoryChartBarColorRule from 'Model/Models/StatusPageHistoryChartBarColorRule';
|
||||
import StatusPageHistoryChartBarColorRuleService, {
|
||||
Service as StatusPageHistoryChartBarColorRuleServiceType,
|
||||
} from 'CommonServer/Services/StatusPageHistoryChartBarColorRuleService';
|
||||
|
||||
import IncidentTemplate from 'Model/Models/IncidentTemplate';
|
||||
import IncidentTemplateService, {
|
||||
Service as IncidentTemplateServiceType,
|
||||
} from 'CommonServer/Services/IncidentTemplateService';
|
||||
|
||||
import IncidentNoteTemplate from 'Model/Models/IncidentNoteTemplate';
|
||||
import IncidentNoteTemplateService, {
|
||||
Service as IncidentNoteTemplateServiceType,
|
||||
} from 'CommonServer/Services/IncidentNoteTemplateService';
|
||||
|
||||
import ScheduledMaintenanceNoteTemplate from 'Model/Models/ScheduledMaintenanceNoteTemplate';
|
||||
import ScheduledMaintenanceNoteTemplateService, {
|
||||
Service as ScheduledMaintenanceNoteTemplateServiceType,
|
||||
} from 'CommonServer/Services/ScheduledMaintenanceNoteTemplateService';
|
||||
|
||||
import IncidentTemplateOwnerTeam from 'Model/Models/IncidentTemplateOwnerTeam';
|
||||
import IncidentTemplateOwnerTeamService, {
|
||||
Service as IncidentTemplateOwnerTeamServiceType,
|
||||
} from 'CommonServer/Services/IncidentTemplateOwnerTeamService';
|
||||
|
||||
import IncidentTemplateOwnerUser from 'Model/Models/IncidentTemplateOwnerUser';
|
||||
import IncidentTemplateOwnerUserService, {
|
||||
Service as IncidentTemplateOwnerUserServiceType,
|
||||
} from 'CommonServer/Services/IncidentTemplateOwnerUserService';
|
||||
|
||||
import MonitorOwnerTeam from 'Model/Models/MonitorOwnerTeam';
|
||||
import MonitorOwnerTeamService, {
|
||||
Service as MonitorOwnerTeamServiceType,
|
||||
} from 'CommonServer/Services/MonitorOwnerTeamService';
|
||||
|
||||
import StatusPageOwnerTeam from 'Model/Models/StatusPageOwnerTeam';
|
||||
import StatusPageOwnerTeamService, {
|
||||
Service as StatusPageOwnerTeamServiceType,
|
||||
} from 'CommonServer/Services/StatusPageOwnerTeamService';
|
||||
|
||||
import ScheduledMaintenanceOwnerTeam from 'Model/Models/ScheduledMaintenanceOwnerTeam';
|
||||
import ScheduledMaintenanceOwnerTeamService, {
|
||||
Service as ScheduledMaintenanceOwnerTeamServiceType,
|
||||
} from 'CommonServer/Services/ScheduledMaintenanceOwnerTeamService';
|
||||
|
||||
import IncidentOwnerUser from 'Model/Models/IncidentOwnerUser';
|
||||
import IncidentOwnerUserService, {
|
||||
Service as IncidentOwnerUserServiceType,
|
||||
} from 'CommonServer/Services/IncidentOwnerUserService';
|
||||
|
||||
import MonitorOwnerUser from 'Model/Models/MonitorOwnerUser';
|
||||
import MonitorOwnerUserService, {
|
||||
Service as MonitorOwnerUserServiceType,
|
||||
} from 'CommonServer/Services/MonitorOwnerUserService';
|
||||
|
||||
import StatusPageOwnerUser from 'Model/Models/StatusPageOwnerUser';
|
||||
import StatusPageOwnerUserService, {
|
||||
Service as StatusPageOwnerUserServiceType,
|
||||
} from 'CommonServer/Services/StatusPageOwnerUserService';
|
||||
|
||||
import ScheduledMaintenanceOwnerUser from 'Model/Models/ScheduledMaintenanceOwnerUser';
|
||||
import ScheduledMaintenanceOwnerUserService, {
|
||||
Service as ScheduledMaintenanceOwnerUserServiceType,
|
||||
} from 'CommonServer/Services/ScheduledMaintenanceOwnerUserService';
|
||||
|
||||
import Workflow from 'Model/Models/Workflow';
|
||||
import WorkflowService, {
|
||||
Service as WorkflowServiceType,
|
||||
} from 'CommonServer/Services/WorkflowService';
|
||||
|
||||
import WorkflowLog from 'Model/Models/WorkflowLog';
|
||||
import WorkflowLogService, {
|
||||
Service as WorkflowLogServiceType,
|
||||
} from 'CommonServer/Services/WorkflowLogService';
|
||||
|
||||
import ProjectSsoAPI from 'CommonServer/API/ProjectSSO';
|
||||
|
||||
import SmsLog from 'Model/Models/SmsLog';
|
||||
import SmsLogService, {
|
||||
Service as SmsLogServiceType,
|
||||
} from 'CommonServer/Services/SmsLogService';
|
||||
|
||||
import EmailLog from 'Model/Models/EmailLog';
|
||||
import EmailLogService, {
|
||||
Service as EmailLogServiceType,
|
||||
} from 'CommonServer/Services/EmailLogService';
|
||||
|
||||
import Reseller from 'Model/Models/Reseller';
|
||||
import ResellerService, {
|
||||
Service as ResellerServiceType,
|
||||
} from 'CommonServer/Services/ResellerService';
|
||||
|
||||
import CallLog from 'Model/Models/CallLog';
|
||||
import CallLogService, {
|
||||
Service as CallLogServiceType,
|
||||
} from 'CommonServer/Services/CallLogService';
|
||||
|
||||
import StatusPageSSO from 'Model/Models/StatusPageSso';
|
||||
import StatusPageSSOService, {
|
||||
Service as StatusPageSSOServiceType,
|
||||
} from 'CommonServer/Services/StatusPageSsoService';
|
||||
|
||||
import WorkflowVariable from 'Model/Models/WorkflowVariable';
|
||||
import WorkflowVariableService, {
|
||||
Service as WorkflowVariableServiceType,
|
||||
} from 'CommonServer/Services/WorkflowVariableService';
|
||||
|
||||
import TelemetryService from 'Model/Models/TelemetryService';
|
||||
import TelemetryServiceService, {
|
||||
Service as TelemetryServiceServiceType,
|
||||
} from 'CommonServer/Services/TelemetryServiceService';
|
||||
|
||||
import MonitorProbe from 'Model/Models/MonitorProbe';
|
||||
import MonitorProbeService, {
|
||||
Service as MonitorProbeServiceType,
|
||||
} from 'CommonServer/Services/MonitorProbeService';
|
||||
|
||||
import StatusPagePrivateUser from 'Model/Models/StatusPagePrivateUser';
|
||||
import StatusPagePrivateUserService, {
|
||||
Service as StatusPagePrivateUserServiceType,
|
||||
} from 'CommonServer/Services/StatusPagePrivateUserService';
|
||||
|
||||
import StatusPageFooterLink from 'Model/Models/StatusPageFooterLink';
|
||||
import StatusPageFooterLinkService, {
|
||||
Service as StatusPageFooterLinkServiceType,
|
||||
} from 'CommonServer/Services/StatusPageFooterLinkService';
|
||||
|
||||
import StatusPageHeaderLink from 'Model/Models/StatusPageHeaderLink';
|
||||
import StatusPageHeaderLinkService, {
|
||||
Service as StatusPageHeaderLinkServiceType,
|
||||
} from 'CommonServer/Services/StatusPageHeaderLinkService';
|
||||
|
||||
import BillingPaymentMethodAPI from 'CommonServer/API/BillingPaymentMethodAPI';
|
||||
import FileAPI from 'CommonServer/API/FileAPI';
|
||||
|
||||
import UserNotificationRule from 'Model/Models/UserNotificationRule';
|
||||
import UserNotificationRuleService, {
|
||||
Service as UserNotificationRuleServiceType,
|
||||
} from 'CommonServer/Services/UserNotificationRuleService';
|
||||
|
||||
import StatusPageAnnouncement from 'Model/Models/StatusPageAnnouncement';
|
||||
import StatusPageAnnouncementService, {
|
||||
Service as StatusPageAnnouncementServiceType,
|
||||
} from 'CommonServer/Services/StatusPageAnnouncementService';
|
||||
|
||||
import EmailVerificationToken from 'Model/Models/EmailVerificationToken';
|
||||
import EmailVerificationTokenService, {
|
||||
Service as EmailVerificationTokenServiceType,
|
||||
} from 'CommonServer/Services/EmailVerificationTokenService';
|
||||
|
||||
import Team from 'Model/Models/Team';
|
||||
import TeamService, {
|
||||
Service as TeamServiceType,
|
||||
} from 'CommonServer/Services/TeamService';
|
||||
|
||||
import TeamMember from 'Model/Models/TeamMember';
|
||||
import TeamMemberService, {
|
||||
TeamMemberService as TeamMemberServiceType,
|
||||
} from 'CommonServer/Services/TeamMemberService';
|
||||
|
||||
import TeamPermission from 'Model/Models/TeamPermission';
|
||||
import TeamPermissionService, {
|
||||
Service as TeamPermissionServiceType,
|
||||
} from 'CommonServer/Services/TeamPermissionService';
|
||||
|
||||
import Label from 'Model/Models/Label';
|
||||
import LabelService, {
|
||||
Service as LabelServiceType,
|
||||
} from 'CommonServer/Services/LabelService';
|
||||
|
||||
import ProjectSmtpConfig from 'Model/Models/ProjectSmtpConfig';
|
||||
import ProjectSmtpConfigService, {
|
||||
Service as ProjectSMTPConfigServiceType,
|
||||
} from 'CommonServer/Services/ProjectSmtpConfigService';
|
||||
|
||||
import ApiKey from 'Model/Models/ApiKey';
|
||||
import ApiKeyService, {
|
||||
Service as ApiKeyServiceType,
|
||||
} from 'CommonServer/Services/ApiKeyService';
|
||||
|
||||
import ApiKeyPermission from 'Model/Models/ApiKeyPermission';
|
||||
import GlobalConfigAPI from 'CommonServer/API/GlobalConfigAPI';
|
||||
import MonitorGroupAPI from 'CommonServer/API/MonitorGroupAPI';
|
||||
import NotificationAPI from 'CommonServer/API/NotificationAPI';
|
||||
import Ingestor from 'CommonServer/API/ProbeAPI';
|
||||
import ProjectAPI from 'CommonServer/API/ProjectAPI';
|
||||
import ProjectSsoAPI from 'CommonServer/API/ProjectSSO';
|
||||
// Import API
|
||||
import ResellerPlanAPI from 'CommonServer/API/ResellerPlanAPI';
|
||||
import ShortLinkAPI from 'CommonServer/API/ShortLinkAPI';
|
||||
import StatusPageAPI from 'CommonServer/API/StatusPageAPI';
|
||||
import StatusPageDomainAPI from 'CommonServer/API/StatusPageDomainAPI';
|
||||
import StatusPageSubscriberAPI from 'CommonServer/API/StatusPageSubscriberAPI';
|
||||
import UserCallAPI from 'CommonServer/API/UserCallAPI';
|
||||
// User Notification methods.
|
||||
import UserEmailAPI from 'CommonServer/API/UserEmailAPI';
|
||||
import UserNotificationLogTimelineAPI from 'CommonServer/API/UserOnCallLogTimelineAPI';
|
||||
import UserSMSAPI from 'CommonServer/API/UserSmsAPI';
|
||||
import ApiKeyPermissionService, {
|
||||
Service as ApiKeyPermissionServiceType,
|
||||
} from 'CommonServer/Services/ApiKeyPermissionService';
|
||||
|
||||
import Monitor from 'Model/Models/Monitor';
|
||||
import MonitorService, {
|
||||
Service as MonitorServiceType,
|
||||
} from 'CommonServer/Services/MonitorService';
|
||||
|
||||
import OnCallDutyPolicy from 'Model/Models/OnCallDutyPolicy';
|
||||
import OnCallDutyPolicyService, {
|
||||
Service as OnCallDutyPolicyServiceType,
|
||||
} from 'CommonServer/Services/OnCallDutyPolicyService';
|
||||
|
||||
import MonitorStatus from 'Model/Models/MonitorStatus';
|
||||
import MonitorStatusService, {
|
||||
Service as MonitorStatusServiceType,
|
||||
} from 'CommonServer/Services/MonitorStatusService';
|
||||
|
||||
import MonitorTimelineStatus from 'Model/Models/MonitorStatusTimeline';
|
||||
import MonitorTimelineStatusService, {
|
||||
Service as MonitorTimelineStatusServiceType,
|
||||
} from 'CommonServer/Services/MonitorStatusTimelineService';
|
||||
|
||||
import ScheduledMaintenanceState from 'Model/Models/ScheduledMaintenanceState';
|
||||
import ScheduledMaintenanceStateService, {
|
||||
Service as ScheduledMaintenanceStateServiceType,
|
||||
} from 'CommonServer/Services/ScheduledMaintenanceStateService';
|
||||
|
||||
import ScheduledMaintenance from 'Model/Models/ScheduledMaintenance';
|
||||
import ScheduledMaintenanceService, {
|
||||
Service as ScheduledMaintenanceServiceType,
|
||||
} from 'CommonServer/Services/ScheduledMaintenanceService';
|
||||
|
||||
import ScheduledMaintenanceStateTimeline from 'Model/Models/ScheduledMaintenanceStateTimeline';
|
||||
import ScheduledMaintenanceStateTimelineService, {
|
||||
Service as ScheduledMaintenanceStateTimelineServiceType,
|
||||
} from 'CommonServer/Services/ScheduledMaintenanceStateTimelineService';
|
||||
|
||||
import ScheduledMaintenanceInternalNote from 'Model/Models/ScheduledMaintenanceInternalNote';
|
||||
import ScheduledMaintenanceInternalNoteService, {
|
||||
Service as ScheduledMaintenanceInternalNoteServiceType,
|
||||
} from 'CommonServer/Services/ScheduledMaintenanceInternalNoteService';
|
||||
|
||||
import ScheduledMaintenancePublicNote from 'Model/Models/ScheduledMaintenancePublicNote';
|
||||
import ScheduledMaintenancePublicNoteService, {
|
||||
Service as ScheduledMaintenancePublicNoteServiceType,
|
||||
} from 'CommonServer/Services/ScheduledMaintenancePublicNoteService';
|
||||
|
||||
import IncidentState from 'Model/Models/IncidentState';
|
||||
import IncidentStateService, {
|
||||
Service as IncidentStateServiceType,
|
||||
} from 'CommonServer/Services/IncidentStateService';
|
||||
|
||||
import Incident from 'Model/Models/Incident';
|
||||
import IncidentService, {
|
||||
Service as IncidentServiceType,
|
||||
} from 'CommonServer/Services/IncidentService';
|
||||
|
||||
import IncidentStateTimeline from 'Model/Models/IncidentStateTimeline';
|
||||
import IncidentStateTimelineService, {
|
||||
Service as IncidentStateTimelineServiceType,
|
||||
} from 'CommonServer/Services/IncidentStateTimelineService';
|
||||
|
||||
import IncidentInternalNote from 'Model/Models/IncidentInternalNote';
|
||||
import IncidentInternalNoteService, {
|
||||
Service as IncidentInternalNoteServiceType,
|
||||
} from 'CommonServer/Services/IncidentInternalNoteService';
|
||||
|
||||
import IncidentPublicNote from 'Model/Models/IncidentPublicNote';
|
||||
import IncidentPublicNoteService, {
|
||||
Service as IncidentPublicNoteServiceType,
|
||||
} from 'CommonServer/Services/IncidentPublicNoteService';
|
||||
|
||||
import Domain from 'Model/Models/Domain';
|
||||
import ApiKeyService, {
|
||||
Service as ApiKeyServiceType,
|
||||
} from 'CommonServer/Services/ApiKeyService';
|
||||
import CallLogService, {
|
||||
Service as CallLogServiceType,
|
||||
} from 'CommonServer/Services/CallLogService';
|
||||
import DomainService, {
|
||||
Service as DomainServiceType,
|
||||
} from 'CommonServer/Services/DomainService';
|
||||
|
||||
import StatusPageGroup from 'Model/Models/StatusPageGroup';
|
||||
import StatusPageGroupService, {
|
||||
Service as StatusPageGroupServiceType,
|
||||
} from 'CommonServer/Services/StatusPageGroupService';
|
||||
|
||||
import StatusPageResource from 'Model/Models/StatusPageResource';
|
||||
import StatusPageResourceService, {
|
||||
Service as StatusPageResourceServiceType,
|
||||
} from 'CommonServer/Services/StatusPageResourceService';
|
||||
|
||||
import IncidentSeverity from 'Model/Models/IncidentSeverity';
|
||||
import IncidentSeverityService, {
|
||||
Service as IncidentSeverityServiceType,
|
||||
} from 'CommonServer/Services/IncidentSeverityService';
|
||||
|
||||
import StatusPageDomain from 'Model/Models/StatusPageDomain';
|
||||
import StatusPageDomainService, {
|
||||
Service as StatusPageDomainServiceType,
|
||||
} from 'CommonServer/Services/StatusPageDomainService';
|
||||
|
||||
// User Notification methods.
|
||||
import UserEmailAPI from 'CommonServer/API/UserEmailAPI';
|
||||
import UserSMSAPI from 'CommonServer/API/UserSmsAPI';
|
||||
import UserCallAPI from 'CommonServer/API/UserCallAPI';
|
||||
|
||||
// Import API
|
||||
import ResellerPlanAPI from 'CommonServer/API/ResellerPlanAPI';
|
||||
import StatusPageAPI from 'CommonServer/API/StatusPageAPI';
|
||||
import ShortLinkAPI from 'CommonServer/API/ShortLinkAPI';
|
||||
import NotificationAPI from 'CommonServer/API/NotificationAPI';
|
||||
import MonitorGroupAPI from 'CommonServer/API/MonitorGroupAPI';
|
||||
|
||||
import Ingestor from 'CommonServer/API/ProbeAPI';
|
||||
|
||||
import StatusPageSubscriberAPI from 'CommonServer/API/StatusPageSubscriberAPI';
|
||||
|
||||
// Custom Fields API
|
||||
import StatusPageCustomField from 'Model/Models/StatusPageCustomField';
|
||||
import StatusPageCustomFieldService, {
|
||||
Service as StatusPageCustomFieldServiceType,
|
||||
} from 'CommonServer/Services/StatusPageCustomFieldService';
|
||||
|
||||
import MonitorCustomField from 'Model/Models/MonitorCustomField';
|
||||
import MonitorCustomFieldService, {
|
||||
Service as MonitorCustomFieldServiceType,
|
||||
} from 'CommonServer/Services/MonitorCustomFieldService';
|
||||
|
||||
import IncidentCustomField from 'Model/Models/IncidentCustomField';
|
||||
import EmailLogService, {
|
||||
Service as EmailLogServiceType,
|
||||
} from 'CommonServer/Services/EmailLogService';
|
||||
import EmailVerificationTokenService, {
|
||||
Service as EmailVerificationTokenServiceType,
|
||||
} from 'CommonServer/Services/EmailVerificationTokenService';
|
||||
import IncidentCustomFieldService, {
|
||||
Service as IncidentCustomFieldServiceType,
|
||||
} from 'CommonServer/Services/IncidentCustomFieldService';
|
||||
|
||||
import OnCallDutyPolicySchedule from 'Model/Models/OnCallDutyPolicySchedule';
|
||||
import OnCallDutyPolicyScheduleService, {
|
||||
Service as OnCallDutyPolicyScheduleServiceType,
|
||||
} from 'CommonServer/Services/OnCallDutyPolicyScheduleService';
|
||||
|
||||
import OnCallDutyPolicyScheduleLayer from 'Model/Models/OnCallDutyPolicyScheduleLayer';
|
||||
import OnCallDutyPolicyScheduleLayerService, {
|
||||
Service as OnCallDutyPolicyScheduleLayerServiceType,
|
||||
} from 'CommonServer/Services/OnCallDutyPolicyScheduleLayerService';
|
||||
|
||||
import OnCallDutyPolicyScheduleLayerUser from 'Model/Models/OnCallDutyPolicyScheduleLayerUser';
|
||||
import OnCallDutyPolicyScheduleLayerUserService, {
|
||||
Service as OnCallDutyPolicyScheduleLayerUserServiceType,
|
||||
} from 'CommonServer/Services/OnCallDutyPolicyScheduleLayerUserService';
|
||||
|
||||
import OnCallDutyPolicyExecutionLogTimeline from 'Model/Models/OnCallDutyPolicyExecutionLogTimeline';
|
||||
import OnCallDutyPolicyExecutionLogTimelineService, {
|
||||
Service as OnCallDutyPolicyExecutionLogTimelineServiceType,
|
||||
} from 'CommonServer/Services/OnCallDutyPolicyExecutionLogTimelineService';
|
||||
|
||||
import ScheduledMaintenanceCustomField from 'Model/Models/ScheduledMaintenanceCustomField';
|
||||
import ScheduledMaintenanceCustomFieldService, {
|
||||
Service as ScheduledMaintenanceCustomFieldServiceType,
|
||||
} from 'CommonServer/Services/ScheduledMaintenanceCustomFieldService';
|
||||
|
||||
import OnCallDutyPolicyExecutionLog from 'Model/Models/OnCallDutyPolicyExecutionLog';
|
||||
import OnCallDutyPolicyExecutionLogService, {
|
||||
Service as OnCallDutyPolicyExecutionLogServiceType,
|
||||
} from 'CommonServer/Services/OnCallDutyPolicyExecutionLogService';
|
||||
|
||||
import PromoCode from 'Model/Models/PromoCode';
|
||||
import PromoCodeService, {
|
||||
Service as PromoCodeServiceType,
|
||||
} from 'CommonServer/Services/PromoCodeService';
|
||||
|
||||
import OnCallDutyPolicyEscalationRule from 'Model/Models/OnCallDutyPolicyEscalationRule';
|
||||
import OnCallDutyPolicyEscalationRuleService, {
|
||||
Service as OnCallDutyPolicyEscalationRuleServiceType,
|
||||
} from 'CommonServer/Services/OnCallDutyPolicyEscalationRuleService';
|
||||
|
||||
import OnCallDutyPolicyEscalationRuleTeam from 'Model/Models/OnCallDutyPolicyEscalationRuleTeam';
|
||||
import OnCallDutyPolicyEscalationRuleTeamService, {
|
||||
Service as OnCallDutyPolicyEscalationRuleTeamServiceType,
|
||||
} from 'CommonServer/Services/OnCallDutyPolicyEscalationRuleTeamService';
|
||||
|
||||
import OnCallDutyPolicyEscalationRuleSchedule from 'Model/Models/OnCallDutyPolicyEscalationRuleSchedule';
|
||||
import OnCallDutyPolicyEscalationRuleScheduleService, {
|
||||
Service as OnCallDutyPolicyEscalationRuleScheduleServiceType,
|
||||
} from 'CommonServer/Services/OnCallDutyPolicyEscalationRuleScheduleService';
|
||||
|
||||
import OnCallDutyPolicyEscalationRuleUser from 'Model/Models/OnCallDutyPolicyEscalationRuleUser';
|
||||
import OnCallDutyPolicyEscalationRuleUserService, {
|
||||
Service as OnCallDutyPolicyEscalationRuleUserServiceType,
|
||||
} from 'CommonServer/Services/OnCallDutyPolicyEscalationRuleUserService';
|
||||
|
||||
import OnCallDutyPolicyCustomField from 'Model/Models/OnCallDutyPolicyCustomField';
|
||||
import OnCallDutyPolicyCustomFieldService, {
|
||||
Service as OnCallDutyPolicyCustomFieldServiceType,
|
||||
} from 'CommonServer/Services/OnCallDutyPolicyCustomFieldService';
|
||||
|
||||
import UserNotificationLogTimelineAPI from 'CommonServer/API/UserOnCallLogTimelineAPI';
|
||||
|
||||
import UserOnCallLog from 'Model/Models/UserOnCallLog';
|
||||
import UserOnCallLogService, {
|
||||
Service as UserNotificationLogServiceType,
|
||||
} from 'CommonServer/Services/UserOnCallLogService';
|
||||
|
||||
import UserNotificationSetting from 'Model/Models/UserNotificationSetting';
|
||||
import UserNotificationSettingService, {
|
||||
Service as UserNotificationSettingServiceType,
|
||||
} from 'CommonServer/Services/UserNotificationSettingService';
|
||||
|
||||
import MonitorGroupOwnerUser from 'Model/Models/MonitorGroupOwnerUser';
|
||||
import MonitorGroupOwnerUserService, {
|
||||
Service as MonitorGroupOwnerUserServiceType,
|
||||
} from 'CommonServer/Services/MonitorGroupOwnerUserService';
|
||||
|
||||
import MonitorGroupOwnerTeam from 'Model/Models/MonitorGroupOwnerTeam';
|
||||
import MonitorGroupOwnerTeamService, {
|
||||
Service as MonitorGroupOwnerTeamServiceType,
|
||||
} from 'CommonServer/Services/MonitorGroupOwnerTeamService';
|
||||
|
||||
import MonitorGroupResource from 'Model/Models/MonitorGroupResource';
|
||||
import MonitorGroupResourceService, {
|
||||
Service as MonitorGroupResourceServiceType,
|
||||
} from 'CommonServer/Services/MonitorGroupResourceService';
|
||||
|
||||
import Log from 'Model/AnalyticsModels/Log';
|
||||
import IncidentInternalNoteService, {
|
||||
Service as IncidentInternalNoteServiceType,
|
||||
} from 'CommonServer/Services/IncidentInternalNoteService';
|
||||
import IncidentNoteTemplateService, {
|
||||
Service as IncidentNoteTemplateServiceType,
|
||||
} from 'CommonServer/Services/IncidentNoteTemplateService';
|
||||
import IncidentOwnerTeamService, {
|
||||
Service as IncidentOwnerTeamServiceType,
|
||||
} from 'CommonServer/Services/IncidentOwnerTeamService';
|
||||
import IncidentOwnerUserService, {
|
||||
Service as IncidentOwnerUserServiceType,
|
||||
} from 'CommonServer/Services/IncidentOwnerUserService';
|
||||
import IncidentPublicNoteService, {
|
||||
Service as IncidentPublicNoteServiceType,
|
||||
} from 'CommonServer/Services/IncidentPublicNoteService';
|
||||
import IncidentService, {
|
||||
Service as IncidentServiceType,
|
||||
} from 'CommonServer/Services/IncidentService';
|
||||
import IncidentSeverityService, {
|
||||
Service as IncidentSeverityServiceType,
|
||||
} from 'CommonServer/Services/IncidentSeverityService';
|
||||
import IncidentStateService, {
|
||||
Service as IncidentStateServiceType,
|
||||
} from 'CommonServer/Services/IncidentStateService';
|
||||
import IncidentStateTimelineService, {
|
||||
Service as IncidentStateTimelineServiceType,
|
||||
} from 'CommonServer/Services/IncidentStateTimelineService';
|
||||
import IncidentTemplateOwnerTeamService, {
|
||||
Service as IncidentTemplateOwnerTeamServiceType,
|
||||
} from 'CommonServer/Services/IncidentTemplateOwnerTeamService';
|
||||
import IncidentTemplateOwnerUserService, {
|
||||
Service as IncidentTemplateOwnerUserServiceType,
|
||||
} from 'CommonServer/Services/IncidentTemplateOwnerUserService';
|
||||
import IncidentTemplateService, {
|
||||
Service as IncidentTemplateServiceType,
|
||||
} from 'CommonServer/Services/IncidentTemplateService';
|
||||
import LabelService, {
|
||||
Service as LabelServiceType,
|
||||
} from 'CommonServer/Services/LabelService';
|
||||
import LogService, {
|
||||
LogService as LogServiceType,
|
||||
} from 'CommonServer/Services/LogService';
|
||||
|
||||
import MonitorMetricsByMinute from 'Model/AnalyticsModels/MonitorMetricsByMinute';
|
||||
import MetricService, {
|
||||
MetricService as MetricServiceType,
|
||||
} from 'CommonServer/Services/MetricService';
|
||||
import MonitorCustomFieldService, {
|
||||
Service as MonitorCustomFieldServiceType,
|
||||
} from 'CommonServer/Services/MonitorCustomFieldService';
|
||||
import MonitorGroupOwnerTeamService, {
|
||||
Service as MonitorGroupOwnerTeamServiceType,
|
||||
} from 'CommonServer/Services/MonitorGroupOwnerTeamService';
|
||||
import MonitorGroupOwnerUserService, {
|
||||
Service as MonitorGroupOwnerUserServiceType,
|
||||
} from 'CommonServer/Services/MonitorGroupOwnerUserService';
|
||||
import MonitorGroupResourceService, {
|
||||
Service as MonitorGroupResourceServiceType,
|
||||
} from 'CommonServer/Services/MonitorGroupResourceService';
|
||||
import MonitorMetricsByMinuteService, {
|
||||
MonitorMetricsByMinuteService as MonitorMetricsByMinuteServiceType,
|
||||
} from 'CommonServer/Services/MonitorMetricsByMinuteService';
|
||||
|
||||
import Span from 'Model/AnalyticsModels/Span';
|
||||
import SpanService, {
|
||||
SpanService as SpanServiceType,
|
||||
} from 'CommonServer/Services/SpanService';
|
||||
|
||||
import TelemetryUsageBilling from 'Model/Models/TelemetryUsageBilling';
|
||||
import TelemetryUsageBillingService, {
|
||||
Service as TelemetryUsageBillingServiceType,
|
||||
} from 'CommonServer/Services/TelemetryUsageBillingService';
|
||||
import BaseAPI from 'CommonServer/API/BaseAPI';
|
||||
import BaseAnalyticsAPI from 'CommonServer/API/BaseAnalyticsAPI';
|
||||
|
||||
import ProjectCallSMSConfig from 'Model/Models/ProjectCallSMSConfig';
|
||||
import MonitorOwnerTeamService, {
|
||||
Service as MonitorOwnerTeamServiceType,
|
||||
} from 'CommonServer/Services/MonitorOwnerTeamService';
|
||||
import MonitorOwnerUserService, {
|
||||
Service as MonitorOwnerUserServiceType,
|
||||
} from 'CommonServer/Services/MonitorOwnerUserService';
|
||||
import MonitorProbeService, {
|
||||
Service as MonitorProbeServiceType,
|
||||
} from 'CommonServer/Services/MonitorProbeService';
|
||||
import MonitorSecretService, {
|
||||
Service as MonitorSecretServiceType,
|
||||
} from 'CommonServer/Services/MonitorSecretService';
|
||||
import MonitorService, {
|
||||
Service as MonitorServiceType,
|
||||
} from 'CommonServer/Services/MonitorService';
|
||||
import MonitorStatusService, {
|
||||
Service as MonitorStatusServiceType,
|
||||
} from 'CommonServer/Services/MonitorStatusService';
|
||||
import MonitorTimelineStatusService, {
|
||||
Service as MonitorTimelineStatusServiceType,
|
||||
} from 'CommonServer/Services/MonitorStatusTimelineService';
|
||||
import OnCallDutyPolicyCustomFieldService, {
|
||||
Service as OnCallDutyPolicyCustomFieldServiceType,
|
||||
} from 'CommonServer/Services/OnCallDutyPolicyCustomFieldService';
|
||||
import OnCallDutyPolicyEscalationRuleScheduleService, {
|
||||
Service as OnCallDutyPolicyEscalationRuleScheduleServiceType,
|
||||
} from 'CommonServer/Services/OnCallDutyPolicyEscalationRuleScheduleService';
|
||||
import OnCallDutyPolicyEscalationRuleService, {
|
||||
Service as OnCallDutyPolicyEscalationRuleServiceType,
|
||||
} from 'CommonServer/Services/OnCallDutyPolicyEscalationRuleService';
|
||||
import OnCallDutyPolicyEscalationRuleTeamService, {
|
||||
Service as OnCallDutyPolicyEscalationRuleTeamServiceType,
|
||||
} from 'CommonServer/Services/OnCallDutyPolicyEscalationRuleTeamService';
|
||||
import OnCallDutyPolicyEscalationRuleUserService, {
|
||||
Service as OnCallDutyPolicyEscalationRuleUserServiceType,
|
||||
} from 'CommonServer/Services/OnCallDutyPolicyEscalationRuleUserService';
|
||||
import OnCallDutyPolicyExecutionLogService, {
|
||||
Service as OnCallDutyPolicyExecutionLogServiceType,
|
||||
} from 'CommonServer/Services/OnCallDutyPolicyExecutionLogService';
|
||||
import OnCallDutyPolicyExecutionLogTimelineService, {
|
||||
Service as OnCallDutyPolicyExecutionLogTimelineServiceType,
|
||||
} from 'CommonServer/Services/OnCallDutyPolicyExecutionLogTimelineService';
|
||||
import OnCallDutyPolicyScheduleLayerService, {
|
||||
Service as OnCallDutyPolicyScheduleLayerServiceType,
|
||||
} from 'CommonServer/Services/OnCallDutyPolicyScheduleLayerService';
|
||||
import OnCallDutyPolicyScheduleLayerUserService, {
|
||||
Service as OnCallDutyPolicyScheduleLayerUserServiceType,
|
||||
} from 'CommonServer/Services/OnCallDutyPolicyScheduleLayerUserService';
|
||||
import OnCallDutyPolicyScheduleService, {
|
||||
Service as OnCallDutyPolicyScheduleServiceType,
|
||||
} from 'CommonServer/Services/OnCallDutyPolicyScheduleService';
|
||||
import OnCallDutyPolicyService, {
|
||||
Service as OnCallDutyPolicyServiceType,
|
||||
} from 'CommonServer/Services/OnCallDutyPolicyService';
|
||||
import ProjectCallSMSConfigService, {
|
||||
Service as ProjectCallSMSConfigServiceType,
|
||||
} from 'CommonServer/Services/ProjectCallSMSConfigService';
|
||||
import ProjectSmtpConfigService, {
|
||||
Service as ProjectSMTPConfigServiceType,
|
||||
} from 'CommonServer/Services/ProjectSmtpConfigService';
|
||||
import PromoCodeService, {
|
||||
Service as PromoCodeServiceType,
|
||||
} from 'CommonServer/Services/PromoCodeService';
|
||||
import ResellerService, {
|
||||
Service as ResellerServiceType,
|
||||
} from 'CommonServer/Services/ResellerService';
|
||||
import ScheduledMaintenanceCustomFieldService, {
|
||||
Service as ScheduledMaintenanceCustomFieldServiceType,
|
||||
} from 'CommonServer/Services/ScheduledMaintenanceCustomFieldService';
|
||||
import ScheduledMaintenanceInternalNoteService, {
|
||||
Service as ScheduledMaintenanceInternalNoteServiceType,
|
||||
} from 'CommonServer/Services/ScheduledMaintenanceInternalNoteService';
|
||||
import ScheduledMaintenanceNoteTemplateService, {
|
||||
Service as ScheduledMaintenanceNoteTemplateServiceType,
|
||||
} from 'CommonServer/Services/ScheduledMaintenanceNoteTemplateService';
|
||||
import ScheduledMaintenanceOwnerTeamService, {
|
||||
Service as ScheduledMaintenanceOwnerTeamServiceType,
|
||||
} from 'CommonServer/Services/ScheduledMaintenanceOwnerTeamService';
|
||||
import ScheduledMaintenanceOwnerUserService, {
|
||||
Service as ScheduledMaintenanceOwnerUserServiceType,
|
||||
} from 'CommonServer/Services/ScheduledMaintenanceOwnerUserService';
|
||||
import ScheduledMaintenancePublicNoteService, {
|
||||
Service as ScheduledMaintenancePublicNoteServiceType,
|
||||
} from 'CommonServer/Services/ScheduledMaintenancePublicNoteService';
|
||||
import ScheduledMaintenanceService, {
|
||||
Service as ScheduledMaintenanceServiceType,
|
||||
} from 'CommonServer/Services/ScheduledMaintenanceService';
|
||||
import ScheduledMaintenanceStateService, {
|
||||
Service as ScheduledMaintenanceStateServiceType,
|
||||
} from 'CommonServer/Services/ScheduledMaintenanceStateService';
|
||||
import ScheduledMaintenanceStateTimelineService, {
|
||||
Service as ScheduledMaintenanceStateTimelineServiceType,
|
||||
} from 'CommonServer/Services/ScheduledMaintenanceStateTimelineService';
|
||||
import ShortLinkService, {
|
||||
Service as ShortLinkServiceType,
|
||||
} from 'CommonServer/Services/ShortLinkService';
|
||||
import SmsLogService, {
|
||||
Service as SmsLogServiceType,
|
||||
} from 'CommonServer/Services/SmsLogService';
|
||||
import SpanService, {
|
||||
SpanService as SpanServiceType,
|
||||
} from 'CommonServer/Services/SpanService';
|
||||
import StatusPageAnnouncementService, {
|
||||
Service as StatusPageAnnouncementServiceType,
|
||||
} from 'CommonServer/Services/StatusPageAnnouncementService';
|
||||
import StatusPageCustomFieldService, {
|
||||
Service as StatusPageCustomFieldServiceType,
|
||||
} from 'CommonServer/Services/StatusPageCustomFieldService';
|
||||
import StatusPageFooterLinkService, {
|
||||
Service as StatusPageFooterLinkServiceType,
|
||||
} from 'CommonServer/Services/StatusPageFooterLinkService';
|
||||
import StatusPageGroupService, {
|
||||
Service as StatusPageGroupServiceType,
|
||||
} from 'CommonServer/Services/StatusPageGroupService';
|
||||
import StatusPageHeaderLinkService, {
|
||||
Service as StatusPageHeaderLinkServiceType,
|
||||
} from 'CommonServer/Services/StatusPageHeaderLinkService';
|
||||
import StatusPageHistoryChartBarColorRuleService, {
|
||||
Service as StatusPageHistoryChartBarColorRuleServiceType,
|
||||
} from 'CommonServer/Services/StatusPageHistoryChartBarColorRuleService';
|
||||
import StatusPageOwnerTeamService, {
|
||||
Service as StatusPageOwnerTeamServiceType,
|
||||
} from 'CommonServer/Services/StatusPageOwnerTeamService';
|
||||
import StatusPageOwnerUserService, {
|
||||
Service as StatusPageOwnerUserServiceType,
|
||||
} from 'CommonServer/Services/StatusPageOwnerUserService';
|
||||
import StatusPagePrivateUserService, {
|
||||
Service as StatusPagePrivateUserServiceType,
|
||||
} from 'CommonServer/Services/StatusPagePrivateUserService';
|
||||
import StatusPageResourceService, {
|
||||
Service as StatusPageResourceServiceType,
|
||||
} from 'CommonServer/Services/StatusPageResourceService';
|
||||
import StatusPageSSOService, {
|
||||
Service as StatusPageSSOServiceType,
|
||||
} from 'CommonServer/Services/StatusPageSsoService';
|
||||
import TeamMemberService, {
|
||||
TeamMemberService as TeamMemberServiceType,
|
||||
} from 'CommonServer/Services/TeamMemberService';
|
||||
import TeamPermissionService, {
|
||||
Service as TeamPermissionServiceType,
|
||||
} from 'CommonServer/Services/TeamPermissionService';
|
||||
import TeamService, {
|
||||
Service as TeamServiceType,
|
||||
} from 'CommonServer/Services/TeamService';
|
||||
import TelemetryServiceService, {
|
||||
Service as TelemetryServiceServiceType,
|
||||
} from 'CommonServer/Services/TelemetryServiceService';
|
||||
import TelemetryUsageBillingService, {
|
||||
Service as TelemetryUsageBillingServiceType,
|
||||
} from 'CommonServer/Services/TelemetryUsageBillingService';
|
||||
import UserNotificationRuleService, {
|
||||
Service as UserNotificationRuleServiceType,
|
||||
} from 'CommonServer/Services/UserNotificationRuleService';
|
||||
import UserNotificationSettingService, {
|
||||
Service as UserNotificationSettingServiceType,
|
||||
} from 'CommonServer/Services/UserNotificationSettingService';
|
||||
import UserOnCallLogService, {
|
||||
Service as UserNotificationLogServiceType,
|
||||
} from 'CommonServer/Services/UserOnCallLogService';
|
||||
import UserService, {
|
||||
Service as UserServiceType,
|
||||
} from 'CommonServer/Services/UserService';
|
||||
import WorkflowLogService, {
|
||||
Service as WorkflowLogServiceType,
|
||||
} from 'CommonServer/Services/WorkflowLogService';
|
||||
import WorkflowService, {
|
||||
Service as WorkflowServiceType,
|
||||
} from 'CommonServer/Services/WorkflowService';
|
||||
import WorkflowVariableService, {
|
||||
Service as WorkflowVariableServiceType,
|
||||
} from 'CommonServer/Services/WorkflowVariableService';
|
||||
import FeatureSet from 'CommonServer/Types/FeatureSet';
|
||||
import Express, { ExpressApplication } from 'CommonServer/Utils/Express';
|
||||
import Log from 'Model/AnalyticsModels/Log';
|
||||
import Metric from 'Model/AnalyticsModels/Metric';
|
||||
import MonitorMetricsByMinute from 'Model/AnalyticsModels/MonitorMetricsByMinute';
|
||||
import Span from 'Model/AnalyticsModels/Span';
|
||||
import ApiKey from 'Model/Models/ApiKey';
|
||||
import ApiKeyPermission from 'Model/Models/ApiKeyPermission';
|
||||
import CallLog from 'Model/Models/CallLog';
|
||||
import Domain from 'Model/Models/Domain';
|
||||
import EmailLog from 'Model/Models/EmailLog';
|
||||
import EmailVerificationToken from 'Model/Models/EmailVerificationToken';
|
||||
import Incident from 'Model/Models/Incident';
|
||||
import IncidentCustomField from 'Model/Models/IncidentCustomField';
|
||||
import IncidentInternalNote from 'Model/Models/IncidentInternalNote';
|
||||
import IncidentNoteTemplate from 'Model/Models/IncidentNoteTemplate';
|
||||
import IncidentOwnerTeam from 'Model/Models/IncidentOwnerTeam';
|
||||
import IncidentOwnerUser from 'Model/Models/IncidentOwnerUser';
|
||||
import IncidentPublicNote from 'Model/Models/IncidentPublicNote';
|
||||
import IncidentSeverity from 'Model/Models/IncidentSeverity';
|
||||
import IncidentState from 'Model/Models/IncidentState';
|
||||
import IncidentStateTimeline from 'Model/Models/IncidentStateTimeline';
|
||||
import IncidentTemplate from 'Model/Models/IncidentTemplate';
|
||||
import IncidentTemplateOwnerTeam from 'Model/Models/IncidentTemplateOwnerTeam';
|
||||
import IncidentTemplateOwnerUser from 'Model/Models/IncidentTemplateOwnerUser';
|
||||
import Label from 'Model/Models/Label';
|
||||
import Monitor from 'Model/Models/Monitor';
|
||||
import MonitorCustomField from 'Model/Models/MonitorCustomField';
|
||||
import MonitorGroupOwnerTeam from 'Model/Models/MonitorGroupOwnerTeam';
|
||||
import MonitorGroupOwnerUser from 'Model/Models/MonitorGroupOwnerUser';
|
||||
import MonitorGroupResource from 'Model/Models/MonitorGroupResource';
|
||||
import MonitorOwnerTeam from 'Model/Models/MonitorOwnerTeam';
|
||||
import MonitorOwnerUser from 'Model/Models/MonitorOwnerUser';
|
||||
import MonitorProbe from 'Model/Models/MonitorProbe';
|
||||
import MonitorSecret from 'Model/Models/MonitorSecret';
|
||||
import MonitorStatus from 'Model/Models/MonitorStatus';
|
||||
import MonitorTimelineStatus from 'Model/Models/MonitorStatusTimeline';
|
||||
import OnCallDutyPolicy from 'Model/Models/OnCallDutyPolicy';
|
||||
import OnCallDutyPolicyCustomField from 'Model/Models/OnCallDutyPolicyCustomField';
|
||||
import OnCallDutyPolicyEscalationRule from 'Model/Models/OnCallDutyPolicyEscalationRule';
|
||||
import OnCallDutyPolicyEscalationRuleSchedule from 'Model/Models/OnCallDutyPolicyEscalationRuleSchedule';
|
||||
import OnCallDutyPolicyEscalationRuleTeam from 'Model/Models/OnCallDutyPolicyEscalationRuleTeam';
|
||||
import OnCallDutyPolicyEscalationRuleUser from 'Model/Models/OnCallDutyPolicyEscalationRuleUser';
|
||||
import OnCallDutyPolicyExecutionLog from 'Model/Models/OnCallDutyPolicyExecutionLog';
|
||||
import OnCallDutyPolicyExecutionLogTimeline from 'Model/Models/OnCallDutyPolicyExecutionLogTimeline';
|
||||
import OnCallDutyPolicySchedule from 'Model/Models/OnCallDutyPolicySchedule';
|
||||
import OnCallDutyPolicyScheduleLayer from 'Model/Models/OnCallDutyPolicyScheduleLayer';
|
||||
import OnCallDutyPolicyScheduleLayerUser from 'Model/Models/OnCallDutyPolicyScheduleLayerUser';
|
||||
import ProjectCallSMSConfig from 'Model/Models/ProjectCallSMSConfig';
|
||||
import ProjectSmtpConfig from 'Model/Models/ProjectSmtpConfig';
|
||||
import PromoCode from 'Model/Models/PromoCode';
|
||||
import Reseller from 'Model/Models/Reseller';
|
||||
import ScheduledMaintenance from 'Model/Models/ScheduledMaintenance';
|
||||
import ScheduledMaintenanceCustomField from 'Model/Models/ScheduledMaintenanceCustomField';
|
||||
import ScheduledMaintenanceInternalNote from 'Model/Models/ScheduledMaintenanceInternalNote';
|
||||
import ScheduledMaintenanceNoteTemplate from 'Model/Models/ScheduledMaintenanceNoteTemplate';
|
||||
import ScheduledMaintenanceOwnerTeam from 'Model/Models/ScheduledMaintenanceOwnerTeam';
|
||||
import ScheduledMaintenanceOwnerUser from 'Model/Models/ScheduledMaintenanceOwnerUser';
|
||||
import ScheduledMaintenancePublicNote from 'Model/Models/ScheduledMaintenancePublicNote';
|
||||
import ScheduledMaintenanceState from 'Model/Models/ScheduledMaintenanceState';
|
||||
import ScheduledMaintenanceStateTimeline from 'Model/Models/ScheduledMaintenanceStateTimeline';
|
||||
import ShortLink from 'Model/Models/ShortLink';
|
||||
import SmsLog from 'Model/Models/SmsLog';
|
||||
import StatusPageAnnouncement from 'Model/Models/StatusPageAnnouncement';
|
||||
// Custom Fields API
|
||||
import StatusPageCustomField from 'Model/Models/StatusPageCustomField';
|
||||
import StatusPageFooterLink from 'Model/Models/StatusPageFooterLink';
|
||||
import StatusPageGroup from 'Model/Models/StatusPageGroup';
|
||||
import StatusPageHeaderLink from 'Model/Models/StatusPageHeaderLink';
|
||||
import StatusPageHistoryChartBarColorRule from 'Model/Models/StatusPageHistoryChartBarColorRule';
|
||||
import StatusPageOwnerTeam from 'Model/Models/StatusPageOwnerTeam';
|
||||
import StatusPageOwnerUser from 'Model/Models/StatusPageOwnerUser';
|
||||
import StatusPagePrivateUser from 'Model/Models/StatusPagePrivateUser';
|
||||
import StatusPageResource from 'Model/Models/StatusPageResource';
|
||||
import StatusPageSSO from 'Model/Models/StatusPageSso';
|
||||
import Team from 'Model/Models/Team';
|
||||
import TeamMember from 'Model/Models/TeamMember';
|
||||
import TeamPermission from 'Model/Models/TeamPermission';
|
||||
import TelemetryService from 'Model/Models/TelemetryService';
|
||||
import TelemetryUsageBilling from 'Model/Models/TelemetryUsageBilling';
|
||||
import User from 'Model/Models/User';
|
||||
import UserNotificationRule from 'Model/Models/UserNotificationRule';
|
||||
import UserNotificationSetting from 'Model/Models/UserNotificationSetting';
|
||||
import UserOnCallLog from 'Model/Models/UserOnCallLog';
|
||||
import Workflow from 'Model/Models/Workflow';
|
||||
import WorkflowLog from 'Model/Models/WorkflowLog';
|
||||
import WorkflowVariable from 'Model/Models/WorkflowVariable';
|
||||
|
||||
const BaseAPIFeatureSet: FeatureSet = {
|
||||
init: async (): Promise<void> => {
|
||||
@@ -469,6 +380,14 @@ const BaseAPIFeatureSet: FeatureSet = {
|
||||
).getRouter()
|
||||
);
|
||||
|
||||
app.use(
|
||||
`/${APP_NAME.toLocaleLowerCase()}`,
|
||||
new BaseAnalyticsAPI<Metric, MetricServiceType>(
|
||||
Metric,
|
||||
MetricService
|
||||
).getRouter()
|
||||
);
|
||||
|
||||
app.use(
|
||||
`/${APP_NAME.toLocaleLowerCase()}`,
|
||||
new BaseAnalyticsAPI<
|
||||
@@ -520,6 +439,14 @@ const BaseAPIFeatureSet: FeatureSet = {
|
||||
).getRouter()
|
||||
);
|
||||
|
||||
app.use(
|
||||
`/${APP_NAME.toLocaleLowerCase()}`,
|
||||
new BaseAPI<MonitorSecret, MonitorSecretServiceType>(
|
||||
MonitorSecret,
|
||||
MonitorSecretService
|
||||
).getRouter()
|
||||
);
|
||||
|
||||
app.use(
|
||||
`/${APP_NAME.toLocaleLowerCase()}`,
|
||||
new BaseAPI<
|
||||
@@ -697,14 +624,6 @@ const BaseAPIFeatureSet: FeatureSet = {
|
||||
).getRouter()
|
||||
);
|
||||
|
||||
app.use(
|
||||
`/${APP_NAME.toLocaleLowerCase()}`,
|
||||
new BaseAPI<StatusPageDomain, StatusPageDomainServiceType>(
|
||||
StatusPageDomain,
|
||||
StatusPageDomainService
|
||||
).getRouter()
|
||||
);
|
||||
|
||||
app.use(
|
||||
`/${APP_NAME.toLocaleLowerCase()}`,
|
||||
new BaseAPI<
|
||||
@@ -1052,6 +971,12 @@ const BaseAPIFeatureSet: FeatureSet = {
|
||||
`/${APP_NAME.toLocaleLowerCase()}`,
|
||||
new MonitorGroupAPI().getRouter()
|
||||
);
|
||||
|
||||
app.use(
|
||||
`/${APP_NAME.toLocaleLowerCase()}`,
|
||||
new StatusPageDomainAPI().getRouter()
|
||||
);
|
||||
|
||||
app.use(
|
||||
`/${APP_NAME.toLocaleLowerCase()}`,
|
||||
new ProjectSsoAPI().getRouter()
|
||||
|
||||
@@ -20,6 +20,9 @@ Depending on your usage and budget, you can choose from different system require
|
||||
|
||||
|
||||
#### Prerequisites for Single-Server Deployment
|
||||
|
||||
Installation tutorial: [https://youtu.be/j1SWmMW2oL4](https://youtu.be/j1SWmMW2oL4)
|
||||
|
||||
Before you start the deployment process, please make sure you have:
|
||||
|
||||
- A server running Debian, Ubuntu, or RHEL derivative
|
||||
@@ -47,7 +50,10 @@ If you don't like to use npm or do not have it installed, run this instead:
|
||||
|
||||
```
|
||||
# Read env vars from config.env file and run docker-compose up.
|
||||
export $(grep -v '^#' config.env | xargs) && docker compose up --remove-orphans -d
|
||||
(export $(grep -v '^#' config.env | xargs) && docker compose up --remove-orphans -d)
|
||||
|
||||
# Use sudo if you're having permission issues with binding ports.
|
||||
sudo bash -c "(export $(grep -v '^#' config.env | xargs) && docker compose up --remove-orphans -d)"
|
||||
```
|
||||
|
||||
To update:
|
||||
|
||||
27
App/FeatureSet/Docs/Content/monitor/custom-code-monitor.md
Normal file
27
App/FeatureSet/Docs/Content/monitor/custom-code-monitor.md
Normal file
@@ -0,0 +1,27 @@
|
||||
# Custom Code Monitor
|
||||
|
||||
Custom Code Monitor allows you to write custom scripts to monitor your applications. You can use this feature to monitor your applications in a way that is not possible with the existing monitors. For example, you can have multi-step API requests.
|
||||
|
||||
#### Example
|
||||
|
||||
The following example shows how to use a Synthetic Monitor:
|
||||
|
||||
```javascript
|
||||
// You can use axios module.
|
||||
|
||||
await axios.get('https://api.example.com/');
|
||||
|
||||
// Axios Documentation here: https://axios-http.com/docs/intro
|
||||
|
||||
return {
|
||||
data: 'Hello World' // return any data you like here.
|
||||
};
|
||||
```
|
||||
|
||||
### Things to consider
|
||||
|
||||
- You can use `console.log` to log the data in the console. This will be available in the logs section of the monitor.
|
||||
- You can return the data from the script using the `return` statement.
|
||||
- This is a JavaScript script, so you can use all the JavaScript features in the script.
|
||||
- You can use `axios` module to make HTTP requests in the script. You can use it to make API calls from the script.
|
||||
- Timeout for the script is 2 minutes. If the script takes more than 2 mins, it will be terminated.
|
||||
34
App/FeatureSet/Docs/Content/monitor/monitor-secrets.md
Normal file
34
App/FeatureSet/Docs/Content/monitor/monitor-secrets.md
Normal file
@@ -0,0 +1,34 @@
|
||||
# Monitor Secrets
|
||||
|
||||
You can use secrets to store sensitive information that you want to use in your monitoring checks. Secrets are encrypted and stored securely.
|
||||
|
||||
### Adding a secret
|
||||
|
||||
To add a secret, please go to OneUptime Dashboard -> Project Settings -> Monitor Secrets -> Create Monitor Secret.
|
||||
|
||||

|
||||
|
||||
You can select which monitors have access to the secret. In this case we added `ApiKey` secret and selected monitors to have access to it.
|
||||
|
||||
**Please note**: Secrets are encrypted and stored securely. If you lose the secret, you will need to create a new secret. You cannot view or update the secret after its saved.
|
||||
|
||||
### Using a secret
|
||||
|
||||
You can use secrets in the following monitoring types:
|
||||
|
||||
- API (in request headers, request body, and URL)
|
||||
- Website, IP, Port, Ping, SSL Certificate (in URL)
|
||||
- Synthetic Monitor, Custom Code Monitor (in the code)
|
||||
|
||||
|
||||

|
||||
|
||||
To use a secret, add `{{monitorSecrets.SECRET_NAME}}` in the field where you want to use the secret. For example, in this case we added `{{monitorSecrets.ApiKey}}` in the Requets Header field.
|
||||
|
||||
|
||||
### Monitor Secret Permissions
|
||||
|
||||
You can select which monitors have access to the secret. You can also update the permissions at any time. So, if you want to add a new monitor to have access to the secret, you can do so by updating the permissions.
|
||||
|
||||
|
||||
|
||||
71
App/FeatureSet/Docs/Content/monitor/synthetic-monitor.md
Normal file
71
App/FeatureSet/Docs/Content/monitor/synthetic-monitor.md
Normal file
@@ -0,0 +1,71 @@
|
||||
# Synthetic Monitor
|
||||
|
||||
Synthetic monitoring is a way to proactively monitor your applications by simulating user interactions. You can create a synthetic monitor to check the availability and performance of your applications from different locations around the world.
|
||||
|
||||
#### Example
|
||||
|
||||
The following example shows how to use a Synthetic Monitor:
|
||||
|
||||
```javascript
|
||||
// You can use axios module, and page object from Playwright here.
|
||||
// Page Object is a class that represents a single page in a browser.
|
||||
|
||||
await page.goto('https://playwright.dev/');
|
||||
|
||||
// Playwright Documentation here: https://playwright.dev/docs/intro
|
||||
|
||||
// Here are some of the variables that you can use in the context of the monitored object:
|
||||
|
||||
console.log(browserType) // This will list the browser type in the current run context - Chromium, Firefox, Webkit
|
||||
|
||||
console.log(screenSizeType) // This will list the screen size type in the current run context - Mobile, Tablet, Desktop
|
||||
|
||||
// Playwright page object belongs to that specific browser context, so you can use it to interact with the browser.
|
||||
|
||||
// To take screenshots,
|
||||
|
||||
const screenshots = {};
|
||||
|
||||
screenshots['screenshot-name'] = await page.screenshot(); // you can save multiple screenshots and have them with different names.
|
||||
|
||||
// when you want to return a value, use return statement with data as a prop. You can also add screenshots in the screenshots array.
|
||||
|
||||
return {
|
||||
data: 'Hello World',
|
||||
screenshots: screenshots
|
||||
};
|
||||
```
|
||||
|
||||
### Use of Playwright
|
||||
|
||||
We use Playwright to simulate user interactions. You can use Playwright `page` object to interact with the browser and perform actions like clicking buttons, filling forms, and taking screenshots.
|
||||
|
||||
### Screenshots
|
||||
|
||||
You can take screenshots of the page at any point in the script. You can take multiple screenshots and return them in the screenshots array. These screenshots will be available in the OneUptime Dashboard for that specific monitor.
|
||||
|
||||
```javascript
|
||||
|
||||
// To take screenshots,
|
||||
|
||||
const screenshots = {};
|
||||
|
||||
screenshots['screenshot-name'] = await page.screenshot();
|
||||
|
||||
return {
|
||||
data: 'Hello World',
|
||||
screenshots: screenshots
|
||||
};
|
||||
|
||||
```
|
||||
|
||||
### Things to consider
|
||||
|
||||
- You only have `page` object available in the context of the script. This is from Playwright Page class. You can use it to run all the interactions with the browser.
|
||||
- You can use `console.log` to log the data in the console. This will be available in the logs section of the monitor.
|
||||
- You can return the data from the script using the `return` statement. You can also return screenshots in the screenshots array.
|
||||
- You can use `browserType` and `screenSizeType` variables to get the browser type and screen size type in the current run context. Feel free to use them in your script if you like.
|
||||
- This is a JavaScript script, so you can use all the JavaScript features in the script.
|
||||
- You can use `axios` module to make HTTP requests in the script. You can use it to make API calls from the script.
|
||||
- If you are using oneuptime.com, you will always have the latest version of Playwright & browsers available in the context of the script. If you're self-hosting, please make sure you update the probes to have the latest version of Playwright and the browsers.
|
||||
- Timeout for the script is 2 minutes. If the script takes more than 2 mins, it will be terminated.
|
||||
@@ -1,16 +1,16 @@
|
||||
import 'ejs';
|
||||
import { ContentPath, StaticPath, ViewsPath } from './Utils/Config';
|
||||
import DocsNav, { NavGroup, NavLink } from './Utils/Nav';
|
||||
import DocsRender from './Utils/Render';
|
||||
import FeatureSet from 'CommonServer/Types/FeatureSet';
|
||||
import Express, {
|
||||
ExpressApplication,
|
||||
ExpressRequest,
|
||||
ExpressResponse,
|
||||
ExpressStatic,
|
||||
ExpressApplication,
|
||||
} from 'CommonServer/Utils/Express';
|
||||
import { ContentPath, StaticPath, ViewsPath } from './Utils/Config';
|
||||
import DocsNav, { NavGroup, NavLink } from './Utils/Nav';
|
||||
import LocalFile from 'CommonServer/Utils/LocalFile';
|
||||
import DocsRender from './Utils/Render';
|
||||
import logger from 'CommonServer/Utils/Logger';
|
||||
import FeatureSet from 'CommonServer/Types/FeatureSet';
|
||||
import 'ejs';
|
||||
|
||||
const DocsFeatureSet: FeatureSet = {
|
||||
init: async (): Promise<void> => {
|
||||
|
||||
BIN
App/FeatureSet/Docs/Static/images/CreateMonitorSecret.png
Normal file
BIN
App/FeatureSet/Docs/Static/images/CreateMonitorSecret.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 285 KiB |
BIN
App/FeatureSet/Docs/Static/images/UsingMonitorSecret.png
Normal file
BIN
App/FeatureSet/Docs/Static/images/UsingMonitorSecret.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 148 KiB |
@@ -1,54 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Check if this is debian based
|
||||
|
||||
# Check if system supports apt-get
|
||||
|
||||
if [ -x "$(command -v apt-get)" ]; then
|
||||
# Update apt-get
|
||||
sudo apt-get update
|
||||
# Install build-essential
|
||||
sudo apt-get install build-essential -y
|
||||
fi
|
||||
|
||||
# Check if system supports yum
|
||||
if [ -x "$(command -v yum)" ]; then
|
||||
# Update yum
|
||||
sudo yum update
|
||||
# Install build-essential
|
||||
sudo yum install gcc-c++ make -y
|
||||
fi
|
||||
|
||||
# Check if system supports apk
|
||||
if [ -x "$(command -v apk)" ]; then
|
||||
# Update apk
|
||||
sudo apk update
|
||||
# Install build-essential
|
||||
sudo apk add build-base
|
||||
fi
|
||||
|
||||
|
||||
# Install NVM
|
||||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
|
||||
|
||||
# Export to path
|
||||
export NVM_DIR="$HOME/.nvm"
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
||||
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|
||||
|
||||
|
||||
# Refresh bash
|
||||
source ~/.bashrc
|
||||
|
||||
# Install latest Node.js via NVM
|
||||
nvm install node
|
||||
|
||||
# Make this nodejs version the default
|
||||
nvm alias default node
|
||||
|
||||
# Use the default version
|
||||
nvm use default
|
||||
|
||||
# Now install
|
||||
npm install -g tsx
|
||||
npm install -g @oneuptime/infrastructure-agent
|
||||
@@ -0,0 +1,77 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
usage() {
|
||||
echo "Usage: $0 [-b bindir] [-d]"
|
||||
echo " -b sets the directory for the binary installation, default is ./bin"
|
||||
echo " -d enables debug mode"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Default parameters
|
||||
BINDIR=/usr/bin
|
||||
DEBUG=0
|
||||
|
||||
# Parse command-line options
|
||||
while getopts "b:d" opt; do
|
||||
case ${opt} in
|
||||
b )
|
||||
BINDIR=$OPTARG
|
||||
;;
|
||||
d )
|
||||
set -x
|
||||
DEBUG=1
|
||||
;;
|
||||
\? )
|
||||
usage
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
echo "Installing to ${BINDIR}"
|
||||
mkdir -p "${BINDIR}"
|
||||
|
||||
# Detect platform and architecture
|
||||
OS=$(uname -s | tr '[:upper:]' '[:lower:]')
|
||||
ARCH=$(uname -m)
|
||||
case $ARCH in
|
||||
x86_64)
|
||||
ARCH=amd64
|
||||
;;
|
||||
aarch64)
|
||||
ARCH=arm64
|
||||
;;
|
||||
*arm*)
|
||||
ARCH=arm
|
||||
;;
|
||||
*)
|
||||
echo "Architecture $ARCH is not supported"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# Fetch the latest release tag from GitHub
|
||||
REPO="oneuptime/oneuptime"
|
||||
API_URL="https://api.github.com/repos/${REPO}/releases/latest"
|
||||
TAG=$(curl -s ${API_URL} | grep '"tag_name":' | sed -E 's/.*"tag_name": "([^"]+)".*/\1/')
|
||||
|
||||
if [ "$TAG" = "" ]; then
|
||||
echo "Failed to find the latest release. Please check your internet connection or GitHub API limits."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Fetching the latest release: $TAG"
|
||||
|
||||
# Construct the URL for the binary release
|
||||
URL="https://github.com/${REPO}/releases/download/${TAG}/oneuptime-infrastructure-agent_${OS}_${ARCH}.tar.gz"
|
||||
|
||||
# Download and extract the binary
|
||||
curl -sL "${URL}" | tar xz -C "${BINDIR}"
|
||||
|
||||
# Check if the binary is executable
|
||||
if [ ! -x "${BINDIR}/oneuptime-infrastructure-agent" ]; then
|
||||
echo "Failed to install oneuptime-infrastructure-agent"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "oneuptime-infrastructure-agent installed successfully to ${BINDIR}. Please configure the agent using 'oneuptime-infrastructure-agent configure'."
|
||||
@@ -38,10 +38,22 @@ const DocsNav: NavGroup[] = [
|
||||
{
|
||||
title: 'Monitor',
|
||||
links: [
|
||||
{
|
||||
title: 'Custom Code Monitor',
|
||||
url: '/docs/monitor/custom-code-monitor',
|
||||
},
|
||||
{
|
||||
title: 'Synthetic Monitor',
|
||||
url: '/docs/monitor/synthetic-monitor',
|
||||
},
|
||||
{
|
||||
title: 'JavaScript Expressions',
|
||||
url: '/docs/monitor/javascript-expression',
|
||||
},
|
||||
{
|
||||
title: 'Monitor Secrets',
|
||||
url: '/docs/monitor/monitor-secrets',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
|
||||
@@ -1,50 +1,10 @@
|
||||
import { Renderer, marked } from 'marked';
|
||||
import Markdown, { MarkdownContentType } from 'CommonServer/Types/Markdown';
|
||||
|
||||
export default class DocsRender {
|
||||
public static async render(markdownContent: string): Promise<string> {
|
||||
const renderer: Renderer = this.getBlogRenderer();
|
||||
|
||||
return await marked(markdownContent, {
|
||||
renderer: renderer,
|
||||
});
|
||||
}
|
||||
|
||||
private static getBlogRenderer(): Renderer {
|
||||
const renderer: Renderer = new Renderer();
|
||||
|
||||
renderer.paragraph = function (text) {
|
||||
return `<p class="mt-2 mb-2 leading-8 text-gray-600">${text}</p>`;
|
||||
};
|
||||
|
||||
renderer.blockquote = function (quote) {
|
||||
return `<blockquote class="p-4 pt-1 pb-1 my-4 border-s-4 border-indigo-500">
|
||||
<div class="leading-8 text-gray-600">${quote}</div>
|
||||
</blockquote>`;
|
||||
};
|
||||
|
||||
renderer.image = function (href, _title, text) {
|
||||
return `<img src="${href}" alt="${text}" class="rounded-md shadow-md" />`;
|
||||
};
|
||||
|
||||
renderer.code = function (code, language) {
|
||||
return `<pre class="language-${language} rounded-md"><code class="language-${language} rounded-md">${code}</code></pre>`;
|
||||
};
|
||||
|
||||
renderer.heading = function (text, level) {
|
||||
if (level === 1) {
|
||||
return `<h1 class="my-5 mt-8 text-4xl font-bold tracking-tight text-gray-800">${text}</h1>`;
|
||||
} else if (level === 2) {
|
||||
return `<h2 class="my-5 mt-8 text-3xl font-bold tracking-tight text-gray-800">${text}</h2>`;
|
||||
} else if (level === 3) {
|
||||
return `<h3 class="my-5 mt-8 text-2xl font-bold tracking-tight text-gray-800">${text}</h3>`;
|
||||
} else if (level === 4) {
|
||||
return `<h4 class="my-5 mt-8 text-xl font-bold tracking-tight text-gray-800">${text}</h4>`;
|
||||
} else if (level === 5) {
|
||||
return `<h5 class="my-5 mt-8 text-lg font-bold tracking-tight text-gray-800">${text}</h5>`;
|
||||
}
|
||||
return `<h6 class="my-5 tracking-tight font-bold text-gray-800">${text}</h6>`;
|
||||
};
|
||||
|
||||
return renderer;
|
||||
return Markdown.convertToHTML(
|
||||
markdownContent,
|
||||
MarkdownContentType.Docs
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,18 +5,18 @@
|
||||
<%- include('./Partials/Head.ejs') %>
|
||||
</head>
|
||||
|
||||
<body class="flex min-h-full bg-white dark:bg-slate-900">
|
||||
<body class="flex min-h-full bg-white ">
|
||||
|
||||
<div class="flex w-full flex-col">
|
||||
<%- include('./Partials/Header.ejs') %>
|
||||
|
||||
<div class="relative mx-auto flex w-full max-w-8xl flex-auto justify-center sm:px-2 lg:px-8 xl:px-12">
|
||||
<div class="hidden lg:relative lg:block lg:flex-none">
|
||||
<div class="absolute inset-y-0 right-0 w-[50vw] bg-slate-50 dark:hidden"></div>
|
||||
<div class="absolute inset-y-0 right-0 w-[50vw] bg-slate-50 "></div>
|
||||
<div
|
||||
class="absolute bottom-0 right-0 top-16 hidden h-12 w-px bg-gradient-to-t from-slate-800 dark:block">
|
||||
class="absolute bottom-0 right-0 top-16 hidden h-12 w-px bg-gradient-to-t from-slate-800 ">
|
||||
</div>
|
||||
<div class="absolute bottom-0 right-0 top-28 hidden w-px bg-slate-800 dark:block"></div>
|
||||
<div class="absolute bottom-0 right-0 top-28 hidden w-px bg-slate-800 "></div>
|
||||
<div
|
||||
class="sticky top-[4.75rem] -ml-0.5 h-[calc(100vh-4.75rem)] w-64 overflow-y-auto overflow-x-hidden py-16 pl-0.5 pr-8 xl:w-72 xl:pr-16">
|
||||
<%- include('./Partials/Nav.ejs') %>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<article>
|
||||
<header class="mb-9 space-y-1">
|
||||
<p class="text-base font-bold text-sky-500"><%- category.title %></p>
|
||||
<h1 class="font-bold text-3xl tracking-tight text-slate-900 dark:text-white"><%- link.title %>
|
||||
<h1 class="font-bold text-3xl tracking-tight text-slate-900 "><%- link.title %>
|
||||
</h1>
|
||||
</header>
|
||||
<div
|
||||
class="prose prose-slate max-w-none dark:prose-invert dark:text-slate-400 prose-headings:scroll-mt-28 prose-headings:font-display prose-headings:font-normal lg:prose-headings:scroll-mt-[8.5rem] prose-lead:text-slate-500 dark:prose-lead:text-slate-400 prose-a:font-semibold dark:prose-a:text-sky-400 prose-a:no-underline prose-a:shadow-[inset_0_-2px_0_0_var(--tw-prose-background,#fff),inset_0_calc(-1*(var(--tw-prose-underline-size,4px)+2px))_0_0_var(--tw-prose-underline,theme(colors.sky.300))] hover:prose-a:[--tw-prose-underline-size:6px] dark:[--tw-prose-background:theme(colors.slate.900)] dark:prose-a:shadow-[inset_0_calc(-1*var(--tw-prose-underline-size,2px))_0_0_var(--tw-prose-underline,theme(colors.sky.800))] dark:hover:prose-a:[--tw-prose-underline-size:6px] prose-pre:rounded-xl prose-pre:bg-slate-900 prose-pre:shadow-lg dark:prose-pre:bg-slate-800/60 dark:prose-pre:shadow-none dark:prose-pre:ring-1 dark:prose-pre:ring-slate-300/10 dark:prose-hr:border-slate-800">
|
||||
class="prose prose-slate max-w-none prose-headings:scroll-mt-28 prose-headings:font-display prose-headings:font-normal lg:prose-headings:scroll-mt-[8.5rem] prose-lead:text-slate-500 prose-a:font-semibold prose-a:no-underline prose-a:shadow-[inset_0_-2px_0_0_var(--tw-prose-background,#fff),inset_0_calc(-1*(var(--tw-prose-underline-size,4px)+2px))_0_0_var(--tw-prose-underline,theme(colors.sky.300))] hover:prose-a:[--tw-prose-underline-size:6px] prose-pre:rounded-xl prose-pre:bg-slate-900 prose-pre:shadow-lg ">
|
||||
<%- content %>
|
||||
</div>
|
||||
</article>
|
||||
@@ -1,5 +1,5 @@
|
||||
<header
|
||||
class="sticky top-0 z-50 flex flex-none flex-wrap items-center justify-between bg-white px-4 py-5 shadow-md shadow-slate-900/5 transition duration-500 sm:px-6 lg:px-8 dark:shadow-none dark:bg-slate-900/95 dark:backdrop-blur dark:[@supports(backdrop-filter:blur(0))]:bg-slate-900/75">
|
||||
class="sticky top-0 z-50 flex flex-none flex-wrap items-center justify-between bg-white px-4 py-5 shadow-md shadow-slate-900/5 transition duration-500 sm:px-6 lg:px-8 ">
|
||||
|
||||
<div class="relative flex flex-grow basis-0 items-center"><a aria-label="Home page" href="/">
|
||||
<img class="h-8 w-auto" src="/img/3-transparent.svg" alt="">
|
||||
@@ -8,7 +8,7 @@
|
||||
<div class="relative flex basis-0 justify-end gap-6 sm:gap-8 md:flex-grow">
|
||||
<a class="group" aria-label="GitHub" target="_blank" href="https://github.com/oneuptime/oneuptime"><svg
|
||||
aria-hidden="true" viewBox="0 0 16 16"
|
||||
class="h-6 w-6 fill-slate-400 group-hover:fill-slate-500 dark:group-hover:fill-slate-300">
|
||||
class="h-6 w-6 fill-slate-400 group-hover:fill-slate-500 ">
|
||||
<path
|
||||
d="M8 0C3.58 0 0 3.58 0 8C0 11.54 2.29 14.53 5.47 15.59C5.87 15.66 6.02 15.42 6.02 15.21C6.02 15.02 6.01 14.39 6.01 13.72C4 14.09 3.48 13.23 3.32 12.78C3.23 12.55 2.84 11.84 2.5 11.65C2.22 11.5 1.82 11.13 2.49 11.12C3.12 11.11 3.57 11.7 3.72 11.94C4.44 13.15 5.59 12.81 6.05 12.6C6.12 12.08 6.33 11.73 6.56 11.53C4.78 11.33 2.92 10.64 2.92 7.58C2.92 6.71 3.23 5.99 3.74 5.43C3.66 5.23 3.38 4.41 3.82 3.31C3.82 3.31 4.49 3.1 6.02 4.13C6.66 3.95 7.34 3.86 8.02 3.86C8.7 3.86 9.38 3.95 10.02 4.13C11.55 3.09 12.22 3.31 12.22 3.31C12.66 4.41 12.38 5.23 12.3 5.43C12.81 5.99 13.12 6.7 13.12 7.58C13.12 10.65 11.25 11.33 9.47 11.53C9.76 11.78 10.01 12.26 10.01 13.01C10.01 14.08 10 14.94 10 15.21C10 15.42 10.15 15.67 10.55 15.59C13.71 14.53 16 11.53 16 8C16 3.58 12.42 0 8 0Z">
|
||||
</path>
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
<ul role="list" class="space-y-9">
|
||||
<% for(var i=0; i<nav.length; i++) {%>
|
||||
<li>
|
||||
<h2 class="font-display font-medium text-slate-900 dark:text-white"><%- nav[i].title -%>
|
||||
<h2 class="font-display font-medium text-slate-900 "><%- nav[i].title -%>
|
||||
</h2>
|
||||
|
||||
<ul role="list"
|
||||
class="mt-2 space-y-2 border-l-2 border-slate-100 lg:mt-4 lg:space-y-4 lg:border-slate-200 dark:border-slate-800">
|
||||
class="mt-2 space-y-2 border-l-2 border-slate-100 lg:mt-4 lg:space-y-4 lg:border-slate-200 ">
|
||||
<% if(nav[i].links.length> 0) { %>
|
||||
<% for(var j=0; j<nav[i].links.length; j++) {%>
|
||||
<% if(link.url===nav[i].links[j].url) { %>
|
||||
@@ -17,7 +17,7 @@
|
||||
</li>
|
||||
<% } else { %>
|
||||
<li class="relative"><a
|
||||
class="block w-full pl-3.5 before:pointer-events-none before:absolute before:-left-1 before:top-1/2 before:h-1.5 before:w-1.5 before:-translate-y-1/2 before:rounded-full text-slate-500 before:hidden before:bg-slate-300 hover:text-slate-600 hover:before:block dark:text-slate-400 dark:before:bg-slate-700 dark:hover:text-slate-300"
|
||||
class="block w-full pl-3.5 before:pointer-events-none before:absolute before:-left-1 before:top-1/2 before:h-1.5 before:w-1.5 before:-translate-y-1/2 before:rounded-full text-slate-500 before:hidden before:bg-slate-300 hover:text-slate-600 hover:before:block "
|
||||
href="<%- nav[i].links[j].url -%>"><%-
|
||||
nav[i].links[j].title -%></a></li>
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<dl class="mt-12 flex border-t border-slate-200 pt-6 dark:border-slate-800">
|
||||
<dl class="mt-12 flex border-t border-slate-200 pt-6 ">
|
||||
<div class="ml-auto text-right">
|
||||
<dt class="font-display text-sm font-medium text-slate-900 dark:text-white">Next</dt>
|
||||
<dt class="font-display text-sm font-medium text-slate-900 ">Next</dt>
|
||||
<dd class="mt-1"><a
|
||||
class="flex items-center gap-x-1 text-base font-semibold text-slate-500 hover:text-slate-600 dark:text-slate-400 dark:hover:text-slate-300"
|
||||
class="flex items-center gap-x-1 text-base font-semibold text-slate-500 hover:text-slate-600 "
|
||||
href="/docs/installation">Installation<svg viewBox="0 0 16 16" aria-hidden="true"
|
||||
class="h-4 w-4 flex-none fill-current">
|
||||
<path
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import BlogPostUtil, { BlogPost, BlogPostHeader } from '../Utils/BlogPost';
|
||||
import { ViewsPath } from '../Utils/Config';
|
||||
import NotFoundUtil from '../Utils/NotFound';
|
||||
import ServerErrorUtil from '../Utils/ServerError';
|
||||
import Text from 'Common/Types/Text';
|
||||
import Express, {
|
||||
ExpressApplication,
|
||||
ExpressRequest,
|
||||
ExpressResponse,
|
||||
} from 'CommonServer/Utils/Express';
|
||||
import BlogPostUtil, { BlogPost, BlogPostHeader } from '../Utils/BlogPost';
|
||||
import { ViewsPath } from '../Utils/Config';
|
||||
import logger from 'CommonServer/Utils/Logger';
|
||||
import ServerErrorUtil from '../Utils/ServerError';
|
||||
import NotFoundUtil from '../Utils/NotFound';
|
||||
import Text from 'Common/Types/Text';
|
||||
|
||||
const app: ExpressApplication = Express.getExpressApp();
|
||||
|
||||
|
||||
@@ -1,26 +1,25 @@
|
||||
import 'ejs';
|
||||
// improt API
|
||||
import './API/BlogAPI';
|
||||
import { StaticPath, ViewsPath } from './Utils/Config';
|
||||
import NotFoundUtil from './Utils/NotFound';
|
||||
import ProductCompare, { Product } from './Utils/ProductCompare';
|
||||
import HTTPErrorResponse from 'Common/Types/API/HTTPErrorResponse';
|
||||
import HTTPResponse from 'Common/Types/API/HTTPResponse';
|
||||
import URL from 'Common/Types/API/URL';
|
||||
import OneUptimeDate from 'Common/Types/Date';
|
||||
import Dictionary from 'Common/Types/Dictionary';
|
||||
import { JSONObject } from 'Common/Types/JSON';
|
||||
import API from 'Common/Utils/API';
|
||||
import FeatureSet from 'CommonServer/Types/FeatureSet';
|
||||
import Express, {
|
||||
ExpressApplication,
|
||||
ExpressRequest,
|
||||
ExpressResponse,
|
||||
ExpressStatic,
|
||||
ExpressApplication,
|
||||
} from 'CommonServer/Utils/Express';
|
||||
import Dictionary from 'Common/Types/Dictionary';
|
||||
import OneUptimeDate from 'Common/Types/Date';
|
||||
import URL from 'Common/Types/API/URL';
|
||||
import ProductCompare, { Product } from './Utils/ProductCompare';
|
||||
import 'ejs';
|
||||
import builder from 'xmlbuilder2';
|
||||
import { XMLBuilder } from 'xmlbuilder2/lib/interfaces';
|
||||
import API from 'Common/Utils/API';
|
||||
import { JSONObject } from 'Common/Types/JSON';
|
||||
import HTTPResponse from 'Common/Types/API/HTTPResponse';
|
||||
import HTTPErrorResponse from 'Common/Types/API/HTTPErrorResponse';
|
||||
import { StaticPath, ViewsPath } from './Utils/Config';
|
||||
import NotFoundUtil from './Utils/NotFound';
|
||||
|
||||
// improt API
|
||||
import './API/BlogAPI';
|
||||
import FeatureSet from 'CommonServer/Types/FeatureSet';
|
||||
|
||||
const HomeFeatureSet: FeatureSet = {
|
||||
init: async (): Promise<void> => {
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
import HTTPResponse from 'Common/Types/API/HTTPResponse';
|
||||
import API from 'Common/Utils/API';
|
||||
import URL from 'Common/Types/API/URL';
|
||||
import { marked, Renderer } from 'marked';
|
||||
import { JSONArray, JSONObject, JSONObjectOrArray } from 'Common/Types/JSON';
|
||||
import BaseModel from 'Common/Models/BaseModel';
|
||||
import AnalyticsBaseModel from 'Common/AnalyticsModels/BaseModel';
|
||||
import LocalCache from 'CommonServer/Infrastructure/LocalCache';
|
||||
import JSONFunctions from 'Common/Types/JSONFunctions';
|
||||
import BaseModel from 'Common/Models/BaseModel';
|
||||
import HTTPErrorResponse from 'Common/Types/API/HTTPErrorResponse';
|
||||
import HTTPResponse from 'Common/Types/API/HTTPResponse';
|
||||
import URL from 'Common/Types/API/URL';
|
||||
import OneUptimeDate from 'Common/Types/Date';
|
||||
import BadDataException from 'Common/Types/Exception/BadDataException';
|
||||
import { JSONArray, JSONObject, JSONObjectOrArray } from 'Common/Types/JSON';
|
||||
import JSONFunctions from 'Common/Types/JSONFunctions';
|
||||
import Text from 'Common/Types/Text';
|
||||
import API from 'Common/Utils/API';
|
||||
import LocalCache from 'CommonServer/Infrastructure/LocalCache';
|
||||
import Markdown, { MarkdownContentType } from 'CommonServer/Types/Markdown';
|
||||
|
||||
export interface BlogPostAuthor {
|
||||
username: string;
|
||||
@@ -271,11 +271,10 @@ export default class BlogPostUtil {
|
||||
|
||||
markdownContent = this.getPostFromMarkdown(markdownContent);
|
||||
|
||||
const renderer: Renderer = this.getBlogRenderer();
|
||||
|
||||
const htmlBody: string = await marked(markdownContent, {
|
||||
renderer: renderer,
|
||||
});
|
||||
const htmlBody: string = await Markdown.convertToHTML(
|
||||
markdownContent,
|
||||
MarkdownContentType.Blog
|
||||
);
|
||||
|
||||
const blogPost: BlogPost = {
|
||||
title,
|
||||
@@ -320,41 +319,6 @@ export default class BlogPostUtil {
|
||||
return OneUptimeDate.getDateAsLocalFormattedString(date, true);
|
||||
}
|
||||
|
||||
private static getBlogRenderer(): Renderer {
|
||||
const renderer: Renderer = new Renderer();
|
||||
|
||||
renderer.paragraph = function (text) {
|
||||
return `<p class="mt-2 mb-2 leading-8 text-gray-600">${text}</p>`;
|
||||
};
|
||||
|
||||
renderer.blockquote = function (quote) {
|
||||
return `<blockquote class="p-4 pt-1 pb-1 my-4 border-s-4 border-indigo-500">
|
||||
<div class="leading-8 text-gray-600">${quote}</div>
|
||||
</blockquote>`;
|
||||
};
|
||||
|
||||
renderer.code = function (code, language) {
|
||||
return `<pre class="language-${language} rounded-md"><code class="language-${language} rounded-md">${code}</code></pre>`;
|
||||
};
|
||||
|
||||
renderer.heading = function (text, level) {
|
||||
if (level === 1) {
|
||||
return `<h1 class="my-5 mt-8 text-4xl font-bold tracking-tight text-gray-800">${text}</h1>`;
|
||||
} else if (level === 2) {
|
||||
return `<h2 class="my-5 mt-8 text-3xl font-bold tracking-tight text-gray-800">${text}</h2>`;
|
||||
} else if (level === 3) {
|
||||
return `<h3 class="my-5 mt-8 text-2xl font-bold tracking-tight text-gray-800">${text}</h3>`;
|
||||
} else if (level === 4) {
|
||||
return `<h4 class="my-5 mt-8 text-xl font-bold tracking-tight text-gray-800">${text}</h4>`;
|
||||
} else if (level === 5) {
|
||||
return `<h5 class="my-5 mt-8 text-lg font-bold tracking-tight text-gray-800">${text}</h5>`;
|
||||
}
|
||||
return `<h6 class="my-5 tracking-tight font-bold text-gray-800">${text}</h6>`;
|
||||
};
|
||||
|
||||
return renderer;
|
||||
}
|
||||
|
||||
private static getPostFromMarkdown(markdownContent: string): string {
|
||||
const authorLine: string | undefined = markdownContent
|
||||
.split('\n')
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ExpressResponse } from 'CommonServer/Utils/Express';
|
||||
import { ViewsPath } from './Config';
|
||||
import { ExpressResponse } from 'CommonServer/Utils/Express';
|
||||
|
||||
export default class NotFoundUtil {
|
||||
public static renderNotFound(res: ExpressResponse): void {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ExpressResponse } from 'CommonServer/Utils/Express';
|
||||
import { ViewsPath } from './Config';
|
||||
import { ExpressResponse } from 'CommonServer/Utils/Express';
|
||||
|
||||
export default class ServerErrorUtil {
|
||||
public static renderServerError(res: ExpressResponse): void {
|
||||
|
||||
@@ -474,7 +474,7 @@
|
||||
</div>
|
||||
<input id="default-range" type="range" value="1" max="100" min="0" step="1"
|
||||
onchange="updateMonitorPrice(this.value)" oninput="updateMonitorPrice(this.value)"
|
||||
class="w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700">
|
||||
class="w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer ">
|
||||
|
||||
<div>
|
||||
<p id="more-than-100-monitors-message" style="display: none;" class="text-base text-gray-600">If you have
|
||||
@@ -564,7 +564,7 @@
|
||||
</div>
|
||||
<input id="default-range" type="range" value="1" max="1000" min="0" step="1"
|
||||
onchange="updateTelemetryPrice(this.value, null)" oninput="updateTelemetryPrice(this.value, null)"
|
||||
class="w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700">
|
||||
class="w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer ">
|
||||
<div>
|
||||
<p id="more-than-10-tb-ingested-message" style="display: none;" class="text-base text-gray-600">If you are
|
||||
ingesting more than 1 TB of data every month, contact sales@oneuptime.com for a discount.</p>
|
||||
@@ -578,7 +578,7 @@
|
||||
</div>
|
||||
<input id="default-range" type="range" value="15" max="180" min="0" step="1"
|
||||
onchange="updateTelemetryPrice(null, this.value)" oninput="updateTelemetryPrice(null,this.value)"
|
||||
class="w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700">
|
||||
class="w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer ">
|
||||
<div>
|
||||
<p id="more-than-6-months-rentention" style="display: none;" class="text-base text-gray-600">If you're
|
||||
looking for data rention of more than 6 months. contact sales@oneuptime.com for a discount. </p>
|
||||
|
||||
@@ -1,40 +1,40 @@
|
||||
import {
|
||||
IsBillingEnabled,
|
||||
EncryptionSecret,
|
||||
} from 'CommonServer/EnvironmentConfig';
|
||||
import AuthenticationEmail from '../Utils/AuthenticationEmail';
|
||||
import BaseModel from 'Common/Models/BaseModel';
|
||||
import { AccountsRoute } from 'Common/ServiceRoute';
|
||||
import Hostname from 'Common/Types/API/Hostname';
|
||||
import Protocol from 'Common/Types/API/Protocol';
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import URL from 'Common/Types/API/URL';
|
||||
import OneUptimeDate from 'Common/Types/Date';
|
||||
import Email from 'Common/Types/Email';
|
||||
import EmailTemplateType from 'Common/Types/Email/EmailTemplateType';
|
||||
import BadDataException from 'Common/Types/Exception/BadDataException';
|
||||
import BadRequestException from 'Common/Types/Exception/BadRequestException';
|
||||
import { JSONObject } from 'Common/Types/JSON';
|
||||
import Name from 'Common/Types/Name';
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
import PositiveNumber from 'Common/Types/PositiveNumber';
|
||||
import DatabaseConfig from 'CommonServer/DatabaseConfig';
|
||||
import {
|
||||
EncryptionSecret,
|
||||
IsBillingEnabled,
|
||||
} from 'CommonServer/EnvironmentConfig';
|
||||
import AccessTokenService from 'CommonServer/Services/AccessTokenService';
|
||||
import EmailVerificationTokenService from 'CommonServer/Services/EmailVerificationTokenService';
|
||||
import MailService from 'CommonServer/Services/MailService';
|
||||
import UserService from 'CommonServer/Services/UserService';
|
||||
import CookieUtil from 'CommonServer/Utils/Cookie';
|
||||
import Express, {
|
||||
ExpressRequest,
|
||||
ExpressResponse,
|
||||
ExpressRouter,
|
||||
NextFunction,
|
||||
} from 'CommonServer/Utils/Express';
|
||||
import BadRequestException from 'Common/Types/Exception/BadRequestException';
|
||||
import { JSONObject } from 'Common/Types/JSON';
|
||||
import User from 'Model/Models/User';
|
||||
import EmailVerificationTokenService from 'CommonServer/Services/EmailVerificationTokenService';
|
||||
import UserService from 'CommonServer/Services/UserService';
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
import EmailVerificationToken from 'Model/Models/EmailVerificationToken';
|
||||
import BadDataException from 'Common/Types/Exception/BadDataException';
|
||||
import MailService from 'CommonServer/Services/MailService';
|
||||
import EmailTemplateType from 'Common/Types/Email/EmailTemplateType';
|
||||
import URL from 'Common/Types/API/URL';
|
||||
import Response from 'CommonServer/Utils/Response';
|
||||
import JSONWebToken from 'CommonServer/Utils/JsonWebToken';
|
||||
import OneUptimeDate from 'Common/Types/Date';
|
||||
import PositiveNumber from 'Common/Types/PositiveNumber';
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import logger from 'CommonServer/Utils/Logger';
|
||||
import Email from 'Common/Types/Email';
|
||||
import Name from 'Common/Types/Name';
|
||||
import AuthenticationEmail from '../Utils/AuthenticationEmail';
|
||||
import AccessTokenService from 'CommonServer/Services/AccessTokenService';
|
||||
import Hostname from 'Common/Types/API/Hostname';
|
||||
import Protocol from 'Common/Types/API/Protocol';
|
||||
import DatabaseConfig from 'CommonServer/DatabaseConfig';
|
||||
import CookieUtil from 'CommonServer/Utils/Cookie';
|
||||
import BaseModel from 'Common/Models/BaseModel';
|
||||
import Response from 'CommonServer/Utils/Response';
|
||||
import EmailVerificationToken from 'Model/Models/EmailVerificationToken';
|
||||
import User from 'Model/Models/User';
|
||||
|
||||
const router: ExpressRouter = Express.getRouter();
|
||||
|
||||
@@ -182,10 +182,18 @@ router.post(
|
||||
savedUser.id!
|
||||
);
|
||||
|
||||
const token: string = JSONWebToken.sign(
|
||||
savedUser,
|
||||
OneUptimeDate.getSecondsInDays(new PositiveNumber(30))
|
||||
);
|
||||
const token: string = JSONWebToken.signUserLoginToken({
|
||||
tokenData: {
|
||||
userId: savedUser.id!,
|
||||
email: savedUser.email!,
|
||||
name: savedUser.name!,
|
||||
isMasterAdmin: savedUser.isMasterAdmin!,
|
||||
isGlobalLogin: true, // This is a general login without SSO. So, we will set this to true. This will give access to all the projects that dont require SSO.
|
||||
},
|
||||
expiresInSeconds: OneUptimeDate.getSecondsInDays(
|
||||
new PositiveNumber(30)
|
||||
),
|
||||
});
|
||||
|
||||
// Set a cookie with token.
|
||||
CookieUtil.setCookie(res, CookieUtil.getUserTokenKey(), token, {
|
||||
@@ -195,6 +203,8 @@ router.post(
|
||||
httpOnly: true,
|
||||
});
|
||||
|
||||
logger.info('User signed up: ' + savedUser.email?.toString());
|
||||
|
||||
return Response.sendEntityResponse(req, res, savedUser, User);
|
||||
}
|
||||
|
||||
@@ -257,25 +267,30 @@ router.post(
|
||||
const httpProtocol: Protocol =
|
||||
await DatabaseConfig.getHttpProtocol();
|
||||
|
||||
const tokenVerifyUrl: string = new URL(
|
||||
httpProtocol,
|
||||
host,
|
||||
new Route(AccountsRoute.toString()).addRoute(
|
||||
'/reset-password/' + token
|
||||
)
|
||||
).toString();
|
||||
|
||||
logger.info('User forgot password: ' + user.email?.toString());
|
||||
logger.info('Reset Password URL: ' + tokenVerifyUrl);
|
||||
|
||||
MailService.sendMail({
|
||||
toEmail: user.email!,
|
||||
subject: 'Password Reset Request for OneUptime',
|
||||
templateType: EmailTemplateType.ForgotPassword,
|
||||
vars: {
|
||||
homeURL: new URL(httpProtocol, host).toString(),
|
||||
tokenVerifyUrl: new URL(
|
||||
httpProtocol,
|
||||
host,
|
||||
new Route(AccountsRoute.toString()).addRoute(
|
||||
'/reset-password/' + token
|
||||
)
|
||||
).toString(),
|
||||
tokenVerifyUrl: tokenVerifyUrl,
|
||||
},
|
||||
}).catch((err: Error) => {
|
||||
logger.error(err);
|
||||
});
|
||||
|
||||
return Response.sendEmptyResponse(req, res);
|
||||
return Response.sendEmptySuccessResponse(req, res);
|
||||
}
|
||||
|
||||
return Response.sendErrorResponse(
|
||||
@@ -390,7 +405,9 @@ router.post(
|
||||
logger.error(err);
|
||||
});
|
||||
|
||||
return Response.sendEmptyResponse(req, res);
|
||||
logger.info('User email verified: ' + user.email?.toString());
|
||||
|
||||
return Response.sendEmptySuccessResponse(req, res);
|
||||
} catch (err) {
|
||||
return next(err);
|
||||
}
|
||||
@@ -482,7 +499,11 @@ router.post(
|
||||
logger.error(err);
|
||||
});
|
||||
|
||||
return Response.sendEmptyResponse(req, res);
|
||||
logger.info(
|
||||
'User password reset: ' + alreadySavedUser.email?.toString()
|
||||
);
|
||||
|
||||
return Response.sendEmptySuccessResponse(req, res);
|
||||
} catch (err) {
|
||||
return next(err);
|
||||
}
|
||||
@@ -499,7 +520,7 @@ router.post(
|
||||
try {
|
||||
CookieUtil.removeAllCookies(req, res);
|
||||
|
||||
return Response.sendEmptyResponse(req, res);
|
||||
return Response.sendEmptySuccessResponse(req, res);
|
||||
} catch (err) {
|
||||
return next(err);
|
||||
}
|
||||
@@ -573,11 +594,23 @@ router.post(
|
||||
alreadySavedUser.password.toString() ===
|
||||
user.password!.toString()
|
||||
) {
|
||||
const token: string = JSONWebToken.sign(
|
||||
alreadySavedUser,
|
||||
OneUptimeDate.getSecondsInDays(new PositiveNumber(30))
|
||||
logger.info(
|
||||
'User logged in: ' + alreadySavedUser.email?.toString()
|
||||
);
|
||||
|
||||
const token: string = JSONWebToken.signUserLoginToken({
|
||||
tokenData: {
|
||||
userId: alreadySavedUser.id!,
|
||||
email: alreadySavedUser.email!,
|
||||
name: alreadySavedUser.name!,
|
||||
isMasterAdmin: alreadySavedUser.isMasterAdmin!,
|
||||
isGlobalLogin: true, // This is a general login without SSO. So, we will set this to true. This will give access to all the projects that dont require SSO.
|
||||
},
|
||||
expiresInSeconds: OneUptimeDate.getSecondsInDays(
|
||||
new PositiveNumber(30)
|
||||
),
|
||||
});
|
||||
|
||||
// Set a cookie with token.
|
||||
CookieUtil.setCookie(
|
||||
res,
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
import OneUptimeDate from 'Common/Types/Date';
|
||||
import BadDataException from 'Common/Types/Exception/BadDataException';
|
||||
import ResellerService from 'CommonServer/Services/ResellerService';
|
||||
import Express, {
|
||||
ExpressRequest,
|
||||
ExpressResponse,
|
||||
ExpressRouter,
|
||||
NextFunction,
|
||||
} from 'CommonServer/Utils/Express';
|
||||
import BadDataException from 'Common/Types/Exception/BadDataException';
|
||||
import Reseller from 'Model/Models/Reseller';
|
||||
import ResellerService from 'CommonServer/Services/ResellerService';
|
||||
import JSONWebToken from 'CommonServer/Utils/JsonWebToken';
|
||||
import OneUptimeDate from 'Common/Types/Date';
|
||||
import Response from 'CommonServer/Utils/Response';
|
||||
import Reseller from 'Model/Models/Reseller';
|
||||
|
||||
const router: ExpressRouter = Express.getRouter();
|
||||
|
||||
@@ -62,10 +62,10 @@ router.post(
|
||||
|
||||
// if found then generate a token and return it.
|
||||
|
||||
const token: string = JSONWebToken.sign(
|
||||
{ resellerId: resellerId },
|
||||
OneUptimeDate.getDayInSeconds(365)
|
||||
);
|
||||
const token: string = JSONWebToken.sign({
|
||||
data: { resellerId: resellerId },
|
||||
expiresInSeconds: OneUptimeDate.getDayInSeconds(365),
|
||||
});
|
||||
|
||||
return Response.sendJsonObjectResponse(req, res, {
|
||||
access: token,
|
||||
|
||||
@@ -1,37 +1,38 @@
|
||||
import AuthenticationEmail from '../Utils/AuthenticationEmail';
|
||||
import SSOUtil from '../Utils/SSO';
|
||||
import { DashboardRoute } from 'Common/ServiceRoute';
|
||||
import Hostname from 'Common/Types/API/Hostname';
|
||||
import Protocol from 'Common/Types/API/Protocol';
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import URL from 'Common/Types/API/URL';
|
||||
import OneUptimeDate from 'Common/Types/Date';
|
||||
import Email from 'Common/Types/Email';
|
||||
import BadRequestException from 'Common/Types/Exception/BadRequestException';
|
||||
import Exception from 'Common/Types/Exception/Exception';
|
||||
import ServerException from 'Common/Types/Exception/ServerException';
|
||||
import { JSONObject } from 'Common/Types/JSON';
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
import PositiveNumber from 'Common/Types/PositiveNumber';
|
||||
import DatabaseConfig from 'CommonServer/DatabaseConfig';
|
||||
import { Host, HttpProtocol } from 'CommonServer/EnvironmentConfig';
|
||||
import AccessTokenService from 'CommonServer/Services/AccessTokenService';
|
||||
import ProjectSSOService from 'CommonServer/Services/ProjectSsoService';
|
||||
import TeamMemberService from 'CommonServer/Services/TeamMemberService';
|
||||
import UserService from 'CommonServer/Services/UserService';
|
||||
import CookieUtil from 'CommonServer/Utils/Cookie';
|
||||
import Express, {
|
||||
ExpressRequest,
|
||||
ExpressResponse,
|
||||
ExpressRouter,
|
||||
NextFunction,
|
||||
} from 'CommonServer/Utils/Express';
|
||||
import BadRequestException from 'Common/Types/Exception/BadRequestException';
|
||||
import ServerException from 'Common/Types/Exception/ServerException';
|
||||
import JSONWebToken from 'CommonServer/Utils/JsonWebToken';
|
||||
import logger from 'CommonServer/Utils/Logger';
|
||||
import Response from 'CommonServer/Utils/Response';
|
||||
import ProjectSSO from 'Model/Models/ProjectSso';
|
||||
import ProjectSSOService from 'CommonServer/Services/ProjectSsoService';
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
import xml2js from 'xml2js';
|
||||
import { JSONObject } from 'Common/Types/JSON';
|
||||
import logger from 'CommonServer/Utils/Logger';
|
||||
import Email from 'Common/Types/Email';
|
||||
import User from 'Model/Models/User';
|
||||
import UserService from 'CommonServer/Services/UserService';
|
||||
import AuthenticationEmail from '../Utils/AuthenticationEmail';
|
||||
import OneUptimeDate from 'Common/Types/Date';
|
||||
import PositiveNumber from 'Common/Types/PositiveNumber';
|
||||
import JSONWebToken from 'CommonServer/Utils/JsonWebToken';
|
||||
import URL from 'Common/Types/API/URL';
|
||||
import { DashboardRoute } from 'Common/ServiceRoute';
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import TeamMember from 'Model/Models/TeamMember';
|
||||
import TeamMemberService from 'CommonServer/Services/TeamMemberService';
|
||||
import AccessTokenService from 'CommonServer/Services/AccessTokenService';
|
||||
import SSOUtil from '../Utils/SSO';
|
||||
import Exception from 'Common/Types/Exception/Exception';
|
||||
import Hostname from 'Common/Types/API/Hostname';
|
||||
import Protocol from 'Common/Types/API/Protocol';
|
||||
import DatabaseConfig from 'CommonServer/DatabaseConfig';
|
||||
import CookieUtil from 'CommonServer/Utils/Cookie';
|
||||
import User from 'Model/Models/User';
|
||||
import xml2js from 'xml2js';
|
||||
|
||||
const router: ExpressRouter = Express.getRouter();
|
||||
|
||||
@@ -67,7 +68,10 @@ router.get(
|
||||
isEnabled: true,
|
||||
},
|
||||
select: {
|
||||
_id: true,
|
||||
signOnURL: true,
|
||||
issuerURL: true,
|
||||
projectId: true,
|
||||
},
|
||||
props: {
|
||||
isRoot: true,
|
||||
@@ -92,310 +96,376 @@ router.get(
|
||||
);
|
||||
}
|
||||
|
||||
return Response.redirect(req, res, projectSSO.signOnURL);
|
||||
if (!projectSSO.issuerURL) {
|
||||
return Response.sendErrorResponse(
|
||||
req,
|
||||
res,
|
||||
new BadRequestException('Issuer not found')
|
||||
);
|
||||
}
|
||||
|
||||
const samlRequestUrl: URL = SSOUtil.createSAMLRequestUrl({
|
||||
acsUrl: URL.fromString(
|
||||
`${HttpProtocol}${Host}/identity/idp-login/${projectSSO.projectId?.toString()}/${projectSSO.id?.toString()}`
|
||||
),
|
||||
signOnUrl: projectSSO.signOnURL!,
|
||||
issuerUrl: URL.fromString(
|
||||
`${HttpProtocol}${Host}/${projectSSO.projectId?.toString()}/${projectSSO.id?.toString()}`
|
||||
),
|
||||
});
|
||||
|
||||
return Response.redirect(req, res, samlRequestUrl);
|
||||
} catch (err) {
|
||||
return next(err);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
router.get(
|
||||
'/idp-login/:projectId/:projectSsoId',
|
||||
async (req: ExpressRequest, res: ExpressResponse): Promise<void> => {
|
||||
return await loginUserWithSso(req, res);
|
||||
}
|
||||
);
|
||||
|
||||
router.post(
|
||||
'/idp-login/:projectId/:projectSsoId',
|
||||
async (req: ExpressRequest, res: ExpressResponse): Promise<void> => {
|
||||
try {
|
||||
const samlResponseBase64: string = req.body.SAMLResponse;
|
||||
return await loginUserWithSso(req, res);
|
||||
}
|
||||
);
|
||||
|
||||
const samlResponse: string = Buffer.from(
|
||||
samlResponseBase64,
|
||||
'base64'
|
||||
).toString();
|
||||
type LoginUserWithSsoFunction = (
|
||||
req: ExpressRequest,
|
||||
res: ExpressResponse
|
||||
) => Promise<void>;
|
||||
|
||||
const response: JSONObject = await xml2js.parseStringPromise(
|
||||
samlResponse
|
||||
const loginUserWithSso: LoginUserWithSsoFunction = async (
|
||||
req: ExpressRequest,
|
||||
res: ExpressResponse
|
||||
): Promise<void> => {
|
||||
try {
|
||||
const samlResponseBase64: string = req.body.SAMLResponse;
|
||||
|
||||
if (!samlResponseBase64) {
|
||||
return Response.sendErrorResponse(
|
||||
req,
|
||||
res,
|
||||
new BadRequestException('SAMLResponse not found')
|
||||
);
|
||||
}
|
||||
|
||||
let issuerUrl: string = '';
|
||||
let email: Email | null = null;
|
||||
const samlResponse: string = Buffer.from(
|
||||
samlResponseBase64,
|
||||
'base64'
|
||||
).toString();
|
||||
|
||||
if (!req.params['projectId']) {
|
||||
return Response.sendErrorResponse(
|
||||
req,
|
||||
res,
|
||||
new BadRequestException('Project ID not found')
|
||||
);
|
||||
}
|
||||
const response: JSONObject = await xml2js.parseStringPromise(
|
||||
samlResponse
|
||||
);
|
||||
|
||||
if (!req.params['projectSsoId']) {
|
||||
return Response.sendErrorResponse(
|
||||
req,
|
||||
res,
|
||||
new BadRequestException('Project SSO ID not found')
|
||||
);
|
||||
}
|
||||
let issuerUrl: string = '';
|
||||
let email: Email | null = null;
|
||||
|
||||
const projectSSO: ProjectSSO | null =
|
||||
await ProjectSSOService.findOneBy({
|
||||
query: {
|
||||
projectId: new ObjectID(req.params['projectId']),
|
||||
_id: req.params['projectSsoId'],
|
||||
isEnabled: true,
|
||||
},
|
||||
select: {
|
||||
signOnURL: true,
|
||||
issuerURL: true,
|
||||
publicCertificate: true,
|
||||
teams: {
|
||||
_id: true,
|
||||
},
|
||||
},
|
||||
props: {
|
||||
isRoot: true,
|
||||
},
|
||||
});
|
||||
if (!req.params['projectId']) {
|
||||
return Response.sendErrorResponse(
|
||||
req,
|
||||
res,
|
||||
new BadRequestException('Project ID not found')
|
||||
);
|
||||
}
|
||||
|
||||
if (!projectSSO) {
|
||||
return Response.sendErrorResponse(
|
||||
req,
|
||||
res,
|
||||
new BadRequestException('SSO Config not found')
|
||||
);
|
||||
}
|
||||
if (!req.params['projectSsoId']) {
|
||||
return Response.sendErrorResponse(
|
||||
req,
|
||||
res,
|
||||
new BadRequestException('Project SSO ID not found')
|
||||
);
|
||||
}
|
||||
|
||||
// redirect to Identity Provider.
|
||||
|
||||
if (!projectSSO.issuerURL) {
|
||||
return Response.sendErrorResponse(
|
||||
req,
|
||||
res,
|
||||
new BadRequestException('Issuer URL not found')
|
||||
);
|
||||
}
|
||||
|
||||
// redirect to Identity Provider.
|
||||
|
||||
if (!projectSSO.signOnURL) {
|
||||
return Response.sendErrorResponse(
|
||||
req,
|
||||
res,
|
||||
new BadRequestException('Sign on URL not found')
|
||||
);
|
||||
}
|
||||
|
||||
if (!projectSSO.publicCertificate) {
|
||||
return Response.sendErrorResponse(
|
||||
req,
|
||||
res,
|
||||
new BadRequestException('Public Certificate not found')
|
||||
);
|
||||
}
|
||||
|
||||
try {
|
||||
SSOUtil.isPayloadValid(response);
|
||||
|
||||
if (
|
||||
!SSOUtil.isSignatureValid(
|
||||
samlResponse,
|
||||
projectSSO.publicCertificate
|
||||
)
|
||||
) {
|
||||
return Response.sendErrorResponse(
|
||||
req,
|
||||
res,
|
||||
new BadRequestException(
|
||||
'Signature is not valid or Public Certificate configured with this SSO provider is not valid'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
issuerUrl = SSOUtil.getIssuer(response);
|
||||
email = SSOUtil.getEmail(response);
|
||||
} catch (err: unknown) {
|
||||
if (err instanceof Exception) {
|
||||
return Response.sendErrorResponse(req, res, err);
|
||||
}
|
||||
return Response.sendErrorResponse(
|
||||
req,
|
||||
res,
|
||||
new ServerException()
|
||||
);
|
||||
}
|
||||
|
||||
if (projectSSO.issuerURL.toString() !== issuerUrl) {
|
||||
return Response.sendErrorResponse(
|
||||
req,
|
||||
res,
|
||||
new BadRequestException('Issuer URL does not match')
|
||||
);
|
||||
}
|
||||
|
||||
// Check if he already belongs to the project, If he does - then log in.
|
||||
|
||||
let alreadySavedUser: User | null = await UserService.findOneBy({
|
||||
query: { email: email },
|
||||
select: {
|
||||
_id: true,
|
||||
name: true,
|
||||
email: true,
|
||||
isMasterAdmin: true,
|
||||
isEmailVerified: true,
|
||||
profilePictureId: true,
|
||||
const projectSSO: ProjectSSO | null = await ProjectSSOService.findOneBy(
|
||||
{
|
||||
query: {
|
||||
projectId: new ObjectID(req.params['projectId']),
|
||||
_id: req.params['projectSsoId'],
|
||||
isEnabled: true,
|
||||
},
|
||||
select: {
|
||||
signOnURL: true,
|
||||
issuerURL: true,
|
||||
publicCertificate: true,
|
||||
teams: {
|
||||
_id: true,
|
||||
},
|
||||
},
|
||||
props: {
|
||||
isRoot: true,
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
if (!projectSSO) {
|
||||
return Response.sendErrorResponse(
|
||||
req,
|
||||
res,
|
||||
new BadRequestException('SSO Config not found')
|
||||
);
|
||||
}
|
||||
|
||||
// redirect to Identity Provider.
|
||||
|
||||
if (!projectSSO.issuerURL) {
|
||||
return Response.sendErrorResponse(
|
||||
req,
|
||||
res,
|
||||
new BadRequestException('Issuer URL not found')
|
||||
);
|
||||
}
|
||||
|
||||
// redirect to Identity Provider.
|
||||
|
||||
if (!projectSSO.signOnURL) {
|
||||
return Response.sendErrorResponse(
|
||||
req,
|
||||
res,
|
||||
new BadRequestException('Sign on URL not found')
|
||||
);
|
||||
}
|
||||
|
||||
if (!projectSSO.publicCertificate) {
|
||||
return Response.sendErrorResponse(
|
||||
req,
|
||||
res,
|
||||
new BadRequestException('Public Certificate not found')
|
||||
);
|
||||
}
|
||||
|
||||
try {
|
||||
SSOUtil.isPayloadValid(response);
|
||||
|
||||
if (
|
||||
!SSOUtil.isSignatureValid(
|
||||
samlResponse,
|
||||
projectSSO.publicCertificate
|
||||
)
|
||||
) {
|
||||
return Response.sendErrorResponse(
|
||||
req,
|
||||
res,
|
||||
new BadRequestException(
|
||||
'Signature is not valid or Public Certificate configured with this SSO provider is not valid'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
issuerUrl = SSOUtil.getIssuer(response);
|
||||
email = SSOUtil.getEmail(response);
|
||||
} catch (err: unknown) {
|
||||
if (err instanceof Exception) {
|
||||
return Response.sendErrorResponse(req, res, err);
|
||||
}
|
||||
return Response.sendErrorResponse(req, res, new ServerException());
|
||||
}
|
||||
|
||||
if (projectSSO.issuerURL.toString() !== issuerUrl) {
|
||||
logger.error(
|
||||
'Issuer URL does not match. It should be ' +
|
||||
projectSSO.issuerURL.toString() +
|
||||
' but it is ' +
|
||||
issuerUrl.toString()
|
||||
);
|
||||
return Response.sendErrorResponse(
|
||||
req,
|
||||
res,
|
||||
new BadRequestException('Issuer URL does not match')
|
||||
);
|
||||
}
|
||||
|
||||
// Check if he already belongs to the project, If he does - then log in.
|
||||
|
||||
let alreadySavedUser: User | null = await UserService.findOneBy({
|
||||
query: { email: email },
|
||||
select: {
|
||||
_id: true,
|
||||
name: true,
|
||||
email: true,
|
||||
isMasterAdmin: true,
|
||||
isEmailVerified: true,
|
||||
profilePictureId: true,
|
||||
},
|
||||
props: {
|
||||
isRoot: true,
|
||||
},
|
||||
});
|
||||
|
||||
let isNewUser: boolean = false;
|
||||
|
||||
if (!alreadySavedUser) {
|
||||
// this should never happen because user is logged in before he signs in with SSO UNLESS he initiates the login though the IDP.
|
||||
|
||||
/// Create a user.
|
||||
|
||||
alreadySavedUser = await UserService.createByEmail({
|
||||
email,
|
||||
isEmailVerified: true,
|
||||
generateRandomPassword: true,
|
||||
props: {
|
||||
isRoot: true,
|
||||
},
|
||||
});
|
||||
|
||||
let isNewUser: boolean = false;
|
||||
isNewUser = true;
|
||||
}
|
||||
|
||||
if (!alreadySavedUser) {
|
||||
// this should never happen because user is logged in before he signs in with SSO UNLESS he initiates the login though the IDP.
|
||||
// If he does not then add him to teams that he should belong and log in.
|
||||
// This should never happen because email is verified before he logs in with SSO.
|
||||
if (!alreadySavedUser.isEmailVerified && !isNewUser) {
|
||||
await AuthenticationEmail.sendVerificationEmail(alreadySavedUser!);
|
||||
|
||||
/// Create a user.
|
||||
|
||||
alreadySavedUser = await UserService.createByEmail(email, {
|
||||
isRoot: true,
|
||||
});
|
||||
|
||||
isNewUser = true;
|
||||
}
|
||||
|
||||
// If he does not then add him to teams that he should belong and log in.
|
||||
if (!alreadySavedUser.isEmailVerified && !isNewUser) {
|
||||
await AuthenticationEmail.sendVerificationEmail(
|
||||
alreadySavedUser
|
||||
);
|
||||
|
||||
return Response.render(
|
||||
req,
|
||||
res,
|
||||
'/usr/src/app/FeatureSet/Identity/Views/Message.ejs',
|
||||
{
|
||||
title: 'Email not verified.',
|
||||
message:
|
||||
'Email is not verified. We have sent you an email with the verification link. Please do not forget to check spam.',
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
// check if the user already belongs to the project
|
||||
const teamMemberCount: PositiveNumber =
|
||||
await TeamMemberService.countBy({
|
||||
query: {
|
||||
projectId: new ObjectID(
|
||||
req.params['projectId'] as string
|
||||
),
|
||||
userId: alreadySavedUser.id!,
|
||||
},
|
||||
props: {
|
||||
isRoot: true,
|
||||
},
|
||||
});
|
||||
|
||||
if (teamMemberCount.toNumber() === 0) {
|
||||
// user not in project, add him to default teams.
|
||||
|
||||
if (!projectSSO.teams || projectSSO.teams.length === 0) {
|
||||
return Response.render(
|
||||
req,
|
||||
res,
|
||||
'/usr/src/app/FeatureSet/Identity/Views/Message.ejs',
|
||||
{
|
||||
title: 'No teams added.',
|
||||
message:
|
||||
'No teams have been added to this SSO config. Please contact your admin and have default teams added.',
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
for (const team of projectSSO.teams) {
|
||||
// add user to team
|
||||
let teamMember: TeamMember = new TeamMember();
|
||||
teamMember.projectId = new ObjectID(
|
||||
req.params['projectId'] as string
|
||||
);
|
||||
teamMember.userId = alreadySavedUser.id!;
|
||||
teamMember.hasAcceptedInvitation = true;
|
||||
teamMember.invitationAcceptedAt =
|
||||
OneUptimeDate.getCurrentDate();
|
||||
teamMember.teamId = team.id!;
|
||||
|
||||
teamMember = await TeamMemberService.create({
|
||||
data: teamMember,
|
||||
props: {
|
||||
isRoot: true,
|
||||
ignoreHooks: true,
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (isNewUser) {
|
||||
return Response.render(
|
||||
req,
|
||||
res,
|
||||
'/usr/src/app/FeatureSet/Identity/Views/Message.ejs',
|
||||
{
|
||||
title: 'You have not signed up so far.',
|
||||
message:
|
||||
'You need to sign up for an account on OneUptime with this email:' +
|
||||
email.toString() +
|
||||
'. Once you have signed up, you can use SSO to log in to your project.',
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
const projectId: ObjectID = new ObjectID(
|
||||
req.params['projectId'] as string
|
||||
);
|
||||
|
||||
const token: string = JSONWebToken.sign(
|
||||
{
|
||||
userId: alreadySavedUser.id!,
|
||||
projectId: projectId,
|
||||
email: email,
|
||||
isMasterAdmin: false,
|
||||
},
|
||||
OneUptimeDate.getSecondsInDays(new PositiveNumber(30))
|
||||
);
|
||||
|
||||
// Refresh Permissions for this user here.
|
||||
await AccessTokenService.refreshUserAllPermissions(
|
||||
alreadySavedUser.id!
|
||||
);
|
||||
|
||||
const host: Hostname = await DatabaseConfig.getHost();
|
||||
const httpProtocol: Protocol =
|
||||
await DatabaseConfig.getHttpProtocol();
|
||||
|
||||
CookieUtil.setCookie(
|
||||
res,
|
||||
CookieUtil.getUserSSOKey(projectId),
|
||||
token,
|
||||
{
|
||||
maxAge: OneUptimeDate.getMillisecondsInDays(
|
||||
new PositiveNumber(30)
|
||||
),
|
||||
httpOnly: true,
|
||||
}
|
||||
);
|
||||
|
||||
return Response.redirect(
|
||||
return Response.render(
|
||||
req,
|
||||
res,
|
||||
new URL(
|
||||
httpProtocol,
|
||||
host,
|
||||
new Route(DashboardRoute.toString()).addRoute(
|
||||
'/' + req.params['projectId']
|
||||
),
|
||||
'sso_token=' + token
|
||||
)
|
||||
'/usr/src/app/FeatureSet/Identity/Views/Message.ejs',
|
||||
{
|
||||
title: 'Email not verified.',
|
||||
message:
|
||||
'Email is not verified. We have sent you an email with the verification link. Please do not forget to check spam.',
|
||||
}
|
||||
);
|
||||
} catch (err) {
|
||||
logger.error(err);
|
||||
Response.sendErrorResponse(req, res, new ServerException());
|
||||
}
|
||||
|
||||
// check if the user already belongs to the project
|
||||
const teamMemberCount: PositiveNumber = await TeamMemberService.countBy(
|
||||
{
|
||||
query: {
|
||||
projectId: new ObjectID(req.params['projectId'] as string),
|
||||
userId: alreadySavedUser!.id!,
|
||||
},
|
||||
props: {
|
||||
isRoot: true,
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
if (teamMemberCount.toNumber() === 0) {
|
||||
// user not in project, add him to default teams.
|
||||
|
||||
if (!projectSSO.teams || projectSSO.teams.length === 0) {
|
||||
return Response.render(
|
||||
req,
|
||||
res,
|
||||
'/usr/src/app/FeatureSet/Identity/Views/Message.ejs',
|
||||
{
|
||||
title: 'No teams added.',
|
||||
message:
|
||||
'No teams have been added to this SSO config. Please contact your admin and have default teams added.',
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
for (const team of projectSSO.teams) {
|
||||
// add user to team
|
||||
let teamMember: TeamMember = new TeamMember();
|
||||
teamMember.projectId = new ObjectID(
|
||||
req.params['projectId'] as string
|
||||
);
|
||||
teamMember.userId = alreadySavedUser.id!;
|
||||
teamMember.hasAcceptedInvitation = true;
|
||||
teamMember.invitationAcceptedAt =
|
||||
OneUptimeDate.getCurrentDate();
|
||||
teamMember.teamId = team.id!;
|
||||
|
||||
teamMember = await TeamMemberService.create({
|
||||
data: teamMember,
|
||||
props: {
|
||||
isRoot: true,
|
||||
ignoreHooks: true,
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
const projectId: ObjectID = new ObjectID(
|
||||
req.params['projectId'] as string
|
||||
);
|
||||
|
||||
const ssoToken: string = JSONWebToken.sign({
|
||||
data: {
|
||||
userId: alreadySavedUser.id!,
|
||||
projectId: projectId,
|
||||
name: alreadySavedUser.name!,
|
||||
email: email,
|
||||
isMasterAdmin: false,
|
||||
isGeneralLogin: false,
|
||||
},
|
||||
expiresInSeconds: OneUptimeDate.getSecondsInDays(
|
||||
new PositiveNumber(30)
|
||||
),
|
||||
});
|
||||
|
||||
const oneUptimeToken: string = JSONWebToken.signUserLoginToken({
|
||||
tokenData: {
|
||||
userId: alreadySavedUser.id!,
|
||||
email: alreadySavedUser.email!,
|
||||
name: alreadySavedUser.name!,
|
||||
isMasterAdmin: alreadySavedUser.isMasterAdmin!,
|
||||
isGlobalLogin: false, // This is a general login without SSO. So, we will set this to false. This will give access to all the projects that dont require SSO.
|
||||
},
|
||||
expiresInSeconds: OneUptimeDate.getSecondsInDays(
|
||||
new PositiveNumber(30)
|
||||
),
|
||||
});
|
||||
|
||||
// Set a cookie with token.
|
||||
CookieUtil.setCookie(
|
||||
res,
|
||||
CookieUtil.getUserTokenKey(),
|
||||
oneUptimeToken,
|
||||
{
|
||||
maxAge: OneUptimeDate.getMillisecondsInDays(
|
||||
new PositiveNumber(30)
|
||||
),
|
||||
httpOnly: true,
|
||||
}
|
||||
);
|
||||
|
||||
CookieUtil.setCookie(
|
||||
res,
|
||||
CookieUtil.getUserSSOKey(projectId),
|
||||
ssoToken,
|
||||
{
|
||||
maxAge: OneUptimeDate.getMillisecondsInDays(
|
||||
new PositiveNumber(30)
|
||||
),
|
||||
httpOnly: true,
|
||||
}
|
||||
);
|
||||
|
||||
// Refresh Permissions for this user here.
|
||||
await AccessTokenService.refreshUserAllPermissions(
|
||||
alreadySavedUser.id!
|
||||
);
|
||||
|
||||
const host: Hostname = await DatabaseConfig.getHost();
|
||||
const httpProtocol: Protocol = await DatabaseConfig.getHttpProtocol();
|
||||
|
||||
logger.info('User logged in with SSO' + email.toString());
|
||||
|
||||
return Response.redirect(
|
||||
req,
|
||||
res,
|
||||
new URL(
|
||||
httpProtocol,
|
||||
host,
|
||||
new Route(DashboardRoute.toString()).addRoute(
|
||||
'/' + req.params['projectId']
|
||||
)
|
||||
)
|
||||
);
|
||||
} catch (err) {
|
||||
logger.error(err);
|
||||
Response.sendErrorResponse(req, res, new ServerException());
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
export default router;
|
||||
|
||||
@@ -1,32 +1,32 @@
|
||||
import { EncryptionSecret } from 'CommonServer/EnvironmentConfig';
|
||||
import BaseModel from 'Common/Models/BaseModel';
|
||||
import { FileRoute } from 'Common/ServiceRoute';
|
||||
import Hostname from 'Common/Types/API/Hostname';
|
||||
import Protocol from 'Common/Types/API/Protocol';
|
||||
import URL from 'Common/Types/API/URL';
|
||||
import OneUptimeDate from 'Common/Types/Date';
|
||||
import EmailTemplateType from 'Common/Types/Email/EmailTemplateType';
|
||||
import BadDataException from 'Common/Types/Exception/BadDataException';
|
||||
import { JSONObject } from 'Common/Types/JSON';
|
||||
import JSONFunctions from 'Common/Types/JSONFunctions';
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
import PositiveNumber from 'Common/Types/PositiveNumber';
|
||||
import DatabaseConfig from 'CommonServer/DatabaseConfig';
|
||||
import { EncryptionSecret } from 'CommonServer/EnvironmentConfig';
|
||||
import MailService from 'CommonServer/Services/MailService';
|
||||
import StatusPagePrivateUserService from 'CommonServer/Services/StatusPagePrivateUserService';
|
||||
import StatusPageService from 'CommonServer/Services/StatusPageService';
|
||||
import CookieUtil from 'CommonServer/Utils/Cookie';
|
||||
import Express, {
|
||||
ExpressRequest,
|
||||
ExpressResponse,
|
||||
ExpressRouter,
|
||||
NextFunction,
|
||||
} from 'CommonServer/Utils/Express';
|
||||
import { JSONObject } from 'Common/Types/JSON';
|
||||
import StatusPagePrivateUserService from 'CommonServer/Services/StatusPagePrivateUserService';
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
import BadDataException from 'Common/Types/Exception/BadDataException';
|
||||
import MailService from 'CommonServer/Services/MailService';
|
||||
import EmailTemplateType from 'Common/Types/Email/EmailTemplateType';
|
||||
import URL from 'Common/Types/API/URL';
|
||||
import Response from 'CommonServer/Utils/Response';
|
||||
import JSONWebToken from 'CommonServer/Utils/JsonWebToken';
|
||||
import OneUptimeDate from 'Common/Types/Date';
|
||||
import PositiveNumber from 'Common/Types/PositiveNumber';
|
||||
import logger from 'CommonServer/Utils/Logger';
|
||||
import JSONFunctions from 'Common/Types/JSONFunctions';
|
||||
import StatusPagePrivateUser from 'Model/Models/StatusPagePrivateUser';
|
||||
import Response from 'CommonServer/Utils/Response';
|
||||
import StatusPage from 'Model/Models/StatusPage';
|
||||
import StatusPageService from 'CommonServer/Services/StatusPageService';
|
||||
import Protocol from 'Common/Types/API/Protocol';
|
||||
import Hostname from 'Common/Types/API/Hostname';
|
||||
import DatabaseConfig from 'CommonServer/DatabaseConfig';
|
||||
import CookieUtil from 'CommonServer/Utils/Cookie';
|
||||
import BaseModel from 'Common/Models/BaseModel';
|
||||
import StatusPagePrivateUser from 'Model/Models/StatusPagePrivateUser';
|
||||
|
||||
const router: ExpressRouter = Express.getRouter();
|
||||
|
||||
@@ -51,7 +51,7 @@ router.post(
|
||||
CookieUtil.getUserTokenKey(statusPageId)
|
||||
); // remove the cookie.
|
||||
|
||||
return Response.sendEmptyResponse(req, res);
|
||||
return Response.sendEmptySuccessResponse(req, res);
|
||||
} catch (err) {
|
||||
return next(err);
|
||||
}
|
||||
@@ -178,7 +178,7 @@ router.post(
|
||||
logger.error(err);
|
||||
});
|
||||
|
||||
return Response.sendEmptyResponse(req, res);
|
||||
return Response.sendEmptySuccessResponse(req, res);
|
||||
}
|
||||
|
||||
throw new BadDataException(
|
||||
@@ -320,7 +320,7 @@ router.post(
|
||||
logger.error(err);
|
||||
});
|
||||
|
||||
return Response.sendEmptyResponse(req, res);
|
||||
return Response.sendEmptySuccessResponse(req, res);
|
||||
} catch (err) {
|
||||
return next(err);
|
||||
}
|
||||
@@ -389,10 +389,12 @@ router.post(
|
||||
});
|
||||
|
||||
if (alreadySavedUser) {
|
||||
const token: string = JSONWebToken.sign(
|
||||
alreadySavedUser,
|
||||
OneUptimeDate.getSecondsInDays(new PositiveNumber(30))
|
||||
);
|
||||
const token: string = JSONWebToken.sign({
|
||||
data: alreadySavedUser,
|
||||
expiresInSeconds: OneUptimeDate.getSecondsInDays(
|
||||
new PositiveNumber(30)
|
||||
),
|
||||
});
|
||||
|
||||
CookieUtil.setCookie(
|
||||
res,
|
||||
|
||||
@@ -1,30 +1,31 @@
|
||||
import SSOUtil from '../Utils/SSO';
|
||||
import URL from 'Common/Types/API/URL';
|
||||
import OneUptimeDate from 'Common/Types/Date';
|
||||
import Email from 'Common/Types/Email';
|
||||
import BadRequestException from 'Common/Types/Exception/BadRequestException';
|
||||
import Exception from 'Common/Types/Exception/Exception';
|
||||
import ServerException from 'Common/Types/Exception/ServerException';
|
||||
import HashedString from 'Common/Types/HashedString';
|
||||
import { JSONObject } from 'Common/Types/JSON';
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
import PositiveNumber from 'Common/Types/PositiveNumber';
|
||||
import { Host, HttpProtocol } from 'CommonServer/EnvironmentConfig';
|
||||
import StatusPagePrivateUserService from 'CommonServer/Services/StatusPagePrivateUserService';
|
||||
import StatusPageService from 'CommonServer/Services/StatusPageService';
|
||||
import StatusPageSsoService from 'CommonServer/Services/StatusPageSsoService';
|
||||
import CookieUtil from 'CommonServer/Utils/Cookie';
|
||||
import Express, {
|
||||
ExpressRequest,
|
||||
ExpressResponse,
|
||||
ExpressRouter,
|
||||
NextFunction,
|
||||
} from 'CommonServer/Utils/Express';
|
||||
import BadRequestException from 'Common/Types/Exception/BadRequestException';
|
||||
import ServerException from 'Common/Types/Exception/ServerException';
|
||||
import Response from 'CommonServer/Utils/Response';
|
||||
import StatusPageSsoService from 'CommonServer/Services/StatusPageSsoService';
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
import xml2js from 'xml2js';
|
||||
import { JSONObject } from 'Common/Types/JSON';
|
||||
import logger from 'CommonServer/Utils/Logger';
|
||||
import Email from 'Common/Types/Email';
|
||||
import OneUptimeDate from 'Common/Types/Date';
|
||||
import PositiveNumber from 'Common/Types/PositiveNumber';
|
||||
import JSONWebToken from 'CommonServer/Utils/JsonWebToken';
|
||||
import URL from 'Common/Types/API/URL';
|
||||
import SSOUtil from '../Utils/SSO';
|
||||
import Exception from 'Common/Types/Exception/Exception';
|
||||
import StatusPageSSO from 'Model/Models/StatusPageSso';
|
||||
import logger from 'CommonServer/Utils/Logger';
|
||||
import Response from 'CommonServer/Utils/Response';
|
||||
import StatusPagePrivateUser from 'Model/Models/StatusPagePrivateUser';
|
||||
import StatusPagePrivateUserService from 'CommonServer/Services/StatusPagePrivateUserService';
|
||||
import HashedString from 'Common/Types/HashedString';
|
||||
import StatusPageService from 'CommonServer/Services/StatusPageService';
|
||||
import CookieUtil from 'CommonServer/Utils/Cookie';
|
||||
import StatusPageSSO from 'Model/Models/StatusPageSso';
|
||||
import xml2js from 'xml2js';
|
||||
|
||||
const router: ExpressRouter = Express.getRouter();
|
||||
|
||||
@@ -65,6 +66,8 @@ router.get(
|
||||
},
|
||||
select: {
|
||||
signOnURL: true,
|
||||
statusPageId: true,
|
||||
_id: true,
|
||||
},
|
||||
props: {
|
||||
isRoot: true,
|
||||
@@ -89,7 +92,17 @@ router.get(
|
||||
);
|
||||
}
|
||||
|
||||
return Response.redirect(req, res, statusPageSSO.signOnURL);
|
||||
const samlRequestUrl: URL = SSOUtil.createSAMLRequestUrl({
|
||||
acsUrl: URL.fromString(
|
||||
`${HttpProtocol}${Host}/identity/status-page-idp-login/${statusPageSSO.statusPageId?.toString()}/${statusPageSSO.id?.toString()}`
|
||||
),
|
||||
signOnUrl: statusPageSSO.signOnURL!,
|
||||
issuerUrl: URL.fromString(
|
||||
`${HttpProtocol}${Host}/${statusPageSSO.statusPageId?.toString()}/${statusPageSSO.id?.toString()}`
|
||||
),
|
||||
});
|
||||
|
||||
return Response.redirect(req, res, samlRequestUrl);
|
||||
} catch (err) {
|
||||
return next(err);
|
||||
}
|
||||
@@ -270,10 +283,12 @@ router.post(
|
||||
});
|
||||
}
|
||||
|
||||
const token: string = JSONWebToken.sign(
|
||||
alreadySavedUser,
|
||||
OneUptimeDate.getSecondsInDays(new PositiveNumber(30))
|
||||
);
|
||||
const token: string = JSONWebToken.sign({
|
||||
data: alreadySavedUser,
|
||||
expiresInSeconds: OneUptimeDate.getSecondsInDays(
|
||||
new PositiveNumber(30)
|
||||
),
|
||||
});
|
||||
|
||||
CookieUtil.setCookie(
|
||||
res,
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import 'ejs';
|
||||
import Express, { ExpressApplication } from 'CommonServer/Utils/Express';
|
||||
import AuthenticationAPI from './API/Authentication';
|
||||
import SsoAPI from './API/SSO';
|
||||
import ResellerAPI from './API/Reseller';
|
||||
import StatusPageSsoAPI from './API/StatusPageSSO';
|
||||
import SsoAPI from './API/SSO';
|
||||
import StatusPageAuthenticationAPI from './API/StatusPageAuthentication';
|
||||
import StatusPageSsoAPI from './API/StatusPageSSO';
|
||||
import FeatureSet from 'CommonServer/Types/FeatureSet';
|
||||
import Express, { ExpressApplication } from 'CommonServer/Utils/Express';
|
||||
import 'ejs';
|
||||
|
||||
const IdentityFeatureSet: FeatureSet = {
|
||||
init: async (): Promise<void> => {
|
||||
|
||||
@@ -1,23 +1,18 @@
|
||||
import { AccountsRoute } from 'Common/ServiceRoute';
|
||||
|
||||
import EmailVerificationTokenService from 'CommonServer/Services/EmailVerificationTokenService';
|
||||
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
import EmailVerificationToken from 'Model/Models/EmailVerificationToken';
|
||||
|
||||
import MailService from 'CommonServer/Services/MailService';
|
||||
import EmailTemplateType from 'Common/Types/Email/EmailTemplateType';
|
||||
import URL from 'Common/Types/API/URL';
|
||||
|
||||
import OneUptimeDate from 'Common/Types/Date';
|
||||
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import logger from 'CommonServer/Utils/Logger';
|
||||
import User from 'Model/Models/User';
|
||||
import Hostname from 'Common/Types/API/Hostname';
|
||||
import Protocol from 'Common/Types/API/Protocol';
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import URL from 'Common/Types/API/URL';
|
||||
import OneUptimeDate from 'Common/Types/Date';
|
||||
import Email from 'Common/Types/Email';
|
||||
import EmailTemplateType from 'Common/Types/Email/EmailTemplateType';
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
import DatabaseConfig from 'CommonServer/DatabaseConfig';
|
||||
import EmailVerificationTokenService from 'CommonServer/Services/EmailVerificationTokenService';
|
||||
import MailService from 'CommonServer/Services/MailService';
|
||||
import logger from 'CommonServer/Utils/Logger';
|
||||
import EmailVerificationToken from 'Model/Models/EmailVerificationToken';
|
||||
import User from 'Model/Models/User';
|
||||
|
||||
export default class AuthenticationEmail {
|
||||
public static async sendVerificationEmail(user: User): Promise<void> {
|
||||
|
||||
@@ -1,11 +1,37 @@
|
||||
import { JSONArray, JSONObject } from 'Common/Types/JSON';
|
||||
import BadRequestException from 'Common/Types/Exception/BadRequestException';
|
||||
import URL from 'Common/Types/API/URL';
|
||||
import OneUptimeDate from 'Common/Types/Date';
|
||||
import Email from 'Common/Types/Email';
|
||||
import xmldom from 'xmldom';
|
||||
import xmlCrypto, { FileKeyInfo } from 'xml-crypto';
|
||||
import BadRequestException from 'Common/Types/Exception/BadRequestException';
|
||||
import { JSONArray, JSONObject } from 'Common/Types/JSON';
|
||||
import Text from 'Common/Types/Text';
|
||||
import logger from 'CommonServer/Utils/Logger';
|
||||
import xmlCrypto, { FileKeyInfo } from 'xml-crypto';
|
||||
import xmldom from 'xmldom';
|
||||
import zlib from 'zlib';
|
||||
|
||||
export default class SSOUtil {
|
||||
public static createSAMLRequestUrl(data: {
|
||||
acsUrl: URL;
|
||||
signOnUrl: URL;
|
||||
issuerUrl: URL;
|
||||
}): URL {
|
||||
const { acsUrl, signOnUrl } = data;
|
||||
|
||||
const samlRequest: string = `<samlp:AuthnRequest xmlns="urn:oasis:names:tc:SAML:2.0:metadata" ID="${Text.generateRandomText(
|
||||
10
|
||||
).toUpperCase()}" Version="2.0" IssueInstant="${OneUptimeDate.getCurrentDate().toISOString()}" IsPassive="false" AssertionConsumerServiceURL="${acsUrl.toString()}" xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" ForceAuthn="false"><Issuer xmlns="urn:oasis:names:tc:SAML:2.0:assertion">${data.issuerUrl.toString()}</Issuer></samlp:AuthnRequest>`;
|
||||
|
||||
const deflated: Buffer = zlib.deflateRawSync(samlRequest);
|
||||
|
||||
const base64Encoded: string = deflated.toString('base64');
|
||||
|
||||
return URL.fromString(signOnUrl.toString()).addQueryParam(
|
||||
'SAMLRequest',
|
||||
base64Encoded,
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
public static isPayloadValid(payload: JSONObject): void {
|
||||
if (
|
||||
!payload['saml2p:Response'] &&
|
||||
@@ -18,11 +44,13 @@ export default class SSOUtil {
|
||||
payload =
|
||||
(payload['saml2p:Response'] as JSONObject) ||
|
||||
(payload['samlp:Response'] as JSONObject) ||
|
||||
(payload['samlp:Response'] as JSONObject);
|
||||
(payload['samlp:Response'] as JSONObject) ||
|
||||
(payload['Response'] as JSONObject);
|
||||
|
||||
const issuers: JSONArray =
|
||||
(payload['saml2:Issuer'] as JSONArray) ||
|
||||
(payload['saml:Issuer'] as JSONArray);
|
||||
(payload['saml:Issuer'] as JSONArray) ||
|
||||
(payload['Issuer'] as JSONArray);
|
||||
|
||||
if (issuers.length === 0) {
|
||||
throw new BadRequestException('Issuers not found');
|
||||
@@ -47,7 +75,8 @@ export default class SSOUtil {
|
||||
|
||||
const samlAssertion: JSONArray =
|
||||
(payload['saml2:Assertion'] as JSONArray) ||
|
||||
(payload['saml:Assertion'] as JSONArray);
|
||||
(payload['saml:Assertion'] as JSONArray) ||
|
||||
(payload['Assertion'] as JSONArray);
|
||||
|
||||
if (!samlAssertion || samlAssertion.length === 0) {
|
||||
throw new BadRequestException('SAML Assertion not found');
|
||||
@@ -55,7 +84,8 @@ export default class SSOUtil {
|
||||
|
||||
const samlSubject: JSONArray =
|
||||
((samlAssertion[0] as JSONObject)['saml2:Subject'] as JSONArray) ||
|
||||
((samlAssertion[0] as JSONObject)['saml:Subject'] as JSONArray);
|
||||
((samlAssertion[0] as JSONObject)['saml:Subject'] as JSONArray) ||
|
||||
((samlAssertion[0] as JSONObject)['Subject'] as JSONArray);
|
||||
|
||||
if (!samlSubject || samlSubject.length === 0) {
|
||||
throw new BadRequestException('SAML Subject not found');
|
||||
@@ -63,7 +93,8 @@ export default class SSOUtil {
|
||||
|
||||
const samlNameId: JSONArray =
|
||||
((samlSubject[0] as JSONObject)['saml2:NameID'] as JSONArray) ||
|
||||
((samlSubject[0] as JSONObject)['saml:NameID'] as JSONArray);
|
||||
((samlSubject[0] as JSONObject)['saml:NameID'] as JSONArray) ||
|
||||
((samlSubject[0] as JSONObject)['NameID'] as JSONArray);
|
||||
|
||||
if (!samlNameId || samlNameId.length === 0) {
|
||||
throw new BadRequestException('SAML NAME ID not found');
|
||||
@@ -120,11 +151,13 @@ export default class SSOUtil {
|
||||
|
||||
payload =
|
||||
(payload['saml2p:Response'] as JSONObject) ||
|
||||
(payload['samlp:Response'] as JSONObject);
|
||||
(payload['samlp:Response'] as JSONObject) ||
|
||||
(payload['Response'] as JSONObject);
|
||||
|
||||
const samlAssertion: JSONArray =
|
||||
(payload['saml2:Assertion'] as JSONArray) ||
|
||||
(payload['saml:Assertion'] as JSONArray);
|
||||
(payload['saml:Assertion'] as JSONArray) ||
|
||||
(payload['Assertion'] as JSONArray);
|
||||
|
||||
if (!samlAssertion || samlAssertion.length === 0) {
|
||||
throw new BadRequestException('SAML Assertion not found');
|
||||
@@ -132,7 +165,8 @@ export default class SSOUtil {
|
||||
|
||||
const samlSubject: JSONArray =
|
||||
((samlAssertion[0] as JSONObject)['saml2:Subject'] as JSONArray) ||
|
||||
((samlAssertion[0] as JSONObject)['saml:Subject'] as JSONArray);
|
||||
((samlAssertion[0] as JSONObject)['saml:Subject'] as JSONArray) ||
|
||||
((samlAssertion[0] as JSONObject)['Subject'] as JSONArray);
|
||||
|
||||
if (!samlSubject || samlSubject.length === 0) {
|
||||
throw new BadRequestException('SAML Subject not found');
|
||||
@@ -140,7 +174,8 @@ export default class SSOUtil {
|
||||
|
||||
const samlNameId: JSONArray =
|
||||
((samlSubject[0] as JSONObject)['saml2:NameID'] as JSONArray) ||
|
||||
((samlSubject[0] as JSONObject)['saml:NameID'] as JSONArray);
|
||||
((samlSubject[0] as JSONObject)['saml:NameID'] as JSONArray) ||
|
||||
((samlSubject[0] as JSONObject)['NameID'] as JSONArray);
|
||||
|
||||
if (!samlNameId || samlNameId.length === 0) {
|
||||
throw new BadRequestException('SAML NAME ID not found');
|
||||
@@ -160,11 +195,13 @@ export default class SSOUtil {
|
||||
|
||||
payload =
|
||||
(payload['saml2p:Response'] as JSONObject) ||
|
||||
(payload['samlp:Response'] as JSONObject);
|
||||
(payload['samlp:Response'] as JSONObject) ||
|
||||
(payload['Response'] as JSONObject);
|
||||
|
||||
const issuers: JSONArray =
|
||||
(payload['saml2:Issuer'] as JSONArray) ||
|
||||
(payload['saml:Issuer'] as JSONArray);
|
||||
(payload['saml:Issuer'] as JSONArray) ||
|
||||
(payload['Issuer'] as JSONArray);
|
||||
|
||||
if (issuers.length === 0) {
|
||||
throw new BadRequestException('Issuers not found');
|
||||
|
||||
@@ -1,22 +1,23 @@
|
||||
import CallService from '../Services/CallService';
|
||||
import CallRequest from 'Common/Types/Call/CallRequest';
|
||||
import TwilioConfig from 'Common/Types/CallAndSMS/TwilioConfig';
|
||||
import BadDataException from 'Common/Types/Exception/BadDataException';
|
||||
import { JSONObject } from 'Common/Types/JSON';
|
||||
import JSONFunctions from 'Common/Types/JSONFunctions';
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
import Phone from 'Common/Types/Phone';
|
||||
import ClusterKeyAuthorization from 'CommonServer/Middleware/ClusterKeyAuthorization';
|
||||
import ProjectCallSMSConfigService from 'CommonServer/Services/ProjectCallSMSConfigService';
|
||||
import Express, {
|
||||
ExpressRequest,
|
||||
ExpressResponse,
|
||||
ExpressRouter,
|
||||
} from 'CommonServer/Utils/Express';
|
||||
const router: ExpressRouter = Express.getRouter();
|
||||
import Response from 'CommonServer/Utils/Response';
|
||||
import ClusterKeyAuthorization from 'CommonServer/Middleware/ClusterKeyAuthorization';
|
||||
import { JSONObject } from 'Common/Types/JSON';
|
||||
import JSONFunctions from 'Common/Types/JSONFunctions';
|
||||
import Phone from 'Common/Types/Phone';
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
import CallService from '../Services/CallService';
|
||||
import CallRequest from 'Common/Types/Call/CallRequest';
|
||||
import ProjectCallSMSConfig from 'Model/Models/ProjectCallSMSConfig';
|
||||
import ProjectCallSMSConfigService from 'CommonServer/Services/ProjectCallSMSConfigService';
|
||||
import BadDataException from 'Common/Types/Exception/BadDataException';
|
||||
import TwilioConfig from 'Common/Types/CallAndSMS/TwilioConfig';
|
||||
import logger from 'CommonServer/Utils/Logger';
|
||||
import Response from 'CommonServer/Utils/Response';
|
||||
import ProjectCallSMSConfig from 'Model/Models/ProjectCallSMSConfig';
|
||||
|
||||
const router: ExpressRouter = Express.getRouter();
|
||||
|
||||
router.post(
|
||||
'/make-call',
|
||||
@@ -32,7 +33,7 @@ router.post(
|
||||
customTwilioConfig: body['customTwilioConfig'] as any,
|
||||
});
|
||||
|
||||
return Response.sendEmptyResponse(req, res);
|
||||
return Response.sendEmptySuccessResponse(req, res);
|
||||
}
|
||||
);
|
||||
|
||||
@@ -137,7 +138,7 @@ router.post('/test', async (req: ExpressRequest, res: ExpressResponse) => {
|
||||
);
|
||||
}
|
||||
|
||||
return Response.sendEmptyResponse(req, res);
|
||||
return Response.sendEmptySuccessResponse(req, res);
|
||||
});
|
||||
|
||||
export default router;
|
||||
|
||||
@@ -1,19 +1,20 @@
|
||||
import MailService from '../Services/MailService';
|
||||
import Dictionary from 'Common/Types/Dictionary';
|
||||
import Email from 'Common/Types/Email';
|
||||
import EmailMessage from 'Common/Types/Email/EmailMessage';
|
||||
import EmailServer from 'Common/Types/Email/EmailServer';
|
||||
import EmailTemplateType from 'Common/Types/Email/EmailTemplateType';
|
||||
import { JSONObject } from 'Common/Types/JSON';
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
import ClusterKeyAuthorization from 'CommonServer/Middleware/ClusterKeyAuthorization';
|
||||
import Express, {
|
||||
ExpressRequest,
|
||||
ExpressResponse,
|
||||
ExpressRouter,
|
||||
} from 'CommonServer/Utils/Express';
|
||||
const router: ExpressRouter = Express.getRouter();
|
||||
import Response from 'CommonServer/Utils/Response';
|
||||
import ClusterKeyAuthorization from 'CommonServer/Middleware/ClusterKeyAuthorization';
|
||||
import MailService from '../Services/MailService';
|
||||
import EmailMessage from 'Common/Types/Email/EmailMessage';
|
||||
import EmailTemplateType from 'Common/Types/Email/EmailTemplateType';
|
||||
import { JSONObject } from 'Common/Types/JSON';
|
||||
import Email from 'Common/Types/Email';
|
||||
import Dictionary from 'Common/Types/Dictionary';
|
||||
import EmailServer from 'Common/Types/Email/EmailServer';
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
|
||||
const router: ExpressRouter = Express.getRouter();
|
||||
|
||||
router.post(
|
||||
'/send',
|
||||
@@ -44,7 +45,7 @@ router.post(
|
||||
(body['userOnCallLogTimelineId'] as ObjectID) || undefined,
|
||||
});
|
||||
|
||||
return Response.sendEmptyResponse(req, res);
|
||||
return Response.sendEmptySuccessResponse(req, res);
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -1,21 +1,22 @@
|
||||
import SmsService from '../Services/SmsService';
|
||||
import TwilioConfig from 'Common/Types/CallAndSMS/TwilioConfig';
|
||||
import BadDataException from 'Common/Types/Exception/BadDataException';
|
||||
import { JSONObject } from 'Common/Types/JSON';
|
||||
import JSONFunctions from 'Common/Types/JSONFunctions';
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
import Phone from 'Common/Types/Phone';
|
||||
import ClusterKeyAuthorization from 'CommonServer/Middleware/ClusterKeyAuthorization';
|
||||
import ProjectCallSMSConfigService from 'CommonServer/Services/ProjectCallSMSConfigService';
|
||||
import Express, {
|
||||
ExpressRequest,
|
||||
ExpressResponse,
|
||||
ExpressRouter,
|
||||
} from 'CommonServer/Utils/Express';
|
||||
const router: ExpressRouter = Express.getRouter();
|
||||
import Response from 'CommonServer/Utils/Response';
|
||||
import ClusterKeyAuthorization from 'CommonServer/Middleware/ClusterKeyAuthorization';
|
||||
import { JSONObject } from 'Common/Types/JSON';
|
||||
import JSONFunctions from 'Common/Types/JSONFunctions';
|
||||
import SmsService from '../Services/SmsService';
|
||||
import Phone from 'Common/Types/Phone';
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
import ProjectCallSMSConfig from 'Model/Models/ProjectCallSMSConfig';
|
||||
import ProjectCallSMSConfigService from 'CommonServer/Services/ProjectCallSMSConfigService';
|
||||
import BadDataException from 'Common/Types/Exception/BadDataException';
|
||||
import TwilioConfig from 'Common/Types/CallAndSMS/TwilioConfig';
|
||||
import logger from 'CommonServer/Utils/Logger';
|
||||
import Response from 'CommonServer/Utils/Response';
|
||||
import ProjectCallSMSConfig from 'Model/Models/ProjectCallSMSConfig';
|
||||
|
||||
const router: ExpressRouter = Express.getRouter();
|
||||
|
||||
router.post(
|
||||
'/send',
|
||||
@@ -35,7 +36,7 @@ router.post(
|
||||
}
|
||||
);
|
||||
|
||||
return Response.sendEmptyResponse(req, res);
|
||||
return Response.sendEmptySuccessResponse(req, res);
|
||||
}
|
||||
);
|
||||
|
||||
@@ -135,7 +136,7 @@ router.post('/test', async (req: ExpressRequest, res: ExpressResponse) => {
|
||||
);
|
||||
}
|
||||
|
||||
return Response.sendEmptyResponse(req, res);
|
||||
return Response.sendEmptySuccessResponse(req, res);
|
||||
});
|
||||
|
||||
export default router;
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
import MailService from '../Services/MailService';
|
||||
import Email from 'Common/Types/Email';
|
||||
import EmailMessage from 'Common/Types/Email/EmailMessage';
|
||||
import EmailServer from 'Common/Types/Email/EmailServer';
|
||||
import EmailTemplateType from 'Common/Types/Email/EmailTemplateType';
|
||||
import BadDataException from 'Common/Types/Exception/BadDataException';
|
||||
import { JSONObject } from 'Common/Types/JSON';
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
import ProjectSMTPConfigService from 'CommonServer/Services/ProjectSmtpConfigService';
|
||||
import Express, {
|
||||
ExpressRequest,
|
||||
ExpressResponse,
|
||||
ExpressRouter,
|
||||
} from 'CommonServer/Utils/Express';
|
||||
const router: ExpressRouter = Express.getRouter();
|
||||
|
||||
import Response from 'CommonServer/Utils/Response';
|
||||
import MailService from '../Services/MailService';
|
||||
import EmailMessage from 'Common/Types/Email/EmailMessage';
|
||||
import EmailTemplateType from 'Common/Types/Email/EmailTemplateType';
|
||||
import { JSONObject } from 'Common/Types/JSON';
|
||||
import Email from 'Common/Types/Email';
|
||||
import EmailServer from 'Common/Types/Email/EmailServer';
|
||||
import ProjectSmtpConfig from 'Model/Models/ProjectSmtpConfig';
|
||||
import ProjectSMTPConfigService from 'CommonServer/Services/ProjectSmtpConfigService';
|
||||
import BadDataException from 'Common/Types/Exception/BadDataException';
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
import logger from 'CommonServer/Utils/Logger';
|
||||
import Response from 'CommonServer/Utils/Response';
|
||||
import ProjectSmtpConfig from 'Model/Models/ProjectSmtpConfig';
|
||||
|
||||
const router: ExpressRouter = Express.getRouter();
|
||||
|
||||
router.post('/test', async (req: ExpressRequest, res: ExpressResponse) => {
|
||||
const body: JSONObject = req.body;
|
||||
@@ -98,7 +98,7 @@ router.post('/test', async (req: ExpressRequest, res: ExpressResponse) => {
|
||||
);
|
||||
}
|
||||
|
||||
return Response.sendEmptyResponse(req, res);
|
||||
return Response.sendEmptySuccessResponse(req, res);
|
||||
});
|
||||
|
||||
export default router;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import GlobalConfig, { EmailServerType } from 'Model/Models/GlobalConfig';
|
||||
import Hostname from 'Common/Types/API/Hostname';
|
||||
import TwilioConfig from 'Common/Types/CallAndSMS/TwilioConfig';
|
||||
import Email from 'Common/Types/Email';
|
||||
import EmailServer from 'Common/Types/Email/EmailServer';
|
||||
import BadDataException from 'Common/Types/Exception/BadDataException';
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
import Port from 'Common/Types/Port';
|
||||
import GlobalConfigService from 'CommonServer/Services/GlobalConfigService';
|
||||
import EmailServer from 'Common/Types/Email/EmailServer';
|
||||
import TwilioConfig from 'Common/Types/CallAndSMS/TwilioConfig';
|
||||
import GlobalConfig, { EmailServerType } from 'Model/Models/GlobalConfig';
|
||||
|
||||
export const InternalSmtpPassword: string =
|
||||
process.env['INTERNAL_SMTP_PASSWORD'] || '';
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
import 'ejs';
|
||||
import Express, { ExpressApplication } from 'CommonServer/Utils/Express';
|
||||
|
||||
import CallAPI from './API/Call';
|
||||
// API
|
||||
import MailAPI from './API/Mail';
|
||||
import SmsAPI from './API/SMS';
|
||||
import CallAPI from './API/Call';
|
||||
import SMTPConfigAPI from './API/SMTPConfig';
|
||||
import './Utils/Handlebars';
|
||||
import FeatureSet from 'CommonServer/Types/FeatureSet';
|
||||
import Express, { ExpressApplication } from 'CommonServer/Utils/Express';
|
||||
import 'ejs';
|
||||
|
||||
const NotificationFeatureSet: FeatureSet = {
|
||||
init: async (): Promise<void> => {
|
||||
|
||||
@@ -1,31 +1,31 @@
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
import {
|
||||
CallDefaultCostInCentsPerMinute,
|
||||
CallHighRiskCostInCentsPerMinute,
|
||||
getTwilioConfig,
|
||||
} from '../Config';
|
||||
import Twilio from 'twilio';
|
||||
import CallLog from 'Model/Models/CallLog';
|
||||
import CallStatus from 'Common/Types/Call/CallStatus';
|
||||
import CallRequest, {
|
||||
GatherInput,
|
||||
Say,
|
||||
isHighRiskPhoneNumber,
|
||||
} from 'Common/Types/Call/CallRequest';
|
||||
import CallStatus from 'Common/Types/Call/CallStatus';
|
||||
import TwilioConfig from 'Common/Types/CallAndSMS/TwilioConfig';
|
||||
import OneUptimeDate from 'Common/Types/Date';
|
||||
import BadDataException from 'Common/Types/Exception/BadDataException';
|
||||
import JSONFunctions from 'Common/Types/JSONFunctions';
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
import UserNotificationStatus from 'Common/Types/UserNotification/UserNotificationStatus';
|
||||
import { IsBillingEnabled } from 'CommonServer/EnvironmentConfig';
|
||||
import CallLogService from 'CommonServer/Services/CallLogService';
|
||||
import ProjectService from 'CommonServer/Services/ProjectService';
|
||||
import Project from 'Model/Models/Project';
|
||||
import NotificationService from 'CommonServer/Services/NotificationService';
|
||||
import logger from 'CommonServer/Utils/Logger';
|
||||
import { CallInstance } from 'twilio/lib/rest/api/v2010/account/call';
|
||||
import JSONWebToken from 'CommonServer/Utils/JsonWebToken';
|
||||
import OneUptimeDate from 'Common/Types/Date';
|
||||
import JSONFunctions from 'Common/Types/JSONFunctions';
|
||||
import ProjectService from 'CommonServer/Services/ProjectService';
|
||||
import UserOnCallLogTimelineService from 'CommonServer/Services/UserOnCallLogTimelineService';
|
||||
import UserNotificationStatus from 'Common/Types/UserNotification/UserNotificationStatus';
|
||||
import BadDataException from 'Common/Types/Exception/BadDataException';
|
||||
import TwilioConfig from 'Common/Types/CallAndSMS/TwilioConfig';
|
||||
import JSONWebToken from 'CommonServer/Utils/JsonWebToken';
|
||||
import logger from 'CommonServer/Utils/Logger';
|
||||
import CallLog from 'Model/Models/CallLog';
|
||||
import Project from 'Model/Models/Project';
|
||||
import Twilio from 'twilio';
|
||||
import { CallInstance } from 'twilio/lib/rest/api/v2010/account/call';
|
||||
|
||||
export default class CallService {
|
||||
public static async makeCall(
|
||||
@@ -41,7 +41,7 @@ export default class CallService {
|
||||
const callLog: CallLog = new CallLog();
|
||||
|
||||
try {
|
||||
logger.info('Call Request received.');
|
||||
logger.debug('Call Request received.');
|
||||
|
||||
let callCost: number = 0;
|
||||
|
||||
@@ -56,7 +56,7 @@ export default class CallService {
|
||||
}
|
||||
}
|
||||
|
||||
logger.info('Call Cost: ' + callCost);
|
||||
logger.debug('Call Cost: ' + callCost);
|
||||
|
||||
const twilioConfig: TwilioConfig | null =
|
||||
options.customTwilioConfig || (await getTwilioConfig());
|
||||
@@ -101,7 +101,7 @@ export default class CallService {
|
||||
},
|
||||
});
|
||||
|
||||
logger.info('Project found.');
|
||||
logger.debug('Project found.');
|
||||
|
||||
if (!project) {
|
||||
callLog.status = CallStatus.Error;
|
||||
@@ -243,7 +243,7 @@ export default class CallService {
|
||||
}
|
||||
}
|
||||
|
||||
logger.info('Sending Call Request.');
|
||||
logger.debug('Sending Call Request.');
|
||||
|
||||
const twillioCall: CallInstance = await client.calls.create({
|
||||
twiml: this.generateTwimlForCall(callRequest),
|
||||
@@ -251,16 +251,16 @@ export default class CallService {
|
||||
from: twilioConfig.phoneNumber.toString(), // From a valid Twilio number
|
||||
});
|
||||
|
||||
logger.info('Call Request sent successfully.');
|
||||
logger.debug('Call Request sent successfully.');
|
||||
|
||||
callLog.status = CallStatus.Success;
|
||||
callLog.statusMessage = 'Call ID: ' + twillioCall.sid;
|
||||
|
||||
logger.info('Call ID: ' + twillioCall.sid);
|
||||
logger.info(callLog.statusMessage);
|
||||
logger.debug('Call ID: ' + twillioCall.sid);
|
||||
logger.debug(callLog.statusMessage);
|
||||
|
||||
if (shouldChargeForCall && project) {
|
||||
logger.info('Updating Project Balance.');
|
||||
logger.debug('Updating Project Balance.');
|
||||
|
||||
callLog.callCostInUSDCents = callCost * 100;
|
||||
|
||||
@@ -271,7 +271,7 @@ export default class CallService {
|
||||
);
|
||||
}
|
||||
|
||||
logger.info('Call Cost: ' + callLog.callCostInUSDCents);
|
||||
logger.debug('Call Cost: ' + callLog.callCostInUSDCents);
|
||||
|
||||
project.smsOrCallCurrentBalanceInUSDCents = Math.floor(
|
||||
project.smsOrCallCurrentBalanceInUSDCents! - callCost * 100
|
||||
@@ -289,8 +289,8 @@ export default class CallService {
|
||||
},
|
||||
});
|
||||
|
||||
logger.info("Project's current balance updated.");
|
||||
logger.info(
|
||||
logger.debug("Project's current balance updated.");
|
||||
logger.debug(
|
||||
'Current Balance: ' +
|
||||
project.smsOrCallCurrentBalanceInUSDCents
|
||||
);
|
||||
@@ -306,19 +306,19 @@ export default class CallService {
|
||||
callError = e;
|
||||
}
|
||||
|
||||
logger.info('Saving Call Log if project id is provided.');
|
||||
logger.debug('Saving Call Log if project id is provided.');
|
||||
|
||||
if (options.projectId) {
|
||||
logger.info('Saving Call Log.');
|
||||
logger.debug('Saving Call Log.');
|
||||
await CallLogService.create({
|
||||
data: callLog,
|
||||
props: {
|
||||
isRoot: true,
|
||||
},
|
||||
});
|
||||
logger.info('Call Log saved.');
|
||||
logger.debug('Call Log saved.');
|
||||
} else {
|
||||
logger.info('Project Id is not provided. Call Log not saved.');
|
||||
logger.debug('Project Id is not provided. Call Log not saved.');
|
||||
}
|
||||
|
||||
if (options.userOnCallLogTimelineId) {
|
||||
|
||||
@@ -1,20 +1,3 @@
|
||||
import nodemailer, { Transporter } from 'nodemailer';
|
||||
import Handlebars from 'handlebars';
|
||||
import fsp from 'fs/promises';
|
||||
import EmailMessage from 'Common/Types/Email/EmailMessage';
|
||||
import Path from 'path';
|
||||
import Email from 'Common/Types/Email';
|
||||
import BadDataException from 'Common/Types/Exception/BadDataException';
|
||||
import EmailServer from 'Common/Types/Email/EmailServer';
|
||||
import LocalCache from 'CommonServer/Infrastructure/LocalCache';
|
||||
import OneUptimeDate from 'Common/Types/Date';
|
||||
import EmailTemplateType from 'Common/Types/Email/EmailTemplateType';
|
||||
import Dictionary from 'Common/Types/Dictionary';
|
||||
import Hostname from 'Common/Types/API/Hostname';
|
||||
import Port from 'Common/Types/Port';
|
||||
import { JSONObject } from 'Common/Types/JSON';
|
||||
import logger from 'CommonServer/Utils/Logger';
|
||||
import { IsDevelopment } from 'CommonServer/EnvironmentConfig';
|
||||
import {
|
||||
InternalSmtpEmail,
|
||||
InternalSmtpFromName,
|
||||
@@ -22,19 +5,36 @@ import {
|
||||
InternalSmtpPassword,
|
||||
InternalSmtpPort,
|
||||
InternalSmtpSecure,
|
||||
SendGridConfig,
|
||||
getEmailServerType,
|
||||
getGlobalSMTPConfig,
|
||||
SendGridConfig,
|
||||
getSendgridConfig,
|
||||
} from '../Config';
|
||||
import SendgridMail, { MailDataRequired } from '@sendgrid/mail';
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
import UserOnCallLogTimelineService from 'CommonServer/Services/UserOnCallLogTimelineService';
|
||||
import UserNotificationStatus from 'Common/Types/UserNotification/UserNotificationStatus';
|
||||
import EmailLog from 'Model/Models/EmailLog';
|
||||
import Hostname from 'Common/Types/API/Hostname';
|
||||
import OneUptimeDate from 'Common/Types/Date';
|
||||
import Dictionary from 'Common/Types/Dictionary';
|
||||
import Email from 'Common/Types/Email';
|
||||
import EmailMessage from 'Common/Types/Email/EmailMessage';
|
||||
import EmailServer from 'Common/Types/Email/EmailServer';
|
||||
import EmailTemplateType from 'Common/Types/Email/EmailTemplateType';
|
||||
import BadDataException from 'Common/Types/Exception/BadDataException';
|
||||
import { JSONObject } from 'Common/Types/JSON';
|
||||
import MailStatus from 'Common/Types/Mail/MailStatus';
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
import Port from 'Common/Types/Port';
|
||||
import UserNotificationStatus from 'Common/Types/UserNotification/UserNotificationStatus';
|
||||
import { IsDevelopment } from 'CommonServer/EnvironmentConfig';
|
||||
import LocalCache from 'CommonServer/Infrastructure/LocalCache';
|
||||
import EmailLogService from 'CommonServer/Services/EmailLogService';
|
||||
import UserOnCallLogTimelineService from 'CommonServer/Services/UserOnCallLogTimelineService';
|
||||
import logger from 'CommonServer/Utils/Logger';
|
||||
import EmailLog from 'Model/Models/EmailLog';
|
||||
import { EmailServerType } from 'Model/Models/GlobalConfig';
|
||||
import fsp from 'fs/promises';
|
||||
import Handlebars from 'handlebars';
|
||||
import nodemailer, { Transporter } from 'nodemailer';
|
||||
import Path from 'path';
|
||||
|
||||
export default class MailService {
|
||||
public static isSMTPConfigValid(obj: JSONObject): boolean {
|
||||
|
||||
@@ -1,26 +1,26 @@
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
import Phone from 'Common/Types/Phone';
|
||||
import {
|
||||
SMSDefaultCostInCents,
|
||||
SMSHighRiskCostInCents,
|
||||
getTwilioConfig,
|
||||
} from '../Config';
|
||||
import Twilio from 'twilio';
|
||||
import SmsLog from 'Model/Models/SmsLog';
|
||||
import SmsStatus from 'Common/Types/SmsStatus';
|
||||
import { IsBillingEnabled } from 'CommonServer/EnvironmentConfig';
|
||||
import SmsLogService from 'CommonServer/Services/SmsLogService';
|
||||
import ProjectService from 'CommonServer/Services/ProjectService';
|
||||
import Project from 'Model/Models/Project';
|
||||
import { MessageInstance } from 'twilio/lib/rest/api/v2010/account/message';
|
||||
import NotificationService from 'CommonServer/Services/NotificationService';
|
||||
import logger from 'CommonServer/Utils/Logger';
|
||||
import UserOnCallLogTimelineService from 'CommonServer/Services/UserOnCallLogTimelineService';
|
||||
import UserNotificationStatus from 'Common/Types/UserNotification/UserNotificationStatus';
|
||||
import BadDataException from 'Common/Types/Exception/BadDataException';
|
||||
import { isHighRiskPhoneNumber } from 'Common/Types/Call/CallRequest';
|
||||
import Text from 'Common/Types/Text';
|
||||
import TwilioConfig from 'Common/Types/CallAndSMS/TwilioConfig';
|
||||
import BadDataException from 'Common/Types/Exception/BadDataException';
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
import Phone from 'Common/Types/Phone';
|
||||
import SmsStatus from 'Common/Types/SmsStatus';
|
||||
import Text from 'Common/Types/Text';
|
||||
import UserNotificationStatus from 'Common/Types/UserNotification/UserNotificationStatus';
|
||||
import { IsBillingEnabled } from 'CommonServer/EnvironmentConfig';
|
||||
import NotificationService from 'CommonServer/Services/NotificationService';
|
||||
import ProjectService from 'CommonServer/Services/ProjectService';
|
||||
import SmsLogService from 'CommonServer/Services/SmsLogService';
|
||||
import UserOnCallLogTimelineService from 'CommonServer/Services/UserOnCallLogTimelineService';
|
||||
import logger from 'CommonServer/Utils/Logger';
|
||||
import Project from 'Model/Models/Project';
|
||||
import SmsLog from 'Model/Models/SmsLog';
|
||||
import Twilio from 'twilio';
|
||||
import { MessageInstance } from 'twilio/lib/rest/api/v2010/account/message';
|
||||
|
||||
export default class SmsService {
|
||||
public static async sendSms(
|
||||
@@ -251,8 +251,8 @@ export default class SmsService {
|
||||
smsLog.status = SmsStatus.Success;
|
||||
smsLog.statusMessage = 'Message ID: ' + twillioMessage.sid;
|
||||
|
||||
logger.info('SMS message sent successfully.');
|
||||
logger.info(smsLog.statusMessage);
|
||||
logger.debug('SMS message sent successfully.');
|
||||
logger.debug(smsLog.statusMessage);
|
||||
|
||||
if (shouldChargeForSMS && project) {
|
||||
smsLog.smsCostInUSDCents = smsCost * 100;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user