Compare commits
1021 Commits
23.01.22-H
...
v23.9.11
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
78a87c4ed0 | ||
|
|
af41eed26c | ||
|
|
5169ac32a1 | ||
|
|
1e7c50b0fe | ||
|
|
31f7521501 | ||
|
|
a29e700b83 | ||
|
|
04c45bd39f | ||
|
|
524bf1f676 | ||
|
|
ee63f3fe0d | ||
|
|
295db87113 | ||
|
|
1f54292fbc | ||
|
|
eea4e2642c | ||
|
|
8b81501b44 | ||
|
|
148f3198ce | ||
|
|
b7417a07ad | ||
|
|
844311f4e8 | ||
|
|
da45606f64 | ||
|
|
cf0cc4cc17 | ||
|
|
edd8fd0fbc | ||
|
|
05c3613d3f | ||
|
|
ebbbebf352 | ||
|
|
ea478ae5e6 | ||
|
|
be57534b2a | ||
|
|
7c11f0fa38 | ||
|
|
a3b05c3760 | ||
|
|
04a91b2bb7 | ||
|
|
1d81a20e6f | ||
|
|
989ec68666 | ||
|
|
5401e2729b | ||
|
|
5c6bb2fa0d | ||
|
|
858e02f7c6 | ||
|
|
dd65bd5744 | ||
|
|
6ba1bdb7de | ||
|
|
b7e3263b38 | ||
|
|
4830d54229 | ||
|
|
85911c8ff4 | ||
|
|
296891ca67 | ||
|
|
7d0762ff35 | ||
|
|
127d9e6196 | ||
|
|
6c58281c2e | ||
|
|
beeeb4bd33 | ||
|
|
9aa1462e17 | ||
|
|
6637d9c954 | ||
|
|
f1344f16fa | ||
|
|
abbaa1c11f | ||
|
|
87a10a721b | ||
|
|
2230df591e | ||
|
|
2898805514 | ||
|
|
c906ccda91 | ||
|
|
d1101aee47 | ||
|
|
39157360ef | ||
|
|
e4a34ecd2b | ||
|
|
d444ad31ce | ||
|
|
06a11f43ea | ||
|
|
fdcf12fb86 | ||
|
|
59682f6840 | ||
|
|
949052d00c | ||
|
|
e7fd39112e | ||
|
|
028c4a9cb4 | ||
|
|
274f954b8a | ||
|
|
e44bceaed5 | ||
|
|
9fe8d8a3b4 | ||
|
|
ab59d529ec | ||
|
|
7581e4f63a | ||
|
|
8f15579136 | ||
|
|
2b9323ac98 | ||
|
|
8676b7ccde | ||
|
|
cd43935656 | ||
|
|
f6a08fc3d4 | ||
|
|
166af4ce8d | ||
|
|
7943977ff5 | ||
|
|
2e407d9e8f | ||
|
|
04cf16cc94 | ||
|
|
fa6df3cff8 | ||
|
|
0476689c25 | ||
|
|
ce2d955c86 | ||
|
|
d62a1f077a | ||
|
|
14a1d61bb1 | ||
|
|
069522febe | ||
|
|
28df1e6aaf | ||
|
|
bdcef1a37e | ||
|
|
1580810597 | ||
|
|
d4c724e79c | ||
|
|
361952ec5a | ||
|
|
c2a4713024 | ||
|
|
8c60e98852 | ||
|
|
10371e8411 | ||
|
|
053bcff11c | ||
|
|
841bd16701 | ||
|
|
657e6e2f8d | ||
|
|
89ea7c02c6 | ||
|
|
297b9158e1 | ||
|
|
0ab1f9e19a | ||
|
|
25b54d1f62 | ||
|
|
854ef20826 | ||
|
|
bed4e6a152 | ||
|
|
a379054f5b | ||
|
|
b5e933ba12 | ||
|
|
9afed6e43b | ||
|
|
015ce23fe2 | ||
|
|
6dcf09a2f6 | ||
|
|
7391df9f7b | ||
|
|
6032667ea7 | ||
|
|
8ae8d6aa27 | ||
|
|
b281652009 | ||
|
|
82e9a4a8ef | ||
|
|
f9baa603f4 | ||
|
|
f1a553aac6 | ||
|
|
61df3ec581 | ||
|
|
8ffc07a110 | ||
|
|
a794170adf | ||
|
|
6c28c14e7c | ||
|
|
a1b17a238b | ||
|
|
53f41a9434 | ||
|
|
2223050523 | ||
|
|
eb7282201b | ||
|
|
396416ad29 | ||
|
|
9c76c9f79c | ||
|
|
c4adb03c50 | ||
|
|
1d8beb9222 | ||
|
|
e6644ad3ec | ||
|
|
dce40cb9fb | ||
|
|
d6cf983b93 | ||
|
|
0b350b686e | ||
|
|
fa7d2534bf | ||
|
|
3a2afa4bf4 | ||
|
|
57c9c5b23f | ||
|
|
facc6619e2 | ||
|
|
6b0a65c427 | ||
|
|
fb489adc66 | ||
|
|
45c03aee45 | ||
|
|
41cfdcdc00 | ||
|
|
e14475afb0 | ||
|
|
64a3c348bd | ||
|
|
c57513618b | ||
|
|
b114de1fd9 | ||
|
|
ed0276b61e | ||
|
|
6998f11967 | ||
|
|
956fcf65ed | ||
|
|
e32844d2f2 | ||
|
|
3dca9da5e3 | ||
|
|
5a060722a1 | ||
|
|
f3dac743d1 | ||
|
|
a07ed7ee85 | ||
|
|
d54722cf03 | ||
|
|
ba09964eaa | ||
|
|
c0f73a8112 | ||
|
|
06b6ef2889 | ||
|
|
602f0648e0 | ||
|
|
7e2f05866c | ||
|
|
acfc48c82c | ||
|
|
2b8257d866 | ||
|
|
a3bcb3c491 | ||
|
|
658b936a01 | ||
|
|
9b1443423e | ||
|
|
4848ba78d9 | ||
|
|
d16d43de9d | ||
|
|
fa36fb788c | ||
|
|
276214da98 | ||
|
|
1c94328dbd | ||
|
|
7f51fdcfa1 | ||
|
|
541cb2e1b1 | ||
|
|
2396f226dd | ||
|
|
58c26ea055 | ||
|
|
413f869424 | ||
|
|
e1ab0b3ef7 | ||
|
|
0cb7b6c96a | ||
|
|
3f0c899f17 | ||
|
|
a25efc6dd6 | ||
|
|
8038fc9472 | ||
|
|
17c3dc4914 | ||
|
|
2e53da32d1 | ||
|
|
57aefdf332 | ||
|
|
9edbe8affc | ||
|
|
033dacf8be | ||
|
|
b82246595f | ||
|
|
277950fc51 | ||
|
|
0261b8e210 | ||
|
|
445b4de69e | ||
|
|
3b60a3a1ae | ||
|
|
5103e2c229 | ||
|
|
e9dc7de2e8 | ||
|
|
c7d04ddbcf | ||
|
|
af5aecd127 | ||
|
|
ecc297a112 | ||
|
|
1067211033 | ||
|
|
64c3de0450 | ||
|
|
20986852de | ||
|
|
2239aa6c25 | ||
|
|
908789230b | ||
|
|
eb74d7fc14 | ||
|
|
519822c971 | ||
|
|
9be6af6477 | ||
|
|
5838f8be95 | ||
|
|
da8098752e | ||
|
|
0fcd4502bd | ||
|
|
9e768f5be7 | ||
|
|
50fa0677d9 | ||
|
|
3641d2360e | ||
|
|
9eab7640c4 | ||
|
|
8feb7c585f | ||
|
|
654efdc503 | ||
|
|
46b01bcb93 | ||
|
|
4895a61af3 | ||
|
|
c820e2e8f5 | ||
|
|
c9c7f0ada6 | ||
|
|
3069e508f5 | ||
|
|
62601fc4ad | ||
|
|
5d05ede3e6 | ||
|
|
c3982bf747 | ||
|
|
ef97013051 | ||
|
|
07d37cd9b0 | ||
|
|
6b3bed69d3 | ||
|
|
f99f45505d | ||
|
|
7caf1f841a | ||
|
|
8ea45f5295 | ||
|
|
a57669a6e0 | ||
|
|
80a0b889c1 | ||
|
|
57f508f15c | ||
|
|
b732a87409 | ||
|
|
c2b97cbabd | ||
|
|
645e779d7c | ||
|
|
b6a9c788bf | ||
|
|
8bd5c59186 | ||
|
|
22b9ec5a1a | ||
|
|
ed2f6f90eb | ||
|
|
609e118a7a | ||
|
|
8ed1456e02 | ||
|
|
75002f93d3 | ||
|
|
84fb663e09 | ||
|
|
7f051938d0 | ||
|
|
913a1f72b6 | ||
|
|
cb7eeb7d46 | ||
|
|
92c58efd63 | ||
|
|
f5acab8ad8 | ||
|
|
9b2c6b8838 | ||
|
|
33e6fffd5d | ||
|
|
c61caed1af | ||
|
|
474da8f3f0 | ||
|
|
0ed510cfd8 | ||
|
|
5e884dc675 | ||
|
|
fcde1a275e | ||
|
|
bcd804403a | ||
|
|
ef1c3c9674 | ||
|
|
7d995f0735 | ||
|
|
89342ba9ee | ||
|
|
b18bcc7692 | ||
|
|
55d6513853 | ||
|
|
d11972c07d | ||
|
|
b2c798a934 | ||
|
|
200e4c806c | ||
|
|
d96b3519b2 | ||
|
|
6f5c514be3 | ||
|
|
89fe57fbc1 | ||
|
|
f168726778 | ||
|
|
69ff580d4c | ||
|
|
6dfa82bafa | ||
|
|
63c0850352 | ||
|
|
49d1480e15 | ||
|
|
0dd75db4d7 | ||
|
|
2773fc4f83 | ||
|
|
8fc140c16a | ||
|
|
c7a740d51f | ||
|
|
611ae2f154 | ||
|
|
326503bcf9 | ||
|
|
ad4adc742f | ||
|
|
7befc97ab7 | ||
|
|
28f98c159b | ||
|
|
e7ff1a7954 | ||
|
|
f93b8b2e10 | ||
|
|
c64c351a85 | ||
|
|
75c5ec1215 | ||
|
|
7b3a08ef25 | ||
|
|
ef660d49c3 | ||
|
|
bcf4bcc5af | ||
|
|
e8f8296d53 | ||
|
|
c360c80291 | ||
|
|
8b62207b8b | ||
|
|
1a92514253 | ||
|
|
725490c87e | ||
|
|
f811c0a543 | ||
|
|
a26a81beec | ||
|
|
cb5b3d3a8d | ||
|
|
26ee74be6e | ||
|
|
0d1c32a453 | ||
|
|
ab0c9dfeb9 | ||
|
|
0ebd391cd2 | ||
|
|
a0b077b54e | ||
|
|
d78fcd6ae3 | ||
|
|
a397048ea4 | ||
|
|
e4da6c9379 | ||
|
|
be1cdec6fa | ||
|
|
5df4822ef0 | ||
|
|
1a89a14ee3 | ||
|
|
97f7770d98 | ||
|
|
0327f8818a | ||
|
|
b03c6aec57 | ||
|
|
3c9a035249 | ||
|
|
4b075cffe7 | ||
|
|
b85c308e78 | ||
|
|
9e58c8c572 | ||
|
|
5cc08030ce | ||
|
|
50699ed01f | ||
|
|
486e245c14 | ||
|
|
cd9105d0a9 | ||
|
|
99e9f5ca68 | ||
|
|
f35550663d | ||
|
|
39eb7fff1e | ||
|
|
fa6748fe79 | ||
|
|
2c12e625b4 | ||
|
|
49daed828b | ||
|
|
a3359dbec4 | ||
|
|
c8bae60060 | ||
|
|
0f8253241e | ||
|
|
ed9c0c2a2c | ||
|
|
3c5db004c4 | ||
|
|
5eac1e000f | ||
|
|
b42d6feaa0 | ||
|
|
d61d9b1789 | ||
|
|
2c7e14afcd | ||
|
|
58ade8948c | ||
|
|
10e08093c6 | ||
|
|
58bc8bf6ce | ||
|
|
b1e10567f6 | ||
|
|
1a464630f2 | ||
|
|
4aea02e215 | ||
|
|
b1b8d6f090 | ||
|
|
0de1406b5c | ||
|
|
e068b360a4 | ||
|
|
385deb254b | ||
|
|
b28f9ed422 | ||
|
|
117e0366e5 | ||
|
|
6759aa3267 | ||
|
|
aab506fb58 | ||
|
|
b111bbf926 | ||
|
|
8d58f1fe91 | ||
|
|
20871ba401 | ||
|
|
fb121c1df4 | ||
|
|
80888ae910 | ||
|
|
84c74fbb2a | ||
|
|
9caeb0cfdf | ||
|
|
796c02adfb | ||
|
|
0812182fd2 | ||
|
|
8368c3d102 | ||
|
|
dca50f42c7 | ||
|
|
1944c24fe7 | ||
|
|
f136334414 | ||
|
|
c5f99ad701 | ||
|
|
62b3bc6a6a | ||
|
|
e7fe2b808f | ||
|
|
a85f0003e3 | ||
|
|
d6142f7498 | ||
|
|
63661dea5b | ||
|
|
499a798d3e | ||
|
|
23da070784 | ||
|
|
5efc4975c6 | ||
|
|
013262c694 | ||
|
|
12d8d2d2fc | ||
|
|
af83432fdb | ||
|
|
34d3ea9ef0 | ||
|
|
9c2ebd53d7 | ||
|
|
fc569b50d4 | ||
|
|
06873f5054 | ||
|
|
420ee4ac65 | ||
|
|
2659bc1440 | ||
|
|
ded7af9fe3 | ||
|
|
75dd81adcd | ||
|
|
b749199f55 | ||
|
|
731e9be82b | ||
|
|
22844b430e | ||
|
|
dbfb3176f5 | ||
|
|
0591afa80f | ||
|
|
be2f5a9f15 | ||
|
|
633ceb6136 | ||
|
|
7610f3633d | ||
|
|
acf2437020 | ||
|
|
f28733d94d | ||
|
|
8398d73b61 | ||
|
|
46876228ba | ||
|
|
7de5e4db8b | ||
|
|
33273bf83c | ||
|
|
719b3e5705 | ||
|
|
ae5fd47f72 | ||
|
|
57f9728867 | ||
|
|
b07118b298 | ||
|
|
e669ecacf3 | ||
|
|
725032d31f | ||
|
|
ea05fd58c1 | ||
|
|
1ecdc1249c | ||
|
|
b016f6fefe | ||
|
|
8c64b65942 | ||
|
|
e0e1250592 | ||
|
|
64694a1ead | ||
|
|
7c1c33ecdc | ||
|
|
48303fce62 | ||
|
|
67cac33779 | ||
|
|
7c9229e9c9 | ||
|
|
f8b5cc98b2 | ||
|
|
ddde35ec1c | ||
|
|
df7c51d303 | ||
|
|
96de41e4f0 | ||
|
|
eb63964a90 | ||
|
|
00942ba48f | ||
|
|
9735085328 | ||
|
|
367dec4024 | ||
|
|
3200b3bc10 | ||
|
|
e98035e418 | ||
|
|
477d43b675 | ||
|
|
01d7730ffb | ||
|
|
d69227a8f1 | ||
|
|
7e6fa9fcbd | ||
|
|
a58ef98a9c | ||
|
|
5805c94c8a | ||
|
|
df0afdc7be | ||
|
|
5bf12e4e7d | ||
|
|
c9f22aa0c7 | ||
|
|
8c91357fbb | ||
|
|
4a0265ef25 | ||
|
|
d392be05a2 | ||
|
|
824825860f | ||
|
|
0a4261bba4 | ||
|
|
93e76e27d7 | ||
|
|
9812b76138 | ||
|
|
988a323757 | ||
|
|
29fc5c669d | ||
|
|
fbc3c8cede | ||
|
|
11f341366b | ||
|
|
2414498846 | ||
|
|
1977f48eb1 | ||
|
|
dc1c5763aa | ||
|
|
14e16a9d18 | ||
|
|
4505a5a97a | ||
|
|
f076240832 | ||
|
|
086d1c03cf | ||
|
|
c6fab002be | ||
|
|
48be1a9eda | ||
|
|
59e3f45e70 | ||
|
|
294a205dfd | ||
|
|
80500b6ede | ||
|
|
06d9cf2292 | ||
|
|
b7a3ad7044 | ||
|
|
b6df0fb1a8 | ||
|
|
42e0d4330d | ||
|
|
cfae2c3418 | ||
|
|
fd314b5187 | ||
|
|
f6a680730f | ||
|
|
0164f4a9d7 | ||
|
|
b37b4559b0 | ||
|
|
81d9e12c8d | ||
|
|
5aa4450691 | ||
|
|
144b81eab7 | ||
|
|
c2e4d39117 | ||
|
|
5397edc14d | ||
|
|
82d7c28fd7 | ||
|
|
b3159d683c | ||
|
|
56d6190fa3 | ||
|
|
b59d2149b8 | ||
|
|
3ca4ce9c80 | ||
|
|
c3a6b33b33 | ||
|
|
de964eb64a | ||
|
|
e421d84033 | ||
|
|
76e02d691d | ||
|
|
e7a8668420 | ||
|
|
b71da10a80 | ||
|
|
a73f8bf8da | ||
|
|
eae55beccc | ||
|
|
2b9c76efe1 | ||
|
|
b1b3abeb2f | ||
|
|
8d028ad705 | ||
|
|
50098bd092 | ||
|
|
6f45cfc60c | ||
|
|
d3030b8815 | ||
|
|
12e97c6b9a | ||
|
|
a6797d8608 | ||
|
|
640aac54f5 | ||
|
|
89e7ae9593 | ||
|
|
80cc4ec265 | ||
|
|
ffb187dd84 | ||
|
|
48117cc0d6 | ||
|
|
a4c236979f | ||
|
|
73e9748631 | ||
|
|
d46289e59d | ||
|
|
55ab809d5c | ||
|
|
6843668193 | ||
|
|
c6a2f697b8 | ||
|
|
02340feb70 | ||
|
|
42e1030f85 | ||
|
|
221b6349f1 | ||
|
|
ac1dbe4e46 | ||
|
|
75c4b50d96 | ||
|
|
20955e1a8f | ||
|
|
4fa8b8c4ef | ||
|
|
bf29cd42d6 | ||
|
|
d85ecb0d12 | ||
|
|
27519a3966 | ||
|
|
50480b85dd | ||
|
|
14d236cac7 | ||
|
|
220bd6798e | ||
|
|
2003f5a946 | ||
|
|
7e75df6334 | ||
|
|
b4775ae1e7 | ||
|
|
fec1b3f323 | ||
|
|
50aeaa957e | ||
|
|
9a59102f92 | ||
|
|
6b13738ea7 | ||
|
|
3c2dc0dbfb | ||
|
|
243f0034f3 | ||
|
|
1dfe20b0c9 | ||
|
|
d6cffb367f | ||
|
|
2561fccce5 | ||
|
|
3933936aa9 | ||
|
|
12f628aa5d | ||
|
|
5ed95dcd36 | ||
|
|
47ef80cc44 | ||
|
|
832beeef22 | ||
|
|
6598eb9a48 | ||
|
|
4e36f539ef | ||
|
|
93a7da0018 | ||
|
|
622694f405 | ||
|
|
01c5de3620 | ||
|
|
5e1248cc00 | ||
|
|
efecdff59d | ||
|
|
3c5deccb84 | ||
|
|
8e12daf1c7 | ||
|
|
008da18727 | ||
|
|
f108cc86da | ||
|
|
f2b2a25a19 | ||
|
|
82a1a7e5c7 | ||
|
|
e4b61e2667 | ||
|
|
cd4d1ca37b | ||
|
|
d238de9fb1 | ||
|
|
4b07e8bbb6 | ||
|
|
2cb169eff5 | ||
|
|
b53b455719 | ||
|
|
cf51d1f5d7 | ||
|
|
296fd71b5a | ||
|
|
4f17e61e8a | ||
|
|
95126b7c36 | ||
|
|
d2b6e75483 | ||
|
|
320660945c | ||
|
|
a0d02b2aa5 | ||
|
|
19cf64a6f0 | ||
|
|
01017040e3 | ||
|
|
9c7f5ff771 | ||
|
|
3718a06ea9 | ||
|
|
2950d2ce9f | ||
|
|
4f59d0867d | ||
|
|
ee98c7a653 | ||
|
|
af902dae57 | ||
|
|
0e23c6ac61 | ||
|
|
30362bb72e | ||
|
|
dd7f86bfa0 | ||
|
|
b231a06ee8 | ||
|
|
d86a042070 | ||
|
|
b0e34a802d | ||
|
|
3460b88167 | ||
|
|
2668370450 | ||
|
|
42e1e748a3 | ||
|
|
0c620a06f7 | ||
|
|
bae7b0400c | ||
|
|
b87083e6b1 | ||
|
|
db4d81863b | ||
|
|
2c15bc4127 | ||
|
|
f7a8e77cc5 | ||
|
|
7c16bd31a2 | ||
|
|
d5d23c8c60 | ||
|
|
3948557da8 | ||
|
|
8057d49be0 | ||
|
|
22bfb9deef | ||
|
|
c9f4560cf9 | ||
|
|
6dee27e5a5 | ||
|
|
9ddea01f12 | ||
|
|
8a8790d49b | ||
|
|
e74b8d27b6 | ||
|
|
a38d254877 | ||
|
|
3ca4e19199 | ||
|
|
0b3b1e4ed4 | ||
|
|
b068b631be | ||
|
|
9bdac0edbf | ||
|
|
56604f702f | ||
|
|
25bdc36183 | ||
|
|
fa7582135e | ||
|
|
40e94e45a2 | ||
|
|
e119d51d08 | ||
|
|
7c63a5e52f | ||
|
|
3a46c7eb27 | ||
|
|
80bda24b5f | ||
|
|
5f3f4c1a73 | ||
|
|
1bdfc1962a | ||
|
|
ff9245c31d | ||
|
|
085e7c80e7 | ||
|
|
9a13133a5f | ||
|
|
1baeeb99db | ||
|
|
8f1223c55b | ||
|
|
64ad2f6b80 | ||
|
|
39282d51ac | ||
|
|
76c3f7e94e | ||
|
|
2a14d59a45 | ||
|
|
d848e18bc0 | ||
|
|
3430118f09 | ||
|
|
e0c7ffbb12 | ||
|
|
ec669a701e | ||
|
|
8da84e8d64 | ||
|
|
90e94a14fb | ||
|
|
f33262d262 | ||
|
|
2e137b4e07 | ||
|
|
634bc0744d | ||
|
|
8cbca4430a | ||
|
|
6c166908a1 | ||
|
|
42ebb687f8 | ||
|
|
d9761e771f | ||
|
|
2575b79c8b | ||
|
|
6009098c9c | ||
|
|
2946e48321 | ||
|
|
8256a84efe | ||
|
|
c2da5c56b8 | ||
|
|
ef64014100 | ||
|
|
2bb5d332ff | ||
|
|
54d71c7cc9 | ||
|
|
14437f2984 | ||
|
|
928ee52a7e | ||
|
|
82d87db762 | ||
|
|
f26507e540 | ||
|
|
dcd32b9162 | ||
|
|
d59eb03f40 | ||
|
|
d096b36434 | ||
|
|
5624401fcf | ||
|
|
8c4992bf9a | ||
|
|
a4984dc477 | ||
|
|
c2676f9fda | ||
|
|
9bb3820e82 | ||
|
|
72ccaf754f | ||
|
|
da0d387ae0 | ||
|
|
e06fe9146c | ||
|
|
e5eb3ab297 | ||
|
|
012589b848 | ||
|
|
43a2c4870e | ||
|
|
8fe10e6314 | ||
|
|
cab6c0cefb | ||
|
|
07c2c2b9ac | ||
|
|
a4f8cfa287 | ||
|
|
1bafee59c8 | ||
|
|
e8f9608372 | ||
|
|
d8904f7ac8 | ||
|
|
8f8e4334b9 | ||
|
|
293e009321 | ||
|
|
5d53f1f605 | ||
|
|
87212bb25f | ||
|
|
7076c83185 | ||
|
|
ccbf4defe8 | ||
|
|
c3c3de01e0 | ||
|
|
7efe658503 | ||
|
|
88301c97eb | ||
|
|
e68a04ee5b | ||
|
|
655fa96c67 | ||
|
|
ce5d09ed2e | ||
|
|
e34a7c032a | ||
|
|
88ef46b2d4 | ||
|
|
d5f8cdda7d | ||
|
|
4fbaccc0f2 | ||
|
|
b4dd34355e | ||
|
|
2b02e6ee29 | ||
|
|
a262a89e13 | ||
|
|
50233460b2 | ||
|
|
8776fc1356 | ||
|
|
cd793c8e67 | ||
|
|
9a6c5896dd | ||
|
|
43e96a8708 | ||
|
|
38702d03ac | ||
|
|
335fa1b003 | ||
|
|
91140642ef | ||
|
|
eb0c7fbf68 | ||
|
|
d8af423a9c | ||
|
|
8693d4cae9 | ||
|
|
960a3ebe14 | ||
|
|
1105caed16 | ||
|
|
f35bb19f5a | ||
|
|
eee7816a50 | ||
|
|
58bb740e48 | ||
|
|
1101bc9477 | ||
|
|
6fd750e4e1 | ||
|
|
55d7cb0fec | ||
|
|
cc5901ffb0 | ||
|
|
e9c8be78ad | ||
|
|
779ce0e568 | ||
|
|
c351d2e8d4 | ||
|
|
dc2849f296 | ||
|
|
b10d259390 | ||
|
|
aac46f97ce | ||
|
|
46e4857a35 | ||
|
|
35a0a91a02 | ||
|
|
cd164793cc | ||
|
|
56f35f5068 | ||
|
|
e83a622152 | ||
|
|
6cdc0c14df | ||
|
|
d7fb478794 | ||
|
|
2c2bf18562 | ||
|
|
5faf6fb419 | ||
|
|
b1f946e1e6 | ||
|
|
bcea3e1a97 | ||
|
|
bcda186cbe | ||
|
|
02215c87eb | ||
|
|
024e97f138 | ||
|
|
c56c7609cc | ||
|
|
d723b37622 | ||
|
|
b461bf4ef7 | ||
|
|
6e8bb4c2ea | ||
|
|
0446f6302e | ||
|
|
a0b0c0ba19 | ||
|
|
cb0a62396f | ||
|
|
3315994356 | ||
|
|
c3798ff102 | ||
|
|
43c0df086a | ||
|
|
98745805d3 | ||
|
|
1dbdf425d6 | ||
|
|
b3d05332e5 | ||
|
|
98fb02282b | ||
|
|
536d789535 | ||
|
|
d0284a0603 | ||
|
|
4d433b633f | ||
|
|
388844f2bc | ||
|
|
2fc63daf23 | ||
|
|
c9bc3e9447 | ||
|
|
4a754cdae5 | ||
|
|
1bb1d528f4 | ||
|
|
770d9bfe4a | ||
|
|
8e3aa0407a | ||
|
|
acb756a871 | ||
|
|
85e6319760 | ||
|
|
66ffb5ebca | ||
|
|
e548138b9f | ||
|
|
2a5a2693ce | ||
|
|
efee89dcc1 | ||
|
|
74894b519f | ||
|
|
1a08a88b9e | ||
|
|
e3e0e62d77 | ||
|
|
235264ed1e | ||
|
|
a5aa3d550d | ||
|
|
79b5429a01 | ||
|
|
45dd94e5d5 | ||
|
|
e0d5970643 | ||
|
|
1fc11cd49f | ||
|
|
e5be488b3f | ||
|
|
77ba2e1362 | ||
|
|
89aa38ecc1 | ||
|
|
0c35577a68 | ||
|
|
cd9e244efd | ||
|
|
ae876484a4 | ||
|
|
7720bba5dc | ||
|
|
d1b1f078aa | ||
|
|
8839ed5932 | ||
|
|
c5987778b6 | ||
|
|
abe9ff5b2c | ||
|
|
e231600b88 | ||
|
|
3ccad7a564 | ||
|
|
8cf034ed29 | ||
|
|
9784092c7f | ||
|
|
ef3fe4dd52 | ||
|
|
7530fb0e23 | ||
|
|
49211719f0 | ||
|
|
430e53820a | ||
|
|
170772eb7c | ||
|
|
6f1d795c60 | ||
|
|
3d1178bd16 | ||
|
|
17f2421836 | ||
|
|
c61a5bedcf | ||
|
|
a318a15cad | ||
|
|
f430587965 | ||
|
|
de3b0c7ffc | ||
|
|
689f54cdc3 | ||
|
|
cee24e0b6c | ||
|
|
2e713bf1d0 | ||
|
|
d774901b6d | ||
|
|
7d7f3df226 | ||
|
|
07c2cd1af4 | ||
|
|
ddd28a0607 | ||
|
|
fa92df6567 | ||
|
|
76a3efe039 | ||
|
|
601ed15f20 | ||
|
|
2a3b505dff | ||
|
|
9550227672 | ||
|
|
89c0750463 | ||
|
|
0fa71362b8 | ||
|
|
d8df097e83 | ||
|
|
67c20cabc3 | ||
|
|
5867961383 | ||
|
|
649e280ce1 | ||
|
|
9d982eff1b | ||
|
|
6ac8225b19 | ||
|
|
55ed3c4ae0 | ||
|
|
5d0804639c | ||
|
|
6edb623b9c | ||
|
|
8c2a1e17d9 | ||
|
|
2a2f96d726 | ||
|
|
ec705df38b | ||
|
|
cb20fad13b | ||
|
|
969cae0343 | ||
|
|
f9652258e9 | ||
|
|
6bb891f830 | ||
|
|
4659d2c941 | ||
|
|
8644818949 | ||
|
|
de62956c40 | ||
|
|
3547aec75f | ||
|
|
21b5d775d2 | ||
|
|
0973bc538e | ||
|
|
bf2c4b87ab | ||
|
|
b03087c1c5 | ||
|
|
b814a856d0 | ||
|
|
f6b69a63e2 | ||
|
|
df499ea33c | ||
|
|
007611c429 | ||
|
|
12bf4c7bcc | ||
|
|
5b05be24ad | ||
|
|
f50e3d4e92 | ||
|
|
7177cdd51d | ||
|
|
a71f16ee37 | ||
|
|
070e31ef19 | ||
|
|
42df2b255a | ||
|
|
52027c65b3 | ||
|
|
a2f2bce3ab | ||
|
|
ebcf6fa49b | ||
|
|
c14c762bde | ||
|
|
fd50ab7deb | ||
|
|
0db7521bee | ||
|
|
3adfa2c268 | ||
|
|
e27610a199 | ||
|
|
bd43a16975 | ||
|
|
eb56126224 | ||
|
|
7945fce65d | ||
|
|
8a7ddfbb47 | ||
|
|
03163e424f | ||
|
|
d5b7023927 | ||
|
|
884aca149a | ||
|
|
1836567f97 | ||
|
|
78f71abd31 | ||
|
|
0f63497847 | ||
|
|
8a1e472fed | ||
|
|
3831b5a50a | ||
|
|
3756e1a327 | ||
|
|
c9eb866acd | ||
|
|
55530c05f9 | ||
|
|
422997be9b | ||
|
|
13ff086412 | ||
|
|
298b5ac03e | ||
|
|
e9af2efbd1 | ||
|
|
4027970975 | ||
|
|
0ca7116167 | ||
|
|
1474cf424b | ||
|
|
b763d75703 | ||
|
|
a0501d88ec | ||
|
|
f62d94ba61 | ||
|
|
e99d855284 | ||
|
|
31b78ff106 | ||
|
|
ae0c45a716 | ||
|
|
0105844410 | ||
|
|
07e8395536 | ||
|
|
6c8fc093af | ||
|
|
95a7dcc7fc | ||
|
|
c54156ca1e | ||
|
|
941a8ef661 | ||
|
|
fc79ffc956 | ||
|
|
8e86343942 | ||
|
|
bb87e65745 | ||
|
|
d1989acd5c | ||
|
|
e5bc4ad41b | ||
|
|
927bdc2f2b | ||
|
|
2ff57d8272 | ||
|
|
49baf4b613 | ||
|
|
a573fd9841 | ||
|
|
e91b640bff | ||
|
|
8ee47e2fcc | ||
|
|
092797e75c | ||
|
|
816a01f8af | ||
|
|
3578bbfcad | ||
|
|
b4b15af887 | ||
|
|
c74ef127d1 | ||
|
|
90b3a491c7 | ||
|
|
ad41d02eeb | ||
|
|
19fe48c7ec | ||
|
|
f3d05ca222 | ||
|
|
4aa1848ece | ||
|
|
2176c58cb5 | ||
|
|
2b95daa248 | ||
|
|
e7c0bcf419 | ||
|
|
063682510e | ||
|
|
8542d05f66 | ||
|
|
42aa89971d | ||
|
|
abd607ea10 | ||
|
|
5936ba4626 | ||
|
|
a6c2b9254b | ||
|
|
62669fd181 | ||
|
|
c8fcf6227e | ||
|
|
310b6de2cc | ||
|
|
306535a2a6 | ||
|
|
5944b1b6f5 | ||
|
|
6de9e1d4bd | ||
|
|
4bf6ab9c8c | ||
|
|
1e93dfa35e | ||
|
|
7f2567264c | ||
|
|
d9a9246f1b | ||
|
|
aa8fb62f15 | ||
|
|
6d5eeb88d3 | ||
|
|
ea1d710209 | ||
|
|
032b787b66 | ||
|
|
7024cd22de | ||
|
|
b9b66d5af1 | ||
|
|
b73a0d6347 | ||
|
|
a0bc318ff9 | ||
|
|
642e8464cd | ||
|
|
63a9e55d4e | ||
|
|
a07c73155f | ||
|
|
efbc32d3ed | ||
|
|
83f50bd0d8 | ||
|
|
87cb0f50b5 | ||
|
|
73c779c238 | ||
|
|
40615cf17a | ||
|
|
6dd1448667 | ||
|
|
d8b4091043 | ||
|
|
7ea920efa9 | ||
|
|
7306dfbdd3 | ||
|
|
53c8c41133 | ||
|
|
395dfe5fe7 | ||
|
|
2ec0074a45 | ||
|
|
93dce378ea | ||
|
|
df6fae7aa5 | ||
|
|
57e0705e64 | ||
|
|
f3b31479c4 | ||
|
|
b914be9f0e | ||
|
|
2d0a4b79d8 | ||
|
|
d090b29c55 | ||
|
|
5a8be94cdc | ||
|
|
176a436ad4 | ||
|
|
1a05435691 | ||
|
|
49ce3edbdb | ||
|
|
51df759e25 | ||
|
|
992aa00c3c | ||
|
|
d87d933058 | ||
|
|
e0d639cba0 | ||
|
|
1cbbfb25cc | ||
|
|
f205e6f5c1 | ||
|
|
5e67ea22f5 | ||
|
|
99f522e625 | ||
|
|
f04cd7e28b | ||
|
|
3392a1f17c | ||
|
|
d0d9a1a65d | ||
|
|
16d04fe485 | ||
|
|
43d5c51e7c | ||
|
|
647013f3ff | ||
|
|
2ef631a440 | ||
|
|
86315a245b | ||
|
|
b0ce1b87a9 | ||
|
|
541c16aea6 | ||
|
|
ee1a3fc683 | ||
|
|
b90edcccbd | ||
|
|
4614b93780 | ||
|
|
4f548803cb | ||
|
|
d16dd95d65 | ||
|
|
97f7494c34 | ||
|
|
6179dabfa6 | ||
|
|
05ca683f91 | ||
|
|
170e61e73f | ||
|
|
33f0356ca7 | ||
|
|
4b9117dcb4 | ||
|
|
ec274c90da | ||
|
|
e7a1f013df | ||
|
|
c287bc2f22 | ||
|
|
5b8f8f2c5d | ||
|
|
887c2d0f42 | ||
|
|
06d7aa6623 | ||
|
|
5ed142a6b8 | ||
|
|
da9ca8a1f4 | ||
|
|
1cb5375a92 | ||
|
|
fd11cc30f5 | ||
|
|
a1bfdc0f18 | ||
|
|
e88362ce80 | ||
|
|
b5f0a64e7c | ||
|
|
e3623420b0 | ||
|
|
3344ed4b99 | ||
|
|
b0c91f7804 | ||
|
|
f8cf7f0717 | ||
|
|
29a6b78f27 | ||
|
|
388370b49d | ||
|
|
4d67c25e5a | ||
|
|
eec0dcca82 | ||
|
|
f1dc33761d | ||
|
|
7ea74d0fe3 | ||
|
|
0c635534a1 | ||
|
|
f70a3a4207 | ||
|
|
0fc174b5b3 | ||
|
|
d4eddf042d | ||
|
|
a4210c7e6b | ||
|
|
106438d61d | ||
|
|
94365d2cc9 | ||
|
|
b633c43078 | ||
|
|
84c3f1d786 | ||
|
|
1c963e9aff | ||
|
|
a2fe7f79cc | ||
|
|
8dabdb3f11 | ||
|
|
b9f2957104 | ||
|
|
bdeda87600 | ||
|
|
e98a538f53 | ||
|
|
2e0cb923db | ||
|
|
2e532abf6b | ||
|
|
51e865c98d | ||
|
|
2c27248aa1 | ||
|
|
43c2084e15 | ||
|
|
14cb0f46f3 | ||
|
|
162d507468 | ||
|
|
8624851cf5 | ||
|
|
2d92e93b7b | ||
|
|
78f9018083 | ||
|
|
ecb8a01aaa | ||
|
|
cca2c99f6b | ||
|
|
028d0dd7d8 | ||
|
|
7753e0481c | ||
|
|
5b35e68cf2 | ||
|
|
8b4115fe48 | ||
|
|
8bc1c3e0ed | ||
|
|
69061ed537 | ||
|
|
f151b1268d | ||
|
|
35d9c0e548 |
46
.github/ISSUE_TEMPLATE/i-have-an-issue.md
vendored
@@ -7,40 +7,40 @@ assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe the issue**
|
||||
## Describe the issue
|
||||
|
||||
> When submitting an issue ❗[enable debug](https://github.com/jokob-sk/Pi.Alert/blob/main/docs/DEBUG_TIPS.md)❗ and [have a look at the docs](https://github.com/jokob-sk/Pi.Alert/tree/main/docs)
|
||||
|
||||
**Paste last few lines from `pialert.log`**
|
||||
[describe your issue]
|
||||
|
||||
## Paste your `pialert.conf` (remove personal info)
|
||||
|
||||
```
|
||||
|
||||
paste here
|
||||
|
||||
paste_here
|
||||
```
|
||||
|
||||
**Paste your `pialert.conf` (remove personal info)**
|
||||
|
||||
```
|
||||
|
||||
paste here
|
||||
|
||||
```
|
||||
|
||||
**Paste your `docker-compose.yml` and `.env` (remove personal info)**
|
||||
## Paste your `docker-compose.yml` and `.env` (remove personal info)
|
||||
|
||||
`docker-compose.yml`
|
||||
```
|
||||
|
||||
paste here
|
||||
|
||||
```
|
||||
|
||||
paste_here
|
||||
```
|
||||
|
||||
`.env`
|
||||
```
|
||||
|
||||
paste here
|
||||
|
||||
```
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
paste_here
|
||||
```
|
||||
|
||||
## Screenshots
|
||||
|
||||
[If applicable, add screenshots to help explain your problem.]
|
||||
|
||||
## Paste last few lines from `pialert.log`
|
||||
|
||||
> You can use `tail -100 /home/pi/pialert/front/log/pialert.log`
|
||||
|
||||
```bash
|
||||
|
||||
# paste code below
|
||||
|
||||
25
.github/workflows/docker_cache-cleaner.yml
vendored
Executable file
@@ -0,0 +1,25 @@
|
||||
name: ci-package-cleaner
|
||||
|
||||
on:
|
||||
|
||||
workflow_dispatch: # manual option
|
||||
|
||||
schedule:
|
||||
- cron: '15 22 * * 1' # every Monday 10.15pm UTC (~11.15am Tuesday NZT)
|
||||
|
||||
jobs:
|
||||
|
||||
package-cleaner:
|
||||
name: package-cleaner
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
permissions:
|
||||
packages: write
|
||||
steps:
|
||||
|
||||
- uses: actions/delete-package-versions@v4
|
||||
with:
|
||||
package-name: pi.alert
|
||||
package-type: container
|
||||
min-versions-to-keep: 0
|
||||
delete-only-untagged-versions: true
|
||||
26
.github/workflows/docker_dev.yml
vendored
@@ -14,7 +14,13 @@ on:
|
||||
jobs:
|
||||
docker_dev:
|
||||
runs-on: ubuntu-latest
|
||||
if: contains(github.event.head_commit.message, 'PUSHPROD') != 'True'
|
||||
timeout-minutes: 30
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
if: >
|
||||
contains(github.event.head_commit.message, 'PUSHPROD') != 'True' &&
|
||||
github.repository == 'jokob-sk/Pi.Alert'
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
@@ -26,9 +32,16 @@ jobs:
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Set up dynamic build ARGs
|
||||
id: getargs
|
||||
id: getargs
|
||||
run: echo "version=$(cat ./stable/VERSION)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Get release version
|
||||
id: get_version
|
||||
run: echo "::set-output name=version::${{ 'Dev' }}"
|
||||
|
||||
- name: Create .VERSION file
|
||||
run: echo "${{ steps.get_version.outputs.version }}" >> .VERSION
|
||||
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v4
|
||||
@@ -47,6 +60,13 @@ jobs:
|
||||
type=semver,pattern={{major}}
|
||||
type=sha
|
||||
|
||||
- name: Log in to Github Container registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: jokob-sk
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Login to DockerHub
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: docker/login-action@v2
|
||||
@@ -62,3 +82,5 @@ jobs:
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
cache-from: type=registry,ref=ghcr.io/jokob-sk/pi.alert:buildcache
|
||||
cache-to: type=registry,ref=ghcr.io/jokob-sk/pi.alert:buildcache,mode=max
|
||||
|
||||
36
.github/workflows/docker_prod.yml
vendored
@@ -12,10 +12,15 @@ name: Publish Docker image
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
tags:
|
||||
- '*.*.*'
|
||||
jobs:
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
@@ -30,6 +35,13 @@ jobs:
|
||||
id: getargs
|
||||
run: echo "version=$(cat ./stable/VERSION)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Get release version
|
||||
id: get_version
|
||||
run: echo "::set-output name=version::${GITHUB_REF#refs/tags/}"
|
||||
|
||||
- name: Create .VERSION file
|
||||
run: echo "${{ steps.get_version.outputs.version }}" >> .VERSION
|
||||
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v4
|
||||
@@ -39,14 +51,20 @@ jobs:
|
||||
jokobsk/pi.alert
|
||||
# generate Docker tags based on the following events/attributes
|
||||
tags: |
|
||||
type=raw,value=latest
|
||||
type=schedule
|
||||
type=ref,event=branch
|
||||
type=semver,pattern={{version}},value=${{ inputs.version }}
|
||||
type=semver,pattern={{major}}.{{minor}},value=${{ inputs.version }}
|
||||
type=semver,pattern={{major}},value=${{ inputs.version }}
|
||||
type=ref,event=branch,suffix=-{{ sha }}
|
||||
type=ref,event=pr
|
||||
type=semver,pattern={{version}}
|
||||
type=semver,pattern={{major}}.{{minor}}
|
||||
type=semver,pattern={{major}}
|
||||
type=sha
|
||||
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') }}
|
||||
|
||||
- name: Log in to Github Container registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: jokob-sk
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Login to DockerHub
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: docker/login-action@v2
|
||||
@@ -62,3 +80,5 @@ jobs:
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
cache-from: type=registry,ref=ghcr.io/jokob-sk/pi.alert:buildcache
|
||||
cache-to: type=registry,ref=ghcr.io/jokob-sk/pi.alert:buildcache,mode=max
|
||||
|
||||
13
.gitignore
vendored
@@ -1,4 +1,17 @@
|
||||
.vscode
|
||||
.DS_Store
|
||||
config/pialert.conf
|
||||
db/*
|
||||
db/pialert.db
|
||||
front/log/*
|
||||
front/api/*
|
||||
**/plugins/**/*.log
|
||||
**/%40eaDir/
|
||||
**/@eaDir/
|
||||
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
*$py.class
|
||||
|
||||
**/last_result.log
|
||||
**/script.log
|
||||
12
Dockerfile
@@ -1,14 +1,15 @@
|
||||
FROM debian:bullseye-slim
|
||||
|
||||
# default UID and GID
|
||||
ENV USER=pi USER_ID=1000 USER_GID=1000 TZ=Europe/London PORT=20211
|
||||
ENV USER=pi USER_ID=1000 USER_GID=1000 PORT=20211
|
||||
#TZ=Europe/London
|
||||
|
||||
# Todo, figure out why using a workdir instead of full paths don't work
|
||||
# Todo, do we still need all these packages? I can already see sudo which isn't needed
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install --no-install-recommends tini ca-certificates curl libwww-perl arp-scan perl apt-utils cron sudo nginx-light php php-cgi php-fpm php-sqlite3 php-curl sqlite3 dnsutils net-tools python3 iproute2 nmap python3-pip zip -y \
|
||||
&& pip3 install requests paho-mqtt scapy cron-converter pytz \
|
||||
&& apt-get install --no-install-recommends tini snmp ca-certificates curl libwww-perl arp-scan perl apt-utils cron sudo nginx-light php php-cgi php-fpm php-sqlite3 php-curl sqlite3 dnsutils net-tools python3 iproute2 nmap python3-pip zip systemctl usbutils traceroute -y \
|
||||
&& pip3 install requests paho-mqtt scapy cron-converter pytz json2table dhcp-leases pyunifi \
|
||||
&& update-alternatives --install /usr/bin/python python /usr/bin/python3 10 \
|
||||
&& apt-get clean autoclean \
|
||||
&& apt-get autoremove \
|
||||
@@ -46,3 +47,8 @@ RUN rm /etc/nginx/sites-available/default \
|
||||
ENTRYPOINT ["tini", "--"]
|
||||
|
||||
CMD ["/home/pi/pialert/dockerfiles/start.sh"]
|
||||
|
||||
|
||||
|
||||
|
||||
## command to build docker: DOCKER_BUILDKIT=1 docker build . --iidfile dockerID
|
||||
|
||||
117
README.md
@@ -7,7 +7,6 @@ Scans for devices connected to your WIFI / LAN and alerts you if new and unknown
|
||||
|
||||
![Main screen][main]
|
||||
|
||||
|
||||
# 🐳 Docker image
|
||||
[](https://github.com/jokob-sk/Pi.Alert/actions/workflows/docker_prod.yml)
|
||||
[](https://github.com/jokob-sk/Pi.Alert)
|
||||
@@ -15,82 +14,66 @@ Scans for devices connected to your WIFI / LAN and alerts you if new and unknown
|
||||
[](https://hub.docker.com/r/jokobsk/pi.alert)
|
||||
[](https://hub.docker.com/r/jokobsk/pi.alert)
|
||||
|
||||
🐳 [Docker hub](https://registry.hub.docker.com/r/jokobsk/pi.alert) | 📄 [Dockerfile](https://github.com/jokob-sk/Pi.Alert/blob/main/Dockerfile) | 📚 [Docker instructions](https://github.com/jokob-sk/Pi.Alert/blob/main//dockerfiles/README.md) | 🆕 [Release notes](https://github.com/jokob-sk/Pi.Alert/releases)
|
||||
🐳 [Docker hub](https://registry.hub.docker.com/r/jokobsk/pi.alert) | 📑 [Docker guide](https://github.com/jokob-sk/Pi.Alert/blob/main/dockerfiles/README.md) | 🆕 [Release notes](https://github.com/jokob-sk/Pi.Alert/releases) | 📚 [All Docs](https://github.com/jokob-sk/Pi.Alert/tree/main/docs)
|
||||
|
||||
## 🔍 Scan Methods
|
||||
The system continuously scans the network for, **New devices**, **New connections** (re-connections), **Disconnections**, **"Always Connected" devices down**, Devices **IP changes** and **Internet IP address changes**. Scanning methods are:
|
||||
- **Method 1: arp-scan**. The arp-scan system utility is used to search
|
||||
for devices on the network using arp frames.
|
||||
- **Method 2: Pi-hole**. This method is optional and complementary to
|
||||
method 1. If the Pi-hole DNS server is active, Pi.Alert examines its
|
||||
activity looking for active devices using DNS that have not been
|
||||
detected by method 1.
|
||||
- **Method 3. dnsmasq**. This method is optional and complementary to the
|
||||
previous methods. If the DHCP server dnsmasq is active, Pi.Alert
|
||||
examines the DHCP leases (addresses assigned) to find active devices
|
||||
that were not discovered by the other methods.
|
||||
The system continuously scans the network for, **New devices**, **New connections** (re-connections), **Disconnections**, **"Always Connected" devices down**, Devices **IP changes** and **Internet IP address changes**. Discovery & scan methods include:
|
||||
- **arp-scan**. The arp-scan system utility is used to search for devices on the network using arp frames.
|
||||
- **Pi-hole - DB import**. The PiHole database is used as a source for events for devices
|
||||
- **Pi-hole - DHCP leases**. Import of devices from the PiHole dhcp.leases file
|
||||
- **Generic DHCP leases**. Import of devices from the generic dhcp.leases file
|
||||
- **UNIFI import**. Import of devices from the UNIFI controller
|
||||
- **SNMP-enabled router import**. Import of devices from an SNMP-enabled router
|
||||
|
||||
|
||||
## 🧩 Notification Integrations
|
||||
## 🧩 Integrations
|
||||
- [Apprise](https://hub.docker.com/r/caronc/apprise), [Pushsafer](https://www.pushsafer.com/), [NTFY](https://ntfy.sh/)
|
||||
- [Webhooks](https://github.com/jokob-sk/Pi.Alert/blob/main/docs/WEBHOOK_N8N.md) ([sample JSON](docs/webhook_json_sample.json))
|
||||
- Home Assistant via [MQTT](https://www.home-assistant.io/integrations/mqtt/)
|
||||
- discovery ~10s per device, deleting not supported, use [MQTT Explorer](https://mqtt-explorer.com/) for now
|
||||
|
||||
|
||||
## 🔐 Security
|
||||
|
||||
- Configurable login to prevent unauthorized use.
|
||||
|
||||
## 📑 Features
|
||||
- Display:
|
||||
- Sessions, Connected devices, Favorites, Events, Presence, Concurrent devices, Down alerts, IP's
|
||||
- Manual Nmap scans, Optional speedtest for Device "Internet"
|
||||
- Simple Network relationship display
|
||||
- Maintenance tasks and Settings like:
|
||||
- Status Infos (active scans, database size, backup counter)
|
||||
- Theme Selection (blue, red, green, yellow, black, purple) and Light/Dark-Mode Switch
|
||||
- Language Selection (English, German, Spanish)
|
||||
- Pause arp-scan
|
||||
- DB maintenance, Backup, Restore tools and CSV Export / Import
|
||||
- Help/FAQ Section
|
||||
|
||||
| ![Screen 1][screen1] | ![Screen 2][screen2] |
|
||||
|----------------------|----------------------|
|
||||
| ![Screen 3][screen3] | ![Screen 4][screen4] |
|
||||
| ![Screen 5][screen5] | ![Screen 6][screen6] |
|
||||
| ![Report 1][report1] | ![Report 2][report2] |
|
||||
|
||||
- [Webhooks](https://github.com/jokob-sk/Pi.Alert/blob/main/docs/WEBHOOK_N8N.md)
|
||||
- [Home Assistant](https://github.com/jokob-sk/Pi.Alert/blob/main/docs/HOME_ASSISTANT.md)
|
||||
- [API endpoint](https://github.com/jokob-sk/Pi.Alert/blob/main/docs/API.md)
|
||||
- [Plugin system](https://github.com/jokob-sk/Pi.Alert/tree/main/front/plugins) for custom scripts monitoring and framework for extending the app
|
||||
|
||||
# 📥 Installation
|
||||
<!--- --------------------------------------------------------------------- --->
|
||||
|
||||
⚠ This [fork (jokob-sk)](https://github.com/jokob-sk/Pi.Alert) is only tested as a [docker container](dockerfiles/README.md). Check out [leiweibau's fork](https://github.com/leiweibau/Pi.Alert/) if you want to install Pi.Alert on the server directly.
|
||||
⚠ Only tested as a [docker container - follow the guide here](dockerfiles/README.md).
|
||||
> Check out [leiweibau's fork](https://github.com/leiweibau/Pi.Alert/) if you want to install Pi.Alert on the server directly or check instructions for [pucherot's original code](https://github.com/pucherot/Pi.Alert/)
|
||||
|
||||
Instructions for [pucherot's original code can be found here](https://github.com/pucherot/Pi.Alert/)
|
||||
# 📑 Features
|
||||
- Display:
|
||||
- Sessions, Connected devices, Favorites, Events, Presence, Concurrent devices, Down alerts, IP's
|
||||
- Manual Nmap scans, Optional speedtest for Device "Internet"
|
||||
- Simple Network relationship display
|
||||
- Maintenance tasks and Settings like:
|
||||
- Theme Selection (blue, red, green, yellow, black, purple) and Light/Dark-Mode Switch
|
||||
- DB maintenance, Backup, Restore tools and CSV Export / Import
|
||||
- Simple login Support
|
||||
- 🌟[Plugin system](https://github.com/jokob-sk/Pi.Alert/tree/main/front/plugins)
|
||||
- Create custom plugins with automatically generated settings and UI.
|
||||
- Monitor anything for changes
|
||||
- Check the [instructions](https://github.com/jokob-sk/Pi.Alert/tree/main/front/plugins) carefully if you are up for a challenge! Current plugins include:
|
||||
- Detecting Rogue DHCP servers via NMAP
|
||||
- Monitoring HTTP status changes of domains/URLs
|
||||
- Import devices from DHCP.leases files, a UniFi controller, or an SNMP enabled router
|
||||
- Creation of dummy devices to visualize your [network map](https://github.com/jokob-sk/Pi.Alert/blob/main/docs/NETWORK_TREE.md)
|
||||
|
||||
| ![Screen 1][screen1] | ![Screen 2][screen2] | ![Screen 5][screen5] |
|
||||
|----------------------|----------------------| ----------------------|
|
||||
| ![Screen 3][screen3] | ![Screen 4][screen4] | ![Screen 6][screen6] |
|
||||
| ![Screen 8][screen8] | ![Report 2][report2] | ![Screen 9][screen9] |
|
||||
|
||||
|
||||
## 🔗 Other
|
||||
|
||||
|
||||
<!--- --------------------------------------------------------------------- --->
|
||||
|
||||
<!--- --------------------------------------------------------------------- --->
|
||||
### Alternatives
|
||||
### 🔗 Other Alternatives
|
||||
|
||||
- [WatchYourLAN](https://github.com/aceberg/WatchYourLAN) - Lightweight network IP scanner with web GUI (Open source)
|
||||
- [Fing](https://www.fing.com/) - Network scanner app for your Internet security (Commercial, Phone App, Proprietary hardware)
|
||||
|
||||
### Old docs
|
||||
### 📚 Documentation
|
||||
|
||||
- [Device Management instructions](docs/DEVICE_MANAGEMENT.md)
|
||||
- [Versions History](docs/VERSIONS_HISTORY.md)
|
||||
- Initial Docker Setup: [Docker instructions](https://github.com/jokob-sk/Pi.Alert/blob/main/dockerfiles/README.md)
|
||||
- App Usage and Configuration: [All Documentation](https://github.com/jokob-sk/Pi.Alert/blob/main/docs/README.md)
|
||||
|
||||
### License
|
||||
GPL 3.0
|
||||
- [Read more here](LICENSE.txt)
|
||||
- Source of the [animated GIF (Loading Animation)](https://commons.wikimedia.org/wiki/File:Loading_Animation.gif)
|
||||
- Source of the [selfhosted Fonts](https://github.com/adobe-fonts/source-sans)
|
||||
GPL 3.0 | [Read more here](LICENSE.txt) | Source of the [animated GIF (Loading Animation)](https://commons.wikimedia.org/wiki/File:Loading_Animation.gif) | Source of the [selfhosted Fonts](https://github.com/adobe-fonts/source-sans)
|
||||
|
||||
### 🥇 Special thanks
|
||||
|
||||
@@ -101,8 +84,16 @@ Instructions for [pucherot's original code can be found here](https://github.com
|
||||
- [Macleykun](https://github.com/Macleykun): Help with Dockerfile clean-up
|
||||
- [Final-Hawk](https://github.com/Final-Hawk): Help with NTFY, styling and other fixes
|
||||
- [TeroRERO](https://github.com/terorero): Spanish translation
|
||||
- [jokob-sk](https://github.com/jokob-sk/Pi.Alert): DB Maintenance tools
|
||||
- Please see the [Git commit history](https://github.com/jokob-sk/Pi.Alert/commits/main) for a full list of people and their contributions to the project
|
||||
- [Data-Monkey](https://github.com/Data-Monkey): Split-up of the python.py file and more
|
||||
- Please see the [Git contributors](https://github.com/jokob-sk/Pi.Alert/graphs/contributors) for a full list of people and their contributions to the project
|
||||
|
||||
## ☕ Support me
|
||||
|
||||
<a href="https://github.com/sponsors/jokob-sk" target="_blank"><img src="https://i.imgur.com/X6p5ACK.png" alt="Sponsor Me on GitHub" style="height: 30px !important;width: 117px !important;" width="150px" ></a>
|
||||
<a href="https://www.buymeacoffee.com/jokobsk" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 30px !important;width: 117px !important;" width="117px" height="30px" ></a>
|
||||
<a href="https://www.patreon.com/user?u=84385063" target="_blank"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/8/82/Patreon_logo_with_wordmark.svg/512px-Patreon_logo_with_wordmark.svg.png" alt="Support me on patreon" style="height: 30px !important;width: 117px !important;" width="117px" ></a>
|
||||
|
||||
BTC: 1N8tupjeCK12qRVU2XrV17WvKK7LCawyZM
|
||||
|
||||
<!--- --------------------------------------------------------------------- --->
|
||||
[main]: ./docs/img/devices_split.png "Main screen"
|
||||
@@ -112,7 +103,9 @@ Instructions for [pucherot's original code can be found here](https://github.com
|
||||
[screen4]: ./docs/img/maintenance.png "Screen 4"
|
||||
[screen5]: ./docs/img/network.png "Screen 5"
|
||||
[screen6]: ./docs/img/settings.png "Screen 6"
|
||||
[screen7]: ./docs/img/help_faq.png "Screen 6"
|
||||
[screen7]: ./docs/img/help_faq.png "Screen 7"
|
||||
[screen8]: ./docs/img/plugins_rogue_dhcp.png "Screen 8"
|
||||
[screen9]: ./docs/img/device_nmap.png "Screen 9"
|
||||
[report1]: ./docs/img/4_report_1.jpg "Report sample 1"
|
||||
[report2]: ./docs/img/4_report_2.jpg "Report sample 2"
|
||||
[main_dark]: /docs/img/1_devices_dark.jpg "Main screen dark"
|
||||
|
||||
3163
back/pialert.py
173
back/report_sample.html
Executable file
@@ -0,0 +1,173 @@
|
||||
<!-- ---------------------------------------------------------------------------
|
||||
# Pi.Alert
|
||||
# Open Source Network Guard / WIFI & LAN intrusion detector
|
||||
#
|
||||
# repot_template.html - Back module. Template to email reporting in HTML format
|
||||
#-------------------------------------------------------------------------------
|
||||
# Puche 2021 GNU GPLv3
|
||||
#--------------------------------------------------------------------------- -->
|
||||
<html>
|
||||
<head></head>
|
||||
<body>
|
||||
<font face=sans-serif>
|
||||
<table align=center width=100% cellpadding=0 cellspacing=0 style="border-radius: 5px;">
|
||||
<tr>
|
||||
<td bgcolor=#3c8dbc align=center style="padding: 20px 10px 10px 10px; font-size: 30px; font-weight: bold; color:#ffffff; border-top-right-radius: 5px; border-top-left-radius: 5px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2)">
|
||||
Pi.Alert Report
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor=#2656f1 width=100% align=center style="padding: 20px 10px 10px 10px; font-size: 20px; font-weight: bold; color:#ffffff; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2)">
|
||||
<a style="color:#ffffff;cursor:pointer;" href="https://github.com/jokob-sk/Pi.Alert/releases">🆕 New version available 🆕</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table width=100% border=0 bgcolor=#00c0ef cellpadding=5px cellspacing=0 style="border-collapse: collapse; font-size: 15px; text-align:center; color:#404040">
|
||||
<tr>
|
||||
<td width=100%> Report Date: <b>2023-01-30 22:17</b> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor=#F5F5F5 height=200 valign=top style="padding: 10px">
|
||||
<table style="border-collapse: collapse; font-size: 12px; color:#70707" width="100%" cellspacing="0" cellpadding="3px" bordercolor="#C0C0C0" border="1">
|
||||
<tr>
|
||||
<th width='120px' style='color:blue; font-size: 12px;' bgcolor='#909090' >New devices</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table style="border-collapse: collapse; font-size: 12px; color:#70707" width="100%" cellspacing="0" cellpadding="3px" bordercolor="#C0C0C0" border="1">
|
||||
<tr>
|
||||
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >MAC</th>
|
||||
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >Datetime</th>
|
||||
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >IP</th>
|
||||
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >Event Type</th>
|
||||
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >Device name</th>
|
||||
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >Comments</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://192.168.1.1:20211/deviceDetails.php?mac=00:00:00:ef:a5:6c">00:00:00:ef:a5:6c</a></td>
|
||||
<td>2023-01-30 22:15:09</td>
|
||||
<td>192.168.1.1</td>
|
||||
<td>New Device</td>
|
||||
<td>(name not found)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://192.168.1.1:20211/deviceDetails.php?mac=00:00:00:ef:a5:6c">00:00:00:ef:a5:6c</a></td>
|
||||
<td>2023-01-30 22:17:59</td>
|
||||
<td>192.168.1.82</td>
|
||||
<td>New Device</td>
|
||||
<td>(name not found)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table style="border-collapse: collapse; font-size: 12px; color:#70707" width="100%" cellspacing="0" cellpadding="3px" bordercolor="#C0C0C0" border="1">
|
||||
<tr>
|
||||
<th width='120px' style='color:blue; font-size: 12px;' bgcolor='#909090' >Events</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<ul>
|
||||
<li>
|
||||
<table style="border-collapse: collapse; font-size: 12px; color:#70707" width="100%" cellspacing="0" cellpadding="3px" bordercolor="#C0C0C0" border="1">
|
||||
<tr>
|
||||
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >MAC</th>
|
||||
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >Datetime</th>
|
||||
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >IP</th>
|
||||
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >Event Type</th>
|
||||
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >Device name</th>
|
||||
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >Comments</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://192.168.1.1:20211/deviceDetails.php?mac=00:00:00:ef:a5:6c">00:00:00:ef:a5:6c</a></td>
|
||||
<td>2023-01-30 22:15:09</td>
|
||||
<td>192.168.1.92</td>
|
||||
<td>Disconnected</td>
|
||||
<td>(name not found)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table style="border-collapse: collapse; font-size: 12px; color:#70707" width="100%" cellspacing="0" cellpadding="3px" bordercolor="#C0C0C0" border="1">
|
||||
<tr>
|
||||
<th width='120px' style='color:blue; font-size: 12px;' bgcolor='#909090' >Changed or new ports</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table style="border-collapse: collapse; font-size: 12px; color:#70707" width="100%" cellspacing="0" cellpadding="3px" bordercolor="#C0C0C0" border="1">
|
||||
<tr>
|
||||
<th>new</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table style="border-collapse: collapse; font-size: 12px; color:#70707" width="100%" cellspacing="0" cellpadding="3px" bordercolor="#C0C0C0" border="1">
|
||||
<tr>
|
||||
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >Name</th>
|
||||
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >MAC</th>
|
||||
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >Port</th>
|
||||
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >State</th>
|
||||
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >Service</th>
|
||||
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >Extra</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>New device</td>
|
||||
<td><a href="http://192.168.1.1:20211/deviceDetails.php?mac=00:00:00:ef:a5:6c">00:00:00:ef:a5:6c</a></td>
|
||||
<td>3263/tcp</td>
|
||||
<td>open</td>
|
||||
<td>ecolor-imager</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table style="border-collapse: collapse; font-size: 12px; color:#70707" width="100%" cellspacing="0" cellpadding="3px" bordercolor="#C0C0C0" border="1">
|
||||
<tr>
|
||||
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >Name</th>
|
||||
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >MAC</th>
|
||||
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >Port</th>
|
||||
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >State</th>
|
||||
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >Service</th>
|
||||
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >Extra</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>New device</td>
|
||||
<td><a href="http://192.168.1.1:20211/deviceDetails.php?mac=00:00:00:ef:a5:6c">00:00:00:ef:a5:6c</a></td>
|
||||
<td>3264/tcp</td>
|
||||
<td>open</td>
|
||||
<td>ccmail</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<tr>
|
||||
<td>
|
||||
<table width=100% bgcolor=#46802e cellpadding=5px cellspacing=0 style="font-size: 13px; font-weight: bold; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px;">
|
||||
<tr>
|
||||
<td width=50% style="text-align:center"> Pi.Alert - Synology-NAS</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</font>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,143 +0,0 @@
|
||||
<!-- ---------------------------------------------------------------------------
|
||||
# Pi.Alert
|
||||
# Open Source Network Guard / WIFI & LAN intrusion detector
|
||||
#
|
||||
# repot_sample.html - Back module. Sample email reporting in HTML format
|
||||
#-------------------------------------------------------------------------------
|
||||
# Puche 2021 pi.alert.application@gmail.com GNU GPLv3
|
||||
#--------------------------------------------------------------------------- -->
|
||||
|
||||
<html>
|
||||
|
||||
<head>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<font face=sans-serif>
|
||||
<table align=center width=80% border=1 bordercolor=#909090 cellpadding=0 cellspacing=0 style="border-collapse: collapse; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.5)">
|
||||
<tr>
|
||||
<td bgcolor=#EFB956 align=center style="padding: 20px 10px 10px 10px; font-size: 36px; font-weight: bold; color:#7F6000; text-shadow: 4px 4px 6px #909090">
|
||||
Pi.Alert Report
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<table width=100% border=0 bgcolor=#FFD966 cellpadding=5px cellspacing=0 style="border-collapse: collapse; font-size: 16px; text-align:center; color:#5F5000">
|
||||
<tr>
|
||||
<td width=33%> Report Date: <b>2021-01-01 08:00</b> </td>
|
||||
<td width=34%> Scan Cycle: <b>1</b> </td>
|
||||
<td width=33%> Server: <b>pi4</b> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
<td bgcolor=#F5F5F5 height=400 valign=top style="padding: 20px">
|
||||
|
||||
|
||||
|
||||
<p style="font-size: 14px; font-weight: bold; color:#C04040; text-shadow: 2px 2px 4px #A0A0A0"> New Devices: </p>
|
||||
|
||||
<table width=100% border=1 bordercolor=#C0C0C0 cellpadding=3px cellspacing=0 style="border-collapse: collapse; font-size: 12px; color:#707070; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2)">
|
||||
<tr bgcolor=#909090 style="color:#F0F0F0">
|
||||
<th width=140> MAC </th>
|
||||
<th width=130> Datetime </th>
|
||||
<th width=100> IP </th>
|
||||
<th> Vendor </th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td> f8:d0:27:00:00:00 </td>
|
||||
<td> 2021-01-01 08:00:00 </td>
|
||||
<td> 192.168.1.20 </td>
|
||||
<td> Seiko Epson Corporation </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> c8:6c:3d:00:00:00 </td>
|
||||
<td> 2021-01-01 08:00:00 </td>
|
||||
<td> 192.168.1.181 </td>
|
||||
<td> Amazon Technologies Inc. </td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
<p style="font-size: 14px; font-weight: bold; color:#C04040; text-shadow: 2px 2px 4px #A0A0A0"> Devices Down: </p>
|
||||
|
||||
<table width=100% border=1 bordercolor=#C0C0C0 cellpadding=3px cellspacing=0 style="border-collapse: collapse; font-size: 12px; color:#707070; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2)">
|
||||
<tr bgcolor=#909090 style="color:#F0F0F0">
|
||||
<th width=140> MAC </th>
|
||||
<th width=130> Datetime </th>
|
||||
<th width=100> IP </th>
|
||||
<th> Device Name </th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td> 0c:ee:99:00:00:00 </td>
|
||||
<td> 2021-01-01 08:00:00 </td>
|
||||
<td> 192.168.1.171 </td>
|
||||
<td> Alexa - Echo </td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
<p style="font-size: 14px; font-weight: bold; color:#409040; text-shadow: 2px 2px 4px #A0A0A0"> Events: </p>
|
||||
|
||||
<table width=100% border=1 bordercolor=#C0C0C0 cellpadding=3px cellspacing=0 style="border-collapse: collapse; font-size: 12px; color:#707070; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2)">
|
||||
<tr bgcolor=#909090 style="color:#F0F0F0">
|
||||
<th width=140> MAC </th>
|
||||
<th width=130> Datetime </th>
|
||||
<th width=100> IP </th>
|
||||
<th width=100> Event Type </th>
|
||||
<th width=140> Device Name </th>
|
||||
<th> Additional Info </th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td> 94:0c:98:00:00:00 </td>
|
||||
<td> 2021-01-01 08:00:00 </td>
|
||||
<td> 192.168.1.132 </td>
|
||||
<td> Connected </td>
|
||||
<td> Person 1 - iPhone 11 </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> 5c:41:5a:00:00:00 </td>
|
||||
<td> 2021-01-01 08:00:00 </td>
|
||||
<td> 192.168.1.170 </td>
|
||||
<td> IP Changed </td>
|
||||
<td> Alexa Dot </td>
|
||||
<td> Previous IP: 192.168.1.243 </td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<table width=100% border=0 bgcolor=#70AD47 cellpadding=5px cellspacing=0 style="border-collapse: collapse; font-size: 12px; font-weight: bold; color:#385723">
|
||||
<tr>
|
||||
<td width=25% style="text-align:Left"> Puche 2021</td>
|
||||
<td width=50% style="text-align:center"> Pi.Alert 2.50 / 2021-01-01 </td>
|
||||
<td width=25% style="text-align:right"> GNU GPLv3</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</font>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,11 +1,16 @@
|
||||
<!-- ---------------------------------------------------------------------------
|
||||
# Pi.Alert
|
||||
# Open Source Network Guard / WIFI & LAN intrusion detector
|
||||
#
|
||||
# repot_template.html - Back module. Template to email reporting in HTML format
|
||||
#-------------------------------------------------------------------------------
|
||||
# Puche 2021 pi.alert.application@gmail.com GNU GPLv3
|
||||
#--------------------------------------------------------------------------- -->
|
||||
<!--
|
||||
#---------------------------------------------------------------------------------#
|
||||
# Pi.Alert #
|
||||
# Open Source Network Guard / WIFI & LAN intrusion detector #
|
||||
# #
|
||||
# report_template.html - Back module. Template to email reporting in HTML format #
|
||||
#---------------------------------------------------------------------------------#
|
||||
# Puche 2021 pi.alert.application@gmail.com GNU GPLv3 #
|
||||
# jokob-sk 2022 jokob.sk@gmail.com GNU GPLv3 #
|
||||
# leiweibau 2022 https://github.com/leiweibau GNU GPLv3 #
|
||||
# cvc90 2023 https://github.com/cvc90 GNU GPLv3 #
|
||||
#---------------------------------------------------------------------------------#
|
||||
-->
|
||||
|
||||
<html>
|
||||
|
||||
@@ -16,14 +21,14 @@
|
||||
<font face=sans-serif>
|
||||
<table align=center width=100% cellpadding=0 cellspacing=0 style="border-radius: 5px;">
|
||||
<tr>
|
||||
<td bgcolor=#EFB956 align=center style="padding: 20px 10px 10px 10px; font-size: 30px; font-weight: bold; color:#000000; border-top-right-radius: 5px; border-top-left-radius: 5px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2)">
|
||||
<td bgcolor=#3c8dbc align=center style="padding: 20px 10px 10px 10px; font-size: 30px; font-weight: bold; color:#ffffff; border-top-right-radius: 5px; border-top-left-radius: 5px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2)">
|
||||
Pi.Alert Report
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<table width=100% border=0 bgcolor=#FFD966 cellpadding=5px cellspacing=0 style="border-collapse: collapse; font-size: 15px; text-align:center; color:#404040"> <tr>
|
||||
<table width=100% border=0 bgcolor=#4b99d3 cellpadding=5px cellspacing=0 style="border-collapse: collapse; font-size: 15px; text-align:center; color:#ffffff"> <tr>
|
||||
<td width=100%> Report Date: <b><REPORT_DATE></b> </td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -31,83 +36,30 @@
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td bgcolor=#F5F5F5 height=200 valign=top style="padding: 10px">
|
||||
<SECTION_INTERNET>
|
||||
<p style="font-size: 24px; font-weight: bold; color:#C04040"> Internet: </p>
|
||||
|
||||
<table width=100% border=1 bordercolor=#C0C0C0 cellpadding=3px cellspacing=0 style="border-collapse: collapse; font-size: 12px; color:#707070">
|
||||
<tr bgcolor=#909090 style="color:#f0f0f0">
|
||||
<th width=140> Event Type </th>
|
||||
<th width=130> Datetime </th>
|
||||
<th width=100> IP </th>
|
||||
<th> Additional Info </th>
|
||||
</tr>
|
||||
|
||||
<TABLE_INTERNET>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
</SECTION_INTERNET>
|
||||
|
||||
<SECTION_NEW_DEVICES>
|
||||
<p style="font-size: 14px; font-weight: bold; color:#C04040"> New Devices: </p>
|
||||
|
||||
<table width=100% border=1 bordercolor=#C0C0C0 cellpadding=3px cellspacing=0 style="border-collapse: collapse; font-size: 12px; color:#707070">
|
||||
<tr bgcolor=#909090 style="color:#F0F0F0">
|
||||
<th width=150> MAC </th>
|
||||
<th width=130> Datetime </th>
|
||||
<th width=100> IP </th>
|
||||
<th width=140> Device Name </th>
|
||||
<th> Vendor </th>
|
||||
</tr>
|
||||
|
||||
<TABLE_NEW_DEVICES>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
</SECTION_NEW_DEVICES>
|
||||
|
||||
<SECTION_DEVICES_DOWN>
|
||||
<p style="font-size: 14px; font-weight: bold; color:#C04040"> Devices Down: </p>
|
||||
|
||||
<table width=100% border=1 bordercolor=#C0C0C0 cellpadding=3px cellspacing=0 style="border-collapse: collapse; font-size: 12px; color:#707070">
|
||||
<tr bgcolor=#909090 style="color:#F0F0F0">
|
||||
<th width=140> MAC </th>
|
||||
<th width=130> Datetime </th>
|
||||
<th width=100> IP </th>
|
||||
<th> Device Name </th>
|
||||
</tr>
|
||||
|
||||
<TABLE_DEVICES_DOWN>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
</SECTION_DEVICES_DOWN>
|
||||
|
||||
<SECTION_EVENTS>
|
||||
<p style="font-size: 14px; font-weight: bold; color:#409040"> Events: </p>
|
||||
|
||||
<table width=100% border=1 bordercolor=#C0C0C0 cellpadding=3px cellspacing=0 style="border-collapse: collapse; font-size: 12px; color:#707070">
|
||||
<tr bgcolor=#909090 style="color:#F0F0F0">
|
||||
<th width=140> MAC </th>
|
||||
<th width=130> Datetime </th>
|
||||
<th width=100> IP </th>
|
||||
<th width=100> Event Type </th>
|
||||
<th width=140> Device Name </th>
|
||||
<th> Additional Info </th>
|
||||
</tr>
|
||||
|
||||
<TABLE_EVENTS>
|
||||
</table>
|
||||
</SECTION_EVENTS>
|
||||
<td height=200 valign=top style="padding: 10px">
|
||||
|
||||
<INTERNET_TABLE>
|
||||
<NEW_DEVICES_TABLE>
|
||||
<DOWN_DEVICES_TABLE>
|
||||
<EVENTS_TABLE>
|
||||
<PLUGINS_TABLE>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<table width=100% bgcolor=#46802e cellpadding=5px cellspacing=0 style="font-size: 13px; font-weight: bold; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px;">
|
||||
<table width=100% bgcolor=#3c8dbc cellpadding=5px cellspacing=0 style="font-size: 13px; font-weight: bold; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px;">
|
||||
<tr>
|
||||
<td width=50% style="text-align:center"> Pi.Alert - <SERVER_NAME></td>
|
||||
<td width=50% style="text-align:center;color: white;">
|
||||
<a href="https://github.com/jokob-sk/Pi.Alert" target="_blank" style="color: white">Pi.Alert</a>
|
||||
<a href=".." target="_blank" style="color: white"> (<SERVER_NAME>)</a>
|
||||
<br><span style="display:inline-block;color: white; transform: rotate(180deg)">©</span>2020 Puche (2022+
|
||||
<a style="color: white" href="mailto:jokob@duck.com?subject=PiAlert">jokob-sk</a>) | <b>Built on: <BUILD_PIALERT> </b> | <b> Version: <VERSION_PIALERT> </b> |
|
||||
<a href="https://github.com/jokob-sk/Pi.Alert/tree/main/docs" target="_blank" style="color: white">
|
||||
<span>Docs <i class="fa fa-circle-question"></i>
|
||||
</a><span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
@@ -115,4 +67,4 @@
|
||||
</table>
|
||||
</font>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
@@ -1,19 +1,8 @@
|
||||
Report Date: <REPORT_DATE>
|
||||
Server: <SERVER_NAME>
|
||||
|
||||
<SECTION_NEW_DEVICES>
|
||||
New Devices
|
||||
----------------------
|
||||
<TABLE_NEW_DEVICES>
|
||||
</SECTION_NEW_DEVICES><SECTION_DEVICES_DOWN>
|
||||
Devices Down
|
||||
----------------------
|
||||
<TABLE_DEVICES_DOWN>
|
||||
</SECTION_DEVICES_DOWN><SECTION_EVENTS>
|
||||
Events
|
||||
----------------------
|
||||
<TABLE_EVENTS>
|
||||
</SECTION_EVENTS><SECTION_INTERNET>
|
||||
Internet
|
||||
----------------------
|
||||
<TABLE_INTERNET>
|
||||
</SECTION_INTERNET>
|
||||
<SECTION_DEVICES_DOWN>
|
||||
<SECTION_EVENTS>
|
||||
<SECTION_INTERNET>
|
||||
<PLUGINS_TABLE>
|
||||
|
||||
@@ -1,11 +1,16 @@
|
||||
<!-- ---------------------------------------------------------------------------
|
||||
# Pi.Alert
|
||||
# Open Source Network Guard / WIFI & LAN intrusion detector
|
||||
#
|
||||
# repot_template.html - Back module. Template to email reporting in HTML format
|
||||
#-------------------------------------------------------------------------------
|
||||
# Puche 2021 pi.alert.application@gmail.com GNU GPLv3
|
||||
#--------------------------------------------------------------------------- -->
|
||||
<!--
|
||||
#---------------------------------------------------------------------------------#
|
||||
# Pi.Alert #
|
||||
# Open Source Network Guard / WIFI & LAN intrusion detector #
|
||||
# #
|
||||
# report_template_new_version - Back module. Template to email reporting in text #
|
||||
#---------------------------------------------------------------------------------#
|
||||
# Puche 2021 pi.alert.application@gmail.com GNU GPLv3 #
|
||||
# jokob-sk 2022 jokob.sk@gmail.com GNU GPLv3 #
|
||||
# leiweibau 2022 https://github.com/leiweibau GNU GPLv3 #
|
||||
# cvc90 2023 https://github.com/cvc90 GNU GPLv3 #
|
||||
#---------------------------------------------------------------------------------#
|
||||
-->
|
||||
|
||||
<html>
|
||||
|
||||
@@ -16,18 +21,14 @@
|
||||
<font face=sans-serif>
|
||||
<table align=center width=100% cellpadding=0 cellspacing=0 style="border-radius: 5px;">
|
||||
<tr>
|
||||
<td bgcolor=#EFB956 align=center style="padding: 20px 10px 10px 10px; font-size: 30px; font-weight: bold; color:#000000; border-top-right-radius: 5px; border-top-left-radius: 5px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2)">
|
||||
<td bgcolor=#3c8dbc align=center style="padding: 20px 10px 10px 10px; font-size: 30px; font-weight: bold; color:#ffffff; border-top-right-radius: 5px; border-top-left-radius: 5px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2)">
|
||||
Pi.Alert Report
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor=#2656f1 width=100% align=center style="padding: 20px 10px 10px 10px; font-size: 20px; font-weight: bold; color:#ffffff; border-top-right-radius: 5px; border-top-left-radius: 5px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2)">
|
||||
<a style="color:#ffffff;cursor:pointer;" href="https://github.com/jokob-sk/Pi.Alert/releases">🆕 New version available 🆕</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<table width=100% border=0 bgcolor=#FFD966 cellpadding=5px cellspacing=0 style="border-collapse: collapse; font-size: 15px; text-align:center; color:#404040"> <tr>
|
||||
<table width=100% border=0 bgcolor=#4b99d3 cellpadding=5px cellspacing=0 style="border-collapse: collapse; font-size: 15px; text-align:center; color:#ffffff"> <tr>
|
||||
<td width=100%> Report Date: <b><REPORT_DATE></b> </td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -35,83 +36,30 @@
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td bgcolor=#F5F5F5 height=200 valign=top style="padding: 10px">
|
||||
<SECTION_INTERNET>
|
||||
<p style="font-size: 24px; font-weight: bold; color:#C04040"> Internet: </p>
|
||||
|
||||
<table width=100% border=1 bordercolor=#C0C0C0 cellpadding=3px cellspacing=0 style="border-collapse: collapse; font-size: 12px; color:#707070">
|
||||
<tr bgcolor=#909090 style="color:#f0f0f0">
|
||||
<th width=140> Event Type </th>
|
||||
<th width=130> Datetime </th>
|
||||
<th width=100> IP </th>
|
||||
<th> Additional Info </th>
|
||||
</tr>
|
||||
|
||||
<TABLE_INTERNET>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
</SECTION_INTERNET>
|
||||
|
||||
<SECTION_NEW_DEVICES>
|
||||
<p style="font-size: 14px; font-weight: bold; color:#C04040"> New Devices: </p>
|
||||
|
||||
<table width=100% border=1 bordercolor=#C0C0C0 cellpadding=3px cellspacing=0 style="border-collapse: collapse; font-size: 12px; color:#707070">
|
||||
<tr bgcolor=#909090 style="color:#F0F0F0">
|
||||
<th width=150> MAC </th>
|
||||
<th width=130> Datetime </th>
|
||||
<th width=100> IP </th>
|
||||
<th width=140> Device Name </th>
|
||||
<th> Vendor </th>
|
||||
</tr>
|
||||
|
||||
<TABLE_NEW_DEVICES>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
</SECTION_NEW_DEVICES>
|
||||
|
||||
<SECTION_DEVICES_DOWN>
|
||||
<p style="font-size: 14px; font-weight: bold; color:#C04040"> Devices Down: </p>
|
||||
|
||||
<table width=100% border=1 bordercolor=#C0C0C0 cellpadding=3px cellspacing=0 style="border-collapse: collapse; font-size: 12px; color:#707070">
|
||||
<tr bgcolor=#909090 style="color:#F0F0F0">
|
||||
<th width=140> MAC </th>
|
||||
<th width=130> Datetime </th>
|
||||
<th width=100> IP </th>
|
||||
<th> Device Name </th>
|
||||
</tr>
|
||||
|
||||
<TABLE_DEVICES_DOWN>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
</SECTION_DEVICES_DOWN>
|
||||
|
||||
<SECTION_EVENTS>
|
||||
<p style="font-size: 14px; font-weight: bold; color:#409040"> Events: </p>
|
||||
|
||||
<table width=100% border=1 bordercolor=#C0C0C0 cellpadding=3px cellspacing=0 style="border-collapse: collapse; font-size: 12px; color:#707070">
|
||||
<tr bgcolor=#909090 style="color:#F0F0F0">
|
||||
<th width=140> MAC </th>
|
||||
<th width=130> Datetime </th>
|
||||
<th width=100> IP </th>
|
||||
<th width=100> Event Type </th>
|
||||
<th width=140> Device Name </th>
|
||||
<th> Additional Info </th>
|
||||
</tr>
|
||||
|
||||
<TABLE_EVENTS>
|
||||
</table>
|
||||
</SECTION_EVENTS>
|
||||
<td height=200 valign=top style="padding: 10px">
|
||||
|
||||
<INTERNET_TABLE>
|
||||
<NEW_DEVICES_TABLE>
|
||||
<DOWN_DEVICES_TABLE>
|
||||
<EVENTS_TABLE>
|
||||
<PLUGINS_TABLE>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<table width=100% bgcolor=#46802e cellpadding=5px cellspacing=0 style="font-size: 13px; font-weight: bold; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px;">
|
||||
<table width=100% bgcolor=#3c8dbc cellpadding=5px cellspacing=0 style="font-size: 13px; font-weight: bold; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px;">
|
||||
<tr>
|
||||
<td width=50% style="text-align:center"> Pi.Alert - <SERVER_NAME></td>
|
||||
<td width=50% style="text-align:center;color: white;">
|
||||
<a href="https://github.com/jokob-sk/Pi.Alert" target="_blank" style="color: white">Pi.Alert</a>
|
||||
<a href=".." target="_blank" style="color: white"> (<SERVER_NAME>)</a>
|
||||
<br><span style="display:inline-block;color: white; transform: rotate(180deg)">©</span>2020 Puche (2022+
|
||||
<a style="color: white" href="mailto:jokob@duck.com?subject=PiAlert">jokob-sk</a>) | <b>Built on: <BUILD_PIALERT> </b> | <b> Version: <VERSION_PIALERT> </b> |
|
||||
<a href="https://github.com/jokob-sk/Pi.Alert/tree/main/docs" target="_blank" style="color: white">
|
||||
<span>Docs <i class="fa fa-circle-question"></i>
|
||||
</a><span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
@@ -119,4 +67,4 @@
|
||||
</table>
|
||||
</font>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
@@ -26,16 +26,16 @@ sudo cp *.csv 2_backup
|
||||
echo ""
|
||||
echo Download Start
|
||||
echo ""
|
||||
sudo curl $1 -O https://standards-oui.ieee.org/iab/iab.csv \
|
||||
-O https://standards-oui.ieee.org/iab/iab.txt \
|
||||
-O https://standards-oui.ieee.org/oui28/mam.csv \
|
||||
-O https://standards-oui.ieee.org/iab/iab.txt \
|
||||
-O https://standards-oui.ieee.org/oui28/mam.csv \
|
||||
-O https://standards-oui.ieee.org/oui28/mam.txt \
|
||||
-O https://standards-oui.ieee.org/oui36/oui36.csv \
|
||||
-O https://standards-oui.ieee.org/oui36/oui36.txt \
|
||||
-O https://standards-oui.ieee.org/oui/oui.csv \
|
||||
-O https://standards-oui.ieee.org/oui/oui.txt
|
||||
sudo curl $1 -LO https://standards-oui.ieee.org/iab/iab.csv \
|
||||
-LO https://standards-oui.ieee.org/iab/iab.txt \
|
||||
-LO https://standards-oui.ieee.org/oui28/mam.csv \
|
||||
-LO https://standards-oui.ieee.org/iab/iab.txt \
|
||||
-LO https://standards-oui.ieee.org/oui28/mam.csv \
|
||||
-LO https://standards-oui.ieee.org/oui28/mam.txt \
|
||||
-LO https://standards-oui.ieee.org/oui36/oui36.csv \
|
||||
-LO https://standards-oui.ieee.org/oui36/oui36.txt \
|
||||
-LO https://standards-oui.ieee.org/oui/oui.csv \
|
||||
-LO https://standards-oui.ieee.org/oui/oui.txt
|
||||
echo ""
|
||||
echo Download Finished
|
||||
|
||||
|
||||
@@ -17,197 +17,68 @@
|
||||
"title": "Pi.Alert Notifications",
|
||||
"title_link": "",
|
||||
"text": {
|
||||
"internet": [
|
||||
[
|
||||
"Internet",
|
||||
"243.243.243.243",
|
||||
"2022-01-06 18:32:03",
|
||||
"Internet IP Changed",
|
||||
"Previous Internet IP: 0.0.0.0",
|
||||
1,
|
||||
null
|
||||
],
|
||||
[
|
||||
"Internet",
|
||||
"243.243.243.243",
|
||||
"2022-01-06 18:32:03",
|
||||
"New Device",
|
||||
null,
|
||||
1,
|
||||
null
|
||||
]
|
||||
],
|
||||
"new_devices": [
|
||||
[
|
||||
"b8:b8:b8:b8:b8:b8",
|
||||
"192.168.1.19",
|
||||
"2023-01-06 18:32:03",
|
||||
"New Device",
|
||||
"Raspberry Pi Foundation",
|
||||
1,
|
||||
null,
|
||||
"b8:b8:b8:b8:b8:b8",
|
||||
"raspberrypi",
|
||||
"(unknown)",
|
||||
null,
|
||||
"Raspberry Pi Foundation",
|
||||
0,
|
||||
null,
|
||||
null,
|
||||
"2021-01-06 18:32:03",
|
||||
"2021-01-06 18:32:03",
|
||||
"192.168.1.19",
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
null,
|
||||
1,
|
||||
1,
|
||||
null,
|
||||
0,
|
||||
null,
|
||||
null
|
||||
],
|
||||
[
|
||||
"b1:b8:b8:b8:b8:b8",
|
||||
"192.168.1.45",
|
||||
"2021-01-06 18:32:03",
|
||||
"New Device",
|
||||
"EliteGroup Computer Systems Co., LTD",
|
||||
1,
|
||||
null,
|
||||
"b1:b8:b8:b8:b8:b8",
|
||||
"my-NUC",
|
||||
"(unknown)",
|
||||
null,
|
||||
"EliteGroup Computer Systems Co., LTD",
|
||||
0,
|
||||
null,
|
||||
null,
|
||||
"2023-01-06 18:32:03",
|
||||
"2023-01-06 18:32:03",
|
||||
"192.168.1.45",
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
null,
|
||||
1,
|
||||
1,
|
||||
null,
|
||||
0,
|
||||
null,
|
||||
null
|
||||
]
|
||||
],
|
||||
"down_devices": [
|
||||
[
|
||||
"aa:77:aa:77:aa:77",
|
||||
"192.168.1.151",
|
||||
"2021-01-07 14:20:53",
|
||||
"Device Down",
|
||||
"",
|
||||
1,
|
||||
25,
|
||||
"aa:77:aa:77:aa:77",
|
||||
"ttgo_tdisplay_weather",
|
||||
"(unknown)",
|
||||
"",
|
||||
"Espressif Inc.",
|
||||
0,
|
||||
"",
|
||||
"",
|
||||
"2021-01-06 23:13:06",
|
||||
"2021-01-06 23:13:06",
|
||||
"192.168.1.151",
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
"2021-01-06 23:34:37.067330",
|
||||
0,
|
||||
0,
|
||||
"",
|
||||
0,
|
||||
"",
|
||||
""
|
||||
]
|
||||
],
|
||||
"events": [
|
||||
[
|
||||
"aa:77:aa:77:aa:77",
|
||||
"192.168.1.151",
|
||||
"2022-08-12 21:48:00",
|
||||
"Connected",
|
||||
"",
|
||||
1,
|
||||
null,
|
||||
"aa:77:aa:77:aa:77",
|
||||
"ESP32 - display",
|
||||
"House",
|
||||
"",
|
||||
"Espressif Inc.",
|
||||
0,
|
||||
"",
|
||||
"",
|
||||
"2022-07-21 20:35:00",
|
||||
"2022-08-12 21:48:00",
|
||||
"192.168.1.151",
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
"2022-08-12 21:42:47.937413",
|
||||
1,
|
||||
0,
|
||||
"",
|
||||
0,
|
||||
"aa:77:aa:77:aa:77",
|
||||
""
|
||||
],
|
||||
[
|
||||
"aa:77:aa:77:aa:77",
|
||||
"192.168.1.149",
|
||||
"2022-08-12 21:48:00",
|
||||
"Connected",
|
||||
"",
|
||||
1,
|
||||
null,
|
||||
"aa:77:aa:77:aa:77",
|
||||
"ESP32 - 1",
|
||||
"House",
|
||||
"Singleboard Computer (SBC)",
|
||||
"Espressif Inc.",
|
||||
0,
|
||||
"",
|
||||
"",
|
||||
"2022-07-15 05:30:00",
|
||||
"2022-08-12 21:48:00",
|
||||
"192.168.1.149",
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
"2022-08-12 21:42:47.937413",
|
||||
1,
|
||||
1,
|
||||
"",
|
||||
0,
|
||||
"aa:77:aa:77:aa:77",
|
||||
""
|
||||
]
|
||||
]
|
||||
"internet": [],
|
||||
"new_devices": [{
|
||||
"MAC": "74:ac:74:ac:74:ac",
|
||||
"Datetime": "2023-01-30 22:15:09",
|
||||
"IP": "192.168.1.1",
|
||||
"Event Type": "New Device",
|
||||
"Device name": "(name not found)",
|
||||
"Comments": null
|
||||
}],
|
||||
"down_devices": [],
|
||||
"events": [{
|
||||
"MAC": "74:ac:74:ac:74:ac",
|
||||
"Datetime": "2023-01-30 22:15:09",
|
||||
"IP": "192.168.1.92",
|
||||
"Event Type": "Disconnected",
|
||||
"Device name": "(name not found)",
|
||||
"Comments": null
|
||||
}, {
|
||||
"MAC": "74:ac:74:ac:74:ac",
|
||||
"Datetime": "2023-01-30 22:15:09",
|
||||
"IP": "192.168.1.150",
|
||||
"Event Type": "Disconnected",
|
||||
"Device name": "(name not found)",
|
||||
"Comments": null
|
||||
}],
|
||||
"ports": [{
|
||||
"new": {
|
||||
"Name": "New device",
|
||||
"MAC": "74:ac:74:ac:74:ac",
|
||||
"Port": "22/tcp",
|
||||
"State": "open",
|
||||
"Service": "ssh",
|
||||
"Extra": ""
|
||||
}
|
||||
}, {
|
||||
"new": {
|
||||
"Name": "New device",
|
||||
"MAC": "74:ac:74:ac:74:ac",
|
||||
"Port": "53/tcp",
|
||||
"State": "open",
|
||||
"Service": "domain",
|
||||
"Extra": ""
|
||||
}
|
||||
}, {
|
||||
"new": {
|
||||
"Name": "New device",
|
||||
"MAC": "74:ac:74:ac:74:ac",
|
||||
"Port": "80/tcp",
|
||||
"State": "open",
|
||||
"Service": "http",
|
||||
"Extra": ""
|
||||
}
|
||||
}, {
|
||||
"new": {
|
||||
"Name": "New device",
|
||||
"MAC": "74:ac:74:ac:74:ac",
|
||||
"Port": "443/tcp",
|
||||
"State": "open",
|
||||
"Service": "https",
|
||||
"Extra": ""
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -23,7 +23,8 @@ PIALERT_WEB_PASSWORD='8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923a
|
||||
INCLUDED_SECTIONS=['internet','new_devices','down_devices','events']
|
||||
SCAN_CYCLE_MINUTES=5
|
||||
DAYS_TO_KEEP_EVENTS=90
|
||||
REPORT_DASHBOARD_URL='http://pi.alert/'
|
||||
# Used for generating links in emails. Make sure not to add a trailing slash!
|
||||
REPORT_DASHBOARD_URL='http://pi.alert'
|
||||
|
||||
|
||||
# Email
|
||||
@@ -103,7 +104,7 @@ DHCP_ACTIVE=False
|
||||
# Pholus
|
||||
#---------------------------
|
||||
PHOLUS_ACTIVE=False
|
||||
PHOLUS_TIMEOUT=20
|
||||
PHOLUS_TIMEOUT=120
|
||||
PHOLUS_FORCE=False
|
||||
PHOLUS_DAYS_DATA=7
|
||||
PHOLUS_RUN='once'
|
||||
|
||||
@@ -2,37 +2,58 @@ version: "3"
|
||||
services:
|
||||
pialert:
|
||||
privileged: true
|
||||
build: .
|
||||
build:
|
||||
dockerfile: Dockerfile
|
||||
context: .
|
||||
cache_from:
|
||||
- type=registry,ref=docker.io/jokob-sk/pi.alert:buildcache
|
||||
container_name: pialert
|
||||
network_mode: "host"
|
||||
restart: unless-stopped
|
||||
network_mode: host
|
||||
# restart: unless-stopped
|
||||
volumes:
|
||||
- ${APP_DATA_LOCATION}/pialert/config2:/home/pi/pialert/config
|
||||
# - ${APP_DATA_LOCATION}/pialert/db/pialert.db:/home/pi/pialert/db/pialert.db
|
||||
- ${APP_DATA_LOCATION}/pialert/db2:/home/pi/pialert/db
|
||||
- ${APP_DATA_LOCATION}/pialert_dev/config:/home/pi/pialert/config
|
||||
# - ${APP_DATA_LOCATION}/pialert/config:/home/pi/pialert/config
|
||||
- ${APP_DATA_LOCATION}/pialert_dev/db:/home/pi/pialert/db
|
||||
# - ${APP_DATA_LOCATION}/pialert/db:/home/pi/pialert/db
|
||||
# (optional) useful for debugging if you have issues setting up the container
|
||||
- ${LOGS_LOCATION}:/home/pi/pialert/front/log
|
||||
# ---------------------------------------------------------------------------
|
||||
# DELETE START anyone trying to use this file: comment out / delete BELOW lines, they are only for development purposes
|
||||
- ${DEV_LOCATION}/back/pialert.py:/home/pi/pialert/back/pialert.py
|
||||
- ${DEV_LOCATION}/back/update_vendors.sh:/home/pi/pialert/back/update_vendors.sh
|
||||
- ${DEV_LOCATION}/back/report_template_new_version.html:/home/pi/pialert/back/report_template_new_version.html
|
||||
- ${DEV_LOCATION}/pholus:/home/pi/pialert/pholus
|
||||
- ${APP_DATA_LOCATION}/pialert/dhcp_samples/dhcp1.leases:/mnt/dhcp1.leases
|
||||
- ${APP_DATA_LOCATION}/pialert/dhcp_samples/dhcp2.leases:/mnt/dhcp2.leases
|
||||
- ${APP_DATA_LOCATION}/pialert/dhcp_samples/dhcp_pihole.leases:/etc/pihole/dhcp.leases
|
||||
- ${APP_DATA_LOCATION}/pihole/etc-pihole/pihole-FTL.db:/etc/pihole/pihole-FTL.db
|
||||
- ${DEV_LOCATION}/pialert:/home/pi/pialert/pialert
|
||||
- ${DEV_LOCATION}/back/report_template.html:/home/pi/pialert/back/report_template.html
|
||||
- ${DEV_LOCATION}/back/report_template_new_version.html:/home/pi/pialert/back/report_template_new_version.html
|
||||
- ${DEV_LOCATION}/back/report_template.txt:/home/pi/pialert/back/report_template.txt
|
||||
- ${DEV_LOCATION}/dockerfiles:/home/pi/pialert/dockerfiles
|
||||
- ${APP_DATA_LOCATION}/pialert/php.ini:/etc/php/7.4/fpm/php.ini
|
||||
# - ${DEV_LOCATION}/front/api:/home/pi/pialert/front/api
|
||||
- ${DEV_LOCATION}/front/css:/home/pi/pialert/front/css
|
||||
- ${DEV_LOCATION}/front/lib/AdminLTE:/home/pi/pialert/front/lib/AdminLTE
|
||||
- ${DEV_LOCATION}/front/js:/home/pi/pialert/front/js
|
||||
- ${DEV_LOCATION}/front/api:/home/pi/pialert/front/api
|
||||
- ${DEV_LOCATION}/front/php:/home/pi/pialert/front/php
|
||||
- ${DEV_LOCATION}/front/deviceDetails.php:/home/pi/pialert/front/deviceDetails.php
|
||||
- ${DEV_LOCATION}/front/deviceDetailsTools.php:/home/pi/pialert/front/deviceDetailsTools.php
|
||||
- ${DEV_LOCATION}/front/devices.php:/home/pi/pialert/front/devices.php
|
||||
- ${DEV_LOCATION}/front/events.php:/home/pi/pialert/front/events.php
|
||||
- ${DEV_LOCATION}/front/plugins.php:/home/pi/pialert/front/plugins.php
|
||||
- ${DEV_LOCATION}/front/pluginsCore.php:/home/pi/pialert/front/pluginsCore.php
|
||||
- ${DEV_LOCATION}/front/help_faq.php:/home/pi/pialert/front/help_faq.php
|
||||
- ${DEV_LOCATION}/front/index.php:/home/pi/pialert/front/index.php
|
||||
- ${DEV_LOCATION}/front/maintenance.php:/home/pi/pialert/front/maintenance.php
|
||||
- ${DEV_LOCATION}/front/network.php:/home/pi/pialert/front/network.php
|
||||
- ${DEV_LOCATION}/front/presence.php:/home/pi/pialert/front/presence.php
|
||||
- ${DEV_LOCATION}/front/settings.php:/home/pi/pialert/front/settings.php
|
||||
- ${DEV_LOCATION}/front/settings.php:/home/pi/pialert/front/settings.php
|
||||
- ${DEV_LOCATION}/front/systeminfo.php:/home/pi/pialert/front/systeminfo.php
|
||||
- ${DEV_LOCATION}/front/report.php:/home/pi/pialert/front/report.php
|
||||
- ${DEV_LOCATION}/front/flows.php:/home/pi/pialert/front/flows.php
|
||||
- ${DEV_LOCATION}/front/donations.php:/home/pi/pialert/front/donations.php
|
||||
- ${DEV_LOCATION}/front/plugins:/home/pi/pialert/front/plugins
|
||||
# DELETE END anyone trying to use this file: comment out / delete ABOVE lines, they are only for development purposes
|
||||
# ---------------------------------------------------------------------------
|
||||
environment:
|
||||
- TZ=${TZ}
|
||||
- PORT=${PORT}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
# 🐳 A docker image for Pi.Alert
|
||||
|
||||
🐳 [Docker hub](https://registry.hub.docker.com/r/jokobsk/pi.alert) | 📄 [Dockerfile](https://github.com/jokob-sk/Pi.Alert/blob/main/Dockerfile) | 📚 [Docker instructions](https://github.com/jokob-sk/Pi.Alert/blob/main//dockerfiles/README.md) | 🆕 [Release notes](https://github.com/jokob-sk/Pi.Alert/releases)
|
||||
🐳 [Docker hub](https://registry.hub.docker.com/r/jokobsk/pi.alert) | 📑 [Docker instructions](https://github.com/jokob-sk/Pi.Alert/blob/main/dockerfiles/README.md) | 🆕 [Release notes](https://github.com/jokob-sk/Pi.Alert/releases) | 📚 [All Docs](https://github.com/jokob-sk/Pi.Alert/tree/main/docs)
|
||||
|
||||
<a href="https://raw.githubusercontent.com/jokob-sk/Pi.Alert/main/docs/img/devices_split.png" target="_blank">
|
||||
<img src="https://raw.githubusercontent.com/jokob-sk/Pi.Alert/main/docs/img/devices_split.png" width="300px" />
|
||||
@@ -47,42 +47,45 @@ docker run -d --rm --network=host \
|
||||
| **Required** | `:/home/pi/pialert/db` | Folder which will contain the `pialert.db` file |
|
||||
|Optional| `:/home/pi/pialert/front/log` | Logs folder useful for debugging if you have issues setting up the container |
|
||||
|Optional| `:/etc/pihole/pihole-FTL.db` | PiHole's `pihole-FTL.db` database file. Required if you want to use PiHole |
|
||||
|Optional| `:/etc/pihole/dhcp.leases` | PiHole's `dhcp.leases` file. Required if you want to use PiHole |
|
||||
|Optional| `:/etc/pihole/dhcp.leases` | PiHole's `dhcp.leases` file. Required if you want to use PiHole `dhcp.leases` file. This has to be matched with a corresponding `DHCPLSS_paths_to_check` setting entry. (the path in the container must contain `pihole`)|
|
||||
|Optional| `:/home/pi/pialert/front/api` | A simple [API endpoint](https://github.com/jokob-sk/Pi.Alert/blob/main/docs/API.md) containing static (but regularly updated) json and other files. |
|
||||
|Optional| `:/home/pi/pialert/front/plugins/<plugin>/ignore_plugin` | Map a file `ignore_plugin` to ignore a plugin. Plugins can be soft-disabled via settings. More in the [Plugin docs](/front/plugins/README.md). |
|
||||
|
||||
|
||||
### Config (`pialert.conf`)
|
||||
|
||||
- Modify [pialert.conf](https://github.com/jokob-sk/Pi.Alert/tree/main/config) or manage the configuration via Settings.
|
||||
- ❗ Set the `SCAN_SUBNETS` variable.
|
||||
* The adapter will probably be `eth0` or `eth1`. (Run `iwconfig` to find your interface name(s))
|
||||
* Specify the network filter (which **significantly** speeds up the scan process). For example, the filter `192.168.1.0/24` covers IP ranges 192.168.1.0 to 192.168.1.255.
|
||||
* Examples for one and two subnets (❗ Note the `['...', '...']` format for two or more subnets):
|
||||
* One subnet: `SCAN_SUBNETS = ['192.168.1.0/24 --interface=eth0']`
|
||||
* Two subnets: `SCAN_SUBNETS = ['192.168.1.0/24 --interface=eth0', '192.168.1.0/24 --interface=eth1']`
|
||||
- If unavailable, the app generates a default `pialert.conf` and `pialert.db` file on the first run.
|
||||
- The preferred way is to manage the configuration via the Settings section in the UI.
|
||||
- You can modify [pialert.conf](https://github.com/jokob-sk/Pi.Alert/tree/main/config) directly, if needed.
|
||||
|
||||
#### Important settings
|
||||
|
||||
### 🛑 **Common issues**
|
||||
These are the most important settings to get at least some output in your Devices screen. Usually, only one approach is used, but you should be able to combine these approaches.
|
||||
|
||||
##### For arp-scan: ARPSCAN_RUN, SCAN_SUBNETS
|
||||
|
||||
- ❗ To use the arp-scan method, you need to set the `SCAN_SUBNETS` variable. See the documentation on how [to setup SUBNETS, VLANs & limitations](https://github.com/jokob-sk/Pi.Alert/blob/main/docs/SUBNETS.md)
|
||||
|
||||
##### For pihole: PIHOLE_RUN, DHCPLSS_RUN
|
||||
|
||||
There are 2 approaches how to get PiHole devices imported. Via the PiHole import (PIHOLE) plugin or DHCP leases (DHCPLSS) plugin.
|
||||
|
||||
**PiHole (Device sync)**
|
||||
|
||||
* `PIHOLE_RUN`: You need to map `:/etc/pihole/pihole-FTL.db` in the `docker-compose.yml` file if you enable this setting.
|
||||
|
||||
**DHCP Leases (Device import)**
|
||||
|
||||
* `DHCPLSS_RUN`: You need to map `:/etc/pihole/dhcp.leases` in the `docker-compose.yml` file if you enable this setting.
|
||||
* The above setting has to be matched with a corresponding `DHCPLSS_paths_to_check` setting entry (the path in the container must contain `pihole` as PiHole uses a different format of the `dhcp.leases` file).
|
||||
|
||||
> It's recommended to use the same schedule interval for all plugins responsible for discovering new devices.
|
||||
|
||||
### **Common issues**
|
||||
|
||||
💡 Before creating a new issue, please check if a similar issue was [already resolved](https://github.com/jokob-sk/Pi.Alert/issues?q=is%3Aissue+is%3Aclosed).
|
||||
|
||||
**Permissions**
|
||||
|
||||
* If facing issues (AJAX errors, can't write to DB, empty screen, etc,) make sure permissions are set correctly, and check the logs under `/home/pi/pialert/front/log`.
|
||||
* To solve permission issues you can also try to create a DB backup and then run a DB Restore via the **Maintenance > Backup/Restore** section.
|
||||
* You can try also setting the owner and group of the `pialert.db` by executing the following on the host system: `docker exec pialert chown -R www-data:www-data /home/pi/pialert/db/pialert.db`.
|
||||
* Map to local User and Group IDs. Specify the enviroment variables `HOST_USER_ID` and `HOST_USER_GID` if needed.
|
||||
* Map the pialert.db file (⚠ not folder) to `:/home/pi/pialert/db/pialert.db` (see Examples below for details)
|
||||
|
||||
**Container restarts / crashes**
|
||||
|
||||
* Check the logs for details. Often a required setting for a notification method is missing.
|
||||
|
||||
**unable to resolve host**
|
||||
|
||||
* Check that your `SCAN_SUBNETS` variable is using the correct mask and `--interface` as outlined in the instructions above.
|
||||
|
||||
|
||||
Docker-compose examples can be found below.
|
||||
⚠ Check also common issues and [debugging tips](https://github.com/jokob-sk/Pi.Alert/blob/main/docs/DEBUG_TIPS.md).
|
||||
|
||||
## 📄 Examples
|
||||
|
||||
@@ -93,6 +96,8 @@ version: "3"
|
||||
services:
|
||||
pialert:
|
||||
container_name: pialert
|
||||
# use the below line if you want to test the latest dev image
|
||||
# image: "jokobsk/pi.alert_dev:latest"
|
||||
image: "jokobsk/pi.alert:latest"
|
||||
network_mode: "host"
|
||||
restart: unless-stopped
|
||||
@@ -112,6 +117,29 @@ To run the container execute: `sudo docker-compose up -d`
|
||||
|
||||
### Example 2
|
||||
|
||||
Example by [SeimuS](https://github.com/SeimusS).
|
||||
|
||||
```yaml
|
||||
pialert:
|
||||
container_name: PiAlert
|
||||
hostname: PiAlert
|
||||
privileged: true
|
||||
# use the below line if you want to test the latest dev image
|
||||
# image: "jokobsk/pi.alert_dev:latest"
|
||||
image: jokobsk/pi.alert:latest
|
||||
environment:
|
||||
- TZ=Europe/Bratislava
|
||||
restart: always
|
||||
volumes:
|
||||
- ./pialert/pialert_db:/home/pi/pialert/db
|
||||
- ./pialert/pialert_config:/home/pi/pialert/config
|
||||
network_mode: host
|
||||
```
|
||||
|
||||
To run the container execute: `sudo docker-compose up -d`
|
||||
|
||||
### Example 3
|
||||
|
||||
`docker-compose.yml`
|
||||
|
||||
```yaml
|
||||
@@ -119,6 +147,8 @@ version: "3"
|
||||
services:
|
||||
pialert:
|
||||
container_name: pialert
|
||||
# use the below line if you want to test the latest dev image
|
||||
# image: "jokobsk/pi.alert_dev:latest"
|
||||
image: "jokobsk/pi.alert:latest"
|
||||
network_mode: "host"
|
||||
restart: unless-stopped
|
||||
@@ -157,12 +187,14 @@ DEV_LOCATION=/path/to/local/source/code
|
||||
|
||||
To run the container execute: `sudo docker-compose --env-file /path/to/.env up`
|
||||
|
||||
### Example 3
|
||||
### Example 4
|
||||
|
||||
Courtesy of [pbek](https://github.com/pbek). The volume `pialert_db` is used by the db directory. The two config files are mounted directly from a local folder to their places in the config folder. You can backup the `docker-compose.yaml` folder and the docker volumes folder.
|
||||
|
||||
```yaml
|
||||
pialert:
|
||||
# use the below line if you want to test the latest dev image
|
||||
# image: "jokobsk/pi.alert_dev:latest"
|
||||
image: jokobsk/pi.alert
|
||||
ports:
|
||||
- "80:20211/tcp"
|
||||
@@ -187,8 +219,8 @@ Big thanks to <a href="https://github.com/Macleykun">@Macleykun</a> for help and
|
||||
|
||||
## ☕ Support me
|
||||
|
||||
Disclaimer: Please only donate if you don't have any debt yourself. Support yourself first, then others.
|
||||
|
||||
<a href="https://github.com/sponsors/jokob-sk" target="_blank"><img src="https://i.imgur.com/X6p5ACK.png" alt="Sponsor Me on GitHub" style="height: 30px !important;width: 117px !important;" width="150px" ></a>
|
||||
<a href="https://www.buymeacoffee.com/jokobsk" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 30px !important;width: 117px !important;" width="117px" height="30px" ></a>
|
||||
<a href="https://www.patreon.com/user?u=84385063" target="_blank"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/8/82/Patreon_logo_with_wordmark.svg/512px-Patreon_logo_with_wordmark.svg.png" alt="Support me on patreon" style="height: 30px !important;width: 117px !important;" width="117px" ></a>
|
||||
|
||||
BTC: 1N8tupjeCK12qRVU2XrV17WvKK7LCawyZM
|
||||
|
||||
232
dockerfiles/README_ES.md
Executable file
@@ -0,0 +1,232 @@
|
||||
[](https://github.com/jokob-sk/Pi.Alert/actions/workflows/docker_prod.yml)
|
||||
[](https://github.com/jokob-sk/Pi.Alert)
|
||||
[](https://hub.docker.com/r/jokobsk/pi.alert)
|
||||
[](https://hub.docker.com/r/jokobsk/pi.alert)
|
||||
[](https://hub.docker.com/r/jokobsk/pi.alert)
|
||||
|
||||
# 🐳 Una imagen docker para Pi.Alert
|
||||
|
||||
🐳 [Docker hub](https://registry.hub.docker.com/r/jokobsk/pi.alert) | 📑 [Instrucciones para Docker](https://github.com/jokob-sk/Pi.Alert/blob/main/dockerfiles/README.md) | 🆕 [Release notes](https://github.com/jokob-sk/Pi.Alert/releases) | 📚 [Todos los Docs](https://github.com/jokob-sk/Pi.Alert/tree/main/docs)
|
||||
|
||||
<a href="https://raw.githubusercontent.com/jokob-sk/Pi.Alert/main/docs/img/devices_split.png" target="_blank">
|
||||
<img src="https://raw.githubusercontent.com/jokob-sk/Pi.Alert/main/docs/img/devices_split.png" width="300px" />
|
||||
</a>
|
||||
<a href="https://raw.githubusercontent.com/jokob-sk/Pi.Alert/main/docs/img/network.png" target="_blank">
|
||||
<img src="https://raw.githubusercontent.com/jokob-sk/Pi.Alert/main/docs/img/network.png" width="300px" />
|
||||
</a>
|
||||
|
||||
|
||||
## 📕 Uso básico
|
||||
|
||||
- Tendrás que ejecutar el contenedor en la red del host, por ejemplo:
|
||||
|
||||
```yaml
|
||||
docker run -d --rm --network=host \
|
||||
-v local/path/pialert/config:/home/pi/pialert/config \
|
||||
-v local/path/pialert/db:/home/pi/pialert/db \
|
||||
-e TZ=Europe/Berlin \
|
||||
-e PORT=20211 \
|
||||
jokobsk/pi.alert:latest
|
||||
```
|
||||
- El escaneo inicial puede tardar hasta 15 minutos (con 50 dispositivos y MQTT). Los siguientes pueden durar entre 3 y 5 minutos, así que espere a que se ejecuten todos los escaneos.
|
||||
|
||||
### Variables de entorno Docker
|
||||
|
||||
| Variable | Descripción | Predeterminado |
|
||||
| :------------- |:-------------| -----:|
|
||||
| `PORT` |Puerto de la interfaz web | `20211` |
|
||||
|`TZ` |Zona horaria para mostrar correctamente las estadísticas. Encuentre su zona horaria [aquí](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) | `Europe/Berlin` |
|
||||
|`HOST_USER_GID` |ID de usuario (UID) para asignar el usuario del contenedor a un usuario del servidor con suficientes permisos de lectura y escritura en los archivos asignados | `1000` |
|
||||
|`HOST_USER_ID` |ID de grupo de usuarios (GID) para asignar el grupo de usuarios del contenedor a un grupo de usuarios del servidor con suficientes permisos de lectura y escritura en los archivos asignados | `1000` |
|
||||
|
||||
### Rutas Docker
|
||||
|
||||
| | Ruta | Descripción |
|
||||
| :------------- | :------------- |:-------------|
|
||||
| **Obligatorio** | `:/home/pi/pialert/config` | Carpeta que contendrá el archivo `pialert.conf` (para más detalles, véase más abajo) |
|
||||
| **Obligatorio** | `:/home/pi/pialert/db` | Carpeta que contendrá el archivo `pialert.db` |
|
||||
|Opcional| `:/home/pi/pialert/front/log` | Carpeta de registros útil para depurar si tiene problemas al configurar el contenedor |
|
||||
|Opcional| `:/etc/pihole/pihole-FTL.db` | Archivo de base de datos `pihole-FTL.db` de PiHole. Necesario si desea utilizar PiHole |
|
||||
|Opcional| `:/etc/pihole/dhcp.leases` | Archivo `dhcp.leases` de PiHole. Obligatorio si desea utilizar el archivo `dhcp.leases` de PiHole. Tiene que coincidir con la correspondiente entrada de configuración `DHCPLSS_paths_to_check`. (La ruta en el contenedor debe contener `pihole`)|
|
||||
|Opcional| `:/home/pi/pialert/front/api` | Una simple [API endpoint](https://github.com/jokob-sk/Pi.Alert/blob/main/docs/API.md) que contiene archivos json estáticos (pero actualizados regularmente) y otros archivos. |
|
||||
|
||||
|
||||
### Configurar (`pialert.conf`)
|
||||
|
||||
- Si no está disponible, la aplicación genera un archivo `pialert.conf` y `pialert.db` por defecto en la primera ejecución.
|
||||
- La forma preferida es gestionar la configuración a través de la sección "Configuración" de la interfaz de usuario.
|
||||
- Puede modificar [pialert.conf](https://github.com/jokob-sk/Pi.Alert/tree/main/config) directamente, si es necesario.
|
||||
|
||||
#### Ajustes importantes
|
||||
|
||||
Estos son los ajustes más importantes para obtener al menos alguna salida en la pantalla de tus Dispositivos. Por lo general, sólo se utiliza un enfoque, pero usted debe ser capaz de combinar estos enfoques.
|
||||
|
||||
##### Para arp-scan: ARPSCAN_RUN, SCAN_SUBNETS
|
||||
|
||||
- ❗ Para usar el método arp-scan, necesitas configurar la variable `SCAN_SUBNETS`. Consulte la documentación sobre cómo [configurar SUBNETS, VLANs y limitaciones](https://github.com/jokob-sk/Pi.Alert/blob/main/docs/SUBNETS.md)
|
||||
|
||||
##### Para pihole: PIHOLE_RUN, DHCPLSS_RUN
|
||||
|
||||
Hay dos maneras de importar dispositivos PiHole. A través del plugin de importación PiHole (PIHOLE) o del plugin DHCP leases (DHCPLSS).
|
||||
|
||||
**PiHole (Sincronización de dispositivos)**
|
||||
|
||||
* `PIHOLE_RUN`: Necesitas mapear `:/etc/pihole/pihole-FTL.db` en el fichero `docker-compose.yml` si activas esta opción.
|
||||
|
||||
**DHCP Leases (Importación de dispositivos)**
|
||||
|
||||
* `DHCPLSS_RUN`: Es necesario mapear `:/etc/pihole/dhcp.leases` en el fichero `docker-compose.yml` si se activa esta opción.
|
||||
* La configuración anterior tiene que coincidir con una entrada de configuración correspondiente `DHCPLSS_paths_to_check` (la ruta en el contenedor debe contener `pihole` ya que PiHole utiliza un formato diferente del archivo `dhcp.leases`).
|
||||
|
||||
> Se recomienda utilizar el mismo intervalo de programación para todos los plugins responsables de descubrir nuevos dispositivos.
|
||||
|
||||
### **Problemas comunes**
|
||||
|
||||
💡 Antes de crear una nueva incidencia, comprueba si ya se ha resuelto una [incidencia similar](https://github.com/jokob-sk/Pi.Alert/issues?q=is%3Aissue+is%3Aclosed).
|
||||
|
||||
⚠ Compruebe también los problemas comunes y los [consejos de depuración](https://github.com/jokob-sk/Pi.Alert/blob/main/docs/DEBUG_TIPS.md).
|
||||
|
||||
## 📄 Ejemplos
|
||||
|
||||
### Ejemplo 1
|
||||
|
||||
```yaml
|
||||
version: "3"
|
||||
services:
|
||||
pialert:
|
||||
container_name: pialert
|
||||
# Utilice la siguiente línea si desea probar la última imagen de desarrollo
|
||||
# image: "jokobsk/pi.alert_dev:latest"
|
||||
image: "jokobsk/pi.alert:latest"
|
||||
network_mode: "host"
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- local/path/pialert/config:/home/pi/pialert/config
|
||||
- local/path/pialert/db:/home/pi/pialert/db
|
||||
# (optional) useful for debugging if you have issues setting up the container
|
||||
- local/path/logs:/home/pi/pialert/front/log
|
||||
environment:
|
||||
- TZ=Europe/Berlin
|
||||
- HOST_USER_ID=1000
|
||||
- HOST_USER_GID=1000
|
||||
- PORT=20211
|
||||
```
|
||||
|
||||
Para ejecutar el contenedor ejecute: `sudo docker-compose up -d`
|
||||
|
||||
### Ejemplo 2
|
||||
|
||||
Ejemplo de [SeimuS](https://github.com/SeimusS).
|
||||
|
||||
```yaml
|
||||
pialert:
|
||||
container_name: PiAlert
|
||||
hostname: PiAlert
|
||||
privileged: true
|
||||
# Utilice la siguiente línea si desea probar la última imagen de desarrollo
|
||||
# image: "jokobsk/pi.alert_dev:latest"
|
||||
image: jokobsk/pi.alert:latest
|
||||
environment:
|
||||
- TZ=Europe/Bratislava
|
||||
restart: always
|
||||
volumes:
|
||||
- ./pialert/pialert_db:/home/pi/pialert/db
|
||||
- ./pialert/pialert_config:/home/pi/pialert/config
|
||||
network_mode: host
|
||||
```
|
||||
|
||||
Para ejecutar el contenedor ejecute: `sudo docker-compose up -d`
|
||||
|
||||
### Ejemplo 3
|
||||
|
||||
`docker-compose.yml`
|
||||
|
||||
```yaml
|
||||
version: "3"
|
||||
services:
|
||||
pialert:
|
||||
container_name: pialert
|
||||
# Utilice la siguiente línea si desea probar la última imagen de desarrollo
|
||||
# image: "jokobsk/pi.alert_dev:latest"
|
||||
image: "jokobsk/pi.alert:latest"
|
||||
network_mode: "host"
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ${APP_DATA_LOCATION}/pialert/config:/home/pi/pialert/config
|
||||
- ${APP_DATA_LOCATION}/pialert/db/pialert.db:/home/pi/pialert/db/pialert.db
|
||||
# (optional) useful for debugging if you have issues setting up the container
|
||||
- ${LOGS_LOCATION}:/home/pi/pialert/front/log
|
||||
environment:
|
||||
- TZ=${TZ}
|
||||
- HOST_USER_ID=${HOST_USER_ID}
|
||||
- HOST_USER_GID=${HOST_USER_GID}
|
||||
- PORT=${PORT}
|
||||
```
|
||||
|
||||
`.env` file
|
||||
|
||||
```yaml
|
||||
#VARIABLES DE RUTA GLOBAL
|
||||
|
||||
APP_DATA_LOCATION=/path/to/docker_appdata
|
||||
APP_CONFIG_LOCATION=/path/to/docker_config
|
||||
LOGS_LOCATION=/path/to/docker_logs
|
||||
|
||||
#VARIABLES DE ENTORNO
|
||||
|
||||
TZ=Europe/Paris
|
||||
HOST_USER_ID=1000
|
||||
HOST_USER_GID=1000
|
||||
PORT=20211
|
||||
|
||||
#VARIABLES DE DESARROLLO
|
||||
|
||||
DEV_LOCATION=/path/to/local/source/code
|
||||
```
|
||||
|
||||
Para ejecutar el contenedor ejecute: `sudo docker-compose --env-file /path/to/.env up`
|
||||
|
||||
### Example 4
|
||||
|
||||
Por cortesía de [pbek](https://github.com/pbek). El volumen `pialert_db` es utilizado por el directorio db. Los dos archivos de configuración se montan directamente desde una carpeta local a sus lugares en la carpeta config. Puedes hacer una copia de seguridad de la carpeta `docker-compose.yaml` y de la carpeta docker volumes.
|
||||
|
||||
|
||||
```yaml
|
||||
pialert:
|
||||
# Utilice la siguiente línea si desea probar la última imagen de desarrollo
|
||||
# image: "jokobsk/pi.alert_dev:latest"
|
||||
image: jokobsk/pi.alert
|
||||
ports:
|
||||
- "80:20211/tcp"
|
||||
environment:
|
||||
- TZ=Europe/Vienna
|
||||
networks:
|
||||
local:
|
||||
ipv4_address: 192.168.1.2
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- pialert_db:/home/pi/pialert/db
|
||||
- ./pialert/pialert.conf:/home/pi/pialert/config/pialert.conf
|
||||
```
|
||||
|
||||
## 🏅 Reconocimientos
|
||||
|
||||
Muchas gracias a <a href="https://github.com/Macleykun">@Macleykun</a> por ayudarme en consejos y trucos para Dockerfile(s):
|
||||
|
||||
<a href="https://github.com/Macleykun">
|
||||
<img src="https://avatars.githubusercontent.com/u/26381427?size=50">
|
||||
</a>
|
||||
|
||||
Muchas gracias a <a href="https://github.com/cvc90">@cvc90</a> por ayudarme y realizar esta traduccion:
|
||||
|
||||
<a href="https://github.com/cvc90">
|
||||
<img src="https://avatars.githubusercontent.com/u/76731844?size=50">
|
||||
</a>
|
||||
|
||||
## ☕ Apóyame
|
||||
|
||||
<a href="https://github.com/sponsors/jokob-sk" target="_blank"><img src="https://i.imgur.com/X6p5ACK.png" alt="Sponsor Me on GitHub" style="height: 30px !important;width: 117px !important;" width="150px" ></a>
|
||||
<a href="https://www.buymeacoffee.com/jokobsk" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 30px !important;width: 117px !important;" width="117px" height="30px" ></a>
|
||||
<a href="https://www.patreon.com/user?u=84385063" target="_blank"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/8/82/Patreon_logo_with_wordmark.svg/512px-Patreon_logo_with_wordmark.svg.png" alt="Support me on patreon" style="height: 30px !important;width: 117px !important;" width="117px" ></a>
|
||||
|
||||
BTC: 1N8tupjeCK12qRVU2XrV17WvKK7LCawyZM
|
||||
@@ -1,15 +1,15 @@
|
||||
#!/bin/sh
|
||||
/home/pi/pialert/dockerfiles/user-mapping.sh
|
||||
|
||||
# if custom variables not set we do not need to do anything
|
||||
if [ -n "${TZ}" ]; then
|
||||
FILECONF=/home/pi/pialert/config/pialert.conf
|
||||
if [ -f "$FILECONF" ]; then
|
||||
sed -ie "s|Europe/Berlin|${TZ}|g" /home/pi/pialert/config/pialert.conf
|
||||
else
|
||||
sed -ie "s|Europe/Berlin|${TZ}|g" /home/pi/pialert/back/pialert.conf_bak
|
||||
fi
|
||||
fi
|
||||
# # if custom variables not set we do not need to do anything
|
||||
# if [ -n "${TZ}" ]; then
|
||||
# FILECONF=/home/pi/pialert/config/pialert.conf
|
||||
# if [ -f "$FILECONF" ]; then
|
||||
# sed -ie "s|Europe/Berlin|${TZ}|g" /home/pi/pialert/config/pialert.conf
|
||||
# else
|
||||
# sed -ie "s|Europe/Berlin|${TZ}|g" /home/pi/pialert/back/pialert.conf_bak
|
||||
# fi
|
||||
# fi
|
||||
|
||||
if [ -n "${PORT}" ]; then
|
||||
sed -ie 's/listen 20211/listen '${PORT}'/g' /etc/nginx/sites-available/default
|
||||
@@ -28,4 +28,6 @@ chmod -R a+rw /home/pi/pialert/config
|
||||
/etc/init.d/nginx start
|
||||
|
||||
# cron -f
|
||||
python /home/pi/pialert/back/pialert.py
|
||||
#python /home/pi/pialert/back/pialert.py
|
||||
# echo "[DEBUG] DATA MONKEY VERSION ..."
|
||||
python /home/pi/pialert/pialert/
|
||||
|
||||
97
docs/API.md
Executable file
@@ -0,0 +1,97 @@
|
||||
## API endpoints
|
||||
|
||||
PiAlert comes with a simple API. These API endpoints are static files, that are periodically updated based on your settings.
|
||||
|
||||
|
||||
### When are the endpoints updated
|
||||
|
||||
The endpoints are updated when objects in the API endpoints are changed.
|
||||
|
||||
### Location of the endpoints
|
||||
|
||||
In the container, these files are located under the `/home/pi/pialert/front/api/` folder and thus on the `<pialert_url>/api/<File name>` url.
|
||||
|
||||
### Available endpoints
|
||||
|
||||
You can access the following files:
|
||||
|
||||
| File name | Description |
|
||||
|----------------------|----------------------|
|
||||
| `notification_text.txt` | The plain text version of the last notification. |
|
||||
| `notification_text.html` | The full HTML of the last email notification. |
|
||||
| `notification_json_final.json` | The json version of the last notification (e.g. used for webhooks - [sample JSON](https://github.com/jokob-sk/Pi.Alert/blob/main/back/webhook_json_sample.json)). |
|
||||
| `table_devices.json` | The current (at the time of the last update as mentioned above on this page) state of all of the available Devices detected by the app. |
|
||||
| `table_pholus_scan.json` | The latest state of the [pholus](https://github.com/jokob-sk/Pi.Alert/tree/main/pholus) (A multicast DNS and DNS Service Discovery Security Assessment Tool) scan results. |
|
||||
| `table_plugins_events.json` | The list of the unprocessed (pending) notification events (plugins_events DB table). |
|
||||
| `table_plugins_history.json` | The list of notification events history. |
|
||||
| `table_plugins_objects.json` | The content of the plugins_objects table. Find more info on the [Plugin system here](https://github.com/jokob-sk/Pi.Alert/tree/main/front/plugins)|
|
||||
| `language_strings.json` | The content of the language_strings table, which in turn is loaded from the plugins `config.json` definitions. |
|
||||
| `table_custom_endpoint.json` | A custom endpoint generated by the SQL query specified by the `API_CUSTOM_SQL` setting. |
|
||||
| `table_settings.json` | The content of the settings table. |
|
||||
|
||||
Current/latest state of the aforementioned files depends on your settings.
|
||||
|
||||
### JSON Data format
|
||||
|
||||
The endpoints starting with the `table_` prefix contain most, if not all, data contained in the corresponding database table. The common format for those is:
|
||||
|
||||
```JSON
|
||||
{
|
||||
"data": [
|
||||
{
|
||||
"db_column_name": "data",
|
||||
"db_column_name2": "data2"
|
||||
},
|
||||
{
|
||||
"db_column_name": "data3",
|
||||
"db_column_name2": "data4"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
Example JSON of the `table_devices.json` endpoint with two Devices (database rows):
|
||||
|
||||
```JSON
|
||||
{
|
||||
"data": [
|
||||
{
|
||||
"dev_MAC": "Internet",
|
||||
"dev_Name": "Net - Huawei",
|
||||
"dev_DeviceType": "Router",
|
||||
"dev_Vendor": null,
|
||||
"dev_Group": "Always on",
|
||||
"dev_FirstConnection": "2021-01-01 00:00:00",
|
||||
"dev_LastConnection": "2021-01-28 22:22:11",
|
||||
"dev_LastIP": "192.168.1.24",
|
||||
"dev_StaticIP": 0,
|
||||
"dev_PresentLastScan": 1,
|
||||
"dev_LastNotification": "2023-01-28 22:22:28.998715",
|
||||
"dev_NewDevice": 0,
|
||||
"dev_Network_Node_MAC_ADDR": "",
|
||||
"dev_Network_Node_port": "",
|
||||
"dev_Icon": "globe"
|
||||
},
|
||||
{
|
||||
"dev_MAC": "a4:8f:ff:aa:ba:1f",
|
||||
"dev_Name": "Net - USG",
|
||||
"dev_DeviceType": "Firewall",
|
||||
"dev_Vendor": "Ubiquiti Inc",
|
||||
"dev_Group": "",
|
||||
"dev_FirstConnection": "2021-02-12 22:05:00",
|
||||
"dev_LastConnection": "2021-07-17 15:40:00",
|
||||
"dev_LastIP": "192.168.1.1",
|
||||
"dev_StaticIP": 1,
|
||||
"dev_PresentLastScan": 1,
|
||||
"dev_LastNotification": "2021-07-17 15:40:10.667717",
|
||||
"dev_NewDevice": 0,
|
||||
"dev_Network_Node_MAC_ADDR": "Internet",
|
||||
"dev_Network_Node_port": 1,
|
||||
"dev_Icon": "shield-halved"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
39
docs/DATABASE.md
Executable file
@@ -0,0 +1,39 @@
|
||||
|
||||
# A high-level description of the datbase structure
|
||||
|
||||
⚠ Disclaimer: As I'm not the original author, some of the information might be inaccurate. Feel free to submit a PR to correct anything within this page or documentation in general.
|
||||
|
||||
The MAC address is used as a foreign key in most cases.
|
||||
|
||||
## 🔍Tables overview
|
||||
|
||||
| Table name | Description | Sample data |
|
||||
|----------------------|----------------------| ----------------------|
|
||||
| CurrentScan | Result of the current scan | ![Screen1][screen1] |
|
||||
| Devices | The main devices database that also contains the Network tree mappings. If `ScanCycle` is set to `0` device is not scanned. | ![Screen2][screen2] |
|
||||
| Events | Used to collect connection/disconnection events. | ![Screen4][screen4] |
|
||||
| Online_History | Used to display the `Device presence over time` chart | ![Screen6][screen6] |
|
||||
| Parameters | Used to pass values between the frontend and backend. | ![Screen7][screen7] |
|
||||
| Pholus_Scan | Scan results of the Pholus python network penetration script. | ![Screen8][screen8] |
|
||||
| Plugins_Events | For capturing events exposed by a plugin via the `last_result.log` file. If unique then saved into the `Plugins_Objects` table. Entries are deleted once processed and stored in the `Plugins_History` and/or `Plugins_Objects` tables. | ![Screen10][screen10] |
|
||||
| Plugins_History | History of all entries from the `Plugins_Events` table | ![Screen11][screen11] |
|
||||
| Plugins_Language_Strings | Language strings colelcted from the plugin `config.json` files used for string resolution in the frontend. | ![Screen12][screen12] |
|
||||
| Plugins_Objects | Unique objects detected by individual plugins. | ![Screen13][screen13] |
|
||||
| Sessions | Used to display sessions in the charts | ![Screen15][screen15] |
|
||||
| Settings | Database representation of the sum of all settings from `pialert.conf` and plugins coming from `config.json` files. | ![Screen16][screen16] |
|
||||
|
||||
|
||||
|
||||
[screen1]: /docs/img/DATABASE/CurrentScan.png
|
||||
[screen2]: /docs/img/DATABASE/Devices.png
|
||||
[screen4]: /docs/img/DATABASE/Events.png
|
||||
[screen6]: /docs/img/DATABASE/Online_History.png
|
||||
[screen7]: /docs/img/DATABASE/Parameters.png
|
||||
[screen8]: /docs/img/DATABASE/Pholus_Scan.png
|
||||
[screen10]: /docs/img/DATABASE/Plugins_Events.png
|
||||
[screen11]: /docs/img/DATABASE/Plugins_History.png
|
||||
[screen12]: /docs/img/DATABASE/Plugins_Language_Strings.png
|
||||
[screen13]: /docs/img/DATABASE/Plugins_Objects.png
|
||||
[screen15]: /docs/img/DATABASE/Sessions.png
|
||||
[screen16]: /docs/img/DATABASE/Settings.png
|
||||
|
||||
31
docs/DEBUG_INVALID_JSON.md
Executable file
@@ -0,0 +1,31 @@
|
||||
# How to debug the Invalid JSON response error
|
||||
|
||||
Check the the HTTP response of the failing backend call by following these steps:
|
||||
|
||||
- Open developer console in your browser (usually, e. g. for Chrome, key F12 on the keyboard).
|
||||
- Follow the steps in this screenshot:
|
||||
|
||||
![F12DeveloperConsole][F12DeveloperConsole]
|
||||
|
||||
- Copy the URL causing the error and enter it in the address bar of your browser directly and hit enter. The copied URLs could look something like this (notice the query strings at the end):
|
||||
- `http://<pialert URL>:20211/php/server/devices.php?action=getDevicesTotals`
|
||||
- `http://<pialert URL>:20211/php/server/devices.php?action=getDevicesList&status=all`
|
||||
|
||||
- Post the error response in the existing issue thread on GitHub or create a new issue and include the redacted response of the failing query.
|
||||
|
||||
For reference, the above queries should return results in the following format:
|
||||
|
||||
First URL:
|
||||
|
||||
![array][array]
|
||||
|
||||
Second URL:
|
||||
|
||||
![json][json]
|
||||
|
||||
You can copy and paste any JSON result (result of the second query) into an online JSON checker, such as [this one](https://jsonchecker.com/) to check if it's valid.
|
||||
|
||||
|
||||
[F12DeveloperConsole]: ./img/DEBUG/Invalid_JSON_repsonse_debug.png "F12DeveloperConsole"
|
||||
[array]: ./img/DEBUG/array_result_example.png "array"
|
||||
[json]: ./img/DEBUG/JSON_result_example.png "json"
|
||||
84
docs/DEBUG_TIPS.md
Executable file
@@ -0,0 +1,84 @@
|
||||
# Debugging and troubleshooting
|
||||
|
||||
Please follow tips 1 - 4 to get a more detailed error.
|
||||
|
||||
## 1. More Logging 📃
|
||||
|
||||
When debugging an issue always set the highest log level:
|
||||
|
||||
`LOG_LEVEL='debug'`
|
||||
|
||||
|
||||
## 2. Surfacing errors when container restarts 🔁
|
||||
|
||||
Start the container via the **terminal** with a command similar to this one:
|
||||
|
||||
```bash
|
||||
docker run --rm --network=host \
|
||||
-v local/path/pialert/config:/home/pi/pialert/config \
|
||||
-v local/path/pialert/db:/home/pi/pialert/db \
|
||||
-e TZ=Europe/Berlin \
|
||||
-e PORT=20211 \
|
||||
jokobsk/pi.alert:latest
|
||||
|
||||
```
|
||||
|
||||
> ⚠ Please note, don't use the `-d` parameter so you see the error when the container crashes. Use this error in your issue description.
|
||||
|
||||
## 3. Check the _dev image and open issues ❓
|
||||
|
||||
If possible, check if your issue got fixed in the `_dev` image before opening a new issue. The container is:
|
||||
|
||||
`jokobsk/pi.alert_dev:latest`
|
||||
|
||||
> ⚠ Please backup your DB and config beforehand!
|
||||
|
||||
Please also search [open issues](https://github.com/jokob-sk/Pi.Alert/issues).
|
||||
|
||||
## 4. Disable restart behavior 🛑
|
||||
|
||||
To prevent a Docker container from automatically restarting in a Docker Compose file, specify the restart policy as `no`:
|
||||
|
||||
```yaml
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
your-service:
|
||||
image: your-image:tag
|
||||
restart: no
|
||||
# Other service configurations...
|
||||
```
|
||||
|
||||
## 📃Common issues
|
||||
|
||||
### Permissions
|
||||
|
||||
* If facing issues (AJAX errors, can't write to DB, empty screen, etc,) make sure permissions are set correctly, and check the logs under `/home/pi/pialert/front/log`.
|
||||
* To solve permission issues you can try setting the owner and group of the `pialert.db` by executing the following on the host system: `docker exec pialert chown -R www-data:www-data /home/pi/pialert/db/pialert.db`.
|
||||
* Map to local User and Group IDs. Specify the enviroment variables `HOST_USER_ID` and `HOST_USER_GID` if needed.
|
||||
* If still facing issues, try to map the pialert.db file (⚠ not folder) to `:/home/pi/pialert/db/pialert.db` (see Examples below for details)
|
||||
|
||||
### Container restarts / crashes
|
||||
|
||||
* Check the logs for details. Often a required setting for a notification method is missing.
|
||||
|
||||
### unable to resolve host
|
||||
|
||||
* Check that your `SCAN_SUBNETS` variable is using the correct mask and `--interface` as outlined in the instructions above.
|
||||
|
||||
### Invalid JSON
|
||||
|
||||
Check the [Invalid JSON errors debug help](/docs/DEBUG_INVALID_JSON.md) docs on how to proceed.
|
||||
|
||||
### sudo execution failing (e.g.: on arpscan) on a Raspberry Pi 4
|
||||
|
||||
> sudo: unexpected child termination condition: 0
|
||||
|
||||
Resolution based on [this issue](https://github.com/linuxserver/docker-papermerge/issues/4#issuecomment-1003657581)
|
||||
|
||||
```
|
||||
wget ftp.us.debian.org/debian/pool/main/libs/libseccomp/libseccomp2_2.5.3-2_armhf.deb
|
||||
sudo dpkg -i libseccomp2_2.5.3-2_armhf.deb
|
||||
```
|
||||
|
||||
The link above will probably break in time too. Go to https://packages.debian.org/sid/armhf/libseccomp2/download to find the new version number and put that in the url.
|
||||
@@ -18,7 +18,7 @@ To edit device information:
|
||||
- **Owner**: Device owner (The list is self-populated with existing owners)
|
||||
- **Type**: Select a device type from the dropdown list (Smartphone, Table,
|
||||
Laptop, TV, router, ....) or type a new device type
|
||||
- **Vendor**: Automatically updated by Pi.Alert
|
||||
- **Vendor**: Automatically updated by Pi.Alert when empty or unknown
|
||||
- **Favorite**: Mark the device as favorite and then it will appears at the
|
||||
begining of the device list
|
||||
- **Group**: Select a grouper ('Always on', 'Personal', Friends') or type
|
||||
@@ -81,9 +81,17 @@ decides to change the MAC).
|
||||
GPL 3.0
|
||||
[Read more here](../LICENSE.txt)
|
||||
|
||||
### Contact
|
||||
pi.alert.application@gmail.com
|
||||
### Contact
|
||||
|
||||
Always use the Issue tracker for the correct fork, for example:
|
||||
|
||||
[jokob-sk/Pi.Alert](https://github.com/jokob-sk/Pi.Alert/issues). Please also follow the guidelines on:
|
||||
|
||||
- ➕ [Pull Request guidelines](https://github.com/jokob-sk/Pi.Alert/tree/main/docs#-pull-requests-prs)
|
||||
- 🙏 [Feature request guidelines](https://github.com/jokob-sk/Pi.Alert/tree/main/docs#-feature-requests)
|
||||
- 🐛 [Issue guidelines](https://github.com/jokob-sk/Pi.Alert/tree/main/docs#-submitting-an-issue-or-bug)
|
||||
|
||||
|
||||
***Suggestions and comments are welcome***
|
||||
|
||||
|
||||
|
||||
46
docs/FRONTEND_DEVELOPMENT.md
Executable file
@@ -0,0 +1,46 @@
|
||||
# 🖼 Frontend development
|
||||
|
||||
This page contains tips for frontend development when extending PiAlert. Guiding principles are:
|
||||
|
||||
1. Maintainability
|
||||
2. Extendability
|
||||
3. Reusability
|
||||
4. Placing more functionality into Plugins and enhancing core Plugins functionality
|
||||
|
||||
That means that, when writing code, focus on reusing what's available instead of writing quick fixes. Or creating reusable functions, instead of bespoke functionaility.
|
||||
|
||||
## 🔍 Examples
|
||||
|
||||
Some examples how to apply the above:
|
||||
|
||||
> Example 1
|
||||
>
|
||||
> I want to implement a scan fucntion. Options would be:
|
||||
>
|
||||
> 1. To add a manual scan functionality to the `deviceDetails.php` page.
|
||||
> 2. To create a separate page that handles the execution of the scan.
|
||||
> 3. To create a configurable Plugin.
|
||||
>
|
||||
> From the above, number 3 would be the most appropriate solution. Then followed by number 2. Number 1 would be approved only in special circumstances.
|
||||
|
||||
> Example 2
|
||||
>
|
||||
> I want to change the behavior of the application. Options to implement this could be:
|
||||
>
|
||||
> 1. Hard-code the changes in the code.
|
||||
> 2. Implement the changes and add settings to influence the behavior in the `initialize.py` file so the user can adjust these.
|
||||
> 3. Implement the changes and add settings via a setting-only plugin.
|
||||
> 4. Implement the changes in a way so the behavior can be toggled on each plugin so the core capabilities of Plugins get extended.
|
||||
>
|
||||
> From the above, number 4 would be the most appropriate solution. Then followed by number 3. Number 1 or 2 would be approved only in special circumstances.
|
||||
|
||||
## 💡 Frontend tips
|
||||
|
||||
Some useful frontend JavaScript functions:
|
||||
|
||||
- `getDeviceDataByMacAddress(macAddress, devicesColumn)` - method to retrieve any device data (database column) based on MAC address in the frontend
|
||||
- `getString(string stringKey)` - method to retrieve translated strings in the frontend
|
||||
- `getSetting(string stringKey)` - method to retrieve settings in the frontend
|
||||
|
||||
|
||||
Check the [pialert_common.js](https://github.com/jokob-sk/Pi.Alert/blob/main-2023-06-10/front/js/pialert_common.js) file for more frontend functions.
|
||||
42
docs/HOME_ASSISTANT.md
Executable file
@@ -0,0 +1,42 @@
|
||||
# Overview
|
||||
|
||||
PiAlert comes with MQTT support, allowing you to show all detected devices as devices in Home Assistant. It also supplies a collection of stats, such as number of online devices.
|
||||
|
||||
## ⚠ Note
|
||||
|
||||
- Please note that discovery takes about ~10s per device.
|
||||
- Deleting of devices is not handled automatically. Please use [MQTT Explorer](https://mqtt-explorer.com/) to delete devices in the broker (Home Assistant), if needed.
|
||||
|
||||
|
||||
## 🧭 Guide
|
||||
|
||||
> 💡 This guide was tested only with the Mosquitto MQTT broker
|
||||
|
||||
1. Enable Mosquitto MQTT in Home Assistant by following the [documentation](https://www.home-assistant.io/integrations/mqtt/)
|
||||
|
||||
2. Configure a user name and password on your broker.
|
||||
|
||||
3. Note down the following details that you will need to configure PiAlert:
|
||||
- MQTT host url (usually your Home Assistant IP)
|
||||
- MQTT broker port
|
||||
- User
|
||||
- Password
|
||||
|
||||
4. Ope the `PiAlert` > `Settings` > `MQTT` settings group
|
||||
- Enable MQTT
|
||||
- Fill in the details from above
|
||||
- Fill in remaining settings as per description
|
||||
|
||||
|
||||
## 📷 Screenshots
|
||||
|
||||
| ![Screen 1][sensors] | ![Screen 2][history] |
|
||||
|----------------------|----------------------|
|
||||
| ![Screen 3][list] | ![Screen 4][overview] |
|
||||
|
||||
|
||||
[sensors]: /docs/img/HOME_ASISSTANT/PiAlert-HomeAssistant-Device-as-Sensors.png "sensors"
|
||||
[history]: /docs/img/HOME_ASISSTANT/PiAlert-HomeAssistant-Device-Presence-History.png "history"
|
||||
[list]: /docs/img/HOME_ASISSTANT/PiAlert-HomeAssistant-Devices-List.png "list"
|
||||
[overview]: /docs/img/HOME_ASISSTANT/PiAlert-HomeAssistant-Overview-Card.png "overview"
|
||||
|
||||
30
docs/ICONS.md
Executable file
@@ -0,0 +1,30 @@
|
||||
## Icons overview
|
||||
|
||||
Icons are used to visually distinguish devices in the app in most of the device listing tables and the [network tree](/docs/NETWORK_TREE.md). Currently only free [Font Awesome](https://fontawesome.com/search?o=r&m=free) icons (up-to v 6.4.0) are supported (I have an unblockable [sponsorship goal](https://github.com/sponsors/jokob-sk) to add the material design icon pack).
|
||||
|
||||

|
||||
|
||||
## ⚙ How to use custom device Icons
|
||||
|
||||
You can assign icons individually on each device in the Details tab.
|
||||
|
||||

|
||||
|
||||
- You can click into the `Icon` field or click the Pencil (2) icon in the above screenshot to enter any text. Only [free Font Awesome](https://fontawesome.com/search?o=r&m=free) icons in the following format will work:
|
||||
|
||||
1. For any value that is only prefixed with `fa-`, you can enter the value directly, such as `server`, `tv`, `ethernet`.
|
||||
2. If you want to add another classname, e.g. `fa-brands`, you can enter `brands fa-[fontawesome-icon-name]`, so for `apple` that is using the syntax`fa-brands fa-apple`, you would enter `brands fa-apple`.
|
||||
|
||||
- If you want to mass-apply an icon to all devices of the same device type (Field marked (4) in the above screenshot), you can click the copy button (Marked (1) in the above screenshot). A confirmation prompt is displayed. If you proceed, icons of all devices set to the same device type as the current device, will be overwritten with the current device's icon.
|
||||
|
||||
- The dropdown (3) contains all icons already used in the app for device icons. You need to navigate away or refresh the page once you add a new icon.
|
||||
|
||||
## 🌟 Pro Font Awesome icons
|
||||
|
||||
If you own the premium package of Font Awesome icons you can mount it in your Docker container the following way:
|
||||
|
||||
```yaml
|
||||
/font-awesome:/home/pi/pialert/front/lib/AdminLTE/bower_components/font-awesome:ro
|
||||
```
|
||||
|
||||
You can use the full range of Font Awesome icons afterwards.
|
||||
59
docs/NETWORK_TREE.md
Executable file
@@ -0,0 +1,59 @@
|
||||
## How to setup your Network page
|
||||
|
||||
Make sure you have a root device with the MAC `Internet` (No other MAC addresses are currently supported as the root node).
|
||||
|
||||
> 💡 Tip: You can add dummy devices via the [Undiscoverables plugin](https://github.com/jokob-sk/Pi.Alert/blob/main/front/plugins/undiscoverables/README.md)
|
||||
|
||||
> 💡 Tip: Export your configuration of the Network and Devices once in a while via the Export CSV feature under **Maintenance** -> **Backup/Restore** -> **CSV Export**.
|
||||
|
||||
## ⚡Quick setup:
|
||||
|
||||
* Go to Devices > Device Details.
|
||||
* Find the device(s) you want to use as network devices (network nodes).
|
||||
* Set the Type of such a device to one of the following: AP, Firewall, Gateway, PLC, Powerline, Router, Switch, USB LAN Adapter, USB WIFI Adapter and WLAN.
|
||||
* Save and go to Network where the devices you've marked as network devices (by selecting the Type as mentioned above) will show up as tabs.
|
||||
* You can now assign the Unassigend devices to the correct network node.
|
||||
* If port is empty or 0 a wifi icon is rendered, otherwise a ethernet port icon
|
||||
|
||||
|
||||
## 🔍Detailed example:
|
||||
|
||||
In this example you will setup a device named `rapberrypi` as a `Switch` in our network.
|
||||
|
||||
### 1) Device details page
|
||||
|
||||
- Go to the `Devices` (1) page:
|
||||
|
||||

|
||||
|
||||
- In the (2) `Details` tab navigate to the the `Type` (3) dropdown and select the type `Switch` (4).
|
||||
|
||||
> Note: Only the following device types will show up as selectable Network nodes ( = devices you can connect other devices to):
|
||||
> AP, Firewall, Gateway, Hypervisor, PLC, Powerline, Router, Switch, USB LAN Adapter, USB WIFI Adapter and WLAN.
|
||||
|
||||
- Assign a device to your root device from the `Node` (5) dropdown which has the MAC `Internet` (6) (Your name may differ, but the MAC needs to be set to `Internet` - this is done by default).
|
||||
|
||||
- Save your changes (7)
|
||||
|
||||
### 1) Network page
|
||||
|
||||
- Navigate to your `Network` (1) page:
|
||||
|
||||

|
||||
|
||||
- Notice the newly added `raspberrypi` (2) tab which now represents a network node, also showing up in the tree (3).
|
||||
- As we asssigned the `raspberrypi` in the previous 1) Device details page section to the `Internet` parent network node in step (6), the link is also showing up in the tree diagram (4)
|
||||
- We can now assign the device `(AppleTV)` (5) to this `raspberrypi` node, representing a network Switch in this example
|
||||
|
||||
### 1) Network page with 2 levels
|
||||
|
||||
- After clicking the `Assign` button in the previous section, the `(AppleTV)` (1) device is now connected to our `raspberrypi` (2).
|
||||
|
||||

|
||||
|
||||
- You can see the `raspberrypi` represents the Network node type `Switch` (3)
|
||||
- The `(AppleTV)` to `raspberrypi` connection is also displayed in the table of `Connected devices` (4).
|
||||
- You can also see that our `raspberrypi` node is connected to it's Parent network device node with the MAC `Internet` (5). This connection again shows up in the tree (6) as well.
|
||||
|
||||
|
||||
|
||||
@@ -33,7 +33,14 @@ decides to change the MAC).
|
||||
[Read more here](../LICENSE.txt)
|
||||
|
||||
### Contact
|
||||
pi.alert.application@gmail.com
|
||||
Always use the Issue tracker for the correct fork, for example:
|
||||
|
||||
[jokob-sk/Pi.Alert](https://github.com/jokob-sk/Pi.Alert/issues). Please also follow the guidelines on:
|
||||
|
||||
- ➕ [Pull Request guidelines](https://github.com/jokob-sk/Pi.Alert/tree/main/docs#-pull-requests-prs)
|
||||
- 🙏 [Feature request guidelines](https://github.com/jokob-sk/Pi.Alert/tree/main/docs#-feature-requests)
|
||||
- 🐛 [Issue guidelines](https://github.com/jokob-sk/Pi.Alert/tree/main/docs#-submitting-an-issue-or-bug)
|
||||
|
||||
|
||||
***Suggestions and comments are welcome***
|
||||
|
||||
|
||||
115
docs/README.md
Executable file
@@ -0,0 +1,115 @@
|
||||
## Documentation overview
|
||||
|
||||
In the app hover over settings or fields/labels or click blue in-app ❔ (question-mark) icons to get to relevant documentation pages.
|
||||
|
||||

|
||||
|
||||
There is also an in-app Help / FAQ section that should be answering frequently asked questions.
|
||||
|
||||
### 📥 Installation
|
||||
|
||||
⚠ Only tested as a [docker container - follow these instructions here](https://github.com/jokob-sk/Pi.Alert/blob/main/dockerfiles/README.md).
|
||||
> Check out [leiweibau's fork](https://github.com/leiweibau/Pi.Alert/) if you want to install Pi.Alert on the server directly or original instructions for [pucherot's original code](https://github.com/pucherot/Pi.Alert/)
|
||||
|
||||
|
||||
### 📚 Table of contents
|
||||
|
||||
#### 🐛 Debugging help & tips
|
||||
|
||||
- [Debugging tips](/docs/DEBUG_TIPS.md)
|
||||
- [Invalid JSON errors debug help](/docs/DEBUG_INVALID_JSON.md)
|
||||
|
||||
#### 🔝 Popular/Suggested
|
||||
|
||||
- [Network treemap configuration](/docs/NETWORK_TREE.md)
|
||||
- [Gmail as SMTP server for sending emails](/docs/SMTP_GMAIL.md)
|
||||
- [Subnets and VLANs configuration for arp-scan](/docs/SUBNETS.md)
|
||||
- [Home Assistant](/docs/HOME_ASSISTANT.md)
|
||||
|
||||
#### ⚙ System Management
|
||||
|
||||
- [Manage devices (legacy docs)](/docs/DEVICE_MANAGEMENT.md)
|
||||
- [Random MAC/MAC icon meaning (legacy docs)](/docs/RANDOM_MAC.md)
|
||||
- [Custom Icons configuration and support](/docs/ICONS.md)
|
||||
|
||||
#### 🔎 Examples
|
||||
|
||||
- [N8N webhook example](/docs/WEBHOOK_N8N.md)
|
||||
|
||||
#### ♻ Misc
|
||||
|
||||
- [Version history (legacy)](/docs/VERSIONS_HISTORY.md)
|
||||
- [Reverse proxy (Nginx, Apache, SWAG)](/docs/REVERSE_PROXY.md)
|
||||
|
||||
#### 👩💻For Developers👨💻
|
||||
|
||||
- [APP code structure](/pialert/README.md)
|
||||
- [Database structure](/docs/DATABASE.md)
|
||||
- [API endpoints details](/docs/API.md)
|
||||
- [Plugin system details and how to develop your own](/front/plugins/README.md)
|
||||
- [Settings system](/docs/SETTINGS_SYSTEM.md)
|
||||
- [New Version notifications](/docs/VERSIONS.md)
|
||||
- [Frontend development tips](/docs/FRONTEND_DEVELOPMENT.md)
|
||||
|
||||
Feel free to suggest or submit new docs via a PR.
|
||||
|
||||
## 👨💻 Development priorities
|
||||
|
||||
Priorities from highest to lowest:
|
||||
|
||||
* 🔼 Fixing core functionality bugs not solvable with workarounds
|
||||
* 🔵 New core functionality unlocking other opportunities (e.g.: plugins)
|
||||
* 🔵 Refactoring enabling faster implementation of future functionality
|
||||
* 🔽 (low) UI functionality & improvements (PRs welcome 😉)
|
||||
|
||||
Design philosophy: Focus on core functionality and leverage existing apps and tools to make PiAlert integrate into other workflows.
|
||||
|
||||
Examples:
|
||||
|
||||
1. Supporting apprise makes more sense than implementing multiple individual notification gateways
|
||||
2. Implementing regular expression support across settings for validation makes more sense than validating one setting with a specific expression.
|
||||
|
||||
UI-specific requests are a low priority as the framework picked by the original developer is not very extensible (and afaik doesn't support components) and has limited mobile support. Also, I argue the value proposition is smaller than working on something else.
|
||||
|
||||
Feel free to submit PRs if interested. try to **keep the PRs small/on-topic** so they are easier to review and approve.
|
||||
|
||||
That being said, I'd reconsider if more people and or recurring sponsors file a request 😉.
|
||||
|
||||
## 🙏 Feature requests
|
||||
|
||||
Please be as detailed as possible with **workarounds** you considered and why a native feature is the better way. This gives me better context and will make it more likely to be implemented. Ideally, a feature request should be in the format "I want to be able to do XYZ so that ZYX. I considered these approaches XYZ".
|
||||
|
||||
## ➕ Pull requests (PRs)
|
||||
|
||||
If you submit a PR please:
|
||||
|
||||
1. Check that your changes are backward compatible with existing installations and with a blank setup.
|
||||
2. Existing features should always be preserved.
|
||||
3. Keep the PR small, on-topic and don't change code that is not necessary for the PR to work
|
||||
4. New features code should ideally be re-usable for different purposes, not be for a very narrow use-case.
|
||||
5. New functionality should ideally be implemented via the Plugins system, if possible.
|
||||
|
||||
Suggested test cases:
|
||||
|
||||
- Blank setup with no DB or config
|
||||
- Existing DB / config
|
||||
- Sending a notification (e. g. Delete a device and wait for a scan to run) and testing all notification gateways, especially:
|
||||
- Email, Apprise (e.g. via Telegram), webhook (e.g. via Discord), MQTT (e.g. via HomeAssitant)
|
||||
- Saving settings
|
||||
- Test a couple of plugins
|
||||
- Check the Error log for anything unusual
|
||||
|
||||
Some additional context:
|
||||
|
||||
* Permanent settings/config is stored in the `pialert.conf` file
|
||||
* Currently temporary (session?) settings are stored in the `Parameters` DB table as key-value pairs. This table is wiped during a container rebuild/restart and its values are re-initialized from cookies/session data from the browser.
|
||||
|
||||
## 🐛 Submitting an issue or bug
|
||||
|
||||
Before submitting a new issue please spend a couple of minutes on research:
|
||||
|
||||
* Check [🛑 Common issues](https://github.com/jokob-sk/Pi.Alert/tree/main/dockerfiles#-common-issues)
|
||||
* Check [💡 Closed issues](https://github.com/jokob-sk/Pi.Alert/issues?q=is%3Aissue+is%3Aclosed) if a similar issue was solved in the past.
|
||||
* When submitting an issue ❗[enable debug](https://github.com/jokob-sk/Pi.Alert/blob/main/docs/DEBUG_TIPS.md)❗
|
||||
|
||||
⚠ Please follow the pre-defined issue template to resolve your issue faster.
|
||||
350
docs/REVERSE_PROXY.md
Executable file
@@ -0,0 +1,350 @@
|
||||
# Reverse Proxy Configuration
|
||||
|
||||
> Submitted by amazing [cvc90](https://github.com/cvc90) 🙏
|
||||
|
||||
## NGINX HTTP Configuration (Direct Path)
|
||||
|
||||
1. On your NGINX server, create a new file called /etc/nginx/sites-available/pialert
|
||||
|
||||
2. In this file, paste the following code:
|
||||
|
||||
```
|
||||
server {
|
||||
listen 80;
|
||||
server_name pi.alert;
|
||||
proxy_preserve_host on;
|
||||
proxy_pass http://localhost:20211/;
|
||||
proxy_pass_reverse http://localhost:20211/;
|
||||
}
|
||||
```
|
||||
|
||||
3. Activate the new website by running the following command:
|
||||
|
||||
`nginx -s reload` or `systemctl restart nginx`
|
||||
|
||||
4. Once NGINX restarts, you should be able to access the proxy website at http://pi.alert/
|
||||
|
||||
<br>
|
||||
|
||||
## NGINX HTTP Configuration (Sub Path)
|
||||
|
||||
1. On your NGINX server, create a new file called /etc/nginx/sites-available/pialert
|
||||
|
||||
2. In this file, paste the following code:
|
||||
|
||||
```
|
||||
server {
|
||||
listen 80;
|
||||
server_name pi.alert;
|
||||
proxy_preserve_host on;
|
||||
location ^~ /pi.alert/ {
|
||||
proxy_pass http://localhost:20211/;
|
||||
proxy_pass_reverse http://localhost:20211/;
|
||||
proxy_redirect ~^/(.*)$ /pi.alert/$1;
|
||||
rewrite ^/pi.alert/?(.*)$ /$1 break;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
3. Activate the new website by running the following command:
|
||||
|
||||
`nginx -s reload` or `systemctl restart nginx`
|
||||
|
||||
4. Once NGINX restarts, you should be able to access the proxy website at http://pi.alert/pi.alert/
|
||||
|
||||
<br>
|
||||
|
||||
## NGINX HTTP Configuration (Sub Path) with module ngx_http_sub_module
|
||||
|
||||
1. On your NGINX server, create a new file called /etc/nginx/sites-available/pialert
|
||||
|
||||
2. In this file, paste the following code:
|
||||
|
||||
```
|
||||
server {
|
||||
listen 80;
|
||||
server_name pi.alert;
|
||||
proxy_preserve_host on;
|
||||
location ^~ /pi.alert/ {
|
||||
proxy_pass http://localhost:20211/;
|
||||
proxy_pass_reverse http://localhost:20211/;
|
||||
proxy_redirect ~^/(.*)$ /pi.alert/$1;
|
||||
rewrite ^/pi.alert/?(.*)$ /$1 break;
|
||||
sub_filter_once off;
|
||||
sub_filter_types *;
|
||||
sub_filter 'href="/' 'href="/pi.alert/';
|
||||
sub_filter '(?>$host)/css' '/pi.alert/css';
|
||||
sub_filter '(?>$host)/js' '/pi.alert/js';
|
||||
sub_filter '/img' '/pi.alert/img';
|
||||
sub_filter '/lib' '/pi.alert/lib';
|
||||
sub_filter '/php' '/pi.alert/php';
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
3. Activate the new website by running the following command:
|
||||
|
||||
`nginx -s reload` or `systemctl restart nginx`
|
||||
|
||||
4. Once NGINX restarts, you should be able to access the proxy website at http://pi.alert/pi.alert/
|
||||
|
||||
<br>
|
||||
|
||||
**NGINX HTTPS Configuration (Direct Path)**
|
||||
|
||||
1. On your NGINX server, create a new file called /etc/nginx/sites-available/pialert
|
||||
|
||||
2. In this file, paste the following code:
|
||||
|
||||
```
|
||||
server {
|
||||
listen 443;
|
||||
server_name pi.alert;
|
||||
SSLEngine On;
|
||||
SSLCertificateFile /etc/ssl/certs/pi.alert.pem;
|
||||
SSLCertificateKeyFile /etc/ssl/private/pi.alert.key;
|
||||
proxy_preserve_host on;
|
||||
proxy_pass http://localhost:20211/;
|
||||
proxy_pass_reverse http://localhost:20211/;
|
||||
}
|
||||
```
|
||||
|
||||
3. Activate the new website by running the following command:
|
||||
|
||||
`nginx -s reload` or `systemctl restart nginx`
|
||||
|
||||
4. Once NGINX restarts, you should be able to access the proxy website at https://pi.alert/
|
||||
|
||||
<br>
|
||||
|
||||
**NGINX HTTPS Configuration (Sub Path)**
|
||||
|
||||
1. On your NGINX server, create a new file called /etc/nginx/sites-available/pialert
|
||||
|
||||
2. In this file, paste the following code:
|
||||
|
||||
```
|
||||
server {
|
||||
listen 443;
|
||||
server_name pi.alert;
|
||||
SSLEngine On;
|
||||
SSLCertificateFile /etc/ssl/certs/pi.alert.pem;
|
||||
SSLCertificateKeyFile /etc/ssl/private/pi.alert.key;
|
||||
location ^~ /pi.alert/ {
|
||||
proxy_pass http://localhost:20211/;
|
||||
proxy_pass_reverse http://localhost:20211/;
|
||||
proxy_redirect ~^/(.*)$ /pi.alert/$1;
|
||||
rewrite ^/pi.alert/?(.*)$ /$1 break;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
3. Activate the new website by running the following command:
|
||||
|
||||
`nginx -s reload` or `systemctl restart nginx`
|
||||
|
||||
4. Once NGINX restarts, you should be able to access the proxy website at https://pi.alert/pi.alert/
|
||||
|
||||
<br>
|
||||
|
||||
## NGINX HTTPS Configuration (Sub Path) with module ngx_http_sub_module
|
||||
|
||||
1. On your NGINX server, create a new file called /etc/nginx/sites-available/pialert
|
||||
|
||||
2. In this file, paste the following code:
|
||||
|
||||
```
|
||||
server {
|
||||
listen 443;
|
||||
server_name pi.alert;
|
||||
SSLEngine On;
|
||||
SSLCertificateFile /etc/ssl/certs/pi.alert.pem;
|
||||
SSLCertificateKeyFile /etc/ssl/private/pi.alert.key;
|
||||
location ^~ /pi.alert/ {
|
||||
proxy_pass http://localhost:20211/;
|
||||
proxy_pass_reverse http://localhost:20211/;
|
||||
proxy_redirect ~^/(.*)$ /pi.alert/$1;
|
||||
rewrite ^/pi.alert/?(.*)$ /$1 break;
|
||||
sub_filter_once off;
|
||||
sub_filter_types *;
|
||||
sub_filter 'href="/' 'href="/pi.alert/';
|
||||
sub_filter '(?>$host)/css' '/pi.alert/css';
|
||||
sub_filter '(?>$host)/js' '/pi.alert/js';
|
||||
sub_filter '/img' '/pi.alert/img';
|
||||
sub_filter '/lib' '/pi.alert/lib';
|
||||
sub_filter '/php' '/pi.alert/php';
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
3. Activate the new website by running the following command:
|
||||
|
||||
`nginx -s reload` or `systemctl restart nginx`
|
||||
|
||||
4. Once NGINX restarts, you should be able to access the proxy website at https://pi.alert/pi.alert/
|
||||
|
||||
<br>
|
||||
|
||||
## Apache HTTP Configuration (Direct Path)
|
||||
|
||||
1. On your Apache server, create a new file called /etc/apache2/sites-available/pialert.conf.
|
||||
|
||||
2. In this file, paste the following code:
|
||||
|
||||
```
|
||||
<VirtualHost *:80>
|
||||
ServerName pi.alert
|
||||
ProxyPreserveHost On
|
||||
ProxyPass / http://localhost:20211/
|
||||
ProxyPassReverse / http://localhost:20211/
|
||||
</VirtualHost>
|
||||
```
|
||||
|
||||
3. Activate the new website by running the following command:
|
||||
|
||||
`a2ensite pialert` or `service apache2 reload`
|
||||
|
||||
4. Once Apache restarts, you should be able to access the proxy website at http://pi.alert/
|
||||
|
||||
<br>
|
||||
|
||||
## Apache HTTP Configuration (Sub Path)
|
||||
|
||||
1. On your Apache server, create a new file called /etc/apache2/sites-available/pialert.conf.
|
||||
|
||||
2. In this file, paste the following code:
|
||||
|
||||
```
|
||||
<VirtualHost *:80>
|
||||
ServerName pi.alert
|
||||
location ^~ /pi.alert/ {
|
||||
ProxyPreserveHost On
|
||||
ProxyPass / http://localhost:20211/
|
||||
ProxyPassReverse / http://localhost:20211/
|
||||
}
|
||||
</VirtualHost>
|
||||
```
|
||||
|
||||
3. Activate the new website by running the following command:
|
||||
|
||||
`a2ensite pialert` or `service apache2 reload`
|
||||
|
||||
4. Once Apache restarts, you should be able to access the proxy website at http://pi.alert/
|
||||
|
||||
<br>
|
||||
|
||||
## Apache HTTPS Configuration (Direct Path)
|
||||
|
||||
1. On your Apache server, create a new file called /etc/apache2/sites-available/pialert.conf.
|
||||
|
||||
2. In this file, paste the following code:
|
||||
|
||||
```
|
||||
<VirtualHost *:443>
|
||||
ServerName pi.alert
|
||||
SSLEngine On
|
||||
SSLCertificateFile /etc/ssl/certs/pi.alert.pem
|
||||
SSLCertificateKeyFile /etc/ssl/private/pi.alert.key
|
||||
ProxyPreserveHost On
|
||||
ProxyPass / http://localhost:20211/
|
||||
ProxyPassReverse / http://localhost:20211/
|
||||
</VirtualHost>
|
||||
```
|
||||
|
||||
3. Activate the new website by running the following command:
|
||||
|
||||
`a2ensite pialert` or `service apache2 reload`
|
||||
|
||||
4. Once Apache restarts, you should be able to access the proxy website at https://pi.alert/
|
||||
|
||||
<br>
|
||||
|
||||
## Apache HTTPS Configuration (Sub Path)
|
||||
|
||||
1. On your Apache server, create a new file called /etc/apache2/sites-available/pialert.conf.
|
||||
|
||||
2. In this file, paste the following code:
|
||||
|
||||
```
|
||||
<VirtualHost *:443>
|
||||
ServerName pi.alert
|
||||
SSLEngine On
|
||||
SSLCertificateFile /etc/ssl/certs/pi.alert.pem
|
||||
SSLCertificateKeyFile /etc/ssl/private/pi.alert.key
|
||||
location ^~ /pi.alert/ {
|
||||
ProxyPreserveHost On
|
||||
ProxyPass / http://localhost:20211/
|
||||
ProxyPassReverse / http://localhost:20211/
|
||||
}
|
||||
</VirtualHost>
|
||||
```
|
||||
|
||||
3. Activate the new website by running the following command:
|
||||
|
||||
`a2ensite pialert` or `service apache2 reload`
|
||||
|
||||
4. Once Apache restarts, you should be able to access the proxy website at https://pi.alert/pi.alert/
|
||||
|
||||
## Reverse proxy example by using LinuxServer's SWAG container.
|
||||
|
||||
> Submitted by [s33d1ing](https://github.com/s33d1ing). 🙏
|
||||
|
||||
## [linuxserver/swag](https://github.com/linuxserver/docker-swag)
|
||||
|
||||
In the SWAG container create `/config/nginx/proxy-confs/pialert.subfolder.conf` with the following contents:
|
||||
|
||||
``` nginx
|
||||
## Version 2023/02/05
|
||||
# make sure that your pialert container is named pialert
|
||||
# pialert does not require a base url setting
|
||||
|
||||
# Since Pi.Alert uses a Host network, you may need to use the IP address of the system running Pi.Alert for $upstream_app.
|
||||
|
||||
location /pialert {
|
||||
return 301 $scheme://$host/pialert/;
|
||||
}
|
||||
|
||||
location ^~ /pialert/ {
|
||||
# enable the next two lines for http auth
|
||||
#auth_basic "Restricted";
|
||||
#auth_basic_user_file /config/nginx/.htpasswd;
|
||||
|
||||
# enable for ldap auth (requires ldap-server.conf in the server block)
|
||||
#include /config/nginx/ldap-location.conf;
|
||||
|
||||
# enable for Authelia (requires authelia-server.conf in the server block)
|
||||
#include /config/nginx/authelia-location.conf;
|
||||
|
||||
# enable for Authentik (requires authentik-server.conf in the server block)
|
||||
#include /config/nginx/authentik-location.conf;
|
||||
|
||||
include /config/nginx/proxy.conf;
|
||||
include /config/nginx/resolver.conf;
|
||||
|
||||
set $upstream_app pialert;
|
||||
set $upstream_port 20211;
|
||||
set $upstream_proto http;
|
||||
|
||||
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
|
||||
proxy_set_header Accept-Encoding "";
|
||||
|
||||
proxy_redirect ~^/(.*)$ /pialert/$1;
|
||||
rewrite ^/pialert/?(.*)$ /$1 break;
|
||||
|
||||
sub_filter_once off;
|
||||
sub_filter_types *;
|
||||
|
||||
sub_filter 'href="/' 'href="/pialert/';
|
||||
|
||||
sub_filter '(?>$host)/css' '/pialert/css';
|
||||
sub_filter '(?>$host)/js' '/pialert/js';
|
||||
|
||||
sub_filter '/img' '/pialert/img';
|
||||
sub_filter '/lib' '/pialert/lib';
|
||||
sub_filter '/php' '/pialert/php';
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
77
docs/SETTINGS_SYSTEM.md
Executable file
@@ -0,0 +1,77 @@
|
||||
## ⚙ Setting system
|
||||
|
||||
This is an explanation how settings are handled intended for anyone thinking about writing their own plugin or contributing to the project.
|
||||
|
||||
If you are a user of the app, settings should be described in the `Settings` section of the app. Open an issue if you'd like to clarify any of the settings.
|
||||
|
||||
### 🛢 Data storage
|
||||
|
||||
The source of truth for user-defined values is the `pialert.conf` file. Editing the file makes the App overwrite values in the `Settings` database table and in the `table_settings.json` file.
|
||||
|
||||
#### Settings database table
|
||||
|
||||
The `Settings` database table contains settings for App run purposes. The table is recreated every time the App restarts. The settings are loaded from the source-of-truth, that is the `pialert.conf` file. A high-level overview on the databse structure can be found in the [database documentation](/docs/DATABASE.md).
|
||||
|
||||
#### table_settings.json
|
||||
|
||||
This is the [API endpoint](/docs/API.md) that reflects the state of the `Settings` database table. Settings can be accessed with the:
|
||||
|
||||
* `getSetting(key)` JavaScript method
|
||||
|
||||
The json file is also cached on the client-side local storage of the browser.
|
||||
|
||||
#### pialert.conf
|
||||
|
||||
> [!NOTE]
|
||||
> This is the source of truth for settings. User-defined values in this files always override default values specified in the Plugin definition.
|
||||
|
||||
The App generates two `pialert.conf` entries for every setting (Since version 23.8+). One entry is the setting value, the second is the `__metadata` associated with the setting. This `__metadata` entry contains the full setting definition in JSON format. This should helps the future extensibility of the Settings system.
|
||||
|
||||
#### Plugin settings
|
||||
|
||||
> [!NOTE]
|
||||
> This is the preferred way adding settings going forward. I'll be likely migrating all app settings into plugin-based settings.
|
||||
|
||||
Plugin settings are loaded dynamically from the `config.json` of individual plugins. If a setting isn't defined in the `pialert.conf` file, it is initialized via the `default_value` property of a setting from the `config.json` file. Check the [Plugins documentation](/front/plugins/README.md), section `⚙ Setting object structure` for details on the structure of the setting.
|
||||
|
||||
![Screen 1][screen1]
|
||||
|
||||
### Settings Process flow
|
||||
|
||||
The process flow is mostly managed by the [initialise.py](/pialert/initialise.py) file.
|
||||
|
||||
The script is responsible for reading user-defined values from a configuration file (`pialert.conf`), initializing settings, and importing them into a database. It also handles plugins and their configurations.
|
||||
|
||||
Here's a high-level description of the code:
|
||||
|
||||
1. Function Definitions:
|
||||
- `ccd`: This function is used to handle user-defined settings and configurations. It takes several parameters related to the setting's name, default value, input type, options, group, and more. It saves the settings and their metadata in different lists (`conf.mySettingsSQLsafe` and `conf.mySettings`).
|
||||
|
||||
- `importConfigs`: This function is the main entry point of the script. It imports user settings from a configuration file, processes them, and saves them to the database.
|
||||
|
||||
- `read_config_file`: This function reads the configuration file (`pialert.conf`) and returns a dictionary containing the key-value pairs from the file.
|
||||
|
||||
2. Importing Configuration and Initializing Settings:
|
||||
- The `importConfigs` function starts by checking the modification time of the configuration file to determine if it needs to be re-imported. If the file has not been modified since the last import, the function skips the import process.
|
||||
|
||||
- The function reads the configuration file using the `read_config_file` function, which returns a dictionary of settings.
|
||||
|
||||
- The script then initializes various user-defined settings using the `ccd` function, based on the values read from the configuration file. These settings are categorized into groups such as "General," "Email," "Webhooks," "Apprise," and more.
|
||||
|
||||
3. Plugin Handling:
|
||||
- The script loads and handles plugins dynamically. It retrieves plugin configurations and iterates through each plugin.
|
||||
- For each plugin, it extracts the prefix and settings related to that plugin and processes them similarly to other user-defined settings.
|
||||
- It also handles scheduling for plugins with specific `RUN_SCHD` settings.
|
||||
|
||||
4. Saving Settings to the Database:
|
||||
- The script clears the existing settings in the database and inserts the updated settings into the database using SQL queries.
|
||||
|
||||
5. Updating the API and Performing Cleanup:
|
||||
- After importing the configurations, the script updates the API to reflect the changes in the settings.
|
||||
- It saves the current timestamp to determine the next import time.
|
||||
- Finally, it logs the successful import of the new configuration.
|
||||
|
||||
|
||||
_____________________
|
||||
|
||||
[screen1]: https://raw.githubusercontent.com/jokob-sk/Pi.Alert/main/docs/img/plugins_json_settings.png "Screen 1"
|
||||
15
docs/SMTP_GMAIL.md
Executable file
@@ -0,0 +1,15 @@
|
||||
## Use the Gmail SMTP server
|
||||
|
||||
1) Create an app password by following the instructions from Google, you need to Enable 2FA for this to work.
|
||||
[https://support.google.com/accounts/answer/185833](https://support.google.com/accounts/answer/185833)
|
||||
|
||||
2) Specify the following settings:
|
||||
|
||||
```python
|
||||
SMTP_SKIP_TLS=True
|
||||
SMTP_FORCE_SSL=True
|
||||
SMTP_PORT=465
|
||||
SMTP_SERVER='smtp.gmail.com'
|
||||
SMTP_PASS='16-digit passcode from google'
|
||||
```
|
||||
|
||||
96
docs/SUBNETS.md
Executable file
@@ -0,0 +1,96 @@
|
||||
# Subnets configuration for arp-scan
|
||||
|
||||
You need to specify the network interface and the network mask. You can also configure multiple subnets and specify VLANS (see exceptions below).
|
||||
|
||||
## Examples
|
||||
|
||||
* Examples for one and two subnets (❗ Note the `['...', '...']` format):
|
||||
* One subnet: `SCAN_SUBNETS = ['192.168.1.0/24 --interface=eth0']`
|
||||
* Two subnets: `SCAN_SUBNETS = ['192.168.1.0/24 --interface=eth0', '192.168.1.0/24 --interface=eth1 -vlan=107']`
|
||||
|
||||
## Explanation
|
||||
|
||||
### Network mask
|
||||
|
||||
**Example value: `192.168.1.0/24`**
|
||||
|
||||
The arp-scan time itself depends on the number of IP addresses to check.
|
||||
|
||||
> The number of IPs to check depends on the [network mask](https://www.calculator.net/ip-subnet-calculator.html) you set on the `SCAN_SUBNETS` setting.
|
||||
> For example, a `/24` mask results in 256 IPs to check, whereas a `/16` mask checks around 65,536. Every IP takes a couple of seconds. This means that with an incorrect configuration, the arp-scan will take hours to complete instead of seconds.
|
||||
|
||||
Specify the network filter (which **significantly** speeds up the scan process). For example, the filter `192.168.1.0/24` covers IP ranges 192.168.1.0 to 192.168.1.255.
|
||||
|
||||
### Network interface (adapter)
|
||||
|
||||
**Example value: `--interface=eth0`**
|
||||
|
||||
The adapter will probably be `eth0` or `eth1`. (Run `iwconfig` in the container to find your interface name(s))
|
||||
|
||||
> Run `iwconfig` in your container to find your interface name(s) (e.g.: `eth0`, `eth1`).
|
||||
|
||||
### VLANs
|
||||
|
||||
**Example value: `-vlan=107`**
|
||||
|
||||
- Append e.g.: ` -vlan=107` to the interface field (e.g.: `eth0 -vlan=107`) for multiple vlans. More details in this [comment in this issue](https://github.com/jokob-sk/Pi.Alert/issues/170#issuecomment-1419902988)
|
||||
|
||||
|
||||
#### VLANs on a Hyper-V setup
|
||||
|
||||
> Community sourced content by [mscreations](https://github.com/mscreations) from this [discussion](https://github.com/jokob-sk/Pi.Alert/discussions/404).
|
||||
|
||||
> [!NOTE]
|
||||
> The setup this was tested on: Bare Metal -> Hyper-V on Win Server 2019 -> Ubuntu 22.04 VM -> Docker -> PiAlert.
|
||||
|
||||
**Approach 1 (may cause issues):**
|
||||
|
||||
Configure multiple network adapters in Hyper-V with distinct VLANs connected to each one using Hyper-V's network setup. However, this action can potentially lead to the Docker host's inability to handle network traffic correctly. The issue may stem from the creation of routes for network time servers or domain controllers on every interface, thereby preventing proper synchronization of the underlying Ubuntu VM. This interference can affect the performance of other applications such as Authentik.
|
||||
|
||||
**Approach 2 (working example)**
|
||||
|
||||
Network connections to switches are configured as trunk and allow all VLANs access to the server.
|
||||
|
||||
By default Hyper-V only allows untagged packets through to the VM interface and no VLAN tagged packets get through. In order to fix this follow these steps:
|
||||
|
||||
1) Run the following command in Powershell on the Hyper-V machine:
|
||||
|
||||
```shell
|
||||
Set-VMNetworkAdapterVlan -VMName <Docker VM Name> -Trunk -NativeVlanId 0 -AllowedVlanIdList "<comma separated list of vlans>"
|
||||
```
|
||||
|
||||
(There might be other ways how adjust this.)
|
||||
|
||||
2) Within the VM, set up sub-interfaces for each of the VLANs so they can be scanned. On Ubuntu 22.04 Netplan can be used.
|
||||
|
||||
In /etc/netplan/00-installer-config.yaml, add vlan definitions:
|
||||
|
||||
```
|
||||
network:
|
||||
ethernets:
|
||||
eth0:
|
||||
dhcp4: yes
|
||||
vlans:
|
||||
eth0.2:
|
||||
id: 2
|
||||
link: eth0
|
||||
addresses: [ "192.168.2.2/24" ]
|
||||
routes:
|
||||
- to: 192.168.2.0/24
|
||||
via: 192.168.1.1
|
||||
```
|
||||
|
||||
3) Run `sudo netplan apply` and the interfaces are then available to scan in PiAlert.
|
||||
4) In this case, use `192.168.2.0/24 --interface=eth0.2` in PiAlert
|
||||
|
||||
#### VLAN 🔍Example:
|
||||
|
||||

|
||||
|
||||
#### Support for VLANS (& exceptions)
|
||||
|
||||
Please note the accessibility of the macvlans when they are configured on the same computer. My understanding this is a general networking behavior, but feel free to clarify via a PR/issue.
|
||||
|
||||
- Pi.Alert does not detect the macvlan container when it is running on the same computer.
|
||||
- Pi.Alert recognizes the macvlan container when it is running on a different computer.
|
||||
|
||||
25
docs/VERSIONS.md
Executable file
@@ -0,0 +1,25 @@
|
||||
## Am I running the latest released version?
|
||||
|
||||
Since version 23.01.14 PiAlert uses a simple timestamp-based version check to verify if a new version is available. You can check the [current and past releases here](https://github.com/jokob-sk/Pi.Alert/releases), or have a look at what I'm [currently working on](https://github.com/jokob-sk/Pi.Alert/issues/138).
|
||||
|
||||
If you are not on the latest version, the app will notify you, that a new released version is avialable the following way:
|
||||
|
||||
### 📧 Via email on a notification event
|
||||
|
||||
If any notification occurs and an email is sent, the email will contain a note that a new version is available. See the sample email below:
|
||||
|
||||

|
||||
|
||||
### 🆕 In the UI
|
||||
|
||||
In the UI via a notification Icon and via a custom message in the Maintenance section.
|
||||
|
||||

|
||||
|
||||
For a comparison, this is how the UI looks like if you are on the latest stable image:
|
||||
|
||||

|
||||
|
||||
## Implementation details
|
||||
|
||||
During build a [/home/pi/pialert/front/buildtimestamp.txt](https://github.com/jokob-sk/Pi.Alert/blob/092797e75ccfa8359444ad149e727358ac4da05f/Dockerfile#L44) file is created. The app then periodically checks if a new release is available with a newer timestamp in GitHub's rest-based JSON endpoint (check the `def isNewVersion():` method in `pialert.py` for details).
|
||||
@@ -77,4 +77,11 @@
|
||||
[Read more here](../LICENSE.txt)
|
||||
|
||||
### Contact
|
||||
pi.alert.application@gmail.com
|
||||
Always use the Issue tracker for the correct fork, for example:
|
||||
|
||||
[jokob-sk/Pi.Alert](https://github.com/jokob-sk/Pi.Alert/issues). Please also follow the guidelines on:
|
||||
|
||||
- ➕ [Pull Request guidelines](https://github.com/jokob-sk/Pi.Alert/tree/main/docs#-pull-requests-prs)
|
||||
- 🙏 [Feature request guidelines](https://github.com/jokob-sk/Pi.Alert/tree/main/docs#-feature-requests)
|
||||
- 🐛 [Issue guidelines](https://github.com/jokob-sk/Pi.Alert/tree/main/docs#-submitting-an-issue-or-bug)
|
||||
|
||||
|
||||
@@ -1,12 +1,18 @@
|
||||
### Create a simple n8n workflow
|
||||

|
||||
|
||||

|
||||
|
||||
### Specify your email template
|
||||
See [sample JSON](https://github.com/jokob-sk/Pi.Alert/blob/main/back/webhook_json_sample.json) if you want to see the JSON paths used in the email template below
|
||||

|
||||

|
||||
|
||||
```
|
||||
Events count: {{ $json["body"]["attachments"][0]["text"]["events"].length }}
|
||||
New devices count: {{ $json["body"]["attachments"][0]["text"]["new_devices"].length }}
|
||||
```
|
||||
|
||||
### Get your webhook in n8n
|
||||

|
||||

|
||||
|
||||
### Configure PiAlert to point to the above URL
|
||||

|
||||

|
||||
|
||||
|
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 32 KiB |
BIN
docs/img/DATABASE/CurrentScan.png
Executable file
|
After Width: | Height: | Size: 58 KiB |
BIN
docs/img/DATABASE/DHCP_Leases.png
Executable file
|
After Width: | Height: | Size: 7.1 KiB |
BIN
docs/img/DATABASE/Devices.png
Executable file
|
After Width: | Height: | Size: 85 KiB |
BIN
docs/img/DATABASE/Events.png
Executable file
|
After Width: | Height: | Size: 43 KiB |
BIN
docs/img/DATABASE/Nmap_Scan.png
Executable file
|
After Width: | Height: | Size: 44 KiB |
BIN
docs/img/DATABASE/Online_History.png
Executable file
|
After Width: | Height: | Size: 47 KiB |
BIN
docs/img/DATABASE/Parameters.png
Executable file
|
After Width: | Height: | Size: 39 KiB |
BIN
docs/img/DATABASE/Pholus_Scan.png
Executable file
|
After Width: | Height: | Size: 92 KiB |
BIN
docs/img/DATABASE/PiHole_Network.png
Executable file
|
After Width: | Height: | Size: 6.6 KiB |
BIN
docs/img/DATABASE/Plugins_Events.png
Executable file
|
After Width: | Height: | Size: 17 KiB |
BIN
docs/img/DATABASE/Plugins_History.png
Executable file
|
After Width: | Height: | Size: 72 KiB |
BIN
docs/img/DATABASE/Plugins_Language_Strings.png
Executable file
|
After Width: | Height: | Size: 42 KiB |
BIN
docs/img/DATABASE/Plugins_Objects.png
Executable file
|
After Width: | Height: | Size: 65 KiB |
BIN
docs/img/DATABASE/ScanCycles.png
Executable file
|
After Width: | Height: | Size: 35 KiB |
BIN
docs/img/DATABASE/Sessions.png
Executable file
|
After Width: | Height: | Size: 61 KiB |
BIN
docs/img/DATABASE/Settings.png
Executable file
|
After Width: | Height: | Size: 52 KiB |
BIN
docs/img/DEBUG/Invalid_JSON_repsonse_debug.png
Executable file
|
After Width: | Height: | Size: 197 KiB |
BIN
docs/img/DEBUG/JSON_result_example.png
Executable file
|
After Width: | Height: | Size: 54 KiB |
BIN
docs/img/DEBUG/array_result_example.png
Executable file
|
After Width: | Height: | Size: 7.0 KiB |
BIN
docs/img/GENERAL/in-app-help.png
Executable file
|
After Width: | Height: | Size: 8.7 KiB |
BIN
docs/img/HOME_ASISSTANT/PiAlert-HomeAssistant-Device-Presence-History.png
Executable file
|
After Width: | Height: | Size: 17 KiB |
BIN
docs/img/HOME_ASISSTANT/PiAlert-HomeAssistant-Device-as-Sensors.png
Executable file
|
After Width: | Height: | Size: 14 KiB |
BIN
docs/img/HOME_ASISSTANT/PiAlert-HomeAssistant-Devices-List.png
Executable file
|
After Width: | Height: | Size: 21 KiB |
BIN
docs/img/HOME_ASISSTANT/PiAlert-HomeAssistant-Overview-Card.png
Executable file
|
After Width: | Height: | Size: 9.5 KiB |
BIN
docs/img/ICONS/device-icon.png
Executable file
|
After Width: | Height: | Size: 49 KiB |
BIN
docs/img/ICONS/devices-icons.png
Executable file
|
After Width: | Height: | Size: 13 KiB |
BIN
docs/img/NETWORK_TREE/Device_Details_Network_Type.png
Executable file
|
After Width: | Height: | Size: 100 KiB |
BIN
docs/img/NETWORK_TREE/Network_Page.png
Executable file
|
After Width: | Height: | Size: 185 KiB |
BIN
docs/img/NETWORK_TREE/Network_Page_2_Levels.png
Executable file
|
After Width: | Height: | Size: 89 KiB |
BIN
docs/img/SUBNETS/subnets_vlan.png
Executable file
|
After Width: | Height: | Size: 20 KiB |
BIN
docs/img/VERSIONS/latest-version-maintenance.png
Executable file
|
After Width: | Height: | Size: 60 KiB |
BIN
docs/img/VERSIONS/new-version-available-email.png
Executable file
|
After Width: | Height: | Size: 32 KiB |
BIN
docs/img/VERSIONS/new-version-available-maintenance.png
Executable file
|
After Width: | Height: | Size: 61 KiB |
BIN
docs/img/WEBHOOK_N8N/Webhook_settings.png
Executable file
|
After Width: | Height: | Size: 61 KiB |
BIN
docs/img/WEBHOOK_N8N/n8n_send_email_settings.png
Executable file
|
After Width: | Height: | Size: 38 KiB |
BIN
docs/img/WEBHOOK_N8N/n8n_webhook_settings.png
Executable file
|
After Width: | Height: | Size: 31 KiB |
BIN
docs/img/WEBHOOK_N8N/n8n_workflow.png
Executable file
|
After Width: | Height: | Size: 6.3 KiB |
BIN
docs/img/device_nmap.png
Executable file
|
After Width: | Height: | Size: 157 KiB |
BIN
docs/img/plugins.png
Executable file
|
After Width: | Height: | Size: 218 KiB |
BIN
docs/img/plugins_device_details.png
Executable file
|
After Width: | Height: | Size: 202 KiB |
BIN
docs/img/plugins_json_settings.png
Executable file
|
After Width: | Height: | Size: 185 KiB |
BIN
docs/img/plugins_json_ui.png
Executable file
|
After Width: | Height: | Size: 173 KiB |
BIN
docs/img/plugins_rogue_dhcp.png
Executable file
|
After Width: | Height: | Size: 116 KiB |
BIN
docs/img/plugins_settings.png
Executable file
|
After Width: | Height: | Size: 158 KiB |
BIN
docs/img/plugins_webmon.png
Executable file
|
After Width: | Height: | Size: 92 KiB |
@@ -1,80 +0,0 @@
|
||||
<!-- ---------------------------------------------------------------------------
|
||||
# Pi.Alert
|
||||
# Open Source Network Guard / WIFI & LAN intrusion detector
|
||||
#
|
||||
# repot_sample.html - Back module. Sample email reporting in HTML format
|
||||
#-------------------------------------------------------------------------------
|
||||
# Puche 2021 pi.alert.application@gmail.com GNU GPLv3
|
||||
#--------------------------------------------------------------------------- -->
|
||||
|
||||
<html>
|
||||
|
||||
<head>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<font face=sans-serif>
|
||||
<table align=center width=80% border=1 bordercolor=#909090 cellpadding=0 cellspacing=0 style="border-collapse: collapse; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.5)">
|
||||
<tr>
|
||||
<td bgcolor=#EFB956 align=center style="padding: 20px 10px 10px 10px; font-size: 36px; font-weight: bold; color:#7F6000; text-shadow: 4px 4px 6px #909090">
|
||||
Pi.Alert Report
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<table width=100% border=0 bgcolor=#FFD966 cellpadding=5px cellspacing=0 style="border-collapse: collapse; font-size: 16px; text-align:center; color:#5F5000">
|
||||
<tr>
|
||||
<td width=33%> Report Date: <b>2021-01-01 08:00</b> </td>
|
||||
<td width=34%> Scan Cycle: <b>Internet</b> </td>
|
||||
<td width=33%> Server: <b>pi4</b> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td bgcolor=#F5F5F5 valign=top height=400 style="padding: 20px">
|
||||
|
||||
<p style="font-size: 24px; font-weight: bold; color:#C04040; text-shadow: 2px 2px 4px #A0A0A0"> Internet: </p>
|
||||
|
||||
<table width=100% border=1 bordercolor=#C0C0C0 cellpadding=3px cellspacing=0 style="border-collapse: collapse; font-size: 12px; color:#707070; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2)">
|
||||
<tr bgcolor=#909090 style="color:#F0F0F0">
|
||||
<th width=140> Event Type </th>
|
||||
<th width=130> Datetime </th>
|
||||
<th width=100> IP </th>
|
||||
<th> Additional Info </th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td> Internet IP Changed </td>
|
||||
<td> 2021-01-01 08:00:00 </td>
|
||||
<td style="font-size: 24px; color:#D02020"> 1.1.1.0 </td>
|
||||
<td> Previous Internet IP: 1.1.0.0 </td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<table width=100% border=0 bgcolor=#70AD47 cellpadding=5px cellspacing=0 style="border-collapse: collapse; font-size: 12px; font-weight: bold; color:#385723">
|
||||
<tr>
|
||||
<td width=25% style="text-align:Left"> Puche 2021</td>
|
||||
<td width=50% style="text-align:center"> Pi.Alert 2.50 / 2021-01-01 </td>
|
||||
<td width=25% style="text-align:right"> GNU GPLv3</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</font>
|
||||
</body>
|
||||
</html>
|
||||
2
front/api/.gitignore
vendored
Executable file
@@ -0,0 +1,2 @@
|
||||
*
|
||||
!.gitignore
|
||||
0
front/buildtimestamp.txt
Executable file
@@ -591,7 +591,14 @@ height: 50px;
|
||||
}
|
||||
|
||||
.nav-tabs-custom .tab-content {
|
||||
background-color: white;
|
||||
background-color: white;
|
||||
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
.nav-tabs-custom .tab-content {
|
||||
overflow: scroll;
|
||||
}
|
||||
}
|
||||
|
||||
.top_small_box_gray_text {
|
||||
@@ -623,20 +630,26 @@ height: 50px;
|
||||
width:30%;
|
||||
}
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.setting_description {
|
||||
/* color: green; */
|
||||
display: block;
|
||||
}
|
||||
.setting_input{
|
||||
width:35%;
|
||||
/* background-color: green; */
|
||||
}
|
||||
.setting_name
|
||||
{
|
||||
width:19%;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.setting_description {
|
||||
/* color: green; */
|
||||
display: block;
|
||||
}
|
||||
.setting_input{
|
||||
width:40%;
|
||||
/* background-color: green; */
|
||||
}
|
||||
.setting_name
|
||||
{
|
||||
width:19%;
|
||||
}
|
||||
}
|
||||
|
||||
.settingswrap .metadata
|
||||
{
|
||||
display: none;
|
||||
}
|
||||
|
||||
.table_row {
|
||||
padding: 3px;
|
||||
@@ -663,7 +676,7 @@ height: 50px;
|
||||
|
||||
.setting_description
|
||||
{
|
||||
width:46%;
|
||||
width:40%;
|
||||
}
|
||||
|
||||
.myhidden
|
||||
@@ -685,6 +698,8 @@ height: 50px;
|
||||
margin-top: 50px;
|
||||
}
|
||||
|
||||
/* Settings */
|
||||
|
||||
.settings_content {
|
||||
padding: 10px;
|
||||
/* background-color: #272c30; */
|
||||
@@ -707,6 +722,28 @@ height: 50px;
|
||||
width: auto
|
||||
}
|
||||
|
||||
.override{
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.override .override-text
|
||||
{
|
||||
float:left;
|
||||
width: 80%;
|
||||
}
|
||||
|
||||
.override .override-check
|
||||
{
|
||||
float:left;
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
input[readonly] {
|
||||
/* Apply styles to the readonly input */
|
||||
background-color: #646566 !important;
|
||||
color: #000;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
/* Devices */
|
||||
.drp-edit
|
||||
@@ -727,6 +764,15 @@ height: 50px;
|
||||
{
|
||||
cursor:pointer;
|
||||
}
|
||||
|
||||
.drag
|
||||
{
|
||||
cursor: move; /* fallback if grab cursor is unsupported */
|
||||
cursor: grab;
|
||||
cursor: -moz-grab;
|
||||
cursor: -webkit-grab;
|
||||
}
|
||||
|
||||
.db_info_table_row .select2-container--default .select2-selection--multiple .select2-selection__choice
|
||||
{
|
||||
background-color:#258744;
|
||||
@@ -741,24 +787,58 @@ height: 50px;
|
||||
background-color:#606060;
|
||||
}
|
||||
|
||||
.networkPageHelp{
|
||||
position: absolute;
|
||||
font-size: x-small;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
.pageHelp{
|
||||
position: absolute;
|
||||
font-size: x-small;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
/* NETWORK page */
|
||||
|
||||
/* AdminLTE overrides */
|
||||
#networkTree .box
|
||||
{
|
||||
padding:2px;
|
||||
margin:2px;
|
||||
border-top:1px;
|
||||
border-top-color:grey;
|
||||
padding:0px;
|
||||
padding-top:6px;
|
||||
margin:0px;
|
||||
align-items:center;
|
||||
border-radius:20px;
|
||||
width:180px;
|
||||
display:flex;
|
||||
flex-direction:column;
|
||||
justify-content:center;
|
||||
}
|
||||
#networkTree .netNodeText
|
||||
{
|
||||
top: 2px;
|
||||
margin: 2px;
|
||||
{
|
||||
position: absolute;
|
||||
}
|
||||
#networkTree .netPort
|
||||
{
|
||||
float:left;
|
||||
display:inline;
|
||||
}
|
||||
|
||||
#networkTree .portBckgIcon
|
||||
{
|
||||
opacity: 0.3;
|
||||
display: initial;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#networkTree
|
||||
{
|
||||
margin-left: 16px;
|
||||
/* border: solid;
|
||||
border-color:#606060; */
|
||||
position: relative;
|
||||
font-size: 0.75em;
|
||||
position: relative;
|
||||
}
|
||||
#networkTree .netIcon
|
||||
{
|
||||
@@ -770,7 +850,7 @@ height: 50px;
|
||||
{
|
||||
display: block;
|
||||
position: absolute;
|
||||
margin-left: 156px;
|
||||
margin-left: 170px;
|
||||
top: -3px;
|
||||
font-size: large;
|
||||
left: -15px;
|
||||
@@ -793,5 +873,64 @@ height: 50px;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.plugin-filters
|
||||
{
|
||||
margin: 7px;
|
||||
margin-right: 7px;
|
||||
margin-bottom: 9px;
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
|
||||
.plugin-content
|
||||
{
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
|
||||
.plugin-content .left-nav{
|
||||
width: 100%;
|
||||
padding-right: 0px;
|
||||
}
|
||||
|
||||
.plugin-content #tabs-content-location
|
||||
{
|
||||
margin: 0px;
|
||||
|
||||
}
|
||||
|
||||
.plugins-description
|
||||
{
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
|
||||
.login-page .login-custom
|
||||
{
|
||||
width:480px;
|
||||
|
||||
}
|
||||
|
||||
/*Hidden special button*/
|
||||
|
||||
@media (max-width: 464px) {
|
||||
#back-button {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 432px) {
|
||||
#next-button {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 400px) {
|
||||
#reload-button {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 365px) {
|
||||
#fullscreen-button {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
214
front/deviceDetailsTools.php
Executable file
@@ -0,0 +1,214 @@
|
||||
<script>
|
||||
deviceIP = getDeviceDataByMacAddress("<?php echo $_REQUEST["mac"]?>", "dev_LastIP")
|
||||
</script>
|
||||
|
||||
<?php if ($_REQUEST["mac"] == "Internet") { ?>
|
||||
|
||||
<h4 class=""><i class="fa-solid fa-globe"></i>
|
||||
<?= lang("DevDetail_Tab_Tools_Internet_Info_Title") ?>
|
||||
</h4>
|
||||
<h5 class="">
|
||||
<?= lang("DevDetail_Tab_Tools_Internet_Info_Description") ?>
|
||||
</h5>
|
||||
<br>
|
||||
<div style="width:100%; text-align: center; margin-bottom: 50px;">
|
||||
<button type="button" id="internetinfo" class="btn btn-primary pa-btn" style="margin: auto;" onclick="internetinfo()">
|
||||
<?= lang("DevDetail_Tab_Tools_Internet_Info_Start") ?></button>
|
||||
<br>
|
||||
<div id="internetinfooutput" style="margin-top: 10px;"></div>
|
||||
</div>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($_REQUEST["mac"] == "Internet") { ?>
|
||||
<h4 class=""><i class="fa-solid fa-gauge-high"></i>
|
||||
<?= lang("DevDetail_Tab_Tools_Speedtest_Title") ?>
|
||||
</h4>
|
||||
<h5 class="">
|
||||
<?= lang("DevDetail_Tab_Tools_Speedtest_Description") ?>
|
||||
</h5>
|
||||
<br>
|
||||
<div style="width:100%; text-align: center; margin-bottom: 50px;">
|
||||
<button type="button" id="speedtestcli" class="btn btn-primary pa-btn" style="margin: auto;" onclick="speedtestcli()">
|
||||
<?= lang("DevDetail_Tab_Tools_Speedtest_Start") ?></button>
|
||||
<br>
|
||||
<div id="speedtestoutput" style="margin-top: 10px;"></div>
|
||||
</div>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($_REQUEST["mac"] != "Internet") { ?>
|
||||
<h4 class=""><i class="fa-solid fa-route"></i>
|
||||
<?= lang("DevDetail_Tab_Tools_Traceroute_Title") ?>
|
||||
</h4>
|
||||
<h5 class="">
|
||||
<?= lang("DevDetail_Tab_Tools_Traceroute_Description") ?>
|
||||
</h5>
|
||||
<div style="width:100%; text-align: center; margin-bottom: 50px;">
|
||||
<button type="button" id="traceroute" class="btn btn-primary pa-btn" style="margin: auto;" onclick="traceroute()">
|
||||
<?= lang("DevDetail_Tab_Tools_Traceroute_Start") ?>
|
||||
</button>
|
||||
<br>
|
||||
<div id="tracerouteoutput" style="margin-top: 10px;"></div>
|
||||
</div>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($_REQUEST["mac"] != "Internet") { ?>
|
||||
<h4 class=""><i class="fa-solid fa-magnifying-glass"></i>
|
||||
<?= lang("DevDetail_Tab_Tools_Nslookup_Title") ?>
|
||||
</h4>
|
||||
<h5 class="">
|
||||
<?= lang("DevDetail_Tab_Tools_Nslookup_Description") ?>
|
||||
</h5>
|
||||
<div style="width:100%; text-align: center; margin-bottom: 50px;">
|
||||
<button type="button" id="nslookup" class="btn btn-primary pa-btn" style="margin: auto;" onclick="nslookup()">
|
||||
<?= lang("DevDetail_Tab_Tools_Nslookup_Start") ?>
|
||||
</button>
|
||||
<br>
|
||||
<div id="nslookupoutput" style="margin-top: 10px;"></div>
|
||||
</div>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
<h4 class=""><i class="fa-solid fa-ethernet"></i>
|
||||
<?= lang("DevDetail_Nmap_Scans") ?>
|
||||
</h4>
|
||||
<div style="width:100%; text-align: center;">
|
||||
<div>
|
||||
<?= lang("DevDetail_Nmap_Scans_desc") ?>
|
||||
</div>
|
||||
|
||||
<button type="button" id="piamanualnmap_fast" class="btn btn-primary pa-btn" style="margin-bottom: 20px; margin-left: 10px; margin-right: 10px;" onclick="manualnmapscan(deviceIP, 'fast')">
|
||||
<?= lang("DevDetail_Loading") ?>
|
||||
</button>
|
||||
<button type="button" id="piamanualnmap_normal" class="btn btn-primary pa-btn" style="margin-bottom: 20px; margin-left: 10px; margin-right: 10px;" onclick="manualnmapscan(deviceIP, 'normal')">
|
||||
<?= lang("DevDetail_Loading") ?>
|
||||
</button>
|
||||
<button type="button" id="piamanualnmap_detail" class="btn btn-primary pa-btn" style="margin-bottom: 20px; margin-left: 10px; margin-right: 10px;" onclick="manualnmapscan(deviceIP, 'detail')">
|
||||
<?= lang("DevDetail_Loading") ?>
|
||||
</button>
|
||||
<button type="button" id="piamanualnmap_skipdiscovery" class="btn btn-primary pa-btn" style="margin-bottom: 20px; margin-left: 10px; margin-right: 10px;" onclick="manualnmapscan(deviceIP, 'skipdiscovery')">
|
||||
<?= lang("DevDetail_Loading") ?>
|
||||
</button>
|
||||
|
||||
<div style="text-align: left;">
|
||||
<ul style="padding:20px;">
|
||||
<li>
|
||||
<?= lang("DevDetail_Nmap_buttonFast_text") ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= lang("DevDetail_Nmap_buttonDefault_text") ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= lang("DevDetail_Nmap_buttonDetail_text") ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= lang("DevDetail_Nmap_buttonSkipDiscovery_text") ?>
|
||||
</li>
|
||||
<li>
|
||||
<a onclick="setCache('activeMaintenanceTab', 'tab_Logging_id')" href="/maintenance.php#tab_Logging">
|
||||
<?= lang("DevDetail_Nmap_resultsLink") ?>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="scanoutput" style="margin-top: 30px;"></div>
|
||||
|
||||
<script>
|
||||
// ----------------------------------------------------------------
|
||||
function manualnmapscan(targetip, mode) {
|
||||
$( "#scanoutput" ).empty();
|
||||
$.ajax({
|
||||
method: "POST",
|
||||
url: "./php/server/nmap_scan.php",
|
||||
data: { scan: targetip, mode: mode },
|
||||
beforeSend: function() { $('#scanoutput').addClass("ajax_scripts_loading"); },
|
||||
complete: function() { $('#scanoutput').removeClass("ajax_scripts_loading"); },
|
||||
success: function(data, textStatus) {
|
||||
console.log(data);
|
||||
$("#scanoutput").html(data);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
function speedtestcli() {
|
||||
$( "#speedtestoutput" ).empty();
|
||||
$.ajax({
|
||||
method: "POST",
|
||||
url: "./php/server/speedtestcli.php",
|
||||
beforeSend: function() { $('#speedtestoutput').addClass("ajax_scripts_loading"); },
|
||||
complete: function() { $('#speedtestoutput').removeClass("ajax_scripts_loading"); },
|
||||
success: function(data, textStatus) {
|
||||
$("#speedtestoutput").html(data);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
function traceroute() {
|
||||
|
||||
$( "#tracerouteoutput" ).empty();
|
||||
$.ajax({
|
||||
method: "GET",
|
||||
url: "./php/server/traceroute.php?action=get&ip=" + deviceIP + "",
|
||||
beforeSend: function() { $('#tracerouteoutput').addClass("ajax_scripts_loading"); },
|
||||
complete: function() { $('#tracerouteoutput').removeClass("ajax_scripts_loading"); },
|
||||
success: function(data, textStatus) {
|
||||
$("#tracerouteoutput").html(data);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
function nslookup() {
|
||||
|
||||
$( "#nslookupoutput" ).empty();
|
||||
$.ajax({
|
||||
method: "GET",
|
||||
url: "./php/server/nslookup.php?action=get&ip=" + deviceIP + "",
|
||||
beforeSend: function() { $('#nslookupoutput').addClass("ajax_scripts_loading"); },
|
||||
complete: function() { $('#nslookupoutput').removeClass("ajax_scripts_loading"); },
|
||||
success: function(data, textStatus) {
|
||||
$("#nslookupoutput").html(data);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
setTimeout(function(){
|
||||
document.getElementById('piamanualnmap_fast').innerHTML='<?= lang(
|
||||
"DevDetail_Nmap_buttonFast"
|
||||
) ?> (' + deviceIP +')';
|
||||
document.getElementById('piamanualnmap_normal').innerHTML='<?= lang(
|
||||
"DevDetail_Nmap_buttonDefault"
|
||||
) ?> (' + deviceIP +')';
|
||||
document.getElementById('piamanualnmap_detail').innerHTML='<?= lang(
|
||||
"DevDetail_Nmap_buttonDetail"
|
||||
) ?> (' + deviceIP +')';
|
||||
document.getElementById('piamanualnmap_skipdiscovery').innerHTML='<?= lang(
|
||||
"DevDetail_Nmap_buttonSkipDiscovery"
|
||||
) ?> (' + deviceIP +')';
|
||||
}, 2000);
|
||||
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
function internetinfo() {
|
||||
$( "#internetinfooutput" ).empty();
|
||||
$.ajax({
|
||||
method: "POST",
|
||||
url: "./php/server/internetinfo.php",
|
||||
beforeSend: function() { $('#internetinfooutput').addClass("ajax_scripts_loading"); },
|
||||
complete: function() { $('#internetinfooutput').removeClass("ajax_scripts_loading"); },
|
||||
success: function(data, textStatus) {
|
||||
$("#internetinfooutput").html(data);
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
@@ -1,17 +1,21 @@
|
||||
<!-- ---------------------------------------------------------------------------
|
||||
# Pi.Alert
|
||||
# Open Source Network Guard / WIFI & LAN intrusion detector
|
||||
#
|
||||
# devices.php - Front module. Devices list page
|
||||
#-------------------------------------------------------------------------------
|
||||
# Puche 2021 / 2022+ jokob jokob@duck.com GNU GPLv3
|
||||
#--------------------------------------------------------------------------- -->
|
||||
<!--
|
||||
#---------------------------------------------------------------------------------#
|
||||
# Pi.Alert #
|
||||
# Open Source Network Guard / WIFI & LAN intrusion detector #
|
||||
# #
|
||||
# devices.php - Front module. Devices list page #
|
||||
#---------------------------------------------------------------------------------#
|
||||
# Puche 2021 pi.alert.application@gmail.com GNU GPLv3 #
|
||||
# jokob-sk 2022 jokob.sk@gmail.com GNU GPLv3 #
|
||||
# leiweibau 2022 https://github.com/leiweibau GNU GPLv3 #
|
||||
# cvc90 2023 https://github.com/cvc90 GNU GPLv3 #
|
||||
#---------------------------------------------------------------------------------#
|
||||
-->
|
||||
|
||||
<?php
|
||||
|
||||
require 'php/templates/header.php';
|
||||
require 'php/templates/graph.php';
|
||||
require 'php/server/util.php';
|
||||
|
||||
|
||||
// check permissions
|
||||
@@ -27,7 +31,8 @@
|
||||
<!-- Content header--------------------------------------------------------- -->
|
||||
<section class="content-header">
|
||||
<h1 id="pageTitle">
|
||||
<?php echo lang('Device_Title');?>
|
||||
<i class="fa fa-laptop"></i>
|
||||
<?= lang('Device_Title');?>
|
||||
</h1>
|
||||
</section>
|
||||
|
||||
@@ -40,7 +45,7 @@
|
||||
<a href="#" onclick="javascript: getDevicesList('all');">
|
||||
<div class="small-box bg-aqua">
|
||||
<div class="inner"><h3 id="devicesAll"> -- </h3>
|
||||
<p class="infobox_label"><?php echo lang('Device_Shortcut_AllDevices');?></p>
|
||||
<p class="infobox_label"><?= lang('Device_Shortcut_AllDevices');?></p>
|
||||
</div>
|
||||
<div class="icon"><i class="fa fa-laptop text-aqua-40"></i></div>
|
||||
</div>
|
||||
@@ -52,7 +57,7 @@
|
||||
<a href="#" onclick="javascript: getDevicesList('connected');">
|
||||
<div class="small-box bg-green">
|
||||
<div class="inner"><h3 id="devicesConnected"> -- </h3>
|
||||
<p class="infobox_label"><?php echo lang('Device_Shortcut_Connected');?></p>
|
||||
<p class="infobox_label"><?= lang('Device_Shortcut_Connected');?></p>
|
||||
</div>
|
||||
<div class="icon"><i class="fa fa-plug text-green-40"></i></div>
|
||||
</div>
|
||||
@@ -64,7 +69,7 @@
|
||||
<a href="#" onclick="javascript: getDevicesList('favorites');">
|
||||
<div class="small-box bg-yellow">
|
||||
<div class="inner"><h3 id="devicesFavorites"> -- </h3>
|
||||
<p class="infobox_label"><?php echo lang('Device_Shortcut_Favorites');?></p>
|
||||
<p class="infobox_label"><?= lang('Device_Shortcut_Favorites');?></p>
|
||||
</div>
|
||||
<div class="icon"><i class="fa fa-star text-yellow-40"></i></div>
|
||||
</div>
|
||||
@@ -76,7 +81,7 @@
|
||||
<a href="#" onclick="javascript: getDevicesList('new');">
|
||||
<div class="small-box bg-yellow">
|
||||
<div class="inner"><h3 id="devicesNew"> -- </h3>
|
||||
<p class="infobox_label"><?php echo lang('Device_Shortcut_NewDevices');?></p>
|
||||
<p class="infobox_label"><?= lang('Device_Shortcut_NewDevices');?></p>
|
||||
</div>
|
||||
<div class="icon"><i class="ion ion-plus-round text-yellow-40"></i></div>
|
||||
</div>
|
||||
@@ -88,7 +93,7 @@
|
||||
<a href="#" onclick="javascript: getDevicesList('down');">
|
||||
<div class="small-box bg-red">
|
||||
<div class="inner"><h3 id="devicesDown"> -- </h3>
|
||||
<p class="infobox_label"><?php echo lang('Device_Shortcut_DownAlerts');?></p>
|
||||
<p class="infobox_label"><?= lang('Device_Shortcut_DownAlerts');?></p>
|
||||
</div>
|
||||
<div class="icon"><i class="fa fa-warning text-red-40"></i></div>
|
||||
</div>
|
||||
@@ -100,7 +105,7 @@
|
||||
<a href="#" onclick="javascript: getDevicesList('archived');">
|
||||
<div class="small-box bg-gray top_small_box_gray_text">
|
||||
<div class="inner"><h3 id="devicesArchived"> -- </h3>
|
||||
<p class="infobox_label"><?php echo lang('Device_Shortcut_Archived');?></p>
|
||||
<p class="infobox_label"><?= lang('Device_Shortcut_Archived');?></p>
|
||||
</div>
|
||||
<div class="icon"><i class="fa fa-eye-slash text-gray-40"></i></div>
|
||||
</div>
|
||||
@@ -115,7 +120,7 @@
|
||||
<div class="col-md-12">
|
||||
<div class="box" id="clients">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title"><?php echo lang('Device_Shortcut_OnlineChart');?> </h3>
|
||||
<h3 class="box-title"><?= lang('Device_Shortcut_OnlineChart');?> </h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="chart">
|
||||
@@ -192,9 +197,10 @@
|
||||
var parTableOrder = 'Front_Devices_Order';
|
||||
var tableRows = 10;
|
||||
var tableOrder = [[3,'desc'], [0,'asc']];
|
||||
var tableColumnVisible = [0,1,2,3,4,5,6,7,8,9,10,12,13,14];
|
||||
var columnsStr = '[0,1,2,3,4,5,6,7,8,9,10,12,13,14]';
|
||||
var tableColumnOrder = [0,1,2,3,4,5,6,7,8,9,10,12,13,14] ;
|
||||
|
||||
var columnsStr = '[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]';
|
||||
var tableColumnOrder = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18];
|
||||
var tableColumnVisible = tableColumnOrder;
|
||||
|
||||
// Read parameters & Initialize components
|
||||
main();
|
||||
@@ -203,32 +209,49 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
function main () {
|
||||
|
||||
// get from cookie if available (need to use decodeURI as saved as part of URI in PHP)
|
||||
cookieColumnsVisibleStr = decodeURI(getCookie("Front_Devices_Columns_Visible")).replaceAll('%2C',',')
|
||||
|
||||
defaultValue = cookieColumnsVisibleStr == "" ? columnsStr : cookieColumnsVisibleStr;
|
||||
|
||||
// get visible columns
|
||||
$.get('php/server/parameters.php?action=get&expireMinutes=525600&defaultValue='+columnsStr+'¶meter=Front_Devices_Columns_Visible', function(data) {
|
||||
$.get('php/server/parameters.php?action=get&expireMinutes=525600&defaultValue='+defaultValue+'¶meter=Front_Devices_Columns_Visible&skipcache', function(data) {
|
||||
|
||||
// save which columns are in the Devices page visible
|
||||
tableColumnVisible = numberArrayFromString(data);
|
||||
|
||||
// get from cookie if available (need to use decodeURI as saved as part of URI in PHP)
|
||||
cookieColumnsOrderStr = decodeURI(getCookie("Front_Devices_Columns_Order")).replaceAll('%2C',',')
|
||||
|
||||
defaultValue = cookieColumnsOrderStr == "" ? columnsStr : cookieColumnsOrderStr;
|
||||
|
||||
// get the custom order specified by the user
|
||||
$.get('php/server/parameters.php?action=get&expireMinutes=525600&defaultValue='+columnsStr+'¶meter=Front_Devices_Columns_Order', function(data) {
|
||||
$.get('php/server/parameters.php?action=get&expireMinutes=525600&defaultValue='+defaultValue+'¶meter=Front_Devices_Columns_Order&skipcache', function(data) {
|
||||
|
||||
// save the columns order in the Devices page
|
||||
tableColumnOrder = numberArrayFromString(data);
|
||||
|
||||
|
||||
|
||||
//initialize the table headers in the correct order
|
||||
var headersDefaultOrder = [ '<?php echo lang('Device_TableHead_Name');?>',
|
||||
'<?php echo lang('Device_TableHead_Owner');?>',
|
||||
'<?php echo lang('Device_TableHead_Type');?>',
|
||||
'<?php echo lang('Device_TableHead_Icon');?>',
|
||||
'<?php echo lang('Device_TableHead_Favorite');?>',
|
||||
'<?php echo lang('Device_TableHead_Group');?>',
|
||||
'<?php echo lang('Device_TableHead_FirstSession');?>',
|
||||
'<?php echo lang('Device_TableHead_LastSession');?>',
|
||||
'<?php echo lang('Device_TableHead_LastIP');?>',
|
||||
'<?php echo lang('Device_TableHead_MAC');?>',
|
||||
'<?php echo lang('Device_TableHead_Status');?>',
|
||||
'<?php echo lang('Device_TableHead_MAC_full');?>',
|
||||
'<?php echo lang('Device_TableHead_LastIPOrder');?>',
|
||||
'<?php echo lang('Device_TableHead_Rowid');?>',
|
||||
'<?php echo lang('Device_TableHead_Parent_MAC');?>'
|
||||
var headersDefaultOrder = [ '<?= lang('Device_TableHead_Name');?>',
|
||||
'<?= lang('Device_TableHead_Owner');?>',
|
||||
'<?= lang('Device_TableHead_Type');?>',
|
||||
'<?= lang('Device_TableHead_Icon');?>',
|
||||
'<?= lang('Device_TableHead_Favorite');?>',
|
||||
'<?= lang('Device_TableHead_Group');?>',
|
||||
'<?= lang('Device_TableHead_FirstSession');?>',
|
||||
'<?= lang('Device_TableHead_LastSession');?>',
|
||||
'<?= lang('Device_TableHead_LastIP');?>',
|
||||
'<?= lang('Device_TableHead_MAC');?>',
|
||||
'<?= lang('Device_TableHead_Status');?>',
|
||||
'<?= lang('Device_TableHead_MAC_full');?>',
|
||||
'<?= lang('Device_TableHead_LastIPOrder');?>',
|
||||
'<?= lang('Device_TableHead_Rowid');?>',
|
||||
'<?= lang('Device_TableHead_Parent_MAC');?>',
|
||||
'<?= lang('Device_TableHead_Connected_Devices');?>',
|
||||
'<?= lang('Device_TableHead_Location');?>',
|
||||
'<?= lang('Device_TableHead_Vendor');?>'
|
||||
];
|
||||
|
||||
html = '';
|
||||
@@ -239,8 +262,6 @@ function main () {
|
||||
}
|
||||
|
||||
$('#tableDevices tr').html(html);
|
||||
|
||||
|
||||
|
||||
// get parameter value
|
||||
$.get('php/server/parameters.php?action=get&defaultValue=50¶meter='+ parTableRows, function(data) {
|
||||
@@ -278,14 +299,13 @@ function main () {
|
||||
// -----------------------------------------------------------------------------
|
||||
var tableColumnHide = [];
|
||||
|
||||
// mapping the default order to the user specified one
|
||||
function mapIndx(oldIndex)
|
||||
{
|
||||
for(i=0;i<tableColumnOrder.length;i++)
|
||||
{
|
||||
if(tableColumnOrder[i] == oldIndex)
|
||||
{
|
||||
// console.log('newIndex')
|
||||
// console.log(i)
|
||||
return i;
|
||||
}
|
||||
}
|
||||
@@ -296,26 +316,18 @@ function mapIndx(oldIndex)
|
||||
function initializeDatatable () {
|
||||
for(i = 0; i < tableColumnOrder.length; i++)
|
||||
{
|
||||
// hide this column if not in the tableColumnVisible variable
|
||||
// hide this column if not in the tableColumnVisible variable (we need to keep the MAC address (index 11) for functionality reasons)
|
||||
if(tableColumnVisible.includes(tableColumnOrder[i]) == false)
|
||||
{
|
||||
tableColumnHide.push(mapIndx(tableColumnOrder[i]));
|
||||
}
|
||||
}
|
||||
|
||||
// If the device has a small width (mobile) only show name, ip, and status columns.
|
||||
if (window.screen.width < 400) {
|
||||
tableColumnHide = [11,12,13,1,2,4,5,6,7,9];
|
||||
}
|
||||
// else {
|
||||
// // var tableColumnHide = [11, 12, 13];
|
||||
// tableColumnHide = [11, 12, 13];
|
||||
// };
|
||||
|
||||
var table=
|
||||
$('#tableDevices').DataTable({
|
||||
'paging' : true,
|
||||
'lengthChange' : true,
|
||||
'lengthMenu' : [[10, 25, 50, 100, 500, -1], [10, 25, 50, 100, 500, '<?php echo lang('Device_Tablelenght_all');?>']],
|
||||
'lengthMenu' : [[10, 25, 50, 100, 500, -1], [10, 25, 50, 100, 500, '<?= lang('Device_Tablelenght_all');?>']],
|
||||
'searching' : true,
|
||||
|
||||
'ordering' : true,
|
||||
@@ -329,17 +341,23 @@ function initializeDatatable () {
|
||||
|
||||
'columnDefs' : [
|
||||
{visible: false, targets: tableColumnHide },
|
||||
{className: 'text-center', targets: [mapIndx(3), mapIndx(4), mapIndx(9), mapIndx(10)] },
|
||||
{width: '80px', targets: [mapIndx(6), mapIndx(7)] },
|
||||
{className: 'text-center', targets: [mapIndx(3), mapIndx(4), mapIndx(9), mapIndx(10), mapIndx(15)] },
|
||||
{width: '80px', targets: [mapIndx(6), mapIndx(7), mapIndx(15)] },
|
||||
{width: '30px', targets: [mapIndx(10), mapIndx(13)] },
|
||||
{orderData: [mapIndx(11)], targets: mapIndx(8) },
|
||||
{orderData: [mapIndx(12)], targets: mapIndx(8) },
|
||||
|
||||
// Device Name
|
||||
{targets: [mapIndx(0)],
|
||||
'createdCell': function (td, cellData, rowData, row, col) {
|
||||
'createdCell': function (td, cellData, rowData, row, col) {
|
||||
$(td).html ('<b class="anonymizeDev"><a href="deviceDetails.php?mac='+ rowData[mapIndx(11)] +'" class="">'+ cellData +'</a></b>');
|
||||
} },
|
||||
|
||||
// Connected Devices
|
||||
{targets: [mapIndx(15)],
|
||||
'createdCell': function (td, cellData, rowData, row, col) {
|
||||
$(td).html ('<b><a href="./network.php?mac='+ rowData[mapIndx(11)] +'" class="">'+ cellData +'</a></b>');
|
||||
} },
|
||||
|
||||
// Icon
|
||||
{targets: [mapIndx(3)],
|
||||
'createdCell': function (td, cellData, rowData, row, col) {
|
||||
@@ -408,7 +426,7 @@ function initializeDatatable () {
|
||||
default: color='aqua'; break;
|
||||
};
|
||||
|
||||
$(td).html ('<a href="deviceDetails.php?mac='+ rowData[10] +'" class="badge bg-'+ color +'">'+ cellData.replace('-', '') +'</a>');
|
||||
$(td).html ('<a href="deviceDetails.php?mac='+ rowData[mapIndx(11)] +'" class="badge bg-'+ color +'">'+ cellData.replace('-', '') +'</a>');
|
||||
} },
|
||||
],
|
||||
|
||||
@@ -417,13 +435,13 @@ function initializeDatatable () {
|
||||
'language' : {
|
||||
processing: '<table> <td width="130px" align="middle">Loading...</td><td><i class="ion ion-ios-loop-strong fa-spin fa-2x fa-fw"></td> </table>',
|
||||
emptyTable: 'No data',
|
||||
"lengthMenu": "<?php echo lang('Device_Tablelenght');?>",
|
||||
"search": "<?php echo lang('Device_Searchbox');?>: ",
|
||||
"lengthMenu": "<?= lang('Device_Tablelenght');?>",
|
||||
"search": "<?= lang('Device_Searchbox');?>: ",
|
||||
"paginate": {
|
||||
"next": "<?php echo lang('Device_Table_nav_next');?>",
|
||||
"previous": "<?php echo lang('Device_Table_nav_prev');?>"
|
||||
"next": "<?= lang('Device_Table_nav_next');?>",
|
||||
"previous": "<?= lang('Device_Table_nav_prev');?>"
|
||||
},
|
||||
"info": "<?php echo lang('Device_Table_info');?>",
|
||||
"info": "<?= lang('Device_Table_info');?>",
|
||||
}
|
||||
});
|
||||
|
||||
@@ -461,7 +479,7 @@ function getDevicesFromTable(table)
|
||||
rowIDs.map(function(rowID, index){
|
||||
result.push({
|
||||
"rowid": rowID,
|
||||
"mac":rowMACs[index],
|
||||
"mac" : rowMACs[index],
|
||||
"name" : rowNames[index],
|
||||
"type" : rowTypes[index],
|
||||
"icon" : rowIcons[index],
|
||||
@@ -505,13 +523,13 @@ function getDevicesList (status) {
|
||||
|
||||
// Define color & title for the status selected
|
||||
switch (deviceStatus) {
|
||||
case 'all': tableTitle = '<?php echo lang('Device_Shortcut_AllDevices');?>'; color = 'aqua'; break;
|
||||
case 'connected': tableTitle = '<?php echo lang('Device_Shortcut_Connected');?>'; color = 'green'; break;
|
||||
case 'favorites': tableTitle = '<?php echo lang('Device_Shortcut_Favorites');?>'; color = 'yellow'; break;
|
||||
case 'new': tableTitle = '<?php echo lang('Device_Shortcut_NewDevices');?>'; color = 'yellow'; break;
|
||||
case 'down': tableTitle = '<?php echo lang('Device_Shortcut_DownAlerts');?>'; color = 'red'; break;
|
||||
case 'archived': tableTitle = '<?php echo lang('Device_Shortcut_Archived');?>'; color = 'gray'; break;
|
||||
default: tableTitle = '<?php echo lang('Device_Shortcut_Devices');?>'; color = 'gray'; break;
|
||||
case 'all': tableTitle = '<?= lang('Device_Shortcut_AllDevices');?>'; color = 'aqua'; break;
|
||||
case 'connected': tableTitle = '<?= lang('Device_Shortcut_Connected');?>'; color = 'green'; break;
|
||||
case 'favorites': tableTitle = '<?= lang('Device_Shortcut_Favorites');?>'; color = 'yellow'; break;
|
||||
case 'new': tableTitle = '<?= lang('Device_Shortcut_NewDevices');?>'; color = 'yellow'; break;
|
||||
case 'down': tableTitle = '<?= lang('Device_Shortcut_DownAlerts');?>'; color = 'red'; break;
|
||||
case 'archived': tableTitle = '<?= lang('Device_Shortcut_Archived');?>'; color = 'gray'; break;
|
||||
default: tableTitle = '<?= lang('Device_Shortcut_Devices');?>'; color = 'gray'; break;
|
||||
}
|
||||
|
||||
// Set title and color
|
||||
|
||||
22
front/donations.php
Executable file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
require 'php/templates/header.php';
|
||||
?>
|
||||
<script src="js/pialert_common.js"></script>
|
||||
|
||||
|
||||
<div id="settingsPage" class="content-wrapper">
|
||||
<p>
|
||||
<a target="_blank" href="https://github.com/sponsors/jokob-sk">
|
||||
<img alt="Sponsor Me on GitHub" src="https://i.imgur.com/X6p5ACK.png" width="150px">
|
||||
</a>
|
||||
<a target="_blank" href="https://www.buymeacoffee.com/jokobsk">
|
||||
<img alt="Buy Me A Coffee" src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" width="117px" height="30px">
|
||||
</a>
|
||||
<a target="_blank" href="https://www.patreon.com/user?u=84385063">
|
||||
<img alt="Support me on patreon" src="https://upload.wikimedia.org/wikipedia/commons/thumb/8/82/Patreon_logo_with_wordmark.svg/512px-Patreon_logo_with_wordmark.svg.png" width="117px">
|
||||
</a>
|
||||
</p>
|
||||
<p>
|
||||
BTC: 1N8tupjeCK12qRVU2XrV17WvKK7LCawyZM
|
||||
</p>
|
||||
</div>
|
||||
@@ -1,14 +1,19 @@
|
||||
<!-- ---------------------------------------------------------------------------
|
||||
# Pi.Alert
|
||||
# Open Source Network Guard / WIFI & LAN intrusion detector
|
||||
#
|
||||
# events.php - Front module. Events page
|
||||
#-------------------------------------------------------------------------------
|
||||
# Puche 2021 / 2022+ jokob jokob@duck.com GNU GPLv3
|
||||
#--------------------------------------------------------------------------- -->
|
||||
<!--
|
||||
#---------------------------------------------------------------------------------#
|
||||
# Pi.Alert #
|
||||
# Open Source Network Guard / WIFI & LAN intrusion detector #
|
||||
# #
|
||||
# events.php - Front module. Events page #
|
||||
#---------------------------------------------------------------------------------#
|
||||
# Puche 2021 pi.alert.application@gmail.com GNU GPLv3 #
|
||||
# jokob-sk 2022 jokob.sk@gmail.com GNU GPLv3 #
|
||||
# leiweibau 2022 https://github.com/leiweibau GNU GPLv3 #
|
||||
# cvc90 2023 https://github.com/cvc90 GNU GPLv3 #
|
||||
#---------------------------------------------------------------------------------#
|
||||
-->
|
||||
|
||||
<?php
|
||||
require 'php/templates/header.php';
|
||||
require 'php/templates/header.php';
|
||||
?>
|
||||
|
||||
<!-- Page ------------------------------------------------------------------ -->
|
||||
@@ -17,17 +22,18 @@
|
||||
<!-- Content header--------------------------------------------------------- -->
|
||||
<section class="content-header">
|
||||
<h1 id="pageTitle">
|
||||
<?php echo lang('Events_Title');?>
|
||||
<i class="fa fa-bolt"></i>
|
||||
<?= lang('Events_Title');?>
|
||||
</h1>
|
||||
|
||||
<!-- period selector -->
|
||||
<span class="breadcrumb" style="top: 0px;">
|
||||
<select class="form-control" id="period" onchange="javascript: periodChanged();">
|
||||
<option value="1 day"><?php echo lang('Events_Periodselect_today');?></option>
|
||||
<option value="7 days"><?php echo lang('Events_Periodselect_LastWeek');?></option>
|
||||
<option value="1 month" selected><?php echo lang('Events_Periodselect_LastMonth');?></option>
|
||||
<option value="1 year"><?php echo lang('Events_Periodselect_LastYear');?></option>
|
||||
<option value="100 years"><?php echo lang('Events_Periodselect_All');?></option>
|
||||
<option value="1 day"><?= lang('Events_Periodselect_today');?></option>
|
||||
<option value="7 days"><?= lang('Events_Periodselect_LastWeek');?></option>
|
||||
<option value="1 month" selected><?= lang('Events_Periodselect_LastMonth');?></option>
|
||||
<option value="1 year"><?= lang('Events_Periodselect_LastYear');?></option>
|
||||
<option value="100 years"><?= lang('Events_Periodselect_All');?></option>
|
||||
</select>
|
||||
</span>
|
||||
</section>
|
||||
@@ -42,7 +48,7 @@
|
||||
<a href="#" onclick="javascript: getEvents('all');">
|
||||
<div class="small-box bg-aqua">
|
||||
<div class="inner"> <h3 id="eventsAll"> -- </h3>
|
||||
<p class="infobox_label"><?php echo lang('Events_Shortcut_AllEvents');?></p>
|
||||
<p class="infobox_label"><?= lang('Events_Shortcut_AllEvents');?></p>
|
||||
</div>
|
||||
<div class="icon"> <i class="fa fa-bolt text-aqua-40"></i> </div>
|
||||
</div>
|
||||
@@ -54,7 +60,7 @@
|
||||
<a href="#" onclick="javascript: getEvents('sessions');">
|
||||
<div class="small-box bg-green">
|
||||
<div class="inner"> <h3 id="eventsSessions"> -- </h3>
|
||||
<p class="infobox_label"><?php echo lang('Events_Shortcut_Sessions');?></p>
|
||||
<p class="infobox_label"><?= lang('Events_Shortcut_Sessions');?></p>
|
||||
</div>
|
||||
<div class="icon"> <i class="fa fa-plug text-green-40"></i> </div>
|
||||
</div>
|
||||
@@ -66,7 +72,7 @@
|
||||
<a href="#" onclick="javascript: getEvents('missing');">
|
||||
<div class="small-box bg-yellow">
|
||||
<div class="inner"> <h3 id="eventsMissing"> -- </h3>
|
||||
<p class="infobox_label"><?php echo lang('Events_Shortcut_MissSessions');?></p>
|
||||
<p class="infobox_label"><?= lang('Events_Shortcut_MissSessions');?></p>
|
||||
</div>
|
||||
<div class="icon"> <i class="fa fa-exchange text-yellow-40"></i> </div>
|
||||
</div>
|
||||
@@ -78,7 +84,7 @@
|
||||
<a href="#" onclick="javascript: getEvents('voided');">
|
||||
<div class="small-box bg-yellow">
|
||||
<div class="inner"> <h3 id="eventsVoided"> -- </h3>
|
||||
<p class="infobox_label"><?php echo lang('Events_Shortcut_VoidSessions');?></p>
|
||||
<p class="infobox_label"><?= lang('Events_Shortcut_VoidSessions');?></p>
|
||||
</div>
|
||||
<div class="icon"> <i class="fa fa-exclamation-circle text-yellow-40"></i> </div>
|
||||
</div>
|
||||
@@ -90,7 +96,7 @@
|
||||
<a href="#" onclick="javascript: getEvents('new');">
|
||||
<div class="small-box bg-yellow">
|
||||
<div class="inner"> <h3 id="eventsNewDevices"> -- </h3>
|
||||
<p class="infobox_label"><?php echo lang('Events_Shortcut_NewDevices');?></p>
|
||||
<p class="infobox_label"><?= lang('Events_Shortcut_NewDevices');?></p>
|
||||
</div>
|
||||
<div class="icon"> <i class="ion ion-plus-round text-yellow-40"></i> </div>
|
||||
</div>
|
||||
@@ -102,7 +108,7 @@
|
||||
<a href="#" onclick="javascript: getEvents('down');">
|
||||
<div class="small-box bg-red">
|
||||
<div class="inner"> <h3 id="eventsDown"> -- </h3>
|
||||
<p class="infobox_label"><?php echo lang('Events_Shortcut_DownAlerts');?></p>
|
||||
<p class="infobox_label"><?= lang('Events_Shortcut_DownAlerts');?></p>
|
||||
</div>
|
||||
<div class="icon"> <i class="fa fa-warning text-red-40"></i> </div>
|
||||
</div>
|
||||
@@ -127,18 +133,18 @@
|
||||
<table id="tableEvents" class="table table-bordered table-hover table-striped ">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php echo lang('Events_TableHead_Order');?></th>
|
||||
<th><?php echo lang('Events_TableHead_Device');?></th>
|
||||
<th><?php echo lang('Events_TableHead_Owner');?></th>
|
||||
<th><?php echo lang('Events_TableHead_Date');?></th>
|
||||
<th><?php echo lang('Events_TableHead_EventType');?></th>
|
||||
<th><?php echo lang('Events_TableHead_Connection');?></th>
|
||||
<th><?php echo lang('Events_TableHead_Disconnection');?></th>
|
||||
<th><?php echo lang('Events_TableHead_Duration');?></th>
|
||||
<th><?php echo lang('Events_TableHead_DurationOrder');?></th>
|
||||
<th><?php echo lang('Events_TableHead_IP');?></th>
|
||||
<th><?php echo lang('Events_TableHead_IPOrder');?></th>
|
||||
<th><?php echo lang('Events_TableHead_AdditionalInfo');?></th>
|
||||
<th><?= lang('Events_TableHead_Order');?></th>
|
||||
<th><?= lang('Events_TableHead_Device');?></th>
|
||||
<th><?= lang('Events_TableHead_Owner');?></th>
|
||||
<th><?= lang('Events_TableHead_Date');?></th>
|
||||
<th><?= lang('Events_TableHead_EventType');?></th>
|
||||
<th><?= lang('Events_TableHead_Connection');?></th>
|
||||
<th><?= lang('Events_TableHead_Disconnection');?></th>
|
||||
<th><?= lang('Events_TableHead_Duration');?></th>
|
||||
<th><?= lang('Events_TableHead_DurationOrder');?></th>
|
||||
<th><?= lang('Events_TableHead_IP');?></th>
|
||||
<th><?= lang('Events_TableHead_IPOrder');?></th>
|
||||
<th><?= lang('Events_TableHead_AdditionalInfo');?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
@@ -251,15 +257,15 @@ function initializeDatatable () {
|
||||
// Processing
|
||||
'processing' : true,
|
||||
'language' : {
|
||||
processing: '<table><td width="130px" align="middle">Loading...</td><td><i class="ion ion-ios-loop-strong fa-spin fa-2x fa-fw"></td></table>',
|
||||
processing: '<table><td width="130px" align="middle"><?= lang("Events_Loading");?></td><td><i class="ion ion-ios-loop-strong fa-spin fa-2x fa-fw"></td></table>',
|
||||
emptyTable: 'No data',
|
||||
"lengthMenu": "<?php echo lang('Events_Tablelenght');?>",
|
||||
"search": "<?php echo lang('Events_Searchbox');?>: ",
|
||||
"lengthMenu": "<?= lang('Events_Tablelenght');?>",
|
||||
"search": "<?= lang('Events_Searchbox');?>: ",
|
||||
"paginate": {
|
||||
"next": "<?php echo lang('Events_Table_nav_next');?>",
|
||||
"previous": "<?php echo lang('Events_Table_nav_prev');?>"
|
||||
"next": "<?= lang('Events_Table_nav_next');?>",
|
||||
"previous": "<?= lang('Events_Table_nav_prev');?>"
|
||||
},
|
||||
"info": "<?php echo lang('Events_Table_info');?>",
|
||||
"info": "<?= lang('Events_Table_info');?>",
|
||||
}
|
||||
});
|
||||
|
||||
@@ -311,13 +317,13 @@ function getEvents (p_eventsType) {
|
||||
|
||||
// Define color & title for the status selected
|
||||
switch (eventsType) {
|
||||
case 'all': tableTitle = '<?php echo lang('Events_Shortcut_AllEvents');?>'; color = 'aqua'; sesionCols = false; break;
|
||||
case 'sessions': tableTitle = '<?php echo lang('Events_Shortcut_Sessions');?>'; color = 'green'; sesionCols = true; break;
|
||||
case 'missing': tableTitle = '<?php echo lang('Events_Shortcut_MissSessions');?>'; color = 'yellow'; sesionCols = true; break;
|
||||
case 'voided': tableTitle = '<?php echo lang('Events_Shortcut_VoidSessions');?>'; color = 'yellow'; sesionCols = false; break;
|
||||
case 'new': tableTitle = '<?php echo lang('Events_Shortcut_NewDevices');?>'; color = 'yellow'; sesionCols = false; break;
|
||||
case 'down': tableTitle = '<?php echo lang('Events_Shortcut_DownAlerts');?>'; color = 'red'; sesionCols = false; break;
|
||||
default: tableTitle = '<?php echo lang('Events_Shortcut_Events');?>'; boxClass = ''; sesionCols = false; break;
|
||||
case 'all': tableTitle = '<?= lang('Events_Shortcut_AllEvents');?>'; color = 'aqua'; sesionCols = false; break;
|
||||
case 'sessions': tableTitle = '<?= lang('Events_Shortcut_Sessions');?>'; color = 'green'; sesionCols = true; break;
|
||||
case 'missing': tableTitle = '<?= lang('Events_Shortcut_MissSessions');?>'; color = 'yellow'; sesionCols = true; break;
|
||||
case 'voided': tableTitle = '<?= lang('Events_Shortcut_VoidSessions');?>'; color = 'yellow'; sesionCols = false; break;
|
||||
case 'new': tableTitle = '<?= lang('Events_Shortcut_NewDevices');?>'; color = 'yellow'; sesionCols = false; break;
|
||||
case 'down': tableTitle = '<?= lang('Events_Shortcut_DownAlerts');?>'; color = 'red'; sesionCols = false; break;
|
||||
default: tableTitle = '<?= lang('Events_Shortcut_Events');?>'; boxClass = ''; sesionCols = false; break;
|
||||
}
|
||||
|
||||
// Set title and color
|
||||
|
||||
31
front/flows.php
Executable file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
require 'php/templates/header.php';
|
||||
require 'php/templates/notification.php';
|
||||
?>
|
||||
|
||||
<script src="js/pialert_common.js"></script>
|
||||
|
||||
<!-- Page ------------------------------------------------------------------ -->
|
||||
<div class="content-wrapper">
|
||||
|
||||
<!-- Content header--------------------------------------------------------- -->
|
||||
<section class="content-header">
|
||||
|
||||
<h1 id="pageTitle">
|
||||
<i class="fa fa-fw fa-plug"></i> <?= lang('Navigation_Flows');?>
|
||||
<span class="pageHelp"> <a target="_blank" href="https://github.com/jokob-sk/Pi.Alert/tree/main/front/plugins"><i class="fa fa-circle-question"></i></a><span>
|
||||
</h1>
|
||||
</section>
|
||||
|
||||
|
||||
<?php
|
||||
// require 'pluginsCore.php';
|
||||
?>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
require 'php/templates/footer.php';
|
||||
?>
|
||||
@@ -8,13 +8,17 @@
|
||||
<section class="content-header">
|
||||
<?php require 'php/templates/notification.php'; ?>
|
||||
<h1 id="pageTitle">
|
||||
<?php echo lang('HelpFAQ_Title');?>
|
||||
<i class="fa fa-question"></i>
|
||||
<?= lang('HelpFAQ_Title');?>
|
||||
</h1>
|
||||
</section>
|
||||
|
||||
<!-- Main content ---------------------------------------------------------- -->
|
||||
<section class="content">
|
||||
<h4><?php echo lang('HelpFAQ_Cat_General');?></h4>
|
||||
<h4>
|
||||
<i class="fa fa-question"></i>
|
||||
<?= lang('HelpFAQ_Cat_General');?>
|
||||
</h4>
|
||||
|
||||
<div class="panel-group" id="accordion_gen">
|
||||
<div class="panel panel-default">
|
||||
@@ -22,16 +26,16 @@
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#accordion_gen" href="#collapse100">
|
||||
<?php echo lang('HelpFAQ_Cat_General_100_head');?></a>
|
||||
<?= lang('HelpFAQ_Cat_General_100_head');?></a>
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<div id="collapse100" class="panel-collapse collapse" style="font-size: 16px;">
|
||||
<div class="panel-body"><?php echo lang('HelpFAQ_Cat_General_100_text_a');?>
|
||||
<div class="panel-body"><?= lang('HelpFAQ_Cat_General_100_text_a');?>
|
||||
<span class="text-danger help_faq_code"><?php echo date_default_timezone_get(); ?></span><br>
|
||||
<?php echo lang('HelpFAQ_Cat_General_100_text_b');?>
|
||||
<?= lang('HelpFAQ_Cat_General_100_text_b');?>
|
||||
<span class="text-danger help_faq_code"><?php echo php_ini_loaded_file(); ?></span><br>
|
||||
<?php echo lang('HelpFAQ_Cat_General_100_text_c');?>
|
||||
<?= lang('HelpFAQ_Cat_General_100_text_c');?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -42,12 +46,12 @@
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#accordion_gen" href="#collapse101">
|
||||
<?php echo lang('HelpFAQ_Cat_General_101_head');?></a>
|
||||
<?= lang('HelpFAQ_Cat_General_101_head');?></a>
|
||||
</h4>
|
||||
</div>
|
||||
<div id="collapse101" class="panel-collapse collapse" style="font-size: 16px;">
|
||||
<div class="panel-body">
|
||||
<?php echo lang('HelpFAQ_Cat_General_101_text');?>
|
||||
<?= lang('HelpFAQ_Cat_General_101_text');?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -55,12 +59,12 @@
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#accordion_gen" href="#collapse102">
|
||||
<?php echo lang('HelpFAQ_Cat_General_102_head');?></a>
|
||||
<?= lang('HelpFAQ_Cat_General_102_head');?></a>
|
||||
</h4>
|
||||
</div>
|
||||
<div id="collapse102" class="panel-collapse collapse" style="font-size: 16px;">
|
||||
<div class="panel-body">
|
||||
<?php echo lang('HelpFAQ_Cat_General_102_text');?>
|
||||
<?= lang('HelpFAQ_Cat_General_102_text');?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -68,12 +72,12 @@
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#accordion_gen" href="#collapse102docker">
|
||||
<?php echo lang('HelpFAQ_Cat_General_102docker_head');?></a>
|
||||
<?= lang('HelpFAQ_Cat_General_102docker_head');?></a>
|
||||
</h4>
|
||||
</div>
|
||||
<div id="collapse102docker" class="panel-collapse collapse" style="font-size: 16px;">
|
||||
<div class="panel-body">
|
||||
<?php echo lang('HelpFAQ_Cat_General_102docker_text');?>
|
||||
<?= lang('HelpFAQ_Cat_General_102docker_text');?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -81,48 +85,65 @@
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#accordion_gen" href="#collapse103">
|
||||
<?php echo lang('HelpFAQ_Cat_General_103_head');?></a>
|
||||
<?= lang('HelpFAQ_Cat_General_103_head');?></a>
|
||||
</h4>
|
||||
</div>
|
||||
<div id="collapse103" class="panel-collapse collapse" style="font-size: 16px;">
|
||||
<div class="panel-body">
|
||||
<?php echo lang('HelpFAQ_Cat_General_103_text');?>
|
||||
<?= lang('HelpFAQ_Cat_General_103_text');?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#accordion_net" href="#collapse601">
|
||||
<?= lang('HelpFAQ_Cat_Network_601_head');?></a>
|
||||
</h4>
|
||||
</div>
|
||||
<div id="collapse601" class="panel-collapse collapse" style="font-size: 16px;">
|
||||
<div class="panel-body">
|
||||
<?= lang('HelpFAQ_Cat_Network_601_text');?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h4><?php echo lang('Navigation_Devices');?></h4>
|
||||
<h4>
|
||||
<i class="fa fa-laptop"></i>
|
||||
<?= lang('Navigation_Devices');?>
|
||||
</h4>
|
||||
<div class="panel-group" id="accordion_dev">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#accordion_dev" href="#collapse200">
|
||||
<?php echo lang('HelpFAQ_Cat_Device_200_head');?></a>
|
||||
<?= lang('HelpFAQ_Cat_Device_200_head');?></a>
|
||||
</h4>
|
||||
</div>
|
||||
<div id="collapse200" class="panel-collapse collapse" style="font-size: 16px;">
|
||||
<div class="panel-body">
|
||||
<?php echo lang('HelpFAQ_Cat_Device_200_text');?>
|
||||
<?= lang('HelpFAQ_Cat_Device_200_text');?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<h4><?php echo lang('HelpFAQ_Cat_Detail');?></h4>
|
||||
<h4>
|
||||
<i class="fa fa-info-circle"></i><?= lang('HelpFAQ_Cat_Detail');?></h4>
|
||||
<div class="panel-group" id="accordion_det">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#accordion_det" href="#collapse300">
|
||||
<?php echo lang('HelpFAQ_Cat_Detail_300_head');?> "<?php echo lang('DevDetail_MainInfo_Network');?>" / "<?php echo lang('DevDetail_MainInfo_Network_Port');?>"?</a>
|
||||
<?= lang('HelpFAQ_Cat_Detail_300_head');?> "<?= lang('DevDetail_MainInfo_Network');?>" / "<?= lang('DevDetail_MainInfo_Network_Port');?>"?</a>
|
||||
</h4>
|
||||
</div>
|
||||
<div id="collapse300" class="panel-collapse collapse" style="font-size: 16px;">
|
||||
<div class="panel-body">
|
||||
"<?php echo lang('DevDetail_MainInfo_Network');?>" <?php echo lang('HelpFAQ_Cat_Detail_300_text_a');?><br>
|
||||
"<?php echo lang('DevDetail_MainInfo_Network_Port');?>" <?php echo lang('HelpFAQ_Cat_Detail_300_text_b');?>
|
||||
"<?= lang('DevDetail_MainInfo_Network');?>" <?= lang('HelpFAQ_Cat_Detail_300_text_a');?><br>
|
||||
"<?= lang('DevDetail_MainInfo_Network_Port');?>" <?= lang('HelpFAQ_Cat_Detail_300_text_b');?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -130,12 +151,12 @@
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#accordion_det" href="#collapse301">
|
||||
<?php echo lang('HelpFAQ_Cat_Detail_301_head_a');?> "<?php echo lang('DevDetail_EveandAl_ScanCycle');?>" <?php echo lang('HelpFAQ_Cat_Detail_301_head_b');?></a>
|
||||
<?= lang('HelpFAQ_Cat_Detail_301_head_a');?> "<?= lang('DevDetail_EveandAl_ScanCycle');?>" <?= lang('HelpFAQ_Cat_Detail_301_head_b');?></a>
|
||||
</h4>
|
||||
</div>
|
||||
<div id="collapse301" class="panel-collapse collapse" style="font-size: 16px;">
|
||||
<div class="panel-body">
|
||||
<?php echo lang('HelpFAQ_Cat_Detail_301_text');?>
|
||||
<?= lang('HelpFAQ_Cat_Detail_301_text');?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -143,12 +164,12 @@
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#accordion_det" href="#collapse302">
|
||||
<?php echo lang('HelpFAQ_Cat_Detail_302_head_a');?> "<?php echo lang('DevDetail_EveandAl_RandomMAC');?>" <?php echo lang('HelpFAQ_Cat_Detail_302_head_b');?></a>
|
||||
<?= lang('HelpFAQ_Cat_Detail_302_head_a');?> "<?= lang('DevDetail_EveandAl_RandomMAC');?>" <?= lang('HelpFAQ_Cat_Detail_302_head_b');?></a>
|
||||
</h4>
|
||||
</div>
|
||||
<div id="collapse302" class="panel-collapse collapse" style="font-size: 16px;">
|
||||
<div class="panel-body">
|
||||
<?php echo lang('HelpFAQ_Cat_Detail_302_text');?>
|
||||
<?= lang('HelpFAQ_Cat_Detail_302_text');?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -156,29 +177,33 @@
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#accordion_det" href="#collapse303">
|
||||
<?php echo lang('HelpFAQ_Cat_Detail_303_head');?></a>
|
||||
<?= lang('HelpFAQ_Cat_Detail_303_head');?></a>
|
||||
</h4>
|
||||
</div>
|
||||
<div id="collapse303" class="panel-collapse collapse" style="font-size: 16px;">
|
||||
<div class="panel-body">
|
||||
<?php echo lang('HelpFAQ_Cat_Detail_303_text');?>
|
||||
<?= lang('HelpFAQ_Cat_Detail_303_text');?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h4><?php echo lang('Navigation_Presence');?></h4>
|
||||
<h4>
|
||||
<i class="fa fa-calendar"></i>
|
||||
<?= lang('Navigation_Presence');?>
|
||||
</h4>
|
||||
<div class="panel-group" id="accordion_pre">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#accordion_pre" href="#collapse400">
|
||||
<?php echo lang('HelpFAQ_Cat_Presence_400_head');?></a>
|
||||
<?= lang('HelpFAQ_Cat_Presence_400_head');?></a>
|
||||
</h4>
|
||||
</div>
|
||||
<div id="collapse400" class="panel-collapse collapse" style="font-size: 16px;">
|
||||
<div class="panel-body">
|
||||
<?php echo lang('HelpFAQ_Cat_Presence_400_text');?>
|
||||
<?= lang('HelpFAQ_Cat_Presence_400_text');?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -186,35 +211,37 @@
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#accordion_pre" href="#collapse401">
|
||||
<?php echo lang('HelpFAQ_Cat_Presence_401_head');?></a>
|
||||
<?= lang('HelpFAQ_Cat_Presence_401_head');?></a>
|
||||
</h4>
|
||||
</div>
|
||||
<div id="collapse401" class="panel-collapse collapse" style="font-size: 16px;">
|
||||
<div class="panel-body">
|
||||
<?php echo lang('HelpFAQ_Cat_Presence_401_text');?>
|
||||
<?= lang('HelpFAQ_Cat_Presence_401_text');?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h4><?php echo lang('Navigation_Network');?></h4>
|
||||
<h4>
|
||||
<i class="fa fa-network-wired"></i><?= lang('Navigation_Network');?></h4>
|
||||
<div class="panel-group" id="accordion_net">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#accordion_net" href="#collapse600">
|
||||
<?php echo lang('HelpFAQ_Cat_Network_600_head');?></a>
|
||||
<?= lang('HelpFAQ_Cat_Network_600_head');?></a>
|
||||
</h4>
|
||||
</div>
|
||||
<div id="collapse600" class="panel-collapse collapse" style="font-size: 16px;">
|
||||
<div class="panel-body">
|
||||
<?php echo lang('HelpFAQ_Cat_Network_600_text');?>
|
||||
<?= lang('HelpFAQ_Cat_Network_600_text');?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</section>
|
||||
<br>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
|
||||
@@ -1,31 +1,43 @@
|
||||
<!-- Pi.Alert CSS -->
|
||||
<link rel="stylesheet" href="css/pialert.css">
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
require 'php/templates/language/lang.php';
|
||||
require dirname(__FILE__).'/php/server/init.php';
|
||||
require 'php/templates/security.php';
|
||||
|
||||
|
||||
|
||||
if ($Pia_WebProtection != 'true')
|
||||
{
|
||||
header('Location: devices.php');
|
||||
$_SESSION["login"] = 1;
|
||||
exit;
|
||||
}
|
||||
{
|
||||
header('Location: devices.php');
|
||||
$_SESSION["login"] = 1;
|
||||
exit;
|
||||
}
|
||||
|
||||
// Logout
|
||||
if (isset ($_GET["action"]) && $_GET["action"] == 'logout')
|
||||
{
|
||||
setcookie("PiAlert_SaveLogin", '', time()+1); // reset cookie
|
||||
$_SESSION["login"] = 0;
|
||||
header('Location: index.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
// Password without Cookie check -> pass and set initial cookie
|
||||
if (isset ($_POST["loginpassword"]) && $Pia_Password == hash('sha256',$_POST["loginpassword"]))
|
||||
{
|
||||
header('Location: devices.php');
|
||||
$_SESSION["login"] = 1;
|
||||
if (isset($_POST['PWRemember'])) {setcookie("PiAlert_SaveLogin", hash('sha256',$_POST["loginpassword"]), time()+604800);}
|
||||
}
|
||||
{
|
||||
header('Location: devices.php');
|
||||
$_SESSION["login"] = 1;
|
||||
if (isset($_POST['PWRemember'])) {setcookie("PiAlert_SaveLogin", hash('sha256',$_POST["loginpassword"]), time()+604800);}
|
||||
}
|
||||
|
||||
// active Session or valid cookie (cookie not extends)
|
||||
if (( isset ($_SESSION["login"]) && ($_SESSION["login"] == 1)) || (isset ($_COOKIE["PiAlert_SaveLogin"]) && $Pia_Password == $_COOKIE["PiAlert_SaveLogin"]))
|
||||
{
|
||||
header('Location: devices.php');
|
||||
$_SESSION["login"] = 1;
|
||||
if (isset($_POST['PWRemember'])) {setcookie("PiAlert_SaveLogin", hash('sha256',$_POST["loginpassword"]), time()+604800);}
|
||||
}
|
||||
{
|
||||
header('Location: devices.php');
|
||||
$_SESSION["login"] = 1;
|
||||
if (isset($_POST['PWRemember'])) {setcookie("PiAlert_SaveLogin", hash('sha256',$_POST["loginpassword"]), time()+604800);}
|
||||
}
|
||||
|
||||
$login_headline = lang('Login_Toggle_Info_headline');
|
||||
$login_info = "";
|
||||
@@ -35,22 +47,22 @@ $login_icon = 'fa-info';
|
||||
|
||||
// no active session, cookie not checked
|
||||
if (isset ($_SESSION["login"]) == FALSE || $_SESSION["login"] != 1)
|
||||
{
|
||||
if ($Pia_Password == '8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92')
|
||||
{
|
||||
if ($Pia_Password == '8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92')
|
||||
{
|
||||
$login_info = lang('Login_Default_PWD');
|
||||
$login_mode = 'danger';
|
||||
$login_display_mode = 'display: block;';
|
||||
$login_headline = lang('Login_Toggle_Alert_headline');
|
||||
$login_icon = 'fa-ban';
|
||||
}
|
||||
else
|
||||
{
|
||||
$login_mode = 'info';
|
||||
$login_display_mode = 'display: none;';
|
||||
$login_headline = lang('Login_Toggle_Info_headline');
|
||||
$login_icon = 'fa-info';
|
||||
}
|
||||
$login_info = lang('Login_Default_PWD');
|
||||
$login_mode = 'danger';
|
||||
$login_display_mode = 'display: block;';
|
||||
$login_headline = lang('Login_Toggle_Alert_headline');
|
||||
$login_icon = 'fa-ban';
|
||||
}
|
||||
else
|
||||
{
|
||||
$login_mode = 'info';
|
||||
$login_display_mode = 'display: none;';
|
||||
$login_headline = lang('Login_Toggle_Info_headline');
|
||||
$login_icon = 'fa-info';
|
||||
}
|
||||
}
|
||||
|
||||
// ##################################################
|
||||
@@ -91,16 +103,16 @@ if ($ENABLED_DARKMODE === True) {
|
||||
<link rel="stylesheet" href="/front/css/offline-font.css">
|
||||
</head>
|
||||
<body class="hold-transition login-page">
|
||||
<div class="login-box">
|
||||
<div class="login-box login-custom">
|
||||
<div class="login-logo">
|
||||
<a href="/index2.php">Pi.<b>Alert</b></a>
|
||||
</div>
|
||||
<!-- /.login-logo -->
|
||||
<div class="login-box-body">
|
||||
<p class="login-box-msg"><?php echo lang('Login_Box');?></p>
|
||||
<p class="login-box-msg"><?= lang('Login_Box');?></p>
|
||||
<form action="index.php" method="post">
|
||||
<div class="form-group has-feedback">
|
||||
<input type="password" class="form-control" placeholder="<?php echo lang('Login_Psw-box');?>" name="loginpassword">
|
||||
<input type="password" class="form-control" placeholder="<?= lang('Login_Psw-box');?>" name="loginpassword">
|
||||
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
|
||||
</div>
|
||||
<div class="row">
|
||||
@@ -109,21 +121,21 @@ if ($ENABLED_DARKMODE === True) {
|
||||
<label>
|
||||
<input type="checkbox" name="PWRemember">
|
||||
<div style="margin-left: 10px; display: inline-block; vertical-align: top;">
|
||||
<?php echo lang('Login_Remember');?><br><span style="font-size: smaller"><?php echo lang('Login_Remember_small');?></span>
|
||||
<?= lang('Login_Remember');?><br><span style="font-size: smaller"><?= lang('Login_Remember_small');?></span>
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
<div class="col-xs-4" style="padding-top: 10px;">
|
||||
<button type="submit" class="btn btn-primary btn-block btn-flat"><?php echo lang('Login_Submit');?></button>
|
||||
<button type="submit" class="btn btn-primary btn-block btn-flat"><?= lang('Login_Submit');?></button>
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div style="padding-top: 10px;">
|
||||
<button class="btn btn-xs btn-primary btn-block btn-flat" onclick="Passwordhinfo()"><?php echo lang('Login_Toggle_Info');?></button>
|
||||
<button class="btn btn-xs btn-primary btn-block btn-flat" onclick="Passwordhinfo()"><?= lang('Login_Toggle_Info');?></button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -136,7 +148,7 @@ if ($ENABLED_DARKMODE === True) {
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true"><3E></button>
|
||||
<h4><i class="icon fa <?php echo $login_icon;?>"></i><?php echo $login_headline;?></h4>
|
||||
<p><?php echo $login_info;?></p>
|
||||
<p><?php echo lang('Login_Psw_run');?><br><span style="border: solid 1px yellow; padding: 2px;">./reset_password.sh <?php echo lang('Login_Psw_new');?></span><br><?php echo lang('Login_Psw_folder');?></p>
|
||||
<p><?= lang('Login_Psw_run');?><br><span style="border: solid 1px yellow; padding: 2px;"> /home/pi/pialert/back/pialert-cli set_password <?= lang('Login_Psw_new');?></span><br><?= lang('Login_Psw_folder');?></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -35,19 +35,26 @@ function handleVersion(){
|
||||
|
||||
function getVersion()
|
||||
{
|
||||
release_timestamp = getCookie("release_timestamp")
|
||||
release_timestamp = getCookie("release_timestamp")
|
||||
|
||||
release_timestampNum = Number(release_timestamp)
|
||||
|
||||
// logging
|
||||
console.log(`Latest release in cookie: ${new Date(release_timestampNum*1000)}`)
|
||||
|
||||
// no cached value available
|
||||
if(release_timestamp == "")
|
||||
{
|
||||
// get parameter value
|
||||
$.get('https://api.github.com/repos/jokob-sk/Pi.Alert/releases', function(data) {
|
||||
|
||||
var releases = data;
|
||||
$.get('https://api.github.com/repos/jokob-sk/Pi.Alert/releases').done(function(response) {
|
||||
// Handle successful response
|
||||
var releases = response;
|
||||
|
||||
console.log(response)
|
||||
|
||||
if(releases.length > 0)
|
||||
{
|
||||
release_datetime = releases[0].published_at;
|
||||
|
||||
release_datetime = releases[0].published_at; // get latest release
|
||||
release_timestamp = new Date(release_datetime).getTime() / 1000;
|
||||
|
||||
// cache value
|
||||
@@ -55,6 +62,11 @@ function handleVersion(){
|
||||
|
||||
handleVersion();
|
||||
}
|
||||
|
||||
}).fail(function(jqXHR, textStatus, errorThrown) {
|
||||
|
||||
$('.version').append(`<p>Github API: ${errorThrown} (${jqXHR.status}), ${jqXHR.responseJSON.message}</p>`)
|
||||
|
||||
});
|
||||
} else
|
||||
{
|
||||
|
||||
@@ -10,7 +10,10 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
var timerRefreshData = ''
|
||||
var modalCallbackFunction = '';
|
||||
var emptyArr = ['undefined', "", undefined, null];
|
||||
var emptyArr = ['undefined', "", undefined, null, 'null'];
|
||||
var UI_LANG = "English";
|
||||
var settingsJSON = {}
|
||||
|
||||
|
||||
// urlParams = new Proxy(new URLSearchParams(window.location.search), {
|
||||
// get: (searchParams, prop) => searchParams.get(prop.toString()),
|
||||
@@ -20,13 +23,13 @@ var emptyArr = ['undefined', "", undefined, null];
|
||||
// -----------------------------------------------------------------------------
|
||||
// Simple session cache withe expiration managed via cookies
|
||||
// -----------------------------------------------------------------------------
|
||||
function getCache(key)
|
||||
function getCache(key, noCookie = false)
|
||||
{
|
||||
// check cache
|
||||
if(sessionStorage.getItem(key))
|
||||
{
|
||||
// check if not expired
|
||||
if(getCookie(key + '_session_expiry') != "")
|
||||
if(noCookie || getCookie(key + '_session_expiry') != "")
|
||||
{
|
||||
return sessionStorage.getItem(key);
|
||||
}
|
||||
@@ -38,8 +41,13 @@ function getCache(key)
|
||||
// -----------------------------------------------------------------------------
|
||||
function setCache(key, data, expirationMinutes='')
|
||||
{
|
||||
sessionStorage.setItem(key, data);
|
||||
setCookie (key + '_session_expiry', 'OK', expirationMinutes='')
|
||||
sessionStorage.setItem(key, data);
|
||||
|
||||
// create cookie if expiration set to handle refresh of data
|
||||
if (expirationMinutes != '')
|
||||
{
|
||||
setCookie (key + '_session_expiry', 'OK', expirationMinutes='')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -96,6 +104,108 @@ function deleteAllCookies() {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Get settings from the .json file generated by the python backend
|
||||
// -----------------------------------------------------------------------------
|
||||
function cacheSettings()
|
||||
{
|
||||
|
||||
$.get('api/table_settings.json', function(res) {
|
||||
|
||||
settingsJSON = res;
|
||||
|
||||
data = settingsJSON["data"];
|
||||
|
||||
data.forEach((set) => {
|
||||
setCache(`pia_set_${set.Code_Name}`, set.Value)
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
function getSetting (key) {
|
||||
|
||||
result = getCache(`pia_set_${key}`, true);
|
||||
|
||||
if (result == "")
|
||||
{
|
||||
console.log(`Setting with key "${key}" not found`)
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Get language string
|
||||
// -----------------------------------------------------------------------------
|
||||
function cacheStrings()
|
||||
{
|
||||
|
||||
// handle core strings and translations
|
||||
var allLanguages = ["en_us","es_es","de_de"]; // needs to be same as in lang.php
|
||||
|
||||
allLanguages.forEach(function (language_code) {
|
||||
|
||||
$.get(`php/templates/language/${language_code}.json`, function(res) {
|
||||
|
||||
Object.entries(res).forEach(([language, translations]) => {
|
||||
|
||||
Object.entries(translations).forEach(([key, value]) => {
|
||||
// store as key - value pairs in session
|
||||
setCache(`pia_lang_${key}_${language}`, value)
|
||||
});
|
||||
});
|
||||
|
||||
})
|
||||
|
||||
});
|
||||
|
||||
// handle strings and translations from plugins
|
||||
$.get('api/table_plugins_language_strings.json', function(res) {
|
||||
|
||||
data = res["data"];
|
||||
|
||||
data.forEach((langString) => {
|
||||
setCache(`pia_lang_${langString.String_Key}_${langString.Language_Code}`, langString.String_Value)
|
||||
});
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
function getString (key) {
|
||||
|
||||
UI_LANG = getSetting("UI_LANG");
|
||||
|
||||
lang_code = 'en_us';
|
||||
|
||||
switch(UI_LANG)
|
||||
{
|
||||
case 'English':
|
||||
lang_code = 'en_us';
|
||||
break;
|
||||
case 'Spanish':
|
||||
lang_code = 'es_es';
|
||||
break;
|
||||
case 'German':
|
||||
lang_code = 'de_de';
|
||||
break;
|
||||
}
|
||||
result = getCache(`pia_lang_${key}_${lang_code}`, true);
|
||||
|
||||
|
||||
if(isEmpty(result))
|
||||
{
|
||||
console.log(`pia_lang_${key}_${lang_code}`)
|
||||
console.log(key)
|
||||
result = getCache(`pia_lang_${key}_en_us`, true);
|
||||
console.log(result)
|
||||
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Modal dialog handling
|
||||
// -----------------------------------------------------------------------------
|
||||
@@ -200,6 +310,13 @@ function showMessage (textMessage="") {
|
||||
// -----------------------------------------------------------------------------
|
||||
// General utilities
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
// check if JSON object
|
||||
function isJsonObject(value) {
|
||||
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
||||
}
|
||||
|
||||
|
||||
// remove unnecessary lines from the result
|
||||
function sanitize(data)
|
||||
{
|
||||
@@ -290,6 +407,18 @@ function settingsChanged()
|
||||
};
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
function getQueryString(key){
|
||||
params = new Proxy(new URLSearchParams(window.location.search), {
|
||||
get: (searchParams, prop) => searchParams.get(prop),
|
||||
});
|
||||
|
||||
tmp = params[key]
|
||||
|
||||
result = emptyArr.includes(tmp) ? "" : tmp;
|
||||
|
||||
return result
|
||||
}
|
||||
// -----------------------------------------------------------------------------
|
||||
function translateHTMLcodes (text) {
|
||||
if (text == null || emptyArr.includes(text)) {
|
||||
@@ -333,4 +462,87 @@ function openInNewTab (url) {
|
||||
}
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
function navigateToDeviceWithIp (ip) {
|
||||
|
||||
$.get('api/table_devices.json', function(res) {
|
||||
|
||||
devices = res["data"];
|
||||
|
||||
mac = ""
|
||||
|
||||
$.each(devices, function(index, obj) {
|
||||
|
||||
if(obj.dev_LastIP.trim() == ip.trim())
|
||||
{
|
||||
mac = obj.dev_MAC;
|
||||
|
||||
window.open(window.location.origin +'/deviceDetails.php?mac=' + mac , "_blank");
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
function getNameByMacAddress(macAddress) {
|
||||
return getDeviceDataByMacAddress(macAddress, "dev_Name")
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
//
|
||||
function getDeviceDataByMacAddress(macAddress, dbColumn) {
|
||||
|
||||
const sessionDataKey = 'devicesListAll_JSON';
|
||||
const sessionData = sessionStorage.getItem(sessionDataKey);
|
||||
|
||||
if (!sessionData) {
|
||||
console.log(`Session variable "${sessionDataKey}" not found.`);
|
||||
return "Unknown";
|
||||
}
|
||||
|
||||
const devices = JSON.parse(sessionData);
|
||||
|
||||
for (const device of devices) {
|
||||
if (device["dev_MAC"].toLowerCase() === macAddress.toLowerCase()) {
|
||||
|
||||
return device[dbColumn];
|
||||
}
|
||||
}
|
||||
|
||||
return "Unknown"; // Return a default value if MAC address is not found
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
function initDeviceListAll_JSON()
|
||||
{
|
||||
|
||||
$.get('api/table_devices.json', function(data) {
|
||||
|
||||
console.log(data)
|
||||
|
||||
devicesListAll_JSON = data["data"]
|
||||
|
||||
setCache('devicesListAll_JSON', JSON.stringify(devicesListAll_JSON))
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
var devicesListAll_JSON = []; // this will contain a list off all devices
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
function isEmpty(value)
|
||||
{
|
||||
return emptyArr.includes(value)
|
||||
}
|
||||
|
||||
// initialize
|
||||
cacheSettings()
|
||||
cacheStrings()
|
||||
initDeviceListAll_JSON()
|
||||
|
||||
|
||||
console.log("init pialert_common.js")
|
||||
|
||||
|
||||
|
||||
@@ -1,28 +1,15 @@
|
||||
<?php
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Pi.Alert
|
||||
// Open Source Network Guard / WIFI & LAN intrusion detector
|
||||
//
|
||||
// devices.php - Front module. Server side. Manage Devices
|
||||
//------------------------------------------------------------------------------
|
||||
// Puche 2021 pi.alert.application@gmail.com GNU GPLv3
|
||||
// jokob-sk 2022 jokob.sk@gmail.com GNU GPLv3
|
||||
// leiweibau 2022 https://github.com/leiweibau GNU GPLv3
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// Language selector config ----------------------------------------------------
|
||||
//
|
||||
// For security reasons, new language files must be entered into this array.
|
||||
// The files in the language directory are compared with this array and only
|
||||
// then accepted.
|
||||
//
|
||||
$pia_installed_langs = array('en_us',
|
||||
'de_de',
|
||||
'es_es');
|
||||
//
|
||||
// In addition to this, the language must also be added to the select tag in
|
||||
// line 235. Later, the whole thing may become dynamic.
|
||||
#---------------------------------------------------------------------------------#
|
||||
# Pi.Alert #
|
||||
# Open Source Network Guard / WIFI & LAN intrusion detector #
|
||||
# #
|
||||
# maintenance.php - Front module. Server side. Maintenance #
|
||||
#---------------------------------------------------------------------------------#
|
||||
# Puche 2021 pi.alert.application@gmail.com GNU GPLv3 #
|
||||
# jokob-sk 2022 jokob.sk@gmail.com GNU GPLv3 #
|
||||
# leiweibau 2022 https://github.com/leiweibau GNU GPLv3 #
|
||||
# cvc90 2023 https://github.com/cvc90 GNU GPLv3 #
|
||||
#---------------------------------------------------------------------------------#
|
||||
|
||||
// Skin selector config ----------------------------------------------------
|
||||
//
|
||||
@@ -57,7 +44,8 @@ $pia_installed_skins = array('skin-black-light',
|
||||
<section class="content-header">
|
||||
<?php require 'php/templates/notification.php'; ?>
|
||||
<h1 id="pageTitle">
|
||||
<?php echo lang('Maintenance_Title');?>
|
||||
<i class="fa fa-wrench"></i>
|
||||
<?= lang('Maintenance_Title');?>
|
||||
</h1>
|
||||
</section>
|
||||
|
||||
@@ -131,6 +119,30 @@ if (isset($_POST['submit']) && submit && isset($_POST['skinselector_set'])) {
|
||||
}
|
||||
}
|
||||
}
|
||||
// Table sizes -----------------------------------------------------------------
|
||||
|
||||
$tableSizesHTML = "";
|
||||
|
||||
// Open a connection to the SQLite database
|
||||
$db = new SQLite3($pia_db);
|
||||
|
||||
// Retrieve the table names from sqlite_master
|
||||
$query = "SELECT name FROM sqlite_master WHERE type='table'";
|
||||
$result = $db->query($query);
|
||||
|
||||
// Iterate over the tables and get the row counts
|
||||
while ($row = $result->fetchArray(SQLITE3_ASSOC)) {
|
||||
$tableName = $row['name'];
|
||||
$query = "SELECT COUNT(*) FROM $tableName";
|
||||
$countResult = $db->querySingle($query);
|
||||
$tableSizesHTML = $tableSizesHTML . "$tableName (<b>$countResult</b>), ";
|
||||
}
|
||||
|
||||
// Close the database connection
|
||||
$db->close();
|
||||
|
||||
|
||||
|
||||
|
||||
// Language selector -----------------------------------------------------------------
|
||||
|
||||
@@ -140,36 +152,54 @@ if (isset($_POST['submit']) && submit && isset($_POST['skinselector_set'])) {
|
||||
<div class="col-md-12">
|
||||
<div class="box" id="Maintain-Status">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Status</h3>
|
||||
<h3 class="box-title">
|
||||
<i class="fa fa-display"></i></i>
|
||||
<?= lang('Maintenance_Status');?>
|
||||
</h3>
|
||||
</div>
|
||||
<div class="box-body" style="padding-bottom: 5px;">
|
||||
<div class="db_info_table">
|
||||
<div class="db_info_table_row">
|
||||
<div class="db_info_table_cell" style="min-width: 140px"><?php echo lang('Maintenance_version');?></div>
|
||||
<div class="db_info_table_row">
|
||||
<div class="db_info_table_cell" style="min-width: 140px"><?= lang('Maintenance_version');?>
|
||||
<a href="https://github.com/jokob-sk/Pi.Alert/blob/main/docs/VERSIONS.md" target="_blank"> <span><i class="fa fa-circle-question"></i></a><span>
|
||||
|
||||
</div>
|
||||
<div class="db_info_table_cell">
|
||||
<div class="version" id="version" data-build-time="<?php echo file_get_contents( "buildtimestamp.txt");?>"><?php echo '<span id="new-version-text" class="myhidden">' .lang('Maintenance_new_version').'</span>'.'<span id="current-version-text" class="myhidden">' .lang('Maintenance_current_version').'</span>';?></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="db_info_table_row">
|
||||
<div class="db_info_table_cell" style="min-width: 140px"><?php echo lang('Maintenance_database_path');?></div>
|
||||
<div class="db_info_table_cell" style="min-width: 140px"><?= lang('Maintenance_built_on');?></div>
|
||||
<div class="db_info_table_cell">
|
||||
<?php echo date("Y-m-d", ((int)file_get_contents( "buildtimestamp.txt")));?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="db_info_table_row">
|
||||
<div class="db_info_table_cell" style="min-width: 140px"><?= lang('Maintenance_database_path');?></div>
|
||||
<div class="db_info_table_cell">
|
||||
<?php echo $pia_db;?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="db_info_table_row">
|
||||
<div class="db_info_table_cell"><?php echo lang('Maintenance_database_size');?></div>
|
||||
<div class="db_info_table_cell"><?= lang('Maintenance_database_size');?></div>
|
||||
<div class="db_info_table_cell">
|
||||
<?php echo $pia_db_size;?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="db_info_table_row">
|
||||
<div class="db_info_table_cell"><?php echo lang('Maintenance_database_lastmod');?></div>
|
||||
<div class="db_info_table_cell"><?= lang('Maintenance_database_rows');?></div>
|
||||
<div class="db_info_table_cell">
|
||||
<?php echo $tableSizesHTML;?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="db_info_table_row">
|
||||
<div class="db_info_table_cell"><?= lang('Maintenance_database_lastmod');?></div>
|
||||
<div class="db_info_table_cell">
|
||||
<?php echo $pia_db_mod;?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="db_info_table_row">
|
||||
<div class="db_info_table_cell"><?php echo lang('Maintenance_database_backup');?></div>
|
||||
<div class="db_info_table_cell"><?= lang('Maintenance_database_backup');?></div>
|
||||
<div class="db_info_table_cell">
|
||||
<?php echo $Pia_Archive_count.' '.lang('Maintenance_database_backup_found').' / '.lang('Maintenance_database_backup_total').': '.$Pia_Archive_diskusage;?>
|
||||
</div>
|
||||
@@ -183,45 +213,40 @@ if (isset($_POST['submit']) && submit && isset($_POST['skinselector_set'])) {
|
||||
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active">
|
||||
<a id="tab_Settings_id" href="#tab_Settings" data-toggle="tab"><?php echo lang('Maintenance_Tools_Tab_UISettings');?></a>
|
||||
<li class="active">
|
||||
<a id="tab_Settings_id" href="#tab_Settings" data-toggle="tab">
|
||||
<i class="fa fa-cogs"></i>
|
||||
<?= lang('Maintenance_Tools_Tab_UISettings');?>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a id="tab_DBTools_id" href="#tab_DBTools" data-toggle="tab"><?php echo lang('Maintenance_Tools_Tab_Tools');?></a>
|
||||
<a id="tab_DBTools_id" href="#tab_DBTools" data-toggle="tab">
|
||||
<i class="fa fa-toolbox"></i>
|
||||
<?= lang('Maintenance_Tools_Tab_Tools');?>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a id="tab_BackupRestore_id" href="#tab_BackupRestore" data-toggle="tab"><?php echo lang('Maintenance_Tools_Tab_BackupRestore');?></a>
|
||||
<a id="tab_BackupRestore_id" href="#tab_BackupRestore" data-toggle="tab">
|
||||
<i class="fa fa-file-shield"></i>
|
||||
<?= lang('Maintenance_Tools_Tab_BackupRestore');?>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a id="tab_Logging_id" href="#tab_Logging" data-toggle="tab"><?php echo lang('Maintenance_Tools_Tab_Logging');?></a>
|
||||
<a id="tab_Logging_id" href="#tab_Logging" data-toggle="tab">
|
||||
<i class="fa fa-triangle-exclamation"></i>
|
||||
<?= lang('Maintenance_Tools_Tab_Logging');?>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="tab_Settings">
|
||||
<div class="db_info_table">
|
||||
<div class="db_info_table_row">
|
||||
<div class="db_tools_table_cell_a" style="text-align:center;">
|
||||
<form method="post" action="maintenance.php">
|
||||
<div style="display: inline-block;">
|
||||
<select name="langselector" id="langselector" class="form-control bg-green" style="width:160px; margin-bottom:5px;">
|
||||
<option value=""><?php echo lang('Maintenance_lang_selector_empty');?></option>
|
||||
<option value="en_us"><?php echo lang('Maintenance_lang_en_us');?></option>
|
||||
<option value="de_de"><?php echo lang('Maintenance_lang_de_de');?></option>
|
||||
<option value="es_es"><?php echo lang('Maintenance_lang_es_es');?></option>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="db_info_table_cell" style="padding: 10px; height:40px; text-align:left; vertical-align: middle;">
|
||||
<?php echo lang('Maintenance_lang_selector_text');?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="db_info_table_row">
|
||||
<div class="db_tools_table_cell_a" style="text-align: center;">
|
||||
<form method="post" action="maintenance.php">
|
||||
<div style="display: inline-block; text-align: center;">
|
||||
<select name="skinselector" class="form-control bg-green" style="width:160px; margin-bottom:5px;">
|
||||
<option value=""><?php echo lang('Maintenance_themeselector_empty');?></option>
|
||||
<option value=""><?= lang('Maintenance_themeselector_empty');?></option>
|
||||
<option value="skin-black-light">black light</option>
|
||||
<option value="skin-black">black</option>
|
||||
<option value="skin-blue-light">blue light</option>
|
||||
@@ -235,49 +260,53 @@ if (isset($_POST['submit']) && submit && isset($_POST['skinselector_set'])) {
|
||||
<option value="skin-yellow-light">yellow light</option>
|
||||
<option value="skin-yellow">yellow</option>
|
||||
</select></div>
|
||||
<div style="display: block;"><input type="submit" name="skinselector_set" value="<?php echo lang('Maintenance_themeselector_apply');?>" class="btn bg-green" style="width:160px;">
|
||||
<div style="display: block;"><input type="submit" name="skinselector_set" value="<?= lang('Maintenance_themeselector_apply');?>" class="btn bg-green" style="width:160px;">
|
||||
<?php // echo $pia_skin_test; ?>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="db_info_table_cell" style="padding: 10px; height:40px; text-align:left; vertical-align: middle;">
|
||||
<?php echo lang('Maintenance_themeselector_text'); ?>
|
||||
<?= lang('Maintenance_themeselector_text'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="db_info_table_row">
|
||||
<div class="db_tools_table_cell_a">
|
||||
<button type="button" class="btn bg-green dbtools-button" id="btnToggleDarkmode" onclick="askToggleDarkmode()"><?php echo lang('Maintenance_Tool_darkmode');?></button>
|
||||
<button type="button" class="btn bg-green dbtools-button" id="btnToggleDarkmode" onclick="askToggleDarkmode()"><?= lang('Maintenance_Tool_darkmode');?></button>
|
||||
</div>
|
||||
<div class="db_tools_table_cell_b"><?php echo lang('Maintenance_Tool_darkmode_text');?></div>
|
||||
<div class="db_tools_table_cell_b"><?= lang('Maintenance_Tool_darkmode_text');?></div>
|
||||
</div>
|
||||
<div class="db_info_table_row">
|
||||
<div class="db_tools_table_cell_a">
|
||||
<div class="form-group" >
|
||||
<div class="input-group" >
|
||||
<select id="columnsSelect" class="form-control select2 select2-hidden-accessible" multiple="" style="width: 100%;" tabindex="-1" aria-hidden="true">
|
||||
<option value="0"><?php echo lang('Device_TableHead_Name');?></option>
|
||||
<option value="1"><?php echo lang('Device_TableHead_Owner');?></option>
|
||||
<option value="2"><?php echo lang('Device_TableHead_Type');?></option>
|
||||
<option value="3"><?php echo lang('Device_TableHead_Icon');?></option>
|
||||
<option value="4"><?php echo lang('Device_TableHead_Favorite');?></option>
|
||||
<option value="5"><?php echo lang('Device_TableHead_Group');?></option>
|
||||
<option value="6"><?php echo lang('Device_TableHead_FirstSession');?></option>
|
||||
<option value="7"><?php echo lang('Device_TableHead_LastSession');?></option>
|
||||
<option value="8"><?php echo lang('Device_TableHead_LastIP');?></option>
|
||||
<option value="9"><?php echo lang('Device_TableHead_MAC');?></option>
|
||||
<option value="10"><?php echo lang('Device_TableHead_Status');?></option>
|
||||
<option value="11"><?php echo lang('Device_TableHead_MAC_full');?></option>
|
||||
<option value="12"><?php echo lang('Device_TableHead_LastIPOrder');?></option>
|
||||
<option value="13"><?php echo lang('Device_TableHead_Rowid');?></option>
|
||||
<option value="14"><?php echo lang('Device_TableHead_Parent_MAC');?></option>
|
||||
<option value="0"><?= lang('Device_TableHead_Name');?></option>
|
||||
<option value="1"><?= lang('Device_TableHead_Owner');?></option>
|
||||
<option value="2"><?= lang('Device_TableHead_Type');?></option>
|
||||
<option value="3"><?= lang('Device_TableHead_Icon');?></option>
|
||||
<option value="4"><?= lang('Device_TableHead_Favorite');?></option>
|
||||
<option value="5"><?= lang('Device_TableHead_Group');?></option>
|
||||
<option value="6"><?= lang('Device_TableHead_FirstSession');?></option>
|
||||
<option value="7"><?= lang('Device_TableHead_LastSession');?></option>
|
||||
<option value="8"><?= lang('Device_TableHead_LastIP');?></option>
|
||||
<option value="9"><?= lang('Device_TableHead_MAC');?></option>
|
||||
<option value="10"><?= lang('Device_TableHead_Status');?></option>
|
||||
<option value="11"><?= lang('Device_TableHead_MAC_full');?></option>
|
||||
<option value="12"><?= lang('Device_TableHead_LastIPOrder');?></option>
|
||||
<option value="13"><?= lang('Device_TableHead_Rowid');?></option>
|
||||
<option value="14"><?= lang('Device_TableHead_Parent_MAC');?></option>
|
||||
<option value="15"><?= lang('Device_TableHead_Connected_Devices');?></option>
|
||||
<option value="16"><?= lang('Device_TableHead_Location');?></option>
|
||||
<option value="17"><?= lang('Device_TableHead_Vendor');?></option>
|
||||
<option value="18"><?= lang('Device_TableHead_Port');?></option>
|
||||
</select>
|
||||
<span class="input-group-addon"><i title="<?php echo lang('DevDetail_GoToNetworkNode');?>" class="fa fa-save pointer" onclick="saveSelectedColumns();"></i></span>
|
||||
<span class="input-group-addon"><i title="<?= lang('Gen_Save');?>" class="fa fa-save pointer" onclick="saveSelectedColumns();"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="db_tools_table_cell_b"><?php echo lang('Maintenance_Tool_displayed_columns_text');?></div>
|
||||
<div class="db_tools_table_cell_b"><?= lang('Maintenance_Tool_displayed_columns_text');?></div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -287,39 +316,39 @@ if (isset($_POST['submit']) && submit && isset($_POST['skinselector_set'])) {
|
||||
<div class="db_info_table">
|
||||
<div class="db_info_table_row">
|
||||
<div class="db_tools_table_cell_a" style="">
|
||||
<button type="button" class="btn btn-default pa-btn pa-btn-delete bg-red dbtools-button" id="btnDeleteMAC" onclick="askDeleteDevicesWithEmptyMACs()"><?php echo lang('Maintenance_Tool_del_empty_macs');?></button>
|
||||
<button type="button" class="btn btn-default pa-btn pa-btn-delete bg-red dbtools-button" id="btnDeleteMAC" onclick="askDeleteDevicesWithEmptyMACs()"><?= lang('Maintenance_Tool_del_empty_macs');?></button>
|
||||
</div>
|
||||
<div class="db_tools_table_cell_b"><?php echo lang('Maintenance_Tool_del_empty_macs_text');?></div>
|
||||
<div class="db_tools_table_cell_b"><?= lang('Maintenance_Tool_del_empty_macs_text');?></div>
|
||||
</div>
|
||||
<div class="db_info_table_row">
|
||||
<div class="db_tools_table_cell_a" style="">
|
||||
<button type="button" class="btn btn-default pa-btn pa-btn-delete bg-red dbtools-button" id="btnDeleteMAC" onclick="askDeleteAllDevices()"><?php echo lang('Maintenance_Tool_del_alldev');?></button>
|
||||
<button type="button" class="btn btn-default pa-btn pa-btn-delete bg-red dbtools-button" id="btnDeleteMAC" onclick="askDeleteAllDevices()"><?= lang('Maintenance_Tool_del_alldev');?></button>
|
||||
</div>
|
||||
<div class="db_tools_table_cell_b"><?php echo lang('Maintenance_Tool_del_alldev_text');?></div>
|
||||
<div class="db_tools_table_cell_b"><?= lang('Maintenance_Tool_del_alldev_text');?></div>
|
||||
</div>
|
||||
<div class="db_info_table_row">
|
||||
<div class="db_tools_table_cell_a" style="">
|
||||
<button type="button" class="btn btn-default pa-btn pa-btn-delete bg-red dbtools-button" id="btnDeleteUnknown" onclick="askDeleteUnknown()"><?php echo lang('Maintenance_Tool_del_unknowndev');?></button>
|
||||
<button type="button" class="btn btn-default pa-btn pa-btn-delete bg-red dbtools-button" id="btnDeleteUnknown" onclick="askDeleteUnknown()"><?= lang('Maintenance_Tool_del_unknowndev');?></button>
|
||||
</div>
|
||||
<div class="db_tools_table_cell_b"><?php echo lang('Maintenance_Tool_del_unknowndev_text');?></div>
|
||||
<div class="db_tools_table_cell_b"><?= lang('Maintenance_Tool_del_unknowndev_text');?></div>
|
||||
</div>
|
||||
<div class="db_info_table_row">
|
||||
<div class="db_tools_table_cell_a" style="">
|
||||
<button type="button" class="btn btn-default pa-btn pa-btn-delete bg-red dbtools-button" id="btnDeleteEvents" onclick="askDeleteEvents()"><?php echo lang('Maintenance_Tool_del_allevents');?></button>
|
||||
<button type="button" class="btn btn-default pa-btn pa-btn-delete bg-red dbtools-button" id="btnDeleteEvents" onclick="askDeleteEvents()"><?= lang('Maintenance_Tool_del_allevents');?></button>
|
||||
</div>
|
||||
<div class="db_tools_table_cell_b"><?php echo lang('Maintenance_Tool_del_allevents_text');?></div>
|
||||
<div class="db_tools_table_cell_b"><?= lang('Maintenance_Tool_del_allevents_text');?></div>
|
||||
</div>
|
||||
<div class="db_info_table_row">
|
||||
<div class="db_tools_table_cell_a" style="">
|
||||
<button type="button" class="btn btn-default pa-btn pa-btn-delete bg-red dbtools-button" id="btnDeleteEvents30" onclick="askDeleteEvents30()"><?php echo lang('Maintenance_Tool_del_allevents30');?></button>
|
||||
<button type="button" class="btn btn-default pa-btn pa-btn-delete bg-red dbtools-button" id="btnDeleteEvents30" onclick="askDeleteEvents30()"><?= lang('Maintenance_Tool_del_allevents30');?></button>
|
||||
</div>
|
||||
<div class="db_tools_table_cell_b"><?php echo lang('Maintenance_Tool_del_allevents30_text');?></div>
|
||||
<div class="db_tools_table_cell_b"><?= lang('Maintenance_Tool_del_allevents30_text');?></div>
|
||||
</div>
|
||||
<div class="db_info_table_row">
|
||||
<div class="db_tools_table_cell_a" style="">
|
||||
<button type="button" class="btn btn-default pa-btn pa-btn-delete bg-red dbtools-button" id="btnDeleteActHistory" onclick="askDeleteActHistory()"><?php echo lang('Maintenance_Tool_del_ActHistory');?></button>
|
||||
<button type="button" class="btn btn-default pa-btn pa-btn-delete bg-red dbtools-button" id="btnDeleteActHistory" onclick="askDeleteActHistory()"><?= lang('Maintenance_Tool_del_ActHistory');?></button>
|
||||
</div>
|
||||
<div class="db_tools_table_cell_b"><?php echo lang('Maintenance_Tool_del_ActHistory_text');?></div>
|
||||
<div class="db_tools_table_cell_b"><?= lang('Maintenance_Tool_del_ActHistory_text');?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -327,33 +356,33 @@ if (isset($_POST['submit']) && submit && isset($_POST['skinselector_set'])) {
|
||||
<div class="db_info_table">
|
||||
<div class="db_info_table_row">
|
||||
<div class="db_tools_table_cell_a" style="">
|
||||
<button type="button" class="btn btn-default pa-btn pa-btn-delete bg-red dbtools-button" id="btnPiaBackupDBtoArchive" onclick="askPiaBackupDBtoArchive()"><?php echo lang('Maintenance_Tool_backup');?></button>
|
||||
<button type="button" class="btn btn-default pa-btn pa-btn-delete bg-red dbtools-button" id="btnPiaBackupDBtoArchive" onclick="askPiaBackupDBtoArchive()"><?= lang('Maintenance_Tool_backup');?></button>
|
||||
</div>
|
||||
<div class="db_tools_table_cell_b"><?php echo lang('Maintenance_Tool_backup_text');?></div>
|
||||
<div class="db_tools_table_cell_b"><?= lang('Maintenance_Tool_backup_text');?></div>
|
||||
</div>
|
||||
<div class="db_info_table_row">
|
||||
<div class="db_tools_table_cell_a" style="">
|
||||
<button type="button" class="btn btn-default pa-btn pa-btn-delete bg-red dbtools-button" id="btnPiaRestoreDBfromArchive" onclick="askPiaRestoreDBfromArchive()"><?php echo lang('Maintenance_Tool_restore');?><br><?php echo $latestbackup_date;?></button>
|
||||
<button type="button" class="btn btn-default pa-btn pa-btn-delete bg-red dbtools-button" id="btnPiaRestoreDBfromArchive" onclick="askPiaRestoreDBfromArchive()"><?= lang('Maintenance_Tool_restore');?><br><?php echo $latestbackup_date;?></button>
|
||||
</div>
|
||||
<div class="db_tools_table_cell_b"><?php echo lang('Maintenance_Tool_restore_text');?></div>
|
||||
<div class="db_tools_table_cell_b"><?= lang('Maintenance_Tool_restore_text');?></div>
|
||||
</div>
|
||||
<div class="db_info_table_row">
|
||||
<div class="db_tools_table_cell_a" style="">
|
||||
<button type="button" class="btn btn-default pa-btn pa-btn-delete bg-red dbtools-button" id="btnPiaPurgeDBBackups" onclick="askPiaPurgeDBBackups()"><?php echo lang('Maintenance_Tool_purgebackup');?></button>
|
||||
<button type="button" class="btn btn-default pa-btn pa-btn-delete bg-red dbtools-button" id="btnPiaPurgeDBBackups" onclick="askPiaPurgeDBBackups()"><?= lang('Maintenance_Tool_purgebackup');?></button>
|
||||
</div>
|
||||
<div class="db_tools_table_cell_b"><?php echo lang('Maintenance_Tool_purgebackup_text');?></div>
|
||||
<div class="db_tools_table_cell_b"><?= lang('Maintenance_Tool_purgebackup_text');?></div>
|
||||
</div>
|
||||
<div class="db_info_table_row">
|
||||
<div class="db_tools_table_cell_a" style="">
|
||||
<button type="button" class="btn btn-default pa-btn bg-green dbtools-button" id="btnExportCSV" onclick="askExportCSV()"><?php echo lang('Maintenance_Tool_ExportCSV');?></button>
|
||||
<button type="button" class="btn btn-default pa-btn bg-green dbtools-button" id="btnExportCSV" onclick="askExportCSV()"><?= lang('Maintenance_Tool_ExportCSV');?></button>
|
||||
</div>
|
||||
<div class="db_tools_table_cell_b"><?php echo lang('Maintenance_Tool_ExportCSV_text');?></div>
|
||||
<div class="db_tools_table_cell_b"><?= lang('Maintenance_Tool_ExportCSV_text');?></div>
|
||||
</div>
|
||||
<div class="db_info_table_row">
|
||||
<div class="db_tools_table_cell_a" style="">
|
||||
<button type="button" class="btn btn-default pa-btn pa-btn-delete bg-red dbtools-button" id="btnImportCSV" onclick="askImportCSV()"><?php echo lang('Maintenance_Tool_ImportCSV');?></button>
|
||||
<button type="button" class="btn btn-default pa-btn pa-btn-delete bg-red dbtools-button" id="btnImportCSV" onclick="askImportCSV()"><?= lang('Maintenance_Tool_ImportCSV');?></button>
|
||||
</div>
|
||||
<div class="db_tools_table_cell_b"><?php echo lang('Maintenance_Tool_ImportCSV_text');?></div>
|
||||
<div class="db_tools_table_cell_b"><?= lang('Maintenance_Tool_ImportCSV_text');?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -362,7 +391,17 @@ if (isset($_POST['submit']) && submit && isset($_POST['skinselector_set'])) {
|
||||
<div class="db_info_table">
|
||||
<div class="log-area">
|
||||
<div class="row logs-row">
|
||||
<textarea id="pialert_log" class="logs" cols="70" rows="10" wrap='off' readonly ><?php echo file_get_contents( "./log/pialert.log" ); ?>
|
||||
<textarea id="pialert_log" class="logs" cols="70" rows="10" wrap='off' readonly >
|
||||
<?php
|
||||
if(filesize("./log/pialert.log") > 2000000)
|
||||
{
|
||||
echo file_get_contents( "./log/pialert.log", false, null, -2000000);
|
||||
}
|
||||
else{
|
||||
echo file_get_contents( "./log/pialert.log" );
|
||||
}
|
||||
|
||||
?>
|
||||
</textarea>
|
||||
</div>
|
||||
<div class="row logs-row" >
|
||||
@@ -371,7 +410,7 @@ if (isset($_POST['submit']) && submit && isset($_POST['skinselector_set'])) {
|
||||
<span class="span-padding"><a href="./log/pialert.log" target="_blank"><i class="fa fa-download"></i> </a></span>
|
||||
</div></div>
|
||||
<div class="log-purge">
|
||||
<button class="btn btn-primary" onclick="logManage('pialert.log','cleanLog')"><?php echo lang('Gen_Purge');?></button>
|
||||
<button class="btn btn-primary" onclick="logManage('pialert.log','cleanLog')"><?= lang('Gen_Purge');?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -387,29 +426,28 @@ if (isset($_POST['submit']) && submit && isset($_POST['skinselector_set'])) {
|
||||
<span class="span-padding"><a href="./log/pialert_front.log"><i class="fa fa-download"></i> </a></span>
|
||||
</div></div>
|
||||
<div class="log-purge">
|
||||
<button class="btn btn-primary" onclick="logManage('pialert_front.log','cleanLog')"><?php echo lang('Gen_Purge');?></button>
|
||||
<button class="btn btn-primary" onclick="logManage('pialert_front.log','cleanLog')"><?= lang('Gen_Purge');?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="log-area">
|
||||
|
||||
<div class="row logs-row">
|
||||
<textarea id="pialert_pholus_log" class="logs" cols="70" rows="10" wrap='off' readonly><?php echo file_get_contents( "./log/pialert_pholus.log" ); ?>
|
||||
</textarea>
|
||||
</div>
|
||||
<div class="row logs-row" >
|
||||
<div>
|
||||
<div class="log-file">pialert_pholus.log<div class="logs-size"><?php echo number_format((filesize("./log/pialert_pholus.log") / 1000000),2,",",".") . ' MB';?>
|
||||
<span class="span-padding"><a href="./log/pialert_pholus.log"><i class="fa fa-download"></i> </a></span>
|
||||
</div></div>
|
||||
<div class="log-purge">
|
||||
<button class="btn btn-primary" onclick="logManage('pialert_pholus.log','cleanLog')"><?php echo lang('Gen_Purge');?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row logs-row">
|
||||
<textarea id="pialert_php_log" class="logs" cols="70" rows="10" wrap='off' readonly><?php echo file_get_contents( "./log/pialert.php_errors.log" ); ?>
|
||||
</textarea>
|
||||
</div>
|
||||
<div class="row logs-row" >
|
||||
<div>
|
||||
<div class="log-file">pialert.php_errors.log<div class="logs-size"><?php echo number_format((filesize("./log/pialert.php_errors.log") / 1000000),2,",",".") . ' MB';?>
|
||||
<span class="span-padding"><a href="./log/pialert.php_errors.log"><i class="fa fa-download"></i> </a></span>
|
||||
</div></div>
|
||||
<div class="log-purge">
|
||||
<button class="btn btn-primary" onclick="logManage('pialert.php_errors.log','cleanLog')"><?= lang('Gen_Purge');?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="log-area">
|
||||
|
||||
<div class="row logs-row">
|
||||
@@ -422,7 +460,7 @@ if (isset($_POST['submit']) && submit && isset($_POST['skinselector_set'])) {
|
||||
<span class="span-padding"><a href="./log/pialert_pholus_lastrun.log"><i class="fa fa-download"></i> </a></span>
|
||||
</div></div>
|
||||
<div class="log-purge">
|
||||
<button class="btn btn-primary" onclick="logManage('pialert_pholus_lastrun.log','cleanLog')"><?php echo lang('Gen_Purge');?></button>
|
||||
<button class="btn btn-primary" onclick="logManage('pialert_pholus_lastrun.log','cleanLog')"><?= lang('Gen_Purge');?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -440,7 +478,7 @@ if (isset($_POST['submit']) && submit && isset($_POST['skinselector_set'])) {
|
||||
<span class="span-padding"><a href="./log/IP_changes.log"><i class="fa fa-download"></i> </a></span>
|
||||
</div></div>
|
||||
<div class="log-purge">
|
||||
<button class="btn btn-primary" onclick="logManage('IP_changes.log','cleanLog')"><?php echo lang('Gen_Purge');?></button>
|
||||
<button class="btn btn-primary" onclick="logManage('IP_changes.log','cleanLog')"><?= lang('Gen_Purge');?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -457,7 +495,7 @@ if (isset($_POST['submit']) && submit && isset($_POST['skinselector_set'])) {
|
||||
<span class="span-padding"><a href="./log/stdout.log"><i class="fa fa-download"></i> </a></span>
|
||||
</div></div>
|
||||
<div class="log-purge">
|
||||
<button class="btn btn-primary" onclick="logManage('stdout.log','cleanLog')"><?php echo lang('Gen_Purge');?></button>
|
||||
<button class="btn btn-primary" onclick="logManage('stdout.log','cleanLog')"><?= lang('Gen_Purge');?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -474,7 +512,7 @@ if (isset($_POST['submit']) && submit && isset($_POST['skinselector_set'])) {
|
||||
<span class="span-padding"><a href="./log/stderr.log"><i class="fa fa-download"></i> </a></span>
|
||||
</div></div>
|
||||
<div class="log-purge">
|
||||
<button class="btn btn-primary" onclick="logManage('stderr.log','cleanLog')"><?php echo lang('Gen_Purge');?></button>
|
||||
<button class="btn btn-primary" onclick="logManage('stderr.log','cleanLog')"><?= lang('Gen_Purge');?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -525,7 +563,7 @@ initializeTabs();
|
||||
// delete devices with emty macs
|
||||
function askDeleteDevicesWithEmptyMACs () {
|
||||
// Ask
|
||||
showModalWarning('<?php echo lang('Maintenance_Tool_del_empty_macs_noti');?>', '<?php echo lang('Maintenance_Tool_del_empty_macs_noti_text');?>',
|
||||
showModalWarning('<?= lang('Maintenance_Tool_del_empty_macs_noti');?>', '<?= lang('Maintenance_Tool_del_empty_macs_noti_text');?>',
|
||||
'Cancel', 'Delete', 'deleteDevicesWithEmptyMACs');
|
||||
}
|
||||
function deleteDevicesWithEmptyMACs()
|
||||
@@ -539,8 +577,8 @@ function deleteDevicesWithEmptyMACs()
|
||||
// delete all devices
|
||||
function askDeleteAllDevices () {
|
||||
// Ask
|
||||
showModalWarning('<?php echo lang('Maintenance_Tool_del_alldev_noti');?>', '<?php echo lang('Maintenance_Tool_del_alldev_noti_text');?>',
|
||||
'<?php echo lang('Gen_Cancel');?>', '<?php echo lang('Gen_Delete');?>', 'deleteAllDevices');
|
||||
showModalWarning('<?= lang('Maintenance_Tool_del_alldev_noti');?>', '<?= lang('Maintenance_Tool_del_alldev_noti_text');?>',
|
||||
'<?= lang('Gen_Cancel');?>', '<?= lang('Gen_Delete');?>', 'deleteAllDevices');
|
||||
}
|
||||
function deleteAllDevices()
|
||||
{
|
||||
@@ -553,8 +591,8 @@ function deleteAllDevices()
|
||||
// delete all (unknown) devices
|
||||
function askDeleteUnknown () {
|
||||
// Ask
|
||||
showModalWarning('<?php echo lang('Maintenance_Tool_del_unknowndev_noti');?>', '<?php echo lang('Maintenance_Tool_del_unknowndev_noti_text');?>',
|
||||
'<?php echo lang('Gen_Cancel');?>', '<?php echo lang('Gen_Delete');?>', 'deleteUnknownDevices');
|
||||
showModalWarning('<?= lang('Maintenance_Tool_del_unknowndev_noti');?>', '<?= lang('Maintenance_Tool_del_unknowndev_noti_text');?>',
|
||||
'<?= lang('Gen_Cancel');?>', '<?= lang('Gen_Delete');?>', 'deleteUnknownDevices');
|
||||
}
|
||||
function deleteUnknownDevices()
|
||||
{
|
||||
@@ -567,8 +605,8 @@ function deleteUnknownDevices()
|
||||
// delete all Events
|
||||
function askDeleteEvents () {
|
||||
// Ask
|
||||
showModalWarning('<?php echo lang('Maintenance_Tool_del_allevents_noti');?>', '<?php echo lang('Maintenance_Tool_del_allevents_noti_text');?>',
|
||||
'<?php echo lang('Gen_Cancel');?>', '<?php echo lang('Gen_Delete');?>', 'deleteEvents');
|
||||
showModalWarning('<?= lang('Maintenance_Tool_del_allevents_noti');?>', '<?= lang('Maintenance_Tool_del_allevents_noti_text');?>',
|
||||
'<?= lang('Gen_Cancel');?>', '<?= lang('Gen_Delete');?>', 'deleteEvents');
|
||||
}
|
||||
function deleteEvents()
|
||||
{
|
||||
@@ -581,8 +619,8 @@ function deleteEvents()
|
||||
// delete all Events older than 30 days
|
||||
function askDeleteEvents30 () {
|
||||
// Ask
|
||||
showModalWarning('<?php echo lang('Maintenance_Tool_del_allevents30_noti');?>', '<?php echo lang('Maintenance_Tool_del_allevents30_noti_text');?>',
|
||||
'<?php echo lang('Gen_Cancel');?>', '<?php echo lang('Gen_Delete');?>', 'deleteEvents30');
|
||||
showModalWarning('<?= lang('Maintenance_Tool_del_allevents30_noti');?>', '<?= lang('Maintenance_Tool_del_allevents30_noti_text');?>',
|
||||
'<?= lang('Gen_Cancel');?>', '<?= lang('Gen_Delete');?>', 'deleteEvents30');
|
||||
}
|
||||
function deleteEvents30()
|
||||
{
|
||||
@@ -595,8 +633,8 @@ function deleteEvents30()
|
||||
// delete History
|
||||
function askDeleteActHistory () {
|
||||
// Ask
|
||||
showModalWarning('<?php echo lang('Maintenance_Tool_del_ActHistory_noti');?>', '<?php echo lang('Maintenance_Tool_del_ActHistory_noti_text');?>',
|
||||
'<?php echo lang('Gen_Cancel');?>', '<?php echo lang('Gen_Delete');?>', 'deleteActHistory');
|
||||
showModalWarning('<?= lang('Maintenance_Tool_del_ActHistory_noti');?>', '<?= lang('Maintenance_Tool_del_ActHistory_noti_text');?>',
|
||||
'<?= lang('Gen_Cancel');?>', '<?= lang('Gen_Delete');?>', 'deleteActHistory');
|
||||
}
|
||||
function deleteActHistory()
|
||||
{
|
||||
@@ -609,8 +647,8 @@ function deleteActHistory()
|
||||
// Backup DB to Archive
|
||||
function askPiaBackupDBtoArchive () {
|
||||
// Ask
|
||||
showModalWarning('<?php echo lang('Maintenance_Tool_backup_noti');?>', '<?php echo lang('Maintenance_Tool_backup_noti_text');?>',
|
||||
'<?php echo lang('Gen_Cancel');?>', '<?php echo lang('Gen_Backup');?>', 'PiaBackupDBtoArchive');
|
||||
showModalWarning('<?= lang('Maintenance_Tool_backup_noti');?>', '<?= lang('Maintenance_Tool_backup_noti_text');?>',
|
||||
'<?= lang('Gen_Cancel');?>', '<?= lang('Gen_Backup');?>', 'PiaBackupDBtoArchive');
|
||||
}
|
||||
function PiaBackupDBtoArchive()
|
||||
{
|
||||
@@ -623,8 +661,8 @@ function PiaBackupDBtoArchive()
|
||||
// Restore DB from Archive
|
||||
function askPiaRestoreDBfromArchive () {
|
||||
// Ask
|
||||
showModalWarning('<?php echo lang('Maintenance_Tool_restore_noti');?>', '<?php echo lang('Maintenance_Tool_restore_noti_text');?>',
|
||||
'<?php echo lang('Gen_Cancel');?>', '<?php echo lang('Gen_Restore');?>', 'PiaRestoreDBfromArchive');
|
||||
showModalWarning('<?= lang('Maintenance_Tool_restore_noti');?>', '<?= lang('Maintenance_Tool_restore_noti_text');?>',
|
||||
'<?= lang('Gen_Cancel');?>', '<?= lang('Gen_Restore');?>', 'PiaRestoreDBfromArchive');
|
||||
}
|
||||
function PiaRestoreDBfromArchive()
|
||||
{
|
||||
@@ -637,8 +675,8 @@ function PiaRestoreDBfromArchive()
|
||||
// Purge Backups
|
||||
function askPiaPurgeDBBackups() {
|
||||
// Ask
|
||||
showModalWarning('<?php echo lang('Maintenance_Tool_purgebackup_noti');?>', '<?php echo lang('Maintenance_Tool_purgebackup_noti_text');?>',
|
||||
'<?php echo lang('Gen_Cancel');?>', '<?php echo lang('Gen_Purge');?>', 'PiaPurgeDBBackups');
|
||||
showModalWarning('<?= lang('Maintenance_Tool_purgebackup_noti');?>', '<?= lang('Maintenance_Tool_purgebackup_noti_text');?>',
|
||||
'<?= lang('Gen_Cancel');?>', '<?= lang('Gen_Purge');?>', 'PiaPurgeDBBackups');
|
||||
}
|
||||
function PiaPurgeDBBackups()
|
||||
{
|
||||
@@ -651,25 +689,25 @@ function PiaPurgeDBBackups()
|
||||
// Export CSV
|
||||
function askExportCSV() {
|
||||
// Ask
|
||||
showModalWarning('<?php echo lang('Maintenance_Tool_ExportCSV_noti');?>', '<?php echo lang('Maintenance_Tool_ExportCSV_noti_text');?>',
|
||||
'<?php echo lang('Gen_Cancel');?>', '<?php echo lang('Gen_Okay');?>', 'ExportCSV');
|
||||
showModalWarning('<?= lang('Maintenance_Tool_ExportCSV_noti');?>', '<?= lang('Maintenance_Tool_ExportCSV_noti_text');?>',
|
||||
'<?= lang('Gen_Cancel');?>', '<?= lang('Gen_Okay');?>', 'ExportCSV');
|
||||
}
|
||||
function ExportCSV()
|
||||
{
|
||||
// Execute
|
||||
openInNewTab(window.location.origin + "/php/server/devices.php?action=ExportCSV")
|
||||
openInNewTab("php/server/devices.php?action=ExportCSV")
|
||||
}
|
||||
|
||||
// Import CSV
|
||||
function askImportCSV() {
|
||||
// Ask
|
||||
showModalWarning('<?php echo lang('Maintenance_Tool_ImportCSV_noti');?>', '<?php echo lang('Maintenance_Tool_ImportCSV_noti_text');?>',
|
||||
'<?php echo lang('Gen_Cancel');?>', '<?php echo lang('Gen_Okay');?>', 'ImportCSV');
|
||||
showModalWarning('<?= lang('Maintenance_Tool_ImportCSV_noti');?>', '<?= lang('Maintenance_Tool_ImportCSV_noti_text');?>',
|
||||
'<?= lang('Gen_Cancel');?>', '<?= lang('Gen_Okay');?>', 'ImportCSV');
|
||||
}
|
||||
function ImportCSV()
|
||||
{
|
||||
// Execute
|
||||
$.get('/php/server/devices.php?action=ImportCSV', function(msg) {
|
||||
$.get('php/server/devices.php?action=ImportCSV', function(msg) {
|
||||
showMessage (msg);
|
||||
});
|
||||
}
|
||||
@@ -679,8 +717,8 @@ function ImportCSV()
|
||||
// Switch Darkmode
|
||||
function askToggleDarkmode() {
|
||||
// Ask
|
||||
showModalWarning('<?php echo lang('Maintenance_Tool_darkmode_noti');?>', '<?php echo lang('Maintenance_Tool_darkmode_noti_text');?>',
|
||||
'<?php echo lang('Gen_Cancel');?>', '<?php echo lang('Gen_Switch');?>', 'ToggleDarkmode');
|
||||
showModalWarning('<?= lang('Maintenance_Tool_darkmode_noti');?>', '<?= lang('Maintenance_Tool_darkmode_noti_text');?>',
|
||||
'<?= lang('Gen_Cancel');?>', '<?= lang('Gen_Switch');?>', 'ToggleDarkmode');
|
||||
}
|
||||
|
||||
// --------------------------------------------------------
|
||||
@@ -724,8 +762,8 @@ function logManage(callback) {
|
||||
targetLogFile = arguments[0]; // target
|
||||
logFileAction = arguments[1]; // action
|
||||
// Ask
|
||||
showModalWarning('<?php echo lang('Gen_Purge');?>' + ' ' + arguments[1], '<?php echo lang('Gen_AreYouSure');?>',
|
||||
'<?php echo lang('Gen_Cancel');?>', '<?php echo lang('Gen_Okay');?>', "performLogManage");
|
||||
showModalWarning('<?= lang('Gen_Purge');?>' + ' ' + arguments[1], '<?= lang('Gen_AreYouSure');?>',
|
||||
'<?= lang('Gen_Cancel');?>', '<?= lang('Gen_Okay');?>', "performLogManage");
|
||||
}
|
||||
|
||||
// --------------------------------------------------------
|
||||
@@ -747,12 +785,16 @@ function performLogManage() {
|
||||
// --------------------------------------------------------
|
||||
function scrollDown()
|
||||
{
|
||||
var areaIDs = ['pialert_log', 'pialert_front_log', 'IP_changes_log', 'stdout_log', 'stderr_log', 'pialert_pholus_log', 'pialert_pholus_lastrun_log'];
|
||||
var areaIDs = ['pialert_log', 'pialert_front_log', 'IP_changes_log', 'stdout_log', 'stderr_log', 'pialert_pholus_log', 'pialert_pholus_lastrun_log', 'pialert_php_log'];
|
||||
|
||||
for (let i = 0; i < areaIDs.length; i++) {
|
||||
|
||||
var tempArea = $('#' + areaIDs[i]);
|
||||
$(tempArea[0]).scrollTop(tempArea[0].scrollHeight);
|
||||
|
||||
if (tempArea.length > 0)
|
||||
{
|
||||
$(tempArea[0]).scrollTop(tempArea[0].scrollHeight);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -760,15 +802,16 @@ function scrollDown()
|
||||
// --------------------------------------------------------
|
||||
// Manage displayed columns
|
||||
// --------------------------------------------------------
|
||||
colDefaultOrder = ['0','1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17'];
|
||||
colDefaultOrderTxt = '[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]';
|
||||
|
||||
|
||||
function saveSelectedColumns () {
|
||||
$.get('php/server/parameters.php?action=set&expireMinutes=525600&value=['+ $('#columnsSelect').val().toString() +']¶meter=Front_Devices_Columns_Visible', function(data) {
|
||||
// save full order of all columns to simplify mapping later on
|
||||
|
||||
colDisplayed = $('#columnsSelect').val();
|
||||
|
||||
colDefaultOrder = ['0','1','2','3','4','5','6','7','8','9','10','12','13','14'];
|
||||
|
||||
|
||||
colNewOrder = colDisplayed;
|
||||
|
||||
// append the remaining columns in the previous order
|
||||
@@ -791,7 +834,7 @@ function saveSelectedColumns () {
|
||||
|
||||
// --------------------------------------------------------
|
||||
function initializeSelectedColumns () {
|
||||
$.get('php/server/parameters.php?action=get&expireMinutes=525600&defaultValue=[0,1,2,3,4,5,6,7,8,9,10,12,13,14]¶meter=Front_Devices_Columns_Visible', function(data) {
|
||||
$.get('php/server/parameters.php?action=get&expireMinutes=525600&defaultValue='+colDefaultOrderTxt+'¶meter=Front_Devices_Columns_Visible', function(data) {
|
||||
|
||||
tableColumnShow = numberArrayFromString(data);
|
||||
|
||||
@@ -909,4 +952,4 @@ window.onload = function asyncFooter()
|
||||
|
||||
|
||||
<!-- ----------------------------------------------------------------------- -->
|
||||
<script src="js/pialert_common.js"></script>
|
||||
<script src="js/pialert_common.js"></script>
|
||||
|
||||