Compare commits

...

327 Commits

Author SHA1 Message Date
Jokob @NetAlertX
cb63dd1765 Merge pull request #1167 from ingoratsdorf/db-work
Some checks failed
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled
Code checks / check-url-paths (push) Has been cancelled
DB result iteration fix on empty result
2025-09-10 12:15:33 +10:00
Ingo Ratsdorf
ccec89f419 Final fix 2025-09-10 12:38:33 +12:00
Ingo Ratsdorf
7f7b0a328f Another fix to get_table_json
IIteration error is not a SQL error, so gotta catch generic errors, too
2025-09-10 12:32:23 +12:00
Ingo Ratsdorf
24eaf1e143 fixed get_table_json
This would throw a subsequent error
['[Database] - get_table_as_json ERROR:', TypeError("'NoneType' object is not iterable")]
2025-09-10 12:25:30 +12:00
Ingo Ratsdorf
2836996a21 Update server/db/db_helper.py
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-09-10 10:21:32 +12:00
Ingo Ratsdorf
a94c6a291e DB result iteration fix on empty result
get_table_json would throw exceptions when trying to iterate over a NONE result, ie SQL query returned empty result.
2025-09-10 09:28:45 +12:00
jokob-sk
2b2ae516da weblate
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
2025-09-09 07:47:11 +10:00
jokob-sk
2df7d143d3 Merge branch 'main' of https://github.com/jokob-sk/NetAlertX 2025-09-09 07:46:50 +10:00
jokob-sk
1688d029b9 docs
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
2025-09-09 07:38:15 +10:00
anton garcias
6d8f451be1 Translated using Weblate (Catalan)
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled
Currently translated at 100.0% (761 of 761 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/ca/
2025-09-08 19:01:55 +02:00
jokob-sk
840e1e50a9 docs
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
2025-09-08 21:17:55 +10:00
jokob-sk
164fe504a4 weblate
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
2025-09-08 21:17:45 +10:00
jokob-sk
9040e49e16 sync plugin
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
2025-09-08 08:14:42 +10:00
jokob-sk
629736ad39 Merge branch 'main' of https://github.com/jokob-sk/NetAlertX 2025-09-08 08:12:04 +10:00
jokob-sk
ebc41ada45 logger
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
2025-09-08 08:11:33 +10:00
jokob-sk
4fea786e16 sync plugin
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
2025-09-08 08:11:23 +10:00
Jokob @NetAlertX
0edd20c82c Merge pull request #1155 from FlyingToto/main
adding example 5 of docker compose (3rd try!)
2025-09-08 07:05:10 +10:00
Jokob @NetAlertX
296dd0d0df Merge pull request #1165 from adamoutler/patch-1
Enhance in-app tooltips for clarity
2025-09-08 07:04:33 +10:00
Adam Outler
f2151cd9e8 Enhance in-app tooltips for clarity 2025-09-07 14:47:04 -04:00
Hosted Weblate
60876b14ce Merge branch 'origin/main' into Weblate.
Some checks failed
Deploy MkDocs / deploy (push) Has been cancelled
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
2025-09-04 23:58:20 +02:00
ssantos
9231ba742c Translated using Weblate (Portuguese (Portugal))
Currently translated at 54.5% (415 of 761 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/pt_PT/
2025-09-04 23:58:18 +02:00
jokob-sk
8a538102da weblate
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
2025-09-05 07:57:57 +10:00
jokob-sk
31f901da35 Merge branch 'main' of https://github.com/jokob-sk/NetAlertX 2025-09-05 07:57:25 +10:00
jokob-sk
c5b731fcb2 weblate
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
2025-09-05 07:56:57 +10:00
jokob-sk
b2c7945513 docs
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
2025-09-05 07:56:42 +10:00
suibian
6bf5c1f535 Translated using Weblate (Chinese (Simplified Han script))
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled
Currently translated at 100.0% (761 of 761 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/zh_Hans/
2025-09-03 12:38:56 +02:00
martinkuck
3da50fe83d Translated using Weblate (German)
Currently translated at 81.2% (618 of 761 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/de/
2025-09-03 12:38:56 +02:00
Jokob @NetAlertX
b46bdb9b60 Merge pull request #1156 from ingoratsdorf/contrib
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled
Adding secondary cache to settings
2025-09-03 07:02:11 +10:00
Ingo Ratsdorf
00c7bb65e1 Update server/helper.py
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-09-03 07:10:26 +12:00
Ingo Ratsdorf
9946f9affd Merge branch 'jokob-sk:main' into contrib 2025-09-02 20:43:25 +12:00
anton garcias
46a11b1cca Translated using Weblate (Catalan)
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled
Currently translated at 93.0% (708 of 761 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/ca/
2025-09-02 10:42:15 +02:00
Ingo Ratsdorf
8a003ad805 Merge branch 'jokob-sk:main' into contrib 2025-09-02 20:41:59 +12:00
Jokob @NetAlertX
7dd860b2ab Merge branch 'main' into main 2025-09-02 15:22:04 +10:00
Jokob @NetAlertX
a9d7ca8809 Merge pull request #1154 from FlyingToto/patch-2
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled
added a variant of example 2 as 5...
2025-09-02 15:16:02 +10:00
Ingo Ratsdorf
5695f4f3e7 Adding secondary cache to settings
Caching get_setting_value independent from what backend is used.
2025-09-02 14:48:12 +12:00
FlyingToto
1d74398337 adding address and uid/gid
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-09-01 22:13:02 -04:00
FlyingToto
e8f17346ff 3rd attempt to add example 5 of docker compose! 2025-09-01 22:02:25 -04:00
FlyingToto
bb1e00301c fixing typo
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-09-01 18:29:39 -04:00
FlyingToto
883786ec91 added a variant of example 2 as 5... 2025-09-01 17:39:58 -04:00
jokob-sk
3a023a675f CPU optimization work 5 #1144
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
2025-09-01 09:13:13 +10:00
jokob-sk
8c895864da CPU optimizartion work 4 #1144
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
2025-09-01 08:45:41 +10:00
jokob-sk
90474a6b92 Merge branch 'main' of https://github.com/jokob-sk/NetAlertX 2025-09-01 08:33:38 +10:00
Jokob @NetAlertX
f7cf8a0b1d Merge pull request #1151 from ingoratsdorf/contrib
Added cache to get_settings
2025-09-01 08:33:29 +10:00
jokob-sk
98fdccb58f CPU optimizartion work 2 #1144
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
2025-09-01 08:33:14 +10:00
jokob-sk
6f606f34d1 docs
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
2025-08-31 10:23:31 +10:00
jokob-sk
fd3f1fc929 api layer v0.3.2 - /settings
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
2025-08-31 09:54:56 +10:00
Ingo Ratsdorf
36ea3e62fd Added cache to get_settings
The settings file  is read about 30 times per second and parsed from json. Cache function added for now.
2025-08-30 21:35:15 +12:00
jokob-sk
7c9b37d827 lang
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
2025-08-30 08:23:35 +10:00
jokob-sk
3fc0787b84 docs
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
2025-08-30 08:23:25 +10:00
jokob-sk
5ba50f6d80 Merge branch 'main' of https://github.com/jokob-sk/NetAlertX
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled
2025-08-29 08:09:39 +10:00
jokob-sk
c0c685c561 FE code disclaimers
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
2025-08-29 08:09:29 +10:00
Artyom Rybakov
64a0fd0446 Translated using Weblate (Russian)
Currently translated at 100.0% (761 of 761 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/ru/
2025-08-28 08:03:31 +02:00
jokob-sk
b1b67c268f api layer v0.3.1 - /dbquery
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled
Signed-off-by: jokob-sk <jokob-sk@gmail.com>
2025-08-28 08:12:23 +10:00
jokob-sk
ae12195439 localizeTimestamp 2 #1147
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled
Signed-off-by: jokob-sk <jokob-sk@gmail.com>
2025-08-27 07:34:43 +10:00
jokob-sk
3106b39566 CPU optimizartion work 2 #1144
Some checks failed
Deploy MkDocs / deploy (push) Has been cancelled
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
2025-08-26 08:26:55 +10:00
jokob-sk
d88aa9d6eb FE more defensive localizeTimestamp #1147 2025-08-26 07:33:11 +10:00
jokob-sk
9f9f2ff58c docs 2025-08-25 18:24:28 +10:00
jokob-sk
ce887968b7 docs 2025-08-25 18:19:02 +10:00
jokob-sk
40e9fbdb3f docs
Some checks failed
Deploy MkDocs / deploy (push) Has been cancelled
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
2025-08-24 13:12:33 +10:00
jokob-sk
3227cbbfa4 docs 2025-08-24 12:59:58 +10:00
jokob-sk
df9a17ed85 docs
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled
2025-08-24 12:57:36 +10:00
jokob-sk
3ad7b59c84 docs 2025-08-24 10:05:41 +10:00
jokob-sk
b94da568a9 CPU optimizartion work #1144 2025-08-24 09:35:25 +10:00
jokob-sk
0146ae7c30 FE 2025-08-24 09:21:13 +10:00
jokob-sk
afbcf5985f SMTP_SUBJECT #1146 2025-08-24 08:45:32 +10:00
jokob-sk
af879ec84d graphql fix 2025-08-23 08:25:09 +10:00
jokob-sk
f78c84d9a8 api layer v0.3 - /events /sessions work
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled
2025-08-21 22:36:22 +10:00
jokob-sk
2d11d3dd3e api layer v0.2.6 - /events work 2025-08-21 21:16:34 +10:00
jokob-sk
39c556576c FE - graphql response wrap into data 2025-08-21 15:51:58 +10:00
jokob-sk
73fd094cfc api layer v0.2.5 - graphql standardization 2025-08-21 15:33:32 +10:00
jokob-sk
cbf2cd0ee8 FE 2025-08-21 15:15:45 +10:00
jokob-sk
915bb523d6 api layer v0.2.5 - /sessions + graphql tests 2025-08-21 15:10:47 +10:00
jokob-sk
3dc87d2adb FE 2025-08-20 08:59:42 +10:00
jokob-sk
9155303674 api layer v0.2.4 - /nettools/speedtest endpoint 2025-08-20 08:58:34 +10:00
jokob-sk
0777824d96 FE 2025-08-20 08:50:35 +10:00
jokob-sk
b170ca3e18 api layer v0.2.4 - /nettools/traceroute endpoint 2025-08-20 08:49:34 +10:00
jokob-sk
5fd30fe3c8 FE
Some checks failed
Deploy MkDocs / deploy (push) Has been cancelled
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
2025-08-20 08:41:38 +10:00
jokob-sk
2fa181ffbc api layer v0.2.4 - /nettools endpoint 2025-08-20 08:40:14 +10:00
jokob-sk
a2bccdfb8e FE 2025-08-20 08:11:56 +10:00
jokob-sk
f3b159116f Merge branch 'main' of https://github.com/jokob-sk/NetAlertX 2025-08-20 08:11:05 +10:00
jokob-sk
03b9a9cf0d api layer v0.2.3 - /device(s) endpoints work 2025-08-20 08:10:55 +10:00
Jokob @NetAlertX
bf2fae6e1a Merge pull request #1140 from cvc90/Fix-Relative-URL-in-report.php
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled
Changing absolute path URL to relative path URL in report.php
2025-08-19 22:19:53 +10:00
Carlos V.
086fa54035 Update report.php
Change static route to relative route in URL for proper proxy operation
2025-08-19 13:07:58 +02:00
jokob-sk
962bbaa5a1 api layer v0.2.2 - CSV import/export, refactor
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled
2025-08-19 07:56:54 +10:00
jokob-sk
9c71a8ecab api layer v0.2.1 - /events /history 2025-08-16 17:19:14 +10:00
jokob-sk
deff5a4ed0 api layer v0.2 - /devices
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled
2025-08-16 16:43:15 +10:00
jokob-sk
e10c1c9c8d Added pt_pt language file
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled
2025-08-16 08:18:23 +10:00
jokob-sk
b155fe2b06 api layer v0.1
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled
2025-08-15 08:04:02 +10:00
jokob-sk
840bfe32d2 sync plugin endpoint refactor 2025-08-14 14:28:10 +10:00
jokob-sk
f33ef9861b css fixes, CurrentScan removed mac uniqueness check
Some checks failed
Deploy MkDocs / deploy (push) Has been cancelled
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
2025-08-13 08:22:30 +10:00
jokob-sk
cbe71cc203 UNIFIAPI v0.5, css fixes
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled
2025-08-13 06:48:36 +10:00
jokob-sk
beaf8131ae UNIFIAPI v0.4
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled
2025-08-11 21:39:51 +10:00
jokob-sk
99bfbb56de better check for available device #1132 2025-08-11 19:58:24 +10:00
jokob-sk
e73c8e830a better check for available device #1132 2025-08-11 19:52:16 +10:00
jokob-sk
1c4e6c7e38 UNIFIAPI v0.3 FE setings done 2025-08-11 15:00:22 +10:00
jokob-sk
1319c3380d UNIFIAPI v0.3
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled
2025-08-10 21:24:17 +10:00
jokob-sk
dce8c34064 docs, rewrite docker image 2025-08-10 20:22:43 +10:00
jokob-sk
9502ee0cd0 UNIFIAPI v0.2, not ofund mac handling #1132 2025-08-10 20:08:09 +10:00
jokob-sk
8eb4ffe3ed logging
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled
2025-08-08 07:34:23 +10:00
jokob-sk
4be59807e5 docs, UNIFIAPI v0.1 2025-08-07 16:41:40 +10:00
jokob-sk
4712a2ff29 css fixes, nav menu update, searchable devParentNodeMac
Some checks failed
Deploy MkDocs / deploy (push) Has been cancelled
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
2025-08-06 09:15:45 +10:00
jokob-sk
f9179a1e89 safe device name if number #1131 2025-08-06 07:20:04 +10:00
jokob-sk
a6df204721 github timeout #1124, css fixes, change button on LOADED_PLUGINS
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled
2025-08-05 21:32:35 +10:00
jokob-sk
101189ae7c devParentNodeMac chips in devices list 2025-08-05 20:54:28 +10:00
jokob-sk
f25c012fbe external ip rework #1124
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled
2025-08-05 14:42:00 +10:00
jokob-sk
868a85d84c Merge branch 'main' of https://github.com/jokob-sk/NetAlertX 2025-08-05 14:03:18 +10:00
jokob-sk
771dd4b176 docs 2025-08-05 14:02:48 +10:00
Hosted Weblate
ed4d3bf17c Merge branch 'origin/main' into Weblate. 2025-08-05 03:27:56 +00:00
Massimo Pissarello
7c728fbe36 Translated using Weblate (Italian)
Currently translated at 100.0% (761 of 761 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/it/
2025-08-05 03:27:56 +00:00
jokob-sk
4ff9d01ef5 heuristics docs 2025-08-05 13:27:30 +10:00
jokob-sk
1bce2e80e8 replace external IP check AJAX #1124
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled
2025-08-05 08:15:49 +10:00
jokob-sk
1556d74406 Merge branch 'main' of https://github.com/jokob-sk/NetAlertX 2025-08-05 08:06:48 +10:00
jokob-sk
9b3947cc90 device tools init loading #1130 2025-08-05 08:06:42 +10:00
Sylvain Pichon
18b0309ac4 Translated using Weblate (French)
Currently translated at 100.0% (761 of 761 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/fr/
2025-08-04 19:02:09 +00:00
jokob-sk
0afd4ae115 prometheus metrics docs
Some checks failed
docker / docker_dev (push) Has been cancelled
Code checks / check-url-paths (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled
2025-08-04 18:13:35 +10:00
jokob-sk
09e360c746 prometheus metrics endpoint 2025-08-04 15:12:51 +10:00
jokob-sk
5dbe79ba2f Merge branch 'main' of https://github.com/jokob-sk/NetAlertX 2025-08-04 13:25:23 +10:00
jokob-sk
779707761f heuristics refactor #1129 2025-08-04 13:25:17 +10:00
Hosted Weblate
16992bb2bd Merge branch 'origin/main' into Weblate.
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled
2025-08-03 15:08:18 +02:00
Максим Горпиніч
3374f83255 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (761 of 761 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/uk/
2025-08-03 15:08:17 +02:00
jokob-sk
8f420a14cd fix 2025-08-03 23:06:43 +10:00
jokob-sk
57024c0cb1 Merge branch 'main' of https://github.com/jokob-sk/NetAlertX
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled
2025-08-03 09:37:36 +10:00
jokob-sk
db7fb825fe Copy to clipboard IP 2025-08-03 09:37:18 +10:00
Hosted Weblate
49e8c6a4f2 Merge branch 'origin/main' into Weblate. 2025-08-02 22:40:40 +00:00
Максим Горпиніч
66bf4241b2 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (760 of 760 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/uk/
2025-08-02 22:40:39 +00:00
Massimo Pissarello
76a5dda553 Translated using Weblate (Italian)
Currently translated at 100.0% (760 of 760 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/it/
2025-08-02 22:40:38 +00:00
Sylvain Pichon
6393aa7f2c Translated using Weblate (French)
Currently translated at 100.0% (760 of 760 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/fr/
2025-08-02 22:40:37 +00:00
Ettore Atalan
c5f938113f Translated using Weblate (German)
Currently translated at 81.3% (618 of 760 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/de/
2025-08-02 22:40:35 +00:00
jokob-sk
dac7eaba6d localized spinner support 2025-08-03 08:40:09 +10:00
jokob-sk
35e6059068 Merge branch 'main' of https://github.com/jokob-sk/NetAlertX 2025-08-03 07:44:17 +10:00
jokob-sk
afebc8dc39 systeminfo refactor #1124 2025-08-03 07:44:11 +10:00
Hosted Weblate
34151a86b1 Merge branch 'origin/main' into Weblate.
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled
2025-08-01 21:57:38 +00:00
Massimo Pissarello
72d6934345 Translated using Weblate (Italian)
Currently translated at 100.0% (759 of 759 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/it/
2025-08-01 21:57:37 +00:00
jokob-sk
f5f7031030 copy icon issue #1128 2025-08-02 07:56:57 +10:00
jokob-sk
ffccca9424 Merge branch 'main' of https://github.com/jokob-sk/NetAlertX
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled
2025-08-01 08:15:38 +10:00
jokob-sk
3f5ae334a2 new device button #1126 2025-08-01 08:15:32 +10:00
Максим Горпиніч
bb45c4d345 Translated using Weblate (Ukrainian)
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled
Currently translated at 100.0% (759 of 759 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/uk/
2025-07-31 16:02:16 +02:00
Sylvain Pichon
bad3c76de9 Translated using Weblate (French)
Currently translated at 100.0% (759 of 759 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/fr/
2025-07-31 16:02:14 +02:00
jokob-sk
4ee652cfda Merge branch 'main' of https://github.com/jokob-sk/NetAlertX
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled
2025-07-30 22:31:55 +10:00
jokob-sk
abaffa4042 better Apprise settings description 2025-07-30 22:31:38 +10:00
Hosted Weblate
ad4b5d7c64 Merge branch 'origin/main' into Weblate. 2025-07-30 13:59:20 +02:00
Максим Горпиніч
3b38476c5a Translated using Weblate (Ukrainian)
Currently translated at 100.0% (758 of 758 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/uk/
2025-07-30 13:59:17 +02:00
jokob-sk
a42f6a20e4 Merge branch 'main' of https://github.com/jokob-sk/NetAlertX 2025-07-30 21:58:37 +10:00
jokob-sk
da2afb2fb7 code refactor 2025-07-30 21:58:31 +10:00
Hosted Weblate
dda0d6a898 Merge branch 'origin/main' into Weblate.
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled
2025-07-29 23:45:45 +00:00
jokob-sk
36068aaf77 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.8% (755 of 756 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/zh_Hans/
2025-07-29 23:45:43 +00:00
Safeguard
3cb65fa4ec Translated using Weblate (Russian)
Currently translated at 91.9% (695 of 756 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/ru/
2025-07-29 23:45:42 +00:00
jokob-sk
26cc757f75 Merge branch 'main' of https://github.com/jokob-sk/NetAlertX 2025-07-30 09:31:39 +10:00
jokob-sk
2337f96685 Available Ips in System Info #1127 2025-07-30 09:31:34 +10:00
Hosted Weblate
82ec3b239e Merge branch 'origin/main' into Weblate.
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled
2025-07-29 12:09:14 +02:00
jokob-sk
aa72b0216d Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 92.0% (696 of 756 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/zh_Hans/
2025-07-29 12:09:13 +02:00
jokob-sk
b002bc34ac Merge branch 'main' of https://github.com/jokob-sk/NetAlertX 2025-07-29 20:01:58 +10:00
jokob-sk
a84f0d4faf cache fix on details page, small css fixes 2025-07-29 20:01:50 +10:00
Hosted Weblate
a9715cb087 Merge branch 'origin/main' into Weblate.
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled
2025-07-28 23:27:47 +02:00
Marco Rios
827b0d15d1 Translated using Weblate (Spanish)
Currently translated at 100.0% (756 of 756 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/es/
2025-07-28 23:27:46 +02:00
jokob-sk
4b4b2f914f Merge branch 'main' of https://github.com/jokob-sk/NetAlertX 2025-07-29 07:25:26 +10:00
jokob-sk
bf679cdc5d strings cleanup, small fixes 2025-07-29 07:25:22 +10:00
Jokob @NetAlertX
4c430c6d5d Merge pull request #1123 from dougmaitelli/feat/apprise-tag
Add support for Apprise Tags
2025-07-29 07:22:24 +10:00
Максим Горпиніч
905279aabe Translated using Weblate (Ukrainian)
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled
Currently translated at 100.0% (756 of 756 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/uk/
2025-07-28 08:02:18 +02:00
Massimo Pissarello
d92a5da029 Translated using Weblate (Italian)
Currently translated at 100.0% (756 of 756 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/it/
2025-07-28 08:02:16 +02:00
Sylvain Pichon
a3a27fc27a Translated using Weblate (French)
Currently translated at 100.0% (756 of 756 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/fr/
2025-07-28 08:02:14 +02:00
Douglas Maitelli
0d6bc71d2b Review comments 2025-07-28 00:29:14 +00:00
Douglas Maitelli
41397be1bd Review comments 2025-07-27 23:09:48 +00:00
Douglas Maitelli
8fbcb07267 Review comments 2025-07-27 23:09:20 +00:00
Douglas Maitelli
3c18540c8c Add support for Apprise Tags 2025-07-27 22:35:04 +00:00
Douglas Maitelli
ab9c940d01 Add support for Apprise Tags 2025-07-27 22:29:19 +00:00
Hosted Weblate
7e573282d0 Merge branch 'origin/main' into Weblate.
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled
2025-07-27 01:42:30 +00:00
jokob-sk
d08368e4f5 net devices fix 2025-07-27 11:26:12 +10:00
Hosted Weblate
2c1718bb0e Merge branch 'origin/main' into Weblate. 2025-07-27 01:22:48 +00:00
Deleted User
5a0bf03b81 Translated using Weblate (Ukrainian)
Currently translated at 92.7% (701 of 756 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/uk/
2025-07-27 01:22:46 +00:00
anton garcias
6978c9446c Translated using Weblate (Catalan)
Currently translated at 90.0% (681 of 756 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/ca/
2025-07-27 01:22:45 +00:00
HAMAD ABDULLA
d3fd160cf3 Translated using Weblate (Arabic)
Currently translated at 89.9% (680 of 756 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/ar/
2025-07-27 01:22:44 +00:00
Ondřej Karaffa
c3421c8699 Translated using Weblate (Czech)
Currently translated at 7.1% (54 of 756 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/cs/
2025-07-27 01:22:43 +00:00
blomusti
0a3ebc931b Translated using Weblate (Turkish)
Currently translated at 60.4% (457 of 756 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/tr/
2025-07-27 01:22:42 +00:00
Ptsa Daniel
83c593a1e2 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 92.7% (701 of 756 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/zh_Hans/
2025-07-27 01:22:41 +00:00
Adam Stańczyk
60c812327a Translated using Weblate (Polish)
Currently translated at 91.2% (690 of 756 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/pl/
2025-07-27 01:22:40 +00:00
Cesar Osvaldo Müller
d27ba5c046 Translated using Weblate (Portuguese (Brazil))
Currently translated at 53.5% (405 of 756 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/pt_BR/
2025-07-27 01:22:39 +00:00
Massimo Pissarello
120a88d12d Translated using Weblate (Italian)
Currently translated at 92.5% (700 of 756 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/it/
2025-07-27 01:22:38 +00:00
Safeguard
054df2ed79 Translated using Weblate (Russian)
Currently translated at 91.2% (690 of 756 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/ru/
2025-07-27 01:22:37 +00:00
Marcus Isdahl
94240f61ca Translated using Weblate (Norwegian Bokmål)
Currently translated at 74.4% (563 of 756 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/nb_NO/
2025-07-27 01:22:36 +00:00
BlueTurtle
9c77a25d9a Translated using Weblate (French)
Currently translated at 92.7% (701 of 756 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/fr/
2025-07-27 01:22:35 +00:00
Anonymous
7819f2774c Translated using Weblate (Spanish)
Currently translated at 89.0% (673 of 756 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/es/
2025-07-27 01:22:34 +00:00
Ettore Atalan
a07bdd7469 Translated using Weblate (German)
Currently translated at 82.4% (623 of 756 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/de/
2025-07-27 01:22:32 +00:00
jokob-sk
68c3712539 Merge branch 'main' of https://github.com/jokob-sk/NetAlertX 2025-07-27 11:16:58 +10:00
jokob-sk
be5fc6dccb css fixes, removal of ionicons 2025-07-27 11:16:35 +10:00
Hosted Weblate
414110e575 Merge branch 'origin/main' into Weblate. 2025-07-26 23:02:37 +00:00
Sylvain Pichon
bd641273ff Translated using Weblate (French)
Currently translated at 100.0% (755 of 755 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/fr/
2025-07-26 23:02:35 +00:00
jokob-sk
404a97fb89 network devices list, strings cleanup 2025-07-27 08:58:54 +10:00
Hosted Weblate
e3cab610ec Merge branch 'origin/main' into Weblate.
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled
2025-07-26 09:34:03 +02:00
Максим Горпиніч
cd87f6db0d Translated using Weblate (Ukrainian)
Currently translated at 100.0% (755 of 755 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/uk/
2025-07-26 09:34:02 +02:00
kkumakuma
dc015077e4 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 100.0% (755 of 755 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/zh_Hans/
2025-07-26 09:34:02 +02:00
jokob-sk
f778932fd6 weblate 2025-07-26 17:19:54 +10:00
jokob-sk
c284d27d31 Merge branch 'main' of https://github.com/jokob-sk/NetAlertX 2025-07-26 17:19:23 +10:00
jokob-sk
acac02a672 fixes 2025-07-26 17:19:05 +10:00
Максим Горпиніч
e8d3d5c2a9 Translated using Weblate (Ukrainian)
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled
Currently translated at 99.8% (754 of 755 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/uk/
2025-07-26 05:02:50 +02:00
Ashtin
d4b898358f Translated using Weblate (Catalan)
Currently translated at 97.0% (733 of 755 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/ca/
2025-07-26 05:02:50 +02:00
Ashtin
bd5a9b4f72 Translated using Weblate (Arabic)
Currently translated at 97.0% (733 of 755 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/ar/
2025-07-26 05:02:50 +02:00
Ondřej Karaffa
5f1d2ee26c Translated using Weblate (Czech)
Currently translated at 7.4% (56 of 755 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/cs/
2025-07-26 05:02:50 +02:00
Ashtin
9175a5a45f Translated using Weblate (Turkish)
Currently translated at 65.8% (497 of 755 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/tr/
2025-07-26 05:02:50 +02:00
kkumakuma
2af60c034f Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 88.3% (667 of 755 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/zh_Hans/
2025-07-26 05:02:49 +02:00
Adam Stańczyk
c503aeaf00 Translated using Weblate (Polish)
Currently translated at 98.4% (743 of 755 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/pl/
2025-07-26 05:02:49 +02:00
Ashtin
3f9922b7df Translated using Weblate (Portuguese (Brazil))
Currently translated at 57.2% (432 of 755 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/pt_BR/
2025-07-26 05:02:49 +02:00
Massimo Pissarello
91fc1da896 Translated using Weblate (Italian)
Currently translated at 99.8% (754 of 755 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/it/
2025-07-26 05:02:49 +02:00
Safeguard
3d2e4f6343 Translated using Weblate (Russian)
Currently translated at 98.4% (743 of 755 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/ru/
2025-07-26 05:02:49 +02:00
Ashtin
39d44689de Translated using Weblate (Norwegian Bokmål)
Currently translated at 80.0% (604 of 755 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/nb_NO/
2025-07-26 05:02:49 +02:00
Sylvain Pichon
2547e6e805 Translated using Weblate (French)
Currently translated at 99.8% (754 of 755 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/fr/
2025-07-26 05:02:49 +02:00
Ashtin
3c5a76b512 Translated using Weblate (Spanish)
Currently translated at 96.0% (725 of 755 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/es/
2025-07-26 05:02:48 +02:00
Ettore Atalan
dc76ba2fda Translated using Weblate (German)
Currently translated at 88.7% (670 of 755 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/de/
2025-07-26 05:02:48 +02:00
Hosted Weblate
386ee473bd Merge branch 'origin/main' into Weblate. 2025-07-26 02:59:43 +00:00
kkumakuma
feebe96fec Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 88.0% (665 of 755 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/zh_Hans/
2025-07-26 02:59:41 +00:00
jokob-sk
86f83eff5b Merge branch 'main' of https://github.com/jokob-sk/NetAlertX 2025-07-26 12:59:00 +10:00
jokob-sk
54fa2743f9 refactor, tab async loading on focus 2025-07-26 12:58:45 +10:00
Hosted Weblate
2475133405 Merge branch 'origin/main' into Weblate. 2025-07-25 22:46:56 +00:00
kkumakuma
cdb3dee8ed Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 86.8% (656 of 755 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/zh_Hans/
2025-07-25 22:46:54 +00:00
Massimo Pissarello
e667abf6fb Translated using Weblate (Italian)
Currently translated at 100.0% (755 of 755 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/it/
2025-07-25 22:46:53 +00:00
Sylvain Pichon
d5b2e2f0ee Translated using Weblate (French)
Currently translated at 100.0% (755 of 755 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/fr/
2025-07-25 22:46:52 +00:00
jokob-sk
cd7cbcc4c8 weblate 2025-07-26 08:45:52 +10:00
jokob-sk
a055c2450a Merge branch 'main' of https://github.com/jokob-sk/NetAlertX 2025-07-26 08:45:13 +10:00
jokob-sk
170a3c0ae1 presence rework #1119, plugin history filter 2025-07-26 08:45:07 +10:00
Максим Горпиніч
6fe865e115 Translated using Weblate (Ukrainian)
Some checks failed
Deploy MkDocs / deploy (push) Has been cancelled
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Currently translated at 100.0% (755 of 755 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/uk/
2025-07-24 16:46:53 +02:00
Anonymous
1c1c5bd32b Translated using Weblate (Catalan)
Currently translated at 96.9% (732 of 755 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/ca/
2025-07-24 16:46:53 +02:00
Anonymous
d40ad8bd09 Translated using Weblate (Arabic)
Currently translated at 96.9% (732 of 755 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/ar/
2025-07-24 16:46:53 +02:00
Anonymous
2b70e1c2e5 Translated using Weblate (Turkish)
Currently translated at 65.6% (496 of 755 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/tr/
2025-07-24 16:46:53 +02:00
Anonymous
da8ea98c28 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 81.1% (613 of 755 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/zh_Hans/
2025-07-24 16:46:52 +02:00
Anonymous
caac65f4f9 Translated using Weblate (Polish)
Currently translated at 98.5% (744 of 755 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/pl/
2025-07-24 16:46:52 +02:00
Anonymous
a92d66c981 Translated using Weblate (Portuguese (Brazil))
Currently translated at 57.0% (431 of 755 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/pt_BR/
2025-07-24 16:46:52 +02:00
Massimo Pissarello
5fd709ed35 Translated using Weblate (Italian)
Currently translated at 99.8% (754 of 755 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/it/
2025-07-24 16:46:52 +02:00
Anonymous
29f120e66b Translated using Weblate (Russian)
Currently translated at 98.5% (744 of 755 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/ru/
2025-07-24 16:46:52 +02:00
Anonymous
74f5933627 Translated using Weblate (Norwegian Bokmål)
Currently translated at 79.8% (603 of 755 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/nb_NO/
2025-07-24 16:46:52 +02:00
Sylvain Pichon
56a93ee75b Translated using Weblate (French)
Currently translated at 99.8% (754 of 755 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/fr/
2025-07-24 16:46:51 +02:00
Anonymous
3a8634844f Translated using Weblate (Spanish)
Currently translated at 95.8% (724 of 755 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/es/
2025-07-24 16:46:51 +02:00
Anonymous
26d546f6ec Translated using Weblate (German)
Currently translated at 88.8% (671 of 755 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/de/
2025-07-24 16:46:51 +02:00
jokob-sk
0265c41612 partial rollback #1119 2025-07-24 22:13:19 +10:00
jokob-sk
a53b410713 double-bars work #1119
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled
2025-07-24 21:44:23 +10:00
jokob-sk
3035b5b6b2 double-bars work #1119 2025-07-24 21:15:36 +10:00
jokob-sk
266d7c25da weblate 2025-07-24 21:06:17 +10:00
jokob-sk
77b25a9740 Merge branch 'main' of https://github.com/jokob-sk/NetAlertX 2025-07-24 21:05:39 +10:00
jokob-sk
618bafa514 miss match work #1119 2025-07-24 21:05:33 +10:00
Максим Горпиніч
415f589716 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (755 of 755 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/uk/
2025-07-24 12:33:00 +02:00
Massimo Pissarello
54c7c820b8 Translated using Weblate (Italian)
Currently translated at 100.0% (755 of 755 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/it/
2025-07-24 12:32:59 +02:00
Sylvain Pichon
89864f7070 Translated using Weblate (French)
Currently translated at 100.0% (755 of 755 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/fr/
2025-07-24 12:32:59 +02:00
anton garcias
b4916cd3b6 Translated using Weblate (Catalan)
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled
Currently translated at 96.9% (732 of 755 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/ca/
2025-07-24 05:44:30 +02:00
HAMAD ABDULLA
97567ad472 Translated using Weblate (Arabic)
Currently translated at 96.9% (732 of 755 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/ar/
2025-07-24 05:44:30 +02:00
Bekir Kayra Çiğdem
b00dbd560f Translated using Weblate (Turkish)
Currently translated at 65.6% (496 of 755 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/tr/
2025-07-24 05:44:30 +02:00
Ptsa Daniel
c41fbab8ee Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 81.1% (613 of 755 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/zh_Hans/
2025-07-24 05:44:30 +02:00
Adam Stańczyk
771db9fa0e Translated using Weblate (Polish)
Currently translated at 98.5% (744 of 755 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/pl/
2025-07-24 05:44:30 +02:00
GoldBull3t
dd6ccf830c Translated using Weblate (Portuguese (Brazil))
Currently translated at 57.0% (431 of 755 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/pt_BR/
2025-07-24 05:44:30 +02:00
Massimo Pissarello
b0e079aeb2 Translated using Weblate (Italian)
Currently translated at 99.7% (753 of 755 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/it/
2025-07-24 05:44:29 +02:00
Safeguard
d1d49572e2 Translated using Weblate (Russian)
Currently translated at 98.5% (744 of 755 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/ru/
2025-07-24 05:44:29 +02:00
Marcus Isdahl
774078df9c Translated using Weblate (Norwegian Bokmål)
Currently translated at 79.8% (603 of 755 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/nb_NO/
2025-07-24 05:44:29 +02:00
Sylvain Pichon
8c708f2c96 Translated using Weblate (French)
Currently translated at 99.7% (753 of 755 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/fr/
2025-07-24 05:44:29 +02:00
Deleted User
3c68b0151d Translated using Weblate (Spanish)
Currently translated at 95.8% (724 of 755 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/es/
2025-07-24 05:44:29 +02:00
Norbert (Noschvie)
6cb252c0ed Translated using Weblate (German)
Currently translated at 88.8% (671 of 755 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/de/
2025-07-24 05:44:29 +02:00
Hosted Weblate
11f2a74b5d Merge branch 'origin/main' into Weblate. 2025-07-24 04:54:34 +02:00
Максим Горпиніч
9bba3c9e50 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (755 of 755 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/uk/
2025-07-24 04:54:34 +02:00
jokob-sk
b3d71a5fec Merge branch 'main' of https://github.com/jokob-sk/NetAlertX 2025-07-24 12:54:10 +10:00
jokob-sk
a111ed929b nnetwork and link tweaks 2025-07-24 12:53:24 +10:00
Jokob @NetAlertX
21dd85f62f Merge pull request #1121 from fuad00/patch-1
hotfix: invalid volume variable
2025-07-24 07:40:13 +10:00
Fuad
b08bca5ce4 hotfix: invalid volume variable 2025-07-23 17:59:57 +03:00
jokob-sk
dff6cba2d8 Merge branch 'main' of https://github.com/jokob-sk/NetAlertX
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled
2025-07-23 22:25:47 +10:00
jokob-sk
10a0921e35 plugins columns cleanup, devDetail cleanup, better icon selector CUSTPROP 2025-07-23 22:25:35 +10:00
Massimo Pissarello
70443942ff Translated using Weblate (Italian)
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled
Currently translated at 100.0% (754 of 754 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/it/
2025-07-22 06:03:06 +02:00
jokob-sk
7d26966250 Merge branch 'main' of https://github.com/jokob-sk/NetAlertX
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled
2025-07-21 17:57:08 +10:00
jokob-sk
9ada27cf7e sync plugin, plugins UI css fixes 2025-07-21 17:56:49 +10:00
jokob-sk
752322bbad network tree filter counts 2025-07-21 09:38:28 +10:00
jokob-sk
0444e338ec indexes 4 the win 2025-07-21 09:15:40 +10:00
Максим Горпиніч
a669abd47e Translated using Weblate (Ukrainian)
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled
Currently translated at 100.0% (754 of 754 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/uk/
2025-07-20 16:03:11 +02:00
Sylvain Pichon
4e46fcb9e6 Translated using Weblate (French)
Currently translated at 100.0% (754 of 754 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/fr/
2025-07-20 16:03:10 +02:00
jokob-sk
31d7d0c143 docs and refactor 2025-07-20 22:45:17 +10:00
jokob-sk
b470b985e9 network page refactor
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled
2025-07-20 08:31:50 +10:00
jokob-sk
c90c6b5c90 network topology refactor
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled
2025-07-19 22:00:57 +10:00
jokob-sk
26f0d0ac2f network topology refactor 2025-07-19 20:45:46 +10:00
jokob-sk
5e3365935e docs
Some checks failed
Deploy MkDocs / deploy (push) Has been cancelled
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
2025-07-17 19:09:56 +10:00
jokob-sk
5b6424d405 hover-box in devices lists
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled
2025-07-16 22:28:40 +10:00
jokob-sk
698ad8e45d refactor ui init 2025-07-16 22:00:55 +10:00
jokob-sk
09fd345528 color alignemnt network tab, pop-up box devDetails
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled
2025-07-16 08:32:51 +10:00
jokob-sk
edfba9f1bc hover box css fixes, docs
Some checks are pending
Code checks / check-url-paths (push) Waiting to run
docker / docker_dev (push) Waiting to run
Deploy MkDocs / deploy (push) Waiting to run
2025-07-15 23:21:28 +10:00
Максим Горпиніч
bb844ceac4 Translated using Weblate (Ukrainian)
Some checks are pending
Code checks / check-url-paths (push) Waiting to run
docker / docker_dev (push) Waiting to run
Deploy MkDocs / deploy (push) Waiting to run
Currently translated at 100.0% (751 of 751 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/uk/
2025-07-15 06:03:36 +00:00
Massimo Pissarello
c6f3b60671 Translated using Weblate (Italian)
Currently translated at 100.0% (751 of 751 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/it/
2025-07-15 06:03:35 +00:00
Massimo Pissarello
3178a65e72 Translated using Weblate (Italian)
Currently translated at 100.0% (751 of 751 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/it/
2025-07-15 06:03:35 +00:00
Sylvain Pichon
aedfb4e5dd Translated using Weblate (French)
Currently translated at 100.0% (751 of 751 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/fr/
2025-07-15 06:03:34 +00:00
jokob-sk
e0dcc191c7 hover box, network page improvements, Last Seen changed logic ⚠
Some checks are pending
Code checks / check-url-paths (push) Waiting to run
docker / docker_dev (push) Waiting to run
Deploy MkDocs / deploy (push) Waiting to run
2025-07-15 08:34:47 +10:00
jokob-sk
c80e6d3474 css hover box #724
Some checks are pending
Code checks / check-url-paths (push) Waiting to run
docker / docker_dev (push) Waiting to run
Deploy MkDocs / deploy (push) Waiting to run
2025-07-14 20:42:12 +10:00
jokob-sk
46cd4887a3 css fixes #724 2025-07-14 19:52:16 +10:00
jokob-sk
bfbf70cf1a colored relationships #724
Some checks are pending
Code checks / check-url-paths (push) Waiting to run
docker / docker_dev (push) Waiting to run
Deploy MkDocs / deploy (push) Waiting to run
2025-07-14 15:24:38 +10:00
jokob-sk
61de54bc34 net refactor 2025-07-14 11:01:16 +10:00
Максим Горпиніч
e27af88690 Translated using Weblate (Ukrainian)
Some checks are pending
Code checks / check-url-paths (push) Waiting to run
docker / docker_dev (push) Waiting to run
Deploy MkDocs / deploy (push) Waiting to run
Currently translated at 100.0% (756 of 756 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/uk/
2025-07-13 18:01:48 +02:00
jokob-sk
393c3fd3b6 nics work 724
Some checks are pending
Code checks / check-url-paths (push) Waiting to run
docker / docker_dev (push) Waiting to run
Deploy MkDocs / deploy (push) Waiting to run
2025-07-13 09:02:21 +10:00
Hosted Weblate
0e53aef9ea Merge branch 'origin/main' into Weblate.
Some checks are pending
Code checks / check-url-paths (push) Waiting to run
docker / docker_dev (push) Waiting to run
Deploy MkDocs / deploy (push) Waiting to run
2025-07-12 05:45:29 +00:00
Safeguard
8a742b0ec0 Translated using Weblate (Russian)
Currently translated at 100.0% (751 of 751 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/ru/
2025-07-12 05:45:27 +00:00
jokob-sk
b17b70a91f pl conflict resolution 2025-07-12 15:44:58 +10:00
jokob-sk
6f536f9952 ntfy disable cert #1117, initial nics work #724 2025-07-12 15:40:08 +10:00
Adam Stańczyk
034caf965a Translated using Weblate (Polish)
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled
Currently translated at 100.0% (751 of 751 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/pl/
2025-07-07 12:02:22 +00:00
Adam Stańczyk
6322e3f4cf Translated using Weblate (Polish)
Currently translated at 100.0% (751 of 751 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/pl/
2025-07-07 12:02:20 +00:00
Adam Stańczyk
6b78adb702 Translated using Weblate (Polish)
Currently translated at 100.0% (751 of 751 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/pl/
2025-07-07 12:02:19 +00:00
Adam Stańczyk
6e8c931bf3 Translated using Weblate (Polish)
Currently translated at 100.0% (751 of 751 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/pl/
2025-07-07 12:02:18 +00:00
Adam Stańczyk
b80fe44c08 Translated using Weblate (Polish)
Currently translated at 100.0% (751 of 751 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/pl/
2025-07-07 12:02:17 +00:00
Adam Stańczyk
0921773666 Translated using Weblate (Polish)
Currently translated at 100.0% (751 of 751 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/pl/
2025-07-07 12:02:16 +00:00
Adam Stańczyk
13e960f5cb Translated using Weblate (Polish)
Currently translated at 100.0% (751 of 751 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/pl/
2025-07-07 12:02:15 +00:00
Adam Stańczyk
094583b8f6 Translated using Weblate (Polish)
Currently translated at 100.0% (751 of 751 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/pl/
2025-07-07 12:02:14 +00:00
Adam Stańczyk
fd7ec5d2cf Translated using Weblate (Polish)
Currently translated at 100.0% (751 of 751 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/pl/
2025-07-07 12:02:13 +00:00
Adam Stańczyk
370659f461 Translated using Weblate (Polish)
Currently translated at 100.0% (751 of 751 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/pl/
2025-07-07 12:02:12 +00:00
Adam Stańczyk
1f853a8bb1 Translated using Weblate (Polish)
Currently translated at 100.0% (751 of 751 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/pl/
2025-07-07 12:02:11 +00:00
Adam Stańczyk
b93c3b6093 Translated using Weblate (Polish)
Currently translated at 100.0% (751 of 751 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/pl/
2025-07-07 12:02:10 +00:00
Adam Stańczyk
6145fff2fd Translated using Weblate (Polish)
Currently translated at 100.0% (751 of 751 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/pl/
2025-07-07 12:02:09 +00:00
Adam Stańczyk
48687dc6dd Translated using Weblate (Polish)
Currently translated at 100.0% (751 of 751 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/pl/
2025-07-07 12:02:08 +00:00
Adam Stańczyk
4591cc87e2 Translated using Weblate (Polish)
Currently translated at 100.0% (751 of 751 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/pl/
2025-07-07 12:02:07 +00:00
Adam Stańczyk
67491615c0 Translated using Weblate (Polish)
Currently translated at 100.0% (751 of 751 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/pl/
2025-07-07 12:02:06 +00:00
Adam Stańczyk
fadf64450b Translated using Weblate (Polish)
Currently translated at 100.0% (751 of 751 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/pl/
2025-07-07 12:02:05 +00:00
Adam Stańczyk
34bb7bb93f Translated using Weblate (Polish)
Currently translated at 100.0% (751 of 751 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/pl/
2025-07-07 12:02:04 +00:00
Adam Stańczyk
67f8401dce Translated using Weblate (Polish)
Currently translated at 100.0% (751 of 751 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/pl/
2025-07-07 12:02:03 +00:00
Adam Stańczyk
f9fb711881 Translated using Weblate (Polish)
Currently translated at 100.0% (751 of 751 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/pl/
2025-07-07 12:02:01 +00:00
Adam Stańczyk
26c35a01f3 Translated using Weblate (Polish)
Currently translated at 100.0% (751 of 751 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/pl/
2025-07-07 12:02:00 +00:00
Adam Stańczyk
9538842fcb Translated using Weblate (Polish)
Currently translated at 100.0% (751 of 751 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/pl/
2025-07-07 12:01:59 +00:00
Adam Stańczyk
8ca31ab049 Translated using Weblate (Polish)
Currently translated at 100.0% (751 of 751 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/pl/
2025-07-07 12:01:58 +00:00
Adam Stańczyk
b19c9b5eb6 Translated using Weblate (Polish)
Currently translated at 100.0% (751 of 751 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/pl/
2025-07-07 12:01:58 +00:00
Adam Stańczyk
896ead0bb8 Translated using Weblate (Polish)
Currently translated at 100.0% (751 of 751 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/pl/
2025-07-07 12:01:56 +00:00
Adam Stańczyk
9835381186 Translated using Weblate (Polish)
Currently translated at 100.0% (751 of 751 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/pl/
2025-07-07 12:01:55 +00:00
Adam Stańczyk
d49ced8942 Translated using Weblate (Polish)
Currently translated at 100.0% (751 of 751 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/pl/
2025-07-07 12:01:54 +00:00
Adam Stańczyk
9a01263d70 Translated using Weblate (Polish)
Currently translated at 100.0% (751 of 751 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/pl/
2025-07-07 12:01:53 +00:00
jokob-sk
7980554924 small refactor, docs
Some checks are pending
Code checks / check-url-paths (push) Waiting to run
docker / docker_dev (push) Waiting to run
Deploy MkDocs / deploy (push) Waiting to run
2025-07-07 09:05:35 +10:00
jokob-sk
8949bcb567 icon and device type guessing from @slammingprogramming
Some checks are pending
Code checks / check-url-paths (push) Waiting to run
docker / docker_dev (push) Waiting to run
Deploy MkDocs / deploy (push) Waiting to run
2025-07-06 17:08:11 +10:00
jokob-sk
ac90bb702e string issue #1104
Some checks are pending
Code checks / check-url-paths (push) Waiting to run
docker / docker_dev (push) Waiting to run
Deploy MkDocs / deploy (push) Waiting to run
2025-07-06 12:22:42 +10:00
jokob-sk
088c913ede session events fix 2025-07-06 09:03:26 +10:00
jokob-sk
7554a7f246 apprise_telegram settings screenshot update 2025-07-06 08:23:04 +10:00
jokob-sk
31e5c9fe96 twitter automation removal 2025-07-05 09:04:46 +10:00
jokob-sk
e21c1771c7 docs
Some checks are pending
Code checks / check-url-paths (push) Waiting to run
docker / docker_dev (push) Waiting to run
Deploy MkDocs / deploy (push) Waiting to run
2025-07-05 08:14:24 +10:00
208 changed files with 18731 additions and 7239 deletions

2
.github/FUNDING.yml vendored
View File

@@ -1,3 +1,3 @@
github: jokob-sk github: jokob-sk
patreon: 84385063 patreon: netalertx
buy_me_a_coffee: jokobsk buy_me_a_coffee: jokobsk

2
.github/tweet.md vendored
View File

@@ -1,2 +0,0 @@
🎉 New release: **v25.7.3 - 🌍 Arabic translation and various fixes** is live! 🚀
Check it out here: https://github.com/jokob-sk/NetAlertX/releases/tag/v25.7.3

81
.github/workflows/docker_rewrite.yml vendored Executable file
View File

@@ -0,0 +1,81 @@
name: docker
on:
push:
branches:
- rewrite
tags:
- '*.*.*'
pull_request:
branches:
- rewrite
jobs:
docker_rewrite:
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
contents: read
packages: write
if: >
contains(github.event.head_commit.message, 'PUSHPROD') != 'True' &&
github.repository == 'jokob-sk/NetAlertX'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Set up dynamic build ARGs
id: getargs
run: echo "version=$(cat ./stable/VERSION)" >> $GITHUB_OUTPUT
- name: Get release version
id: get_version
run: echo "version=Dev" >> $GITHUB_OUTPUT
- name: Create .VERSION file
run: echo "${{ steps.get_version.outputs.version }}" >> .VERSION
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
ghcr.io/jokob-sk/netalertx-dev-rewrite
jokobsk/netalertx-dev-rewrite
tags: |
type=raw,value=latest
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
- name: Log in to Github Container Registry (GHCR)
uses: docker/login-action@v3
with:
registry: ghcr.io
username: jokob-sk
password: ${{ secrets.GITHUB_TOKEN }}
- name: Log in to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

View File

@@ -1,4 +1,4 @@
name: 📧 Twitter and Discord Posts name: 📧 Social Posts
on: on:
release: release:
types: [published] types: [published]
@@ -16,38 +16,3 @@ jobs:
-d '{"content": "🎉 New release: **${{ github.event.release.name }}** is live! 🚀\nCheck it out here: ${{ github.event.release.html_url }}"}' \ -d '{"content": "🎉 New release: **${{ github.event.release.name }}** is live! 🚀\nCheck it out here: ${{ github.event.release.html_url }}"}' \
${{ secrets.DISCORD_WEBHOOK_URL }} ${{ secrets.DISCORD_WEBHOOK_URL }}
post-twitter:
runs-on: ubuntu-latest
steps:
- name: Wait for 15 minutes
run: sleep 900 # 15 minutes delay
- name: Checkout repository
uses: actions/checkout@v3
- name: Set Git config
run: |
git config --global user.email "github-actions@github.com"
git config --global user.name "GitHub Actions"
- name: Create tweet file
run: |
echo "🎉 New release: **${{ github.event.release.name }}** is live! 🚀" > .github/tweet.md
echo "Check it out here: ${{ github.event.release.html_url }}" >> .github/tweet.md
git add .github/tweet.md
git commit -m "Add release tweet for ${{ github.event.release.name }}"
- name: Push changes
run: |
git push https://github.com/${{ github.repository }}.git HEAD:main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Tweet
uses: twitter-together/action@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }}
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
TWITTER_API_KEY: ${{ secrets.TWITTER_API_KEY }}
TWITTER_API_SECRET_KEY: ${{ secrets.TWITTER_API_SECRET_KEY }}

View File

@@ -13,7 +13,7 @@ ENV PATH="/opt/venv/bin:$PATH"
COPY . ${INSTALL_DIR}/ COPY . ${INSTALL_DIR}/
RUN pip install openwrt-luci-rpc asusrouter asyncio aiohttp graphene flask tplink-omada-client wakeonlan pycryptodome requests paho-mqtt scapy cron-converter pytz json2table dhcp-leases pyunifi speedtest-cli chardet python-nmap dnspython librouteros yattag git+https://github.com/foreign-sub/aiofreepybox.git \ RUN pip install openwrt-luci-rpc asusrouter asyncio aiohttp graphene flask flask-cors unifi-sm-api tplink-omada-client wakeonlan pycryptodome requests paho-mqtt scapy cron-converter pytz json2table dhcp-leases pyunifi speedtest-cli chardet python-nmap dnspython librouteros yattag git+https://github.com/foreign-sub/aiofreepybox.git \
&& bash -c "find ${INSTALL_DIR} -type d -exec chmod 750 {} \;" \ && bash -c "find ${INSTALL_DIR} -type d -exec chmod 750 {} \;" \
&& bash -c "find ${INSTALL_DIR} -type f -exec chmod 640 {} \;" \ && bash -c "find ${INSTALL_DIR} -type f -exec chmod 640 {} \;" \
&& bash -c "find ${INSTALL_DIR} -type f \( -name '*.sh' -o -name '*.py' -o -name 'speedtest-cli' \) -exec chmod 750 {} \;" && bash -c "find ${INSTALL_DIR} -type f \( -name '*.sh' -o -name '*.py' -o -name 'speedtest-cli' \) -exec chmod 750 {} \;"

View File

@@ -43,7 +43,7 @@ RUN phpenmod -v 8.2 sqlite3
RUN apt-get install -y python3-venv RUN apt-get install -y python3-venv
RUN python3 -m venv myenv RUN python3 -m venv myenv
RUN /bin/bash -c "source myenv/bin/activate && update-alternatives --install /usr/bin/python python /usr/bin/python3 10 && pip3 install openwrt-luci-rpc asusrouter asyncio aiohttp graphene flask tplink-omada-client wakeonlan pycryptodome requests paho-mqtt scapy cron-converter pytz json2table dhcp-leases pyunifi speedtest-cli chardet python-nmap dnspython librouteros yattag " RUN /bin/bash -c "source myenv/bin/activate && update-alternatives --install /usr/bin/python python /usr/bin/python3 10 && pip3 install openwrt-luci-rpc asusrouter asyncio aiohttp graphene flask flask-cors unifi-sm-api tplink-omada-client wakeonlan pycryptodome requests paho-mqtt scapy cron-converter pytz json2table dhcp-leases pyunifi speedtest-cli chardet python-nmap dnspython librouteros yattag "
# Create a buildtimestamp.txt to later check if a new version was released # Create a buildtimestamp.txt to later check if a new version was released
RUN date +%s > ${INSTALL_DIR}/front/buildtimestamp.txt RUN date +%s > ${INSTALL_DIR}/front/buildtimestamp.txt

View File

@@ -24,7 +24,7 @@ LOADED_PLUGINS=['ARPSCAN', 'AVAHISCAN', 'CSVBCKP','DBCLNP', 'DIGSCAN', 'INTRNT',
DAYS_TO_KEEP_EVENTS=90 DAYS_TO_KEEP_EVENTS=90
# Used for generating links in emails. Make sure not to add a trailing slash! # Used for generating links in emails. Make sure not to add a trailing slash!
REPORT_DASHBOARD_URL='http://127.0.0.1' REPORT_DASHBOARD_URL='update_REPORT_DASHBOARD_URL_setting'
# Make sure at least these scanners are enabled for new installs, other defaults are taken from the config.json # Make sure at least these scanners are enabled for new installs, other defaults are taken from the config.json
INTRNT_RUN='schedule' INTRNT_RUN='schedule'

200
back/device_heuristics_rules.json Executable file
View File

@@ -0,0 +1,200 @@
[
{
"dev_type": "Gateway",
"icon_html": "<i class=\"fa fa-globe\"></i>",
"matching_pattern": [
{ "mac_prefix": "INTERNET", "vendor": "" }
],
"name_pattern": []
},
{
"dev_type": "Access Point",
"icon_html": "<i class=\"fa fa-network-wired\"></i>",
"matching_pattern": [
{ "mac_prefix": "74ACB9", "vendor": "Ubiquiti" },
{ "mac_prefix": "002468", "vendor": "Cisco" },
{ "mac_prefix": "F4F5D8", "vendor": "TP-Link" },
{ "mac_prefix": "F88E85", "vendor": "Netgear" }
],
"name_pattern": ["router", "gateway", "ap", "access point", "access-point", "switch"]
},
{
"dev_type": "Phone",
"icon_html": "<i class=\"fa-brands fa-apple\"></i>",
"matching_pattern": [
{ "mac_prefix": "001A79", "vendor": "Apple" },
{ "mac_prefix": "B0BE83", "vendor": "Samsung" },
{ "mac_prefix": "BC926B", "vendor": "Motorola" }
],
"name_pattern": ["iphone", "ipad", "pixel", "galaxy", "redmi"]
},
{
"dev_type": "Phone",
"icon_html": "<i class=\"fa-solid fa-mobile\"></i>",
"matching_pattern": [
],
"name_pattern": ["android","samsung"]
},
{
"dev_type": "Tablet",
"icon_html": "<i class=\"fa fa-tablet\"></i>",
"matching_pattern": [
{ "mac_prefix": "001B63", "vendor": "Apple" },
{ "mac_prefix": "BC4C4C", "vendor": "Samsung" }
],
"name_pattern": ["tablet", "pad"]
},
{
"dev_type": "IoT",
"icon_html": "<i class=\"fa-brands fa-raspberry-pi\"></i>",
"matching_pattern": [
{ "mac_prefix": "B827EB", "vendor": "Raspberry Pi" },
{ "mac_prefix": "DCA632", "vendor": "Raspberry Pi" }
],
"name_pattern": ["raspberry", "pi"]
},
{
"dev_type": "IoT",
"icon_html": "<i class=\"fa-solid fa-microchip\"></i>",
"matching_pattern": [
{ "mac_prefix": "840D8E", "vendor": "Espressif" },
{ "mac_prefix": "ECFABC", "vendor": "Espressif" },
{ "mac_prefix": "7C9EBD", "vendor": "Espressif" }
],
"name_pattern": ["raspberry", "pi"]
},
{
"dev_type": "Desktop",
"icon_html": "<i class=\"fa fa-desktop\"></i>",
"matching_pattern": [
{ "mac_prefix": "001422", "vendor": "Dell" },
{ "mac_prefix": "001874", "vendor": "Lenovo" },
{ "mac_prefix": "00E04C", "vendor": "Hewlett Packard" }
],
"name_pattern": ["desktop", "pc", "computer"]
},
{
"dev_type": "Laptop",
"icon_html": "<i class=\"fa fa-laptop\"></i>",
"matching_pattern": [
{ "mac_prefix": "3C0754", "vendor": "HP" },
{ "mac_prefix": "0017A4", "vendor": "Dell" },
{ "mac_prefix": "F4CE46", "vendor": "Lenovo" },
{ "mac_prefix": "409F38", "vendor": "Acer" }
],
"name_pattern": ["macbook", "imac", "laptop", "notebook"]
},
{
"dev_type": "Server",
"icon_html": "<i class=\"fa fa-server\"></i>",
"matching_pattern": [
{ "mac_prefix": "001CBF", "vendor": "Supermicro" },
{ "mac_prefix": "002186", "vendor": "Dell" },
{ "mac_prefix": "D02788", "vendor": "Hewlett Packard" },
{ "mac_prefix": "002590", "vendor": "IBM" }
],
"name_pattern": ["server", "nas"]
},
{
"dev_type": "VM",
"icon_html": "<i class=\"fa fa-server\"></i>",
"matching_pattern": [
{ "mac_prefix": "525400", "vendor": "QEMU" },
{ "mac_prefix": "005056", "vendor": "VMware" },
{ "mac_prefix": "000C29", "vendor": "VMware" },
{ "mac_prefix": "000569", "vendor": "VMware" },
{ "mac_prefix": "00163E", "vendor": "Xen" },
{ "mac_prefix": "080027", "vendor": "VirtualBox" }
]
},
{
"dev_type": "TV",
"icon_html": "<i class=\"fa fa-tv\"></i>",
"matching_pattern": [
{ "mac_prefix": "0013CE", "vendor": "Samsung" },
{ "mac_prefix": "0017C8", "vendor": "LG" },
{ "mac_prefix": "D46E0E", "vendor": "Sony" }
],
"name_pattern": ["tv", "television", "smarttv"]
},
{
"dev_type": "Gaming Console",
"icon_html": "<i class=\"fa fa-gamepad\"></i>",
"matching_pattern": [
{ "mac_prefix": "001FA7", "vendor": "Sony" },
{ "mac_prefix": "7C04D0", "vendor": "Nintendo" },
{ "mac_prefix": "EC26CA", "vendor": "Sony" }
],
"name_pattern": ["playstation", "xbox"]
},
{
"dev_type": "Camera",
"icon_html": "<i class=\"fa fa-camera\"></i>",
"matching_pattern": [
{ "mac_prefix": "A45E60", "vendor": "Hikvision" },
{ "mac_prefix": "00408C", "vendor": "Axis" },
{ "mac_prefix": "00156D", "vendor": "Amcrest" },
{ "mac_prefix": "AC9E17", "vendor": "Reolink" }
],
"name_pattern": ["camera", "cam", "webcam"]
},
{
"dev_type": "Smart Speaker",
"icon_html": "<i class=\"fa fa-volume-up\"></i>",
"matching_pattern": [
{ "mac_prefix": "44650D", "vendor": "Amazon" },
{ "mac_prefix": "74ACB9", "vendor": "Google" }
],
"name_pattern": ["echo", "alexa", "dot"]
},
{
"dev_type": "Router",
"icon_html": "<i class=\"fa fa-random\"></i>",
"matching_pattern": [
{ "mac_prefix": "000C29", "vendor": "Cisco" },
{ "mac_prefix": "00155D", "vendor": "MikroTik" }
],
"name_pattern": ["router", "gateway", "ap", "access point", "access-point"],
"ip_pattern": [
"^192\\.168\\.[0-1]\\.1$",
"^10\\.0\\.0\\.1$"
]
},
{
"dev_type": "Smart Light",
"icon_html": "<i class=\"fa fa-lightbulb\"></i>",
"matching_pattern": [],
"name_pattern": ["hue", "lifx", "bulb"]
},
{
"dev_type": "Smart Home",
"icon_html": "<i class=\"fa fa-house\"></i>",
"matching_pattern": [],
"name_pattern": ["google", "chromecast", "nest"]
},
{
"dev_type": "Smartwatch",
"icon_html": "<i class=\"fa fa-watch\"></i>",
"matching_pattern": [],
"name_pattern": ["watch", "wear"]
},
{
"dev_type": "Printer",
"icon_html": "<i class=\"fa fa-print\"></i>",
"matching_pattern": [],
"name_pattern": ["printer", "print"]
},
{
"dev_type": "Security Device",
"icon_html": "<i class=\"fa fa-shield-alt\"></i>",
"matching_pattern": [],
"name_pattern": ["doorbell", "lock", "security"]
},
{
"dev_type": "Smart Light",
"icon_html": "<i class=\"fa-solid fa-lightbulb\"></i>",
"matching_pattern": [
],
"name_pattern": ["light","bulb"]
}
]

View File

@@ -23,11 +23,11 @@ services:
# - ${DEV_LOCATION}/api:/app/api # - ${DEV_LOCATION}/api:/app/api
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# DELETE START anyone trying to use this file: comment out / delete BELOW lines, they are only for development purposes # DELETE START anyone trying to use this file: comment out / delete BELOW lines, they are only for development purposes
- ${APP_DATA_LOCATION}/netalertx/dhcp_samples/dhcp1.leases:/mnt/dhcp1.leases - ${APP_DATA_LOCATION}/netalertx/dhcp_samples/dhcp1.leases:/mnt/dhcp1.leases # test data for DCPLSS plugin
- ${APP_DATA_LOCATION}/netalertx/dhcp_samples/dhcp2.leases:/mnt/dhcp2.leases - ${APP_DATA_LOCATION}/netalertx/dhcp_samples/dhcp2.leases:/mnt/dhcp2.leases # test data for DCPLSS plugin
- ${APP_DATA_LOCATION}/netalertx/dhcp_samples/pihole_dhcp_full.leases:/etc/pihole/dhcp.leases - ${APP_DATA_LOCATION}/netalertx/dhcp_samples/pihole_dhcp_full.leases:/etc/pihole/dhcp.leases # test data for DCPLSS plugin
- ${APP_DATA_LOCATION}/netalertx/dhcp_samples/pihole_dhcp_2.leases:/etc/pihole/dhcp2.leases - ${APP_DATA_LOCATION}/netalertx/dhcp_samples/pihole_dhcp_2.leases:/etc/pihole/dhcp2.leases # test data for DCPLSS plugin
- ${APP_DATA_LOCATION}/pihole/etc-pihole/pihole-FTL.db:/etc/pihole/pihole-FTL.db - ${APP_DATA_LOCATION}/pihole/etc-pihole/pihole-FTL.db:/etc/pihole/pihole-FTL.db # test data for PIHOLE plugin
- ${DEV_LOCATION}/mkdocs.yml:/app/mkdocs.yml - ${DEV_LOCATION}/mkdocs.yml:/app/mkdocs.yml
- ${DEV_LOCATION}/docs:/app/docs - ${DEV_LOCATION}/docs:/app/docs
- ${DEV_LOCATION}/server:/app/server - ${DEV_LOCATION}/server:/app/server
@@ -59,6 +59,9 @@ services:
- ${DEV_LOCATION}/front/presence.php:/app/front/presence.php - ${DEV_LOCATION}/front/presence.php:/app/front/presence.php
- ${DEV_LOCATION}/front/settings.php:/app/front/settings.php - ${DEV_LOCATION}/front/settings.php:/app/front/settings.php
- ${DEV_LOCATION}/front/systeminfo.php:/app/front/systeminfo.php - ${DEV_LOCATION}/front/systeminfo.php:/app/front/systeminfo.php
- ${DEV_LOCATION}/front/systeminfoNetwork.php:/app/front/systeminfoNetwork.php
- ${DEV_LOCATION}/front/systeminfoServer.php:/app/front/systeminfoServer.php
- ${DEV_LOCATION}/front/systeminfoStorage.php:/app/front/systeminfoStorage.php
- ${DEV_LOCATION}/front/cloud_services.php:/app/front/cloud_services.php - ${DEV_LOCATION}/front/cloud_services.php:/app/front/cloud_services.php
- ${DEV_LOCATION}/front/report.php:/app/front/report.php - ${DEV_LOCATION}/front/report.php:/app/front/report.php
- ${DEV_LOCATION}/front/workflows.php:/app/front/workflows.php - ${DEV_LOCATION}/front/workflows.php:/app/front/workflows.php

View File

@@ -1,6 +1,6 @@
# API endpoints # NetAlertX API Documentation
NetAlertX comes with a couple of API endpoints. All requests need to be authorized (executed in a logged in browser session) or you have to pass the value of the `API_TOKEN` settings as authorization bearer, for example: This API provides programmatic access to **devices, events, sessions, metrics, network tools, and sync** in NetAlertX. It is implemented as a **REST and GraphQL server**. All requests require authentication via **API Token** (`API_TOKEN` setting) unless explicitly noted. For example, to authorize a GraphQL request, you need to use a `Authorization: Bearer API_TOKEN` header as per example below:
```graphql ```graphql
curl 'http://host:GRAPHQL_PORT/graphql' \ curl 'http://host:GRAPHQL_PORT/graphql' \
@@ -21,241 +21,59 @@ curl 'http://host:GRAPHQL_PORT/graphql' \
}' }'
``` ```
## API Endpoint: GraphQL The API server runs on `0.0.0.0:<graphql_port>` with **CORS enabled** for all main endpoints.
- Endpoint URL: `php/server/query_graphql.php` ---
- Host: `same as front end (web ui)`
- Port: `20212` or as defined by the `GRAPHQL_PORT` setting
### Example Query to Fetch Devices ## Authentication
First, let's define the GraphQL query to fetch devices with pagination and sorting options. All endpoints require an API token provided in the HTTP headers:
```graphql ```http
query GetDevices($options: PageQueryOptionsInput) { Authorization: Bearer <API_TOKEN>
devices(options: $options) {
devices {
rowid
devMac
devName
devOwner
devType
devVendor
devLastConnection
devStatus
}
count
}
}
``` ```
See also: [Debugging GraphQL issues](./DEBUG_GRAPHQL.md) If the token is missing or invalid, the server will return:
### `curl` Command
You can use the following `curl` command to execute the query.
```sh
curl 'http://host:GRAPHQL_PORT/graphql' -X POST -H 'Authorization: Bearer API_TOKEN' -H 'Content-Type: application/json' --data '{
"query": "query GetDevices($options: PageQueryOptionsInput) { devices(options: $options) { devices { rowid devMac devName devOwner devType devVendor devLastConnection devStatus } count } }",
"variables": {
"options": {
"page": 1,
"limit": 10,
"sort": [{ "field": "devName", "order": "asc" }],
"search": "",
"status": "connected"
}
}
}'
```
### Explanation:
1. **GraphQL Query**:
- The `query` parameter contains the GraphQL query as a string.
- The `variables` parameter contains the input variables for the query.
2. **Query Variables**:
- `page`: Specifies the page number of results to fetch.
- `limit`: Specifies the number of results per page.
- `sort`: Specifies the sorting options, with `field` being the field to sort by and `order` being the sort order (`asc` for ascending or `desc` for descending).
- `search`: A search term to filter the devices.
- `status`: The status filter to apply (valid values are `my_devices` (determined by the `UI_MY_DEVICES` setting), `connected`, `favorites`, `new`, `down`, `archived`, `offline`).
3. **`curl` Command**:
- The `-X POST` option specifies that we are making a POST request.
- The `-H "Content-Type: application/json"` option sets the content type of the request to JSON.
- The `-d` option provides the request payload, which includes the GraphQL query and variables.
### Sample Response
The response will be in JSON format, similar to the following:
```json ```json
{ { "error": "Forbidden" }
"data": {
"devices": {
"devices": [
{
"rowid": 1,
"devMac": "00:11:22:33:44:55",
"devName": "Device 1",
"devOwner": "Owner 1",
"devType": "Type 1",
"devVendor": "Vendor 1",
"devLastConnection": "2025-01-01T00:00:00Z",
"devStatus": "connected"
},
{
"rowid": 2,
"devMac": "66:77:88:99:AA:BB",
"devName": "Device 2",
"devOwner": "Owner 2",
"devType": "Type 2",
"devVendor": "Vendor 2",
"devLastConnection": "2025-01-02T00:00:00Z",
"devStatus": "connected"
}
],
"count": 2
}
}
}
``` ```
## API Endpoint: JSON files ---
This API endpoint retrieves static files, that are periodically updated. ## Base URL
- Endpoint URL: `php/server/query_json.php?file=<file name>`
- Host: `same as front end (web ui)`
- Port: `20211` or as defined by the $PORT docker environment variable (same as the port for the web ui)
### 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 `/app/api/` folder. You can access them via the `/php/server/query_json.php?file=user_notifications.json` endpoint.
### Available endpoints
You can access the following files:
| File name | Description |
|----------------------|----------------------|
| `notification_json_final.json` | The json version of the last notification (e.g. used for webhooks - [sample JSON](https://github.com/jokob-sk/NetAlertX/blob/main/front/report_templates/webhook_json_sample.json)). |
| `table_devices.json` | All of the available Devices detected by the app. |
| `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/NetAlertX/tree/main/docs/PLUGINS.md)|
| `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. |
| `app_state.json` | Contains the current application state. |
### 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"
}
]
}
``` ```
http://<server>:<GRAPHQL_PORT>/
Example JSON of the `table_devices.json` endpoint with two Devices (database rows):
```JSON
{
"data": [
{
"devMac": "Internet",
"devName": "Net - Huawei",
"devType": "Router",
"devVendor": null,
"devGroup": "Always on",
"devFirstConnection": "2021-01-01 00:00:00",
"devLastConnection": "2021-01-28 22:22:11",
"devLastIP": "192.168.1.24",
"devStaticIP": 0,
"devPresentLastScan": 1,
"devLastNotification": "2023-01-28 22:22:28.998715",
"devIsNew": 0,
"devParentMAC": "",
"devParentPort": "",
"devIcon": "globe"
},
{
"devMac": "a4:8f:ff:aa:ba:1f",
"devName": "Net - USG",
"devType": "Firewall",
"devVendor": "Ubiquiti Inc",
"devGroup": "",
"devFirstConnection": "2021-02-12 22:05:00",
"devLastConnection": "2021-07-17 15:40:00",
"devLastIP": "192.168.1.1",
"devStaticIP": 1,
"devPresentLastScan": 1,
"devLastNotification": "2021-07-17 15:40:10.667717",
"devIsNew": 0,
"devParentMAC": "Internet",
"devParentPort": 1,
"devIcon": "shield-halved"
}
]
}
``` ```
## API Endpoint: /log files ---
This API endpoint retrieves files from the `/app/log` folder. ## Endpoints
- Endpoint URL: `php/server/query_logs.php?file=<file name>` > [!TIP]
- Host: `same as front end (web ui)` > When retrieving devices or settings try using the GraphQL API endpoint first as it is read-optimized.
- Port: `20211` or as defined by the $PORT docker environment variable (same as the port for the web ui)
| File | Description | * [Device API Endpoints](API_DEVICE.md) Manage individual devices
|--------------------------|---------------------------------------------------------------| * [Devices Collection](API_DEVICES.md) Bulk operations on multiple devices
| `IP_changes.log` | Logs of IP address changes | * [Events](API_EVENTS.md) Device event logging and management
| `app.log` | Main application log | * [Sessions](API_SESSIONS.md) Connection sessions and history
| `app.php_errors.log` | PHP error log | * [Settings](API_SETTINGS.md) Settings
| `app_front.log` | Frontend application log | * [Metrics](API_METRICS.md) Prometheus metrics and per-device status
| `app_nmap.log` | Logs of Nmap scan results | * [Network Tools](API_NETTOOLS.md) Utilities like Wake-on-LAN, traceroute, nslookup, nmap, and internet info
| `db_is_locked.log` | Logs when the database is locked | * [Online History](API_ONLINEHISTORY.md) Online/offline device records
| `execution_queue.log` | Logs of execution queue activities | * [GraphQL](API_GRAPHQL.md) Advanced queries and filtering
| `plugins/` | Directory for temporary plugin-related files (not accessible) | * [Sync](API_SYNC.md) Synchronization between multiple NetAlertX instances
| `report_output.html` | HTML report output | * [DB query](API_DBQUERY.md) (⚠ Internal) - Low level database access - use other endpoints if possible
| `report_output.json` | JSON format report output |
| `report_output.txt` | Text format report output |
| `stderr.log` | Logs of standard error output |
| `stdout.log` | Logs of standard output |
See [Testing](API_TESTS.md) for example requests and usage.
## API Endpoint: /config files ---
To retrieve files from the `/app/config` folder. ## Notes
- Endpoint URL: `php/server/query_config.php?file=<file name>`
- Host: `same as front end (web ui)`
- Port: `20211` or as defined by the $PORT docker environment variable (same as the port for the web ui)
| File | Description |
|--------------------------|--------------------------------------------------|
| `devices.csv` | Devices csv file |
| `app.conf` | Application config file |
* All endpoints enforce **Bearer token authentication**.
* Errors return JSON with `success: False` and an error message.
* GraphQL is available for advanced queries, while REST endpoints cover structured use cases.
* Endpoints run on `0.0.0.0:<GRAPHQL_PORT>` with **CORS enabled**.
* Use consistent API tokens and node/plugin names when interacting with `/sync` to ensure data integrity.

183
docs/API_DBQUERY.md Executable file
View File

@@ -0,0 +1,183 @@
# Database Query API
The **Database Query API** provides direct, low-level access to the NetAlertX database. It allows **read, write, update, and delete** operations against tables, using **base64-encoded** SQL or structured parameters.
> [!Warning]
> This API is primarily used internally to generate and render the application UI. These endpoints are low-level and powerful, and should be used with caution. Wherever possible, prefer the [standard API endpoints](API.md). Invalid or unsafe queries can corrupt data.
> If you need data in a specific format that is not already provided, please open an issue or pull request with a clear, broadly useful use case. This helps ensure new endpoints benefit the wider community rather than relying on raw database queries.
---
## Authentication
All `/dbquery/*` endpoints require an API token in the HTTP headers:
```http
Authorization: Bearer <API_TOKEN>
```
If the token is missing or invalid:
```json
{ "error": "Forbidden" }
```
---
## Endpoints
### 1. `POST /dbquery/read`
Execute a **read-only** SQL query (e.g., `SELECT`).
#### Request Body
```json
{
"rawSql": "U0VMRUNUICogRlJPTSBERVZJQ0VT" // base64 encoded SQL
}
```
Decoded SQL:
```sql
SELECT * FROM Devices;
```
#### Response
```json
{
"success": true,
"results": [
{ "devMac": "AA:BB:CC:DD:EE:FF", "devName": "Phone" }
]
}
```
#### `curl` Example
```bash
curl -X POST "http://<server_ip>:<GRAPHQL_PORT>/dbquery/read" \
-H "Authorization: Bearer <API_TOKEN>" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"rawSql": "U0VMRUNUICogRlJPTSBERVZJQ0VT"
}'
```
---
### 2. `POST /dbquery/update` (safer than `/dbquery/write`)
Update rows in a table by `columnName` + `id`. `/dbquery/update` is parameterized to reduce the risk of SQL injection, while `/dbquery/write` executes raw SQL directly.
#### Request Body
```json
{
"columnName": "devMac",
"id": ["AA:BB:CC:DD:EE:FF"],
"dbtable": "Devices",
"columns": ["devName", "devOwner"],
"values": ["Laptop", "Alice"]
}
```
#### Response
```json
{ "success": true, "updated_count": 1 }
```
#### `curl` Example
```bash
curl -X POST "http://<server_ip>:<GRAPHQL_PORT>/dbquery/update" \
-H "Authorization: Bearer <API_TOKEN>" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"columnName": "devMac",
"id": ["AA:BB:CC:DD:EE:FF"],
"dbtable": "Devices",
"columns": ["devName", "devOwner"],
"values": ["Laptop", "Alice"]
}'
```
---
### 3. `POST /dbquery/write`
Execute a **write query** (`INSERT`, `UPDATE`, `DELETE`).
#### Request Body
```json
{
"rawSql": "SU5TRVJUIElOVE8gRGV2aWNlcyAoZGV2TWFjLCBkZXYgTmFtZSwgZGV2Rmlyc3RDb25uZWN0aW9uLCBkZXZMYXN0Q29ubmVjdGlvbiwgZGV2TGFzdElQKSBWQUxVRVMgKCc2QTpCQjo0Qzo1RDo2RTonLCAnVGVzdERldmljZScsICcyMDI1LTA4LTMwIDEyOjAwOjAwJywgJzIwMjUtMDgtMzAgMTI6MDA6MDAnLCAnMTAuMC4wLjEwJyk="
}
```
Decoded SQL:
```sql
INSERT INTO Devices (devMac, devName, devFirstConnection, devLastConnection, devLastIP)
VALUES ('6A:BB:4C:5D:6E', 'TestDevice', '2025-08-30 12:00:00', '2025-08-30 12:00:00', '10.0.0.10');
```
#### Response
```json
{ "success": true, "affected_rows": 1 }
```
#### `curl` Example
```bash
curl -X POST "http://<server_ip>:<GRAPHQL_PORT>/dbquery/write" \
-H "Authorization: Bearer <API_TOKEN>" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"rawSql": "SU5TRVJUIElOVE8gRGV2aWNlcyAoZGV2TWFjLCBkZXYgTmFtZSwgZGV2Rmlyc3RDb25uZWN0aW9uLCBkZXZMYXN0Q29ubmVjdGlvbiwgZGV2TGFzdElQKSBWQUxVRVMgKCc2QTpCQjo0Qzo1RDo2RTonLCAnVGVzdERldmljZScsICcyMDI1LTA4LTMwIDEyOjAwOjAwJywgJzIwMjUtMDgtMzAgMTI6MDA6MDAnLCAnMTAuMC4wLjEwJyk="
}'
```
---
### 4. `POST /dbquery/delete`
Delete rows in a table by `columnName` + `id`.
#### Request Body
```json
{
"columnName": "devMac",
"id": ["AA:BB:CC:DD:EE:FF"],
"dbtable": "Devices"
}
```
#### Response
```json
{ "success": true, "deleted_count": 1 }
```
#### `curl` Example
```bash
curl -X POST "http://<server_ip>:<GRAPHQL_PORT>/dbquery/delete" \
-H "Authorization: Bearer <API_TOKEN>" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"columnName": "devMac",
"id": ["AA:BB:CC:DD:EE:FF"],
"dbtable": "Devices"
}'
```

233
docs/API_DEVICE.md Executable file
View File

@@ -0,0 +1,233 @@
# Device API Endpoints
Manage a **single device** by its MAC address. Operations include retrieval, updates, deletion, resetting properties, and copying data between devices. All endpoints require **authorization** via Bearer token.
---
## 1. Retrieve Device Details
* **GET** `/device/<mac>`
Fetch all details for a single device, including:
* Computed status (`devStatus`) → `On-line`, `Off-line`, or `Down`
* Session and event counts (`devSessions`, `devEvents`, `devDownAlerts`)
* Presence hours (`devPresenceHours`)
* Children devices (`devChildrenDynamic`) and NIC children (`devChildrenNicsDynamic`)
**Special case**: `mac=new` returns a template for a new device with default values.
**Response** (success):
```json
{
"devMac": "AA:BB:CC:DD:EE:FF",
"devName": "Net - Huawei",
"devOwner": "Admin",
"devType": "Router",
"devVendor": "Huawei",
"devStatus": "On-line",
"devSessions": 12,
"devEvents": 5,
"devDownAlerts": 1,
"devPresenceHours": 32,
"devChildrenDynamic": [...],
"devChildrenNicsDynamic": [...],
...
}
```
**Error Responses**:
* Device not found → HTTP 404
* Unauthorized → HTTP 403
---
## 2. Update Device Fields
* **POST** `/device/<mac>`
Create or update a device record.
**Request Body**:
```json
{
"devName": "New Device",
"devOwner": "Admin",
"createNew": true
}
```
**Behavior**:
* If `createNew=true` → creates a new device
* Otherwise → updates existing device fields
**Response**:
```json
{
"success": true
}
```
**Error Responses**:
* Unauthorized → HTTP 403
---
## 3. Delete a Device
* **DELETE** `/device/<mac>/delete`
Deletes the device with the given MAC.
**Response**:
```json
{
"success": true
}
```
**Error Responses**:
* Unauthorized → HTTP 403
---
## 4. Delete All Events for a Device
* **DELETE** `/device/<mac>/events/delete`
Removes all events associated with a device.
**Response**:
```json
{
"success": true
}
```
---
## 5. Reset Device Properties
* **POST** `/device/<mac>/reset-props`
Resets the device's custom properties to default values.
**Request Body**: Optional JSON for additional parameters.
**Response**:
```json
{
"success": true
}
```
---
## 6. Copy Device Data
* **POST** `/device/copy`
Copy all data from one device to another. If a device exists with `macTo`, it is replaced.
**Request Body**:
```json
{
"macFrom": "AA:BB:CC:DD:EE:FF",
"macTo": "11:22:33:44:55:66"
}
```
**Response**:
```json
{
"success": true,
"message": "Device copied from AA:BB:CC:DD:EE:FF to 11:22:33:44:55:66"
}
```
**Error Responses**:
* Missing `macFrom` or `macTo` → HTTP 400
* Unauthorized → HTTP 403
---
## 7. Update a Single Column
* **POST** `/device/<mac>/update-column`
Update one specific column for a device.
**Request Body**:
```json
{
"columnName": "devName",
"columnValue": "Updated Device Name"
}
```
**Response** (success):
```json
{
"success": true
}
```
**Error Responses**:
* Device not found → HTTP 404
* Missing `columnName` or `columnValue` → HTTP 400
* Unauthorized → HTTP 403
---
## Example `curl` Requests
**Get Device Details**:
```bash
curl -X GET "http://<server_ip>:<GRAPHQL_PORT>/device/AA:BB:CC:DD:EE:FF" \
-H "Authorization: Bearer <API_TOKEN>"
```
**Update Device Fields**:
```bash
curl -X POST "http://<server_ip>:<GRAPHQL_PORT>/device/AA:BB:CC:DD:EE:FF" \
-H "Authorization: Bearer <API_TOKEN>" \
-H "Content-Type: application/json" \
--data '{"devName": "New Device Name"}'
```
**Delete Device**:
```bash
curl -X DELETE "http://<server_ip>:<GRAPHQL_PORT>/device/AA:BB:CC:DD:EE:FF/delete" \
-H "Authorization: Bearer <API_TOKEN>"
```
**Copy Device Data**:
```bash
curl -X POST "http://<server_ip>:<GRAPHQL_PORT>/device/copy" \
-H "Authorization: Bearer <API_TOKEN>" \
-H "Content-Type: application/json" \
--data '{"macFrom":"AA:BB:CC:DD:EE:FF","macTo":"11:22:33:44:55:66"}'
```
**Update Single Column**:
```bash
curl -X POST "http://<server_ip>:<GRAPHQL_PORT>/device/AA:BB:CC:DD:EE:FF/update-column" \
-H "Authorization: Bearer <API_TOKEN>" \
-H "Content-Type: application/json" \
--data '{"columnName":"devName","columnValue":"Updated Device"}'
```

249
docs/API_DEVICES.md Executable file
View File

@@ -0,0 +1,249 @@
# Devices Collection API Endpoints
The Devices Collection API provides operations to **retrieve, manage, import/export, and filter devices** in bulk. All endpoints require **authorization** via Bearer token.
---
## Endpoints
### 1. Get All Devices
* **GET** `/devices`
Retrieves all devices from the database.
**Response** (success):
```json
{
"success": true,
"devices": [
{
"devName": "Net - Huawei",
"devMAC": "AA:BB:CC:DD:EE:FF",
"devIP": "192.168.1.1",
"devType": "Router",
"devFavorite": 0,
"devStatus": "online"
},
...
]
}
```
**Error Responses**:
* Unauthorized → HTTP 403
---
### 2. Delete Devices by MAC
* **DELETE** `/devices`
Deletes devices by MAC address. Supports exact matches or wildcard `*`.
**Request Body**:
```json
{
"macs": ["AA:BB:CC:DD:EE:FF", "11:22:33:*"]
}
```
**Behavior**:
* If `macs` is omitted or `null` → deletes **all devices**.
* Wildcards `*` match multiple devices.
**Response**:
```json
{
"success": true,
"deleted_count": 5
}
```
**Error Responses**:
* Unauthorized → HTTP 403
---
### 3. Delete Devices with Empty MACs
* **DELETE** `/devices/empty-macs`
Removes all devices where MAC address is null or empty.
**Response**:
```json
{
"success": true,
"deleted": 3
}
```
---
### 4. Delete Unknown Devices
* **DELETE** `/devices/unknown`
Deletes devices with names marked as `(unknown)` or `(name not found)`.
**Response**:
```json
{
"success": true,
"deleted": 2
}
```
---
### 5. Export Devices
* **GET** `/devices/export` or `/devices/export/<format>`
Exports all devices in **CSV** (default) or **JSON** format.
**Query Parameter / URL Parameter**:
* `format` (optional) → `csv` (default) or `json`
**CSV Response**:
* Returns as a downloadable CSV file: `Content-Disposition: attachment; filename=devices.csv`
**JSON Response**:
```json
{
"data": [
{ "devName": "Net - Huawei", "devMAC": "AA:BB:CC:DD:EE:FF", ... },
...
],
"columns": ["devName", "devMAC", "devIP", "devType", "devFavorite", "devStatus"]
}
```
**Error Responses**:
* Unsupported format → HTTP 400
---
### 6. Import Devices from CSV
* **POST** `/devices/import`
Imports devices from an uploaded CSV or base64-encoded CSV content.
**Request Body** (multipart file or JSON with `content` field):
```json
{
"content": "<base64-encoded CSV content>"
}
```
**Response**:
```json
{
"success": true,
"inserted": 25,
"skipped_lines": [3, 7]
}
```
**Error Responses**:
* Missing file or content → HTTP 400 / 404
* CSV malformed → HTTP 400
---
### 7. Get Device Totals
* **GET** `/devices/totals`
Returns counts of devices by various categories.
**Response**:
```json
[
120, // Total devices
85, // Connected
5, // Favorites
10, // New
8, // Down
12 // Archived
]
```
*Order: `[all, connected, favorites, new, down, archived]`*
---
### 8. Get Devices by Status
* **GET** `/devices/by-status?status=<status>`
Returns devices filtered by status.
**Query Parameter**:
* `status` → Supported values: `online`, `offline`, `down`, `archived`, `favorites`, `new`, `my`
* If omitted, returns **all devices**.
**Response** (success):
```json
[
{ "id": "AA:BB:CC:DD:EE:FF", "title": "Net - Huawei", "favorite": 0 },
{ "id": "11:22:33:44:55:66", "title": "★ USG Firewall", "favorite": 1 }
]
```
*If `devFavorite=1`, the title is prepended with a star `★`.*
---
## Example `curl` Requests
**Get All Devices**:
```sh
curl -X GET "http://<server_ip>:<GRAPHQL_PORT>/devices" \
-H "Authorization: Bearer <API_TOKEN>"
```
**Delete Devices by MAC**:
```sh
curl -X DELETE "http://<server_ip>:<GRAPHQL_PORT>/devices" \
-H "Authorization: Bearer <API_TOKEN>" \
-H "Content-Type: application/json" \
--data '{"macs":["AA:BB:CC:DD:EE:FF","11:22:33:*"]}'
```
**Export Devices CSV**:
```sh
curl -X GET "http://<server_ip>:<GRAPHQL_PORT>/devices/export?format=csv" \
-H "Authorization: Bearer <API_TOKEN>"
```
**Import Devices from CSV**:
```sh
curl -X POST "http://<server_ip>:<GRAPHQL_PORT>/devices/import" \
-H "Authorization: Bearer <API_TOKEN>" \
-F "file=@devices.csv"
```
**Get Devices by Status**:
```sh
curl -X GET "http://<server_ip>:<GRAPHQL_PORT>/devices/by-status?status=online" \
-H "Authorization: Bearer <API_TOKEN>"
```

169
docs/API_EVENTS.md Executable file
View File

@@ -0,0 +1,169 @@
# Events API Endpoints
The Events API provides access to **device event logs**, allowing creation, retrieval, deletion, and summary of events over time.
---
## Endpoints
### 1. Create Event
* **POST** `/events/create/<mac>`
Create an event for a device identified by its MAC address.
**Request Body** (JSON):
```json
{
"ip": "192.168.1.10",
"event_type": "Device Down",
"additional_info": "Optional info about the event",
"pending_alert": 1,
"event_time": "2025-08-24T12:00:00Z"
}
```
* **Parameters**:
* `ip` (string, optional): IP address of the device
* `event_type` (string, optional): Type of event (default `"Device Down"`)
* `additional_info` (string, optional): Extra information
* `pending_alert` (int, optional): 1 if alert email is pending (default 1)
* `event_time` (ISO datetime, optional): Event timestamp; defaults to current time
**Response** (JSON):
```json
{
"success": true,
"message": "Event created for 00:11:22:33:44:55"
}
```
---
### 2. Get Events
* **GET** `/events`
Retrieve all events, optionally filtered by MAC address:
```
/events?mac=<mac>
```
**Response**:
```json
{
"success": true,
"events": [
{
"eve_MAC": "00:11:22:33:44:55",
"eve_IP": "192.168.1.10",
"eve_DateTime": "2025-08-24T12:00:00Z",
"eve_EventType": "Device Down",
"eve_AdditionalInfo": "",
"eve_PendingAlertEmail": 1
}
]
}
```
---
### 3. Delete Events
* **DELETE** `/events/<mac>` → Delete events for a specific MAC
* **DELETE** `/events` → Delete **all** events
* **DELETE** `/events/<days>` → Delete events older than N days
**Response**:
```json
{
"success": true,
"message": "Deleted events older than <days> days"
}
```
---
### 4. Event Totals Over a Period
* **GET** `/sessions/totals?period=<period>`
Return event and session totals over a given period.
**Query Parameters**:
| Parameter | Description |
| --------- | -------------------------------------------------------------------------------- |
| `period` | Time period for totals, e.g., `"7 days"`, `"1 month"`, `"1 year"`, `"100 years"` |
**Sample Response** (JSON Array):
```json
[120, 85, 5, 10, 3, 7]
```
**Meaning of Values**:
1. Total events in the period
2. Total sessions
3. Missing sessions
4. Voided events (`eve_EventType LIKE 'VOIDED%'`)
5. New device events (`eve_EventType LIKE 'New Device'`)
6. Device down events (`eve_EventType LIKE 'Device Down'`)
---
## Notes
* All endpoints require **authorization** (Bearer token). Unauthorized requests return:
```json
{ "error": "Forbidden" }
```
* Events are stored in the **Events table** with the following fields:
`eve_MAC`, `eve_IP`, `eve_DateTime`, `eve_EventType`, `eve_AdditionalInfo`, `eve_PendingAlertEmail`.
* Event creation automatically logs activity for debugging.
---
## Example `curl` Requests
**Create Event**:
```sh
curl -X POST "http://<server_ip>:<GRAPHQL_PORT>/events/create/00:11:22:33:44:55" \
-H "Authorization: Bearer <API_TOKEN>" \
-H "Content-Type: application/json" \
--data '{
"ip": "192.168.1.10",
"event_type": "Device Down",
"additional_info": "Power outage",
"pending_alert": 1
}'
```
**Get Events for a Device**:
```sh
curl "http://<server_ip>:<GRAPHQL_PORT>/events?mac=00:11:22:33:44:55" \
-H "Authorization: Bearer <API_TOKEN>"
```
**Delete Events Older Than 30 Days**:
```sh
curl -X DELETE "http://<server_ip>:<GRAPHQL_PORT>/events/30" \
-H "Authorization: Bearer <API_TOKEN>"
```
**Get Event Totals for 7 Days**:
```sh
curl "http://<server_ip>:<GRAPHQL_PORT>/sessions/totals?period=7 days" \
-H "Authorization: Bearer <API_TOKEN>"
```

200
docs/API_GRAPHQL.md Executable file
View File

@@ -0,0 +1,200 @@
# GraphQL API Endpoint
GraphQL queries are **read-optimized for speed**. Data may be slightly out of date until the file system cache refreshes. The GraphQL endpoints allows you to access the following objects:
- Devices
- Settings
## Endpoints
* **GET** `/graphql`
Returns a simple status message (useful for browser or debugging).
* **POST** `/graphql`
Execute GraphQL queries against the `devicesSchema`.
---
## Devices Query
### Sample Query
```graphql
query GetDevices($options: PageQueryOptionsInput) {
devices(options: $options) {
devices {
rowid
devMac
devName
devOwner
devType
devVendor
devLastConnection
devStatus
}
count
}
}
```
### Query Parameters
| Parameter | Description |
| --------- | ------------------------------------------------------------------------------------------------------- |
| `page` | Page number of results to fetch. |
| `limit` | Number of results per page. |
| `sort` | Sorting options (`field` = field name, `order` = `asc` or `desc`). |
| `search` | Term to filter devices. |
| `status` | Filter devices by status: `my_devices`, `connected`, `favorites`, `new`, `down`, `archived`, `offline`. |
| `filters` | Additional filters (array of `{ filterColumn, filterValue }`). |
---
### `curl` Example
```sh
curl 'http://host:GRAPHQL_PORT/graphql' \
-X POST \
-H 'Authorization: Bearer API_TOKEN' \
-H 'Content-Type: application/json' \
--data '{
"query": "query GetDevices($options: PageQueryOptionsInput) { devices(options: $options) { devices { rowid devMac devName devOwner devType devVendor devLastConnection devStatus } count } }",
"variables": {
"options": {
"page": 1,
"limit": 10,
"sort": [{ "field": "devName", "order": "asc" }],
"search": "",
"status": "connected"
}
}
}'
```
---
### Sample Response
```json
{
"data": {
"devices": {
"devices": [
{
"rowid": 1,
"devMac": "00:11:22:33:44:55",
"devName": "Device 1",
"devOwner": "Owner 1",
"devType": "Type 1",
"devVendor": "Vendor 1",
"devLastConnection": "2025-01-01T00:00:00Z",
"devStatus": "connected"
}
],
"count": 1
}
}
}
```
---
## Settings Query
The **settings query** provides access to NetAlertX configuration stored in the settings table.
### Sample Query
```graphql
query GetSettings {
settings {
settings {
setKey
setName
setDescription
setType
setOptions
setGroup
setValue
setEvents
setOverriddenByEnv
}
count
}
}
```
### Schema Fields
| Field | Type | Description |
| -------------------- | ------- | ------------------------------------------------------------------------ |
| `setKey` | String | Unique key identifier for the setting. |
| `setName` | String | Human-readable name. |
| `setDescription` | String | Description or documentation of the setting. |
| `setType` | String | Data type (`string`, `int`, `bool`, `json`, etc.). |
| `setOptions` | String | Available options (for dropdown/select-type settings). |
| `setGroup` | String | Group/category the setting belongs to. |
| `setValue` | String | Current value of the setting. |
| `setEvents` | String | Events or triggers related to this setting. |
| `setOverriddenByEnv` | Boolean | Whether the setting is overridden by an environment variable at runtime. |
---
### `curl` Example
```sh
curl 'http://host:GRAPHQL_PORT/graphql' \
-X POST \
-H 'Authorization: Bearer API_TOKEN' \
-H 'Content-Type: application/json' \
--data '{
"query": "query GetSettings { settings { settings { setKey setName setDescription setType setOptions setGroup setValue setEvents setOverriddenByEnv } count } }"
}'
```
---
### Sample Response
```json
{
"data": {
"settings": {
"settings": [
{
"setKey": "UI_MY_DEVICES",
"setName": "My Devices Filter",
"setDescription": "Defines which statuses to include in the 'My Devices' view.",
"setType": "list",
"setOptions": "[\"online\",\"new\",\"down\",\"offline\",\"archived\"]",
"setGroup": "UI",
"setValue": "[\"online\",\"new\"]",
"setEvents": null,
"setOverriddenByEnv": false
},
{
"setKey": "NETWORK_DEVICE_TYPES",
"setName": "Network Device Types",
"setDescription": "Types of devices considered as network infrastructure.",
"setType": "list",
"setOptions": "[\"Router\",\"Switch\",\"AP\"]",
"setGroup": "Network",
"setValue": "[\"Router\",\"Switch\"]",
"setEvents": null,
"setOverriddenByEnv": true
}
],
"count": 2
}
}
}
```
---
## Notes
* Device and settings queries can be combined in one request since GraphQL supports batching.
* The `setOverriddenByEnv` flag helps identify setting values that are locked at container runtime.
* The schema is **read-only** — updates must be performed through other APIs or configuration management. See the other [API](API.md) endpoints for details.

103
docs/API_METRICS.md Executable file
View File

@@ -0,0 +1,103 @@
# Metrics API Endpoint
The `/metrics` endpoint exposes **Prometheus-compatible metrics** for NetAlertX, including aggregate device counts and per-device status.
---
## Endpoint Details
* **GET** `/metrics` → Returns metrics in plain text.
* **Host**: NetAlertX server
* **Port**: As configured in `GRAPHQL_PORT` (default: `20212`)
---
## Example Output
```text
netalertx_connected_devices 31
netalertx_offline_devices 54
netalertx_down_devices 0
netalertx_new_devices 0
netalertx_archived_devices 31
netalertx_favorite_devices 2
netalertx_my_devices 54
netalertx_device_status{device="Net - Huawei", mac="Internet", ip="1111.111.111.111", vendor="None", first_connection="2021-01-01 00:00:00", last_connection="2025-08-04 17:57:00", dev_type="Router", device_status="Online"} 1
netalertx_device_status{device="Net - USG", mac="74:ac:74:ac:74:ac", ip="192.168.1.1", vendor="Ubiquiti Networks Inc.", first_connection="2022-02-12 22:05:00", last_connection="2025-06-07 08:16:49", dev_type="Firewall", device_status="Archived"} 1
netalertx_device_status{device="Raspberry Pi 4 LAN", mac="74:ac:74:ac:74:74", ip="192.168.1.9", vendor="Raspberry Pi Trading Ltd", first_connection="2022-02-12 22:05:00", last_connection="2025-08-04 17:57:00", dev_type="Singleboard Computer (SBC)", device_status="Online"} 1
...
```
---
## Metrics Overview
### 1. Aggregate Device Counts
| Metric | Description |
| ----------------------------- | ---------------------------------------- |
| `netalertx_connected_devices` | Devices currently connected |
| `netalertx_offline_devices` | Devices currently offline |
| `netalertx_down_devices` | Down/unreachable devices |
| `netalertx_new_devices` | Recently detected devices |
| `netalertx_archived_devices` | Archived devices |
| `netalertx_favorite_devices` | User-marked favorites |
| `netalertx_my_devices` | Devices associated with the current user |
---
### 2. Per-Device Status
Metric: `netalertx_device_status`
Each device has labels:
* `device`: friendly name
* `mac`: MAC address (or placeholder)
* `ip`: last recorded IP
* `vendor`: manufacturer or "None"
* `first_connection`: timestamp of first detection
* `last_connection`: most recent contact
* `dev_type`: device type/category
* `device_status`: current status (`Online`, `Offline`, `Archived`, `Down`, …)
Metric value is always `1` (presence indicator).
---
## Querying with `curl`
```sh
curl 'http://<server_ip>:<GRAPHQL_PORT>/metrics' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'Accept: text/plain'
```
Replace placeholders:
* `<server_ip>` NetAlertX host IP/hostname
* `<GRAPHQL_PORT>` configured port (default `20212`)
* `<API_TOKEN>` your API token
---
## Prometheus Scraping Configuration
```yaml
scrape_configs:
- job_name: 'netalertx'
metrics_path: /metrics
scheme: http
scrape_interval: 60s
static_configs:
- targets: ['<server_ip>:<GRAPHQL_PORT>']
authorization:
type: Bearer
credentials: <API_TOKEN>
```
---
## Grafana Dashboard Template
Sample template JSON: [Download](./samples/API/Grafana_Dashboard.json)

243
docs/API_NETTOOLS.md Executable file
View File

@@ -0,0 +1,243 @@
# Net Tools API Endpoints
The Net Tools API provides **network diagnostic utilities**, including Wake-on-LAN, traceroute, speed testing, DNS resolution, nmap scanning, and internet connection information.
All endpoints require **authorization** via Bearer token.
---
## Endpoints
### 1. Wake-on-LAN
* **POST** `/nettools/wakeonlan`
Sends a Wake-on-LAN packet to wake a device.
**Request Body** (JSON):
```json
{
"devMac": "AA:BB:CC:DD:EE:FF"
}
```
**Response** (success):
```json
{
"success": true,
"message": "WOL packet sent",
"output": "Sent magic packet to AA:BB:CC:DD:EE:FF"
}
```
**Error Responses**:
* Invalid MAC address → HTTP 400
* Command failure → HTTP 500
---
### 2. Traceroute
* **POST** `/nettools/traceroute`
Performs a traceroute to a specified IP address.
**Request Body**:
```json
{
"devLastIP": "192.168.1.1"
}
```
**Response** (success):
```json
{
"success": true,
"output": "traceroute output as string"
}
```
**Error Responses**:
* Invalid IP → HTTP 400
* Traceroute command failure → HTTP 500
---
### 3. Speedtest
* **GET** `/nettools/speedtest`
Runs an internet speed test using `speedtest-cli`.
**Response** (success):
```json
{
"success": true,
"output": [
"Ping: 15 ms",
"Download: 120.5 Mbit/s",
"Upload: 22.4 Mbit/s"
]
}
```
**Error Responses**:
* Command failure → HTTP 500
---
### 4. DNS Lookup (nslookup)
* **POST** `/nettools/nslookup`
Resolves an IP address or hostname using `nslookup`.
**Request Body**:
```json
{
"devLastIP": "8.8.8.8"
}
```
**Response** (success):
```json
{
"success": true,
"output": [
"Server: 8.8.8.8",
"Address: 8.8.8.8#53",
"Name: google-public-dns-a.google.com"
]
}
```
**Error Responses**:
* Missing or invalid `devLastIP` → HTTP 400
* Command failure → HTTP 500
---
### 5. Nmap Scan
* **POST** `/nettools/nmap`
Runs an nmap scan on a target IP address or range.
**Request Body**:
```json
{
"scan": "192.168.1.0/24",
"mode": "fast"
}
```
**Supported Modes**:
| Mode | nmap Arguments |
| --------------- | -------------- |
| `fast` | `-F` |
| `normal` | default |
| `detail` | `-A` |
| `skipdiscovery` | `-Pn` |
**Response** (success):
```json
{
"success": true,
"mode": "fast",
"ip": "192.168.1.0/24",
"output": [
"Starting Nmap 7.91",
"Host 192.168.1.1 is up",
"... scan results ..."
]
}
```
**Error Responses**:
* Invalid IP → HTTP 400
* Invalid mode → HTTP 400
* Command failure → HTTP 500
---
### 6. Internet Connection Info
* **GET** `/nettools/internetinfo`
Fetches public internet connection information using `ipinfo.io`.
**Response** (success):
```json
{
"success": true,
"output": "IP: 203.0.113.5 City: Sydney Country: AU Org: Example ISP"
}
```
**Error Responses**:
* Failed request or empty response → HTTP 500
---
## Example `curl` Requests
**Wake-on-LAN**:
```sh
curl -X POST "http://<server_ip>:<GRAPHQL_PORT>/nettools/wakeonlan" \
-H "Authorization: Bearer <API_TOKEN>" \
-H "Content-Type: application/json" \
--data '{"devMac":"AA:BB:CC:DD:EE:FF"}'
```
**Traceroute**:
```sh
curl -X POST "http://<server_ip>:<GRAPHQL_PORT>/nettools/traceroute" \
-H "Authorization: Bearer <API_TOKEN>" \
-H "Content-Type: application/json" \
--data '{"devLastIP":"192.168.1.1"}'
```
**Speedtest**:
```sh
curl "http://<server_ip>:<GRAPHQL_PORT>/nettools/speedtest" \
-H "Authorization: Bearer <API_TOKEN>"
```
**Nslookup**:
```sh
curl -X POST "http://<server_ip>:<GRAPHQL_PORT>/nettools/nslookup" \
-H "Authorization: Bearer <API_TOKEN>" \
-H "Content-Type: application/json" \
--data '{"devLastIP":"8.8.8.8"}'
```
**Nmap Scan**:
```sh
curl -X POST "http://<server_ip>:<GRAPHQL_PORT>/nettools/nmap" \
-H "Authorization: Bearer <API_TOKEN>" \
-H "Content-Type: application/json" \
--data '{"scan":"192.168.1.0/24","mode":"fast"}'
```
**Internet Info**:
```sh
curl "http://<server_ip>:<GRAPHQL_PORT>/nettools/internetinfo" \
-H "Authorization: Bearer <API_TOKEN>"
```

370
docs/API_OLD.md Executable file
View File

@@ -0,0 +1,370 @@
# [Deprecated] API endpoints
> [!WARNING]
> Some of these endpoints will be deprecated soon. Please refere to the new [API](API.md) endpoints docs for details on the new API layer.
NetAlertX comes with a couple of API endpoints. All requests need to be authorized (executed in a logged in browser session) or you have to pass the value of the `API_TOKEN` settings as authorization bearer, for example:
```graphql
curl 'http://host:GRAPHQL_PORT/graphql' \
-X POST \
-H 'Authorization: Bearer API_TOKEN' \
-H 'Content-Type: application/json' \
--data '{
"query": "query GetDevices($options: PageQueryOptionsInput) { devices(options: $options) { devices { rowid devMac devName devOwner devType devVendor devLastConnection devStatus } count } }",
"variables": {
"options": {
"page": 1,
"limit": 10,
"sort": [{ "field": "devName", "order": "asc" }],
"search": "",
"status": "connected"
}
}
}'
```
## API Endpoint: GraphQL
- Endpoint URL: `php/server/query_graphql.php`
- Host: `same as front end (web ui)`
- Port: `20212` or as defined by the `GRAPHQL_PORT` setting
### Example Query to Fetch Devices
First, let's define the GraphQL query to fetch devices with pagination and sorting options.
```graphql
query GetDevices($options: PageQueryOptionsInput) {
devices(options: $options) {
devices {
rowid
devMac
devName
devOwner
devType
devVendor
devLastConnection
devStatus
}
count
}
}
```
See also: [Debugging GraphQL issues](./DEBUG_GRAPHQL.md)
### `curl` Command
You can use the following `curl` command to execute the query.
```sh
curl 'http://host:GRAPHQL_PORT/graphql' -X POST -H 'Authorization: Bearer API_TOKEN' -H 'Content-Type: application/json' --data '{
"query": "query GetDevices($options: PageQueryOptionsInput) { devices(options: $options) { devices { rowid devMac devName devOwner devType devVendor devLastConnection devStatus } count } }",
"variables": {
"options": {
"page": 1,
"limit": 10,
"sort": [{ "field": "devName", "order": "asc" }],
"search": "",
"status": "connected"
}
}
}'
```
### Explanation:
1. **GraphQL Query**:
- The `query` parameter contains the GraphQL query as a string.
- The `variables` parameter contains the input variables for the query.
2. **Query Variables**:
- `page`: Specifies the page number of results to fetch.
- `limit`: Specifies the number of results per page.
- `sort`: Specifies the sorting options, with `field` being the field to sort by and `order` being the sort order (`asc` for ascending or `desc` for descending).
- `search`: A search term to filter the devices.
- `status`: The status filter to apply (valid values are `my_devices` (determined by the `UI_MY_DEVICES` setting), `connected`, `favorites`, `new`, `down`, `archived`, `offline`).
3. **`curl` Command**:
- The `-X POST` option specifies that we are making a POST request.
- The `-H "Content-Type: application/json"` option sets the content type of the request to JSON.
- The `-d` option provides the request payload, which includes the GraphQL query and variables.
### Sample Response
The response will be in JSON format, similar to the following:
```json
{
"data": {
"devices": {
"devices": [
{
"rowid": 1,
"devMac": "00:11:22:33:44:55",
"devName": "Device 1",
"devOwner": "Owner 1",
"devType": "Type 1",
"devVendor": "Vendor 1",
"devLastConnection": "2025-01-01T00:00:00Z",
"devStatus": "connected"
},
{
"rowid": 2,
"devMac": "66:77:88:99:AA:BB",
"devName": "Device 2",
"devOwner": "Owner 2",
"devType": "Type 2",
"devVendor": "Vendor 2",
"devLastConnection": "2025-01-02T00:00:00Z",
"devStatus": "connected"
}
],
"count": 2
}
}
}
```
## API Endpoint: JSON files
This API endpoint retrieves static files, that are periodically updated.
- Endpoint URL: `php/server/query_json.php?file=<file name>`
- Host: `same as front end (web ui)`
- Port: `20211` or as defined by the $PORT docker environment variable (same as the port for the web ui)
### 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 `/app/api/` folder. You can access them via the `/php/server/query_json.php?file=user_notifications.json` endpoint.
### Available endpoints
You can access the following files:
| File name | Description |
|----------------------|----------------------|
| `notification_json_final.json` | The json version of the last notification (e.g. used for webhooks - [sample JSON](https://github.com/jokob-sk/NetAlertX/blob/main/front/report_templates/webhook_json_sample.json)). |
| `table_devices.json` | All of the available Devices detected by the app. |
| `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/NetAlertX/tree/main/docs/PLUGINS.md)|
| `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. |
| `app_state.json` | Contains the current application state. |
### 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": [
{
"devMac": "Internet",
"devName": "Net - Huawei",
"devType": "Router",
"devVendor": null,
"devGroup": "Always on",
"devFirstConnection": "2021-01-01 00:00:00",
"devLastConnection": "2021-01-28 22:22:11",
"devLastIP": "192.168.1.24",
"devStaticIP": 0,
"devPresentLastScan": 1,
"devLastNotification": "2023-01-28 22:22:28.998715",
"devIsNew": 0,
"devParentMAC": "",
"devParentPort": "",
"devIcon": "globe"
},
{
"devMac": "a4:8f:ff:aa:ba:1f",
"devName": "Net - USG",
"devType": "Firewall",
"devVendor": "Ubiquiti Inc",
"devGroup": "",
"devFirstConnection": "2021-02-12 22:05:00",
"devLastConnection": "2021-07-17 15:40:00",
"devLastIP": "192.168.1.1",
"devStaticIP": 1,
"devPresentLastScan": 1,
"devLastNotification": "2021-07-17 15:40:10.667717",
"devIsNew": 0,
"devParentMAC": "Internet",
"devParentPort": 1,
"devIcon": "shield-halved"
}
]
}
```
## API Endpoint: Prometheus Exporter
* **Endpoint URL**: `/metrics`
* **Host**: (where NetAlertX exporter is running)
* **Port**: as configured in the `GRAPHQL_PORT` setting (`20212` by default)
---
### Example Output of the `/metrics` Endpoint
Below is a representative snippet of the metrics you may find when querying the `/metrics` endpoint for `netalertx`. It includes both aggregate counters and `device_status` labels per device.
```
netalertx_connected_devices 31
netalertx_offline_devices 54
netalertx_down_devices 0
netalertx_new_devices 0
netalertx_archived_devices 31
netalertx_favorite_devices 2
netalertx_my_devices 54
netalertx_device_status{device="Net - Huawei", mac="Internet", ip="1111.111.111.111", vendor="None", first_connection="2021-01-01 00:00:00", last_connection="2025-08-04 17:57:00", dev_type="Router", device_status="Online"} 1
netalertx_device_status{device="Net - USG", mac="74:ac:74:ac:74:ac", ip="192.168.1.1", vendor="Ubiquiti Networks Inc.", first_connection="2022-02-12 22:05:00", last_connection="2025-06-07 08:16:49", dev_type="Firewall", device_status="Archived"} 1
netalertx_device_status{device="Raspberry Pi 4 LAN", mac="74:ac:74:ac:74:74", ip="192.168.1.9", vendor="Raspberry Pi Trading Ltd", first_connection="2022-02-12 22:05:00", last_connection="2025-08-04 17:57:00", dev_type="Singleboard Computer (SBC)", device_status="Online"} 1
...
```
---
### Metrics Explanation
#### 1. Aggregate Device Counts
Metric names prefixed with `netalertx_` provide aggregated counts by device status:
* `netalertx_connected_devices`: number of devices currently connected
* `netalertx_offline_devices`: devices currently offline
* `netalertx_down_devices`: down/unreachable devices
* `netalertx_new_devices`: devices recently detected
* `netalertx_archived_devices`: archived devices
* `netalertx_favorite_devices`: user-marked favorite devices
* `netalertx_my_devices`: devices associated with the current user context
These numeric values give a high-level overview of device distribution.
#### 2. PerDevice Status with Labels
Each individual device is represented by a `netalertx_device_status` metric, with descriptive labels:
* `device`: friendly name of the device
* `mac`: MAC address (or placeholder)
* `ip`: last recorded IP address
* `vendor`: manufacturer or "None" if unknown
* `first_connection`: timestamp when the device was first observed
* `last_connection`: most recent contact timestamp
* `dev_type`: device category or type
* `device_status`: current status (Online / Offline / Archived / Down / ...)
The metric value is always `1` (indicating presence or active state) and the combination of labels identifies the device.
---
### How to Query with `curl`
To fetch the metrics from the NetAlertX exporter:
```sh
curl 'http://<server_ip>:<GRAPHQL_PORT>/metrics' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'Accept: text/plain'
```
Replace:
* `<server_ip>`: IP or hostname of the NetAlertX server
* `<GRAPHQL_PORT>`: port specified in your `GRAPHQL_PORT` setting (default: `20212`)
* `<API_TOKEN>` your Bearer token from the `API_TOKEN` setting
---
### Summary
* **Endpoint**: `/metrics` provides both summary counters and per-device status entries.
* **Aggregate metrics** help monitor overall device states.
* **Detailed metrics** expose each devices metadata via labels.
* **Use case**: feed into Prometheus for scraping, monitoring, alerting, or charting dashboard views.
### Prometheus Scraping Configuration
```yaml
scrape_configs:
- job_name: 'netalertx'
metrics_path: /metrics
scheme: http
scrape_interval: 60s
static_configs:
- targets: ['<server_ip>:<GRAPHQL_PORT>']
authorization:
type: Bearer
credentials: <API_TOKEN>
```
### Grafana template
Grafana template sample: [Download json](./samples/API/Grafana_Dashboard.json)
## API Endpoint: /log files
This API endpoint retrieves files from the `/app/log` folder.
- Endpoint URL: `php/server/query_logs.php?file=<file name>`
- Host: `same as front end (web ui)`
- Port: `20211` or as defined by the $PORT docker environment variable (same as the port for the web ui)
| File | Description |
|--------------------------|---------------------------------------------------------------|
| `IP_changes.log` | Logs of IP address changes |
| `app.log` | Main application log |
| `app.php_errors.log` | PHP error log |
| `app_front.log` | Frontend application log |
| `app_nmap.log` | Logs of Nmap scan results |
| `db_is_locked.log` | Logs when the database is locked |
| `execution_queue.log` | Logs of execution queue activities |
| `plugins/` | Directory for temporary plugin-related files (not accessible) |
| `report_output.html` | HTML report output |
| `report_output.json` | JSON format report output |
| `report_output.txt` | Text format report output |
| `stderr.log` | Logs of standard error output |
| `stdout.log` | Logs of standard output |
## API Endpoint: /config files
To retrieve files from the `/app/config` folder.
- Endpoint URL: `php/server/query_config.php?file=<file name>`
- Host: `same as front end (web ui)`
- Port: `20211` or as defined by the $PORT docker environment variable (same as the port for the web ui)
| File | Description |
|--------------------------|--------------------------------------------------|
| `devices.csv` | Devices csv file |
| `app.conf` | Application config file |

32
docs/API_ONLINEHISTORY.md Executable file
View File

@@ -0,0 +1,32 @@
# Online History API Endpoints
Manage the **online history records** of devices. Currently, the API supports deletion of all history entries. All endpoints require **authorization**.
---
## 1. Delete Online History
* **DELETE** `/history`
Remove **all records** from the online history table (`Online_History`). This operation **cannot be undone**.
**Response** (success):
```json
{
"success": true,
"message": "Deleted online history"
}
```
**Error Responses**:
* Unauthorized → HTTP 403
---
### Example `curl` Request
```bash
curl -X DELETE "http://<server_ip>:<GRAPHQL_PORT>/history" \
-H "Authorization: Bearer <API_TOKEN>"
```

240
docs/API_SESSIONS.md Executable file
View File

@@ -0,0 +1,240 @@
# Sessions API Endpoints
Track and manage device connection sessions. Sessions record when a device connects or disconnects on the network.
### Create a Session
* **POST** `/sessions/create` → Create a new session for a device
**Request Body:**
```json
{
"mac": "AA:BB:CC:DD:EE:FF",
"ip": "192.168.1.10",
"start_time": "2025-08-01T10:00:00",
"end_time": "2025-08-01T12:00:00", // optional
"event_type_conn": "Connected", // optional, default "Connected"
"event_type_disc": "Disconnected" // optional, default "Disconnected"
}
```
**Response:**
```json
{
"success": true,
"message": "Session created for MAC AA:BB:CC:DD:EE:FF"
}
```
#### `curl` Example
```bash
curl -X POST "http://<server_ip>:<GRAPHQL_PORT>/sessions/create" \
-H "Authorization: Bearer <API_TOKEN>" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"mac": "AA:BB:CC:DD:EE:FF",
"ip": "192.168.1.10",
"start_time": "2025-08-01T10:00:00",
"end_time": "2025-08-01T12:00:00",
"event_type_conn": "Connected",
"event_type_disc": "Disconnected"
}'
```
---
### Delete Sessions
* **DELETE** `/sessions/delete` → Delete all sessions for a given MAC
**Request Body:**
```json
{
"mac": "AA:BB:CC:DD:EE:FF"
}
```
**Response:**
```json
{
"success": true,
"message": "Deleted sessions for MAC AA:BB:CC:DD:EE:FF"
}
```
#### `curl` Example
```bash
curl -X DELETE "http://<server_ip>:<GRAPHQL_PORT>/sessions/delete" \
-H "Authorization: Bearer <API_TOKEN>" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"mac": "AA:BB:CC:DD:EE:FF"
}'
```
---
### List Sessions
* **GET** `/sessions/list` → Retrieve sessions optionally filtered by device and date range
**Query Parameters:**
* `mac` (optional) → Filter by device MAC address
* `start_date` (optional) → Filter sessions starting from this date (`YYYY-MM-DD`)
* `end_date` (optional) → Filter sessions ending by this date (`YYYY-MM-DD`)
**Example:**
```
/sessions/list?mac=AA:BB:CC:DD:EE:FF&start_date=2025-08-01&end_date=2025-08-21
```
**Response:**
```json
{
"success": true,
"sessions": [
{
"ses_MAC": "AA:BB:CC:DD:EE:FF",
"ses_Connection": "2025-08-01 10:00",
"ses_Disconnection": "2025-08-01 12:00",
"ses_Duration": "2h 0m",
"ses_IP": "192.168.1.10",
"ses_Info": ""
}
]
}
```
#### `curl` Example
```bash
curl -X GET "http://<server_ip>:<GRAPHQL_PORT>/sessions/list?mac=AA:BB:CC:DD:EE:FF&start_date=2025-08-01&end_date=2025-08-21" \
-H "Authorization: Bearer <API_TOKEN>" \
-H "Accept: application/json"
```
---
### Calendar View of Sessions
* **GET** `/sessions/calendar` → View sessions in calendar format
**Query Parameters:**
* `start` → Start date (`YYYY-MM-DD`)
* `end` → End date (`YYYY-MM-DD`)
**Example:**
```
/sessions/calendar?start=2025-08-01&end=2025-08-21
```
**Response:**
```json
{
"success": true,
"sessions": [
{
"resourceId": "AA:BB:CC:DD:EE:FF",
"title": "",
"start": "2025-08-01T10:00:00",
"end": "2025-08-01T12:00:00",
"color": "#00a659",
"tooltip": "Connection: 2025-08-01 10:00\nDisconnection: 2025-08-01 12:00\nIP: 192.168.1.10",
"className": "no-border"
}
]
}
```
#### `curl` Example
```bash
curl -X GET "http://<server_ip>:<GRAPHQL_PORT>/sessions/calendar?start=2025-08-01&end=2025-08-21" \
-H "Authorization: Bearer <API_TOKEN>" \
-H "Accept: application/json"
```
---
### Device Sessions
* **GET** `/sessions/<mac>` → Retrieve sessions for a specific device
**Query Parameters:**
* `period` → Period to retrieve sessions (`1 day`, `7 days`, `1 month`, etc.)
Default: `1 day`
**Example:**
```
/sessions/AA:BB:CC:DD:EE:FF?period=7 days
```
**Response:**
```json
{
"success": true,
"sessions": [
{
"ses_MAC": "AA:BB:CC:DD:EE:FF",
"ses_Connection": "2025-08-01 10:00",
"ses_Disconnection": "2025-08-01 12:00",
"ses_Duration": "2h 0m",
"ses_IP": "192.168.1.10",
"ses_Info": ""
}
]
}
```
#### `curl` Example
```bash
curl -X GET "http://<server_ip>:<GRAPHQL_PORT>/sessions/AA:BB:CC:DD:EE:FF?period=7%20days" \
-H "Authorization: Bearer <API_TOKEN>" \
-H "Accept: application/json"
```
---
### Session Events Summary
* **GET** `/sessions/session-events` → Retrieve a summary of session events
**Query Parameters:**
* `type` → Event type (`all`, `sessions`, `missing`, `voided`, `new`, `down`)
Default: `all`
* `period` → Period to retrieve events (`7 days`, `1 month`, etc.)
**Example:**
```
/sessions/session-events?type=all&period=7 days
```
**Response:**
Returns a list of events or sessions with formatted connection, disconnection, duration, and IP information.
#### `curl` Example
```bash
curl -X GET "http://<server_ip>:<GRAPHQL_PORT>/sessions/session-events?type=all&period=7%20days" \
-H "Authorization: Bearer <API_TOKEN>" \
-H "Accept: application/json"
```

92
docs/API_SETTINGS.md Executable file
View File

@@ -0,0 +1,92 @@
# Settings API Endpoints
Retrieve application settings stored in the configuration system. This endpoint is useful for quickly fetching individual settings such as `API_TOKEN` or `TIMEZONE`.
For bulk or structured access (all settings, schema details, or filtering), use the [GraphQL API Endpoint](API_GRAPHQL.md).
---
### Get a Setting
* **GET** `/settings/<key>` → Retrieve the value of a specific setting
**Path Parameter:**
* `key` → The setting key to retrieve (e.g., `API_TOKEN`, `TIMEZONE`)
**Authorization:**
Requires a valid API token in the `Authorization` header.
---
#### `curl` Example (Success)
```sh
curl 'http://<server_ip>:<GRAPHQL_PORT>/settings/API_TOKEN' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'Accept: application/json'
```
**Response:**
```json
{
"success": true,
"value": "my-secret-token"
}
```
---
#### `curl` Example (Invalid Key)
```sh
curl 'http://<server_ip>:<GRAPHQL_PORT>/settings/DOES_NOT_EXIST' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'Accept: application/json'
```
**Response:**
```json
{
"success": true,
"value": null
}
```
---
#### `curl` Example (Unauthorized)
```sh
curl 'http://<server_ip>:<GRAPHQL_PORT>/settings/API_TOKEN' \
-H 'Accept: application/json'
```
**Response:**
```json
{
"error": "Forbidden"
}
```
---
### Notes
* This endpoint is optimized for **direct retrieval of a single setting**.
* For **complex retrieval scenarios** (listing all settings, retrieving schema metadata like `setName`, `setDescription`, `setType`, or checking if a setting is overridden by environment variables), use the **GraphQL Settings Query**:
```sh
curl 'http://<server_ip>:<GRAPHQL_PORT>/graphql' \
-X POST \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data '{
"query": "query GetSettings { settings { settings { setKey setName setDescription setType setOptions setGroup setValue setEvents setOverriddenByEnv } count } }"
}'
```
See the [GraphQL API Endpoint](API_GRAPHQL.md) for more details.

125
docs/API_SYNC.md Executable file
View File

@@ -0,0 +1,125 @@
# Sync API Endpoint
---
The `/sync` endpoint is used by the **SYNC plugin** to synchronize data between multiple NetAlertX instances (e.g., from a node to a hub). It supports both **GET** and **POST** requests.
#### 9.1 GET `/sync`
Fetches data from a node to the hub. The data is returned as a **base64-encoded JSON file**.
**Example Request:**
```sh
curl 'http://<server>:<GRAPHQL_PORT>/sync' \
-H 'Authorization: Bearer <API_TOKEN>'
```
**Response Example:**
```json
{
"node_name": "NODE-01",
"status": 200,
"message": "OK",
"data_base64": "eyJkZXZpY2VzIjogW3siZGV2TWFjIjogIjAwOjExOjIyOjMzOjQ0OjU1IiwiZGV2TmFtZSI6ICJEZXZpY2UgMSJ9XSwgImNvdW50Ijog1fQ==",
"timestamp": "2025-08-24T10:15:00+10:00"
}
```
**Notes:**
* `data_base64` contains the full JSON data encoded in Base64.
* `node_name` corresponds to the `SYNC_node_name` setting on the node.
* Errors (e.g., missing file) return HTTP 500 with an error message.
---
#### 9.2 POST `/sync`
The **POST** endpoint is used by nodes to **send data to the hub**. The hub expects the data as **form-encoded fields** (application/x-www-form-urlencoded or multipart/form-data). The hub then stores the data in the plugin log folder for processing.
#### Required Fields
| Field | Type | Description |
| ----------- | ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `data` | string | The payload from the plugin or devices. Typically **plain text**, **JSON**, or **encrypted Base64** data. In your Python script, `encrypt_data()` is applied before sending. |
| `node_name` | string | The name of the node sending the data. Matches the nodes `SYNC_node_name` setting. Used to generate the filename on the hub. |
| `plugin` | string | The name of the plugin sending the data. Determines the filename prefix (`last_result.<plugin>...`). |
| `file_path` | string (optional) | Path of the local file being sent. Used only for logging/debugging purposes on the hub; **not required for processing**. |
---
### How the Hub Processes the POST Data
1. **Receives the data** and validates the API token.
2. **Stores the raw payload** in:
```
INSTALL_PATH/log/plugins/last_result.<plugin>.encoded.<node_name>.<sequence>.log
```
* `<plugin>` → plugin name from the POST request.
* `<node_name>` → node name from the POST request.
* `<sequence>` → incremented number for each submission.
3. **Decodes / decrypts the data** if necessary (Base64 or encrypted) before processing.
4. **Processes JSON payloads** (e.g., device info) to:
* Avoid duplicates by tracking `devMac`.
* Add metadata like `devSyncHubNode`.
* Insert new devices into the database.
5. **Renames files** to indicate they have been processed:
```
processed_last_result.<plugin>.<node_name>.<sequence>.log
```
---
### Example POST Payload
If a node is sending device data:
```bash
curl -X POST 'http://<hub>:<PORT>/sync' \
-H 'Authorization: Bearer <API_TOKEN>' \
-F 'data={"data":[{"devMac":"00:11:22:33:44:55","devName":"Device 1","devVendor":"Vendor A","devLastIP":"192.168.1.10"}]}' \
-F 'node_name=NODE-01' \
-F 'plugin=SYNC'
```
* The `data` field contains JSON with a **`data` array**, where each element is a **device object** or **plugin data object**.
* The `plugin` and `node_name` fields allow the hub to **organize and store the file correctly**.
* The data is only processed if the relevant plugins are enabled and run on the target server.
---
### Key Notes
* **Always use the same `plugin` and `node_name` values** for consistent storage.
* **Encrypted data**: The Python script uses `encrypt_data()` before sending, and the hub decodes it before processing.
* **Sequence numbers**: Every submission generates a new sequence, preventing overwriting previous data.
* **Form-encoded**: The hub expects `multipart/form-data` (cURL `-F`) or `application/x-www-form-urlencoded`.
**Storage Details:**
* Data is stored under `INSTALL_PATH/log/plugins` with filenames following the pattern:
```
last_result.<plugin>.encoded.<node_name>.<sequence>.log
```
* Both encoded and decoded files are tracked, and new submissions increment the sequence number.
* If storing fails, the API returns HTTP 500 with an error message.
* The data is only processed if the relevant plugins are enabled and run on the target server.
---
#### 9.3 Notes and Best Practices
* **Authorization Required** Both GET and POST require a valid API token.
* **Data Integrity** Ensure that `node_name` and `plugin` are consistent to avoid overwriting files.
* **Monitoring** Notifications are generated whenever data is sent or received (`write_notification`), which can be used for alerting or auditing.
* **Use Case** Typically used in multi-node deployments to consolidate device and event data on a central hub.

12
docs/API_TESTS.md Executable file
View File

@@ -0,0 +1,12 @@
### Unit Tests
>[!WARNING]
> Please note these test modify data in the database.
1. See the `/test` directory for available test cases. These are not exhaustive but cover the main API endpoints.
2. To run a test case, SSH into the container:
`sudo docker exec -it netalertx /bin/bash`
3. Inside the container, install pytest (if not already installed):
`pip install pytest`
4. Run a specific test case:
`pytest /app/test/TESTFILE.py`

View File

@@ -39,6 +39,8 @@
| `devSourcePlugin` | Source plugin that discovered the device. | `ARPSCAN` | | `devSourcePlugin` | Source plugin that discovered the device. | `ARPSCAN` |
| `devCustomProps` | [Custom properties](./CUSTOM_PROPERTIES.md) related to the device. The value is a base64-encoded JSON object. | `PHN2ZyB...` | | `devCustomProps` | [Custom properties](./CUSTOM_PROPERTIES.md) related to the device. The value is a base64-encoded JSON object. | `PHN2ZyB...` |
| `devFQDN` | Fully qualified domain name. | `raspberrypi.local` | | `devFQDN` | Fully qualified domain name. | `raspberrypi.local` |
| `devParentRelType` | The type of relationship between the current device and it's parent node. By default, selecting `nic` will hide it from lists. | `nic` |
| `devReqNicsOnline` | If all NICs are required to be online to mark teh current device online. | `0` |
To understand how values of these fields influuence application behavior, such as Notifications or Network topology, see also: To understand how values of these fields influuence application behavior, such as Notifications or Network topology, see also:

View File

@@ -10,7 +10,7 @@ Check the the HTTP response of the failing backend call by following these steps
- 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): - 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://<NetAlertX URL>:20211/api/table_devices.json?nocache=1704141103121` - `http://<NetAlertX URL>:20211/api/table_devices.json?nocache=1704141103121`
- `http://<NetAlertX URL>:20211/php/server/devices.php?action=getDevicesTotals` - `http://<NetAlertX URL>:20211/php/server/devices.php?action=getDevicesTotals`
- `http://<NetAlertX 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. - 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.

34
docs/DEBUG_PHP.md Executable file
View File

@@ -0,0 +1,34 @@
# Debugging backend PHP issues
## Logs in UI
![Logs UI](./img/DEBUG/maintenance_debug_php.png)
You can view recent backend PHP errors directly in the **Maintenance > Logs** section of the UI. This provides quick access to logs without needing terminal access.
## Accessing logs directly
Sometimes, the UI might not be accessible. In that case, you can access the logs directly inside the container.
### Step-by-step:
1. **Open a shell into the container:**
```bash
docker exec -it netalertx /bin/sh
```
2. **Check the NGINX error log:**
```bash
cat /var/log/nginx/error.log
```
3. **Check the PHP application error log:**
```bash
cat /app/log/app.php_errors.log
```
These logs will help identify syntax issues, fatal errors, or startup problems when the UI fails to load properly.

114
docs/DEVICE_HEURISTICS.md Executable file
View File

@@ -0,0 +1,114 @@
# Device Heuristics: Icon and Type Guessing
This module is responsible for inferring the most likely **device type** and **icon** based on minimal identifying data like MAC address, vendor, IP, or device name.
It does this using a set of heuristics defined in an external JSON rules file, which it evaluates **in priority order**.
>[!NOTE]
> You can find the full source code of the heuristics module in the `device_heuristics.py` file.
---
## JSON Rule Format
Rules are defined in a file called `device_heuristics_rules.json` (located under `/back`), structured like:
```json
[
{
"dev_type": "Phone",
"icon_html": "<i class=\"fa-brands fa-apple\"></i>",
"matching_pattern": [
{ "mac_prefix": "001A79", "vendor": "Apple" }
],
"name_pattern": ["iphone", "pixel"]
}
]
```
>[!NOTE]
> Feel free to raise a PR in case you'd like to add any rules into the `device_heuristics_rules.json` file. Please place new rules into the correct position and consider the priority of already available rules.
### Supported fields:
| Field | Type | Description |
| ------------------ | -------------------- | --------------------------------------------------------------- |
| `dev_type` | `string` | Type to assign if rule matches (e.g. `"Gateway"`, `"Phone"`) |
| `icon_html` | `string` | Icon (HTML string) to assign if rule matches. Encoded to base64 at load time. |
| `matching_pattern` | `array` | List of `{ mac_prefix, vendor }` objects for first strict and then loose matching |
| `name_pattern` | `array` *(optional)* | List of lowercase substrings (used with regex) |
| `ip_pattern` | `array` *(optional)* | Regex patterns to match IPs |
**Order in this array defines priority** — rules are checked top-down and short-circuit on first match.
---
## Matching Flow (in Priority Order)
The function `guess_device_attributes(...)` runs a series of matching functions in strict order:
1. MAC + Vendor → `match_mac_and_vendor()`
2. Vendor only → `match_vendor()`
3. Name pattern → `match_name()`
4. IP pattern → `match_ip()`
5. Final fallback → defaults defined in the `NEWDEV_devIcon` and `NEWDEV_devType` settings.
> [!NOTE]
> The app will try guessing the device type or icon if `devType` or `devIcon` are `""` or `"null"`.
### Use of default values
The guessing process runs for every device **as long as the current type or icon still matches the default values**. Even if earlier heuristics return a match, the system continues evaluating additional clues — like name or IP — to try and replace placeholders.
```python
# Still considered a match attempt if current values are defaults
if (not type_ or type_ == default_type) or (not icon or icon == default_icon):
type_, icon = match_ip(ip, default_type, default_icon)
```
In other words: if the type or icon is still `"unknown"` (or matches the default), the system assumes the match isnt final — and keeps looking. It stops only when both values are non-default (defaults are defined in the `NEWDEV_devIcon` and `NEWDEV_devType` settings).
---
## Match Behavior (per function)
These functions are executed in the following order:
### `match_mac_and_vendor(mac_clean, vendor, ...)`
* Looks for MAC prefix **and** vendor substring match
* Most precise
* Stops as soon as a match is found
### `match_vendor(vendor, ...)`
* Falls back to substring match on vendor only
* Ignores rules where `mac_prefix` is present (ensures this is really a fallback)
### `match_name(name, ...)`
* Lowercase name is compared against all `name_pattern` values using regex
* Good for user-assigned labels (e.g. "AP Office", "iPhone")
### `match_ip(ip, ...)`
* If IP is present and matches regex patterns under any rule, it returns that type/icon
* Usually used for gateways or local IP ranges
---
## Icons
* Each rule can define an `icon_html`, which is converted to a `icon_base64` on load
* If missing, it falls back to the passed-in `default_icon` (`NEWDEV_devIcon` setting)
* If a match is found but icon is still blank, default is used
**TL;DR:** Type and icon must both be matched. If only one is matched, the other falls back to the default.
---
## Priority Mechanics
* JSON rules are evaluated **top-to-bottom**
* Matching is **first-hit wins** — no scoring, no weights
* Rules that are more specific (e.g. exact MAC prefixes) should be listed earlier

View File

@@ -1,32 +1,42 @@
# Development environment set up # Development Environment Setup
>[!NOTE] I truly appreciate all contributions! To help keep this project maintainable, this guide provides an overview of project priorities, key design considerations, and overall philosophy. It also includes instructions for setting up your environment so you can start contributing right away.
> Replace `/development` with the path where your code files will be stored. The default container name is `netalertx` so there might be a conflict with your running containers.
## Development Guidelines ## Development Guidelines
Before starting development, please scan the below development guidelines. Before starting development, please review the following guidelines.
### Priority Order (Highest to Lowest) ### Priority Order (Highest to Lowest)
1. 🔼 Fixing core bugs that lack workarounds. 1. 🔼 Fixing core bugs that lack workarounds
2. 🔵 Adding core functionality that unlocks other features (e.g., plugins). 2. 🔵 Adding core functionality that unlocks other features (e.g., plugins)
3. 🔵 Refactoring to enable faster development. 3. 🔵 Refactoring to enable faster development
4. 🔽 UI improvements (PRs welcome). 4. 🔽 UI improvements (PRs welcome, but low priority)
### Design Philosophy ### Design Philosophy
Focus on core functionality and integrate with existing tools rather than reinventing the wheel. The application architecture is designed for extensibility and maintainability. It relies heavily on configuration manifests via plugins and settings to dynamically build the UI and populate the application with data from various sources.
Examples:
- Using **Apprise** for notifications instead of implementing multiple separate gateways. For details, see:
- Implementing **regex-based validation** instead of one-off validation for each setting. - [Plugins Development](PLUGINS_DEV.md) (includes video)
- [Settings System](SETTINGS_SYSTEM.md)
> [!NOTE] Focus on **core functionality** and integrate with existing tools rather than reinventing the wheel.
> UI changes have lower priority, however, PRs are welcome, but **keep them small & focused**.
Examples:
- Using **Apprise** for notifications instead of implementing multiple separate gateways
- Implementing **regex-based validation** instead of one-off validation for each setting
> [!NOTE]
> UI changes have lower priority. PRs are welcome, but please keep them **small and focused**.
## Development Environment Set Up ## Development Environment Set Up
The following steps will guide you to set up your environment for local development and to run a custom docker build on your system. For most changes the container doesn't need to be rebuild which speeds up the development significantly.
>[!NOTE]
> Replace `/development` with the path where your code files will be stored. The default container name is `netalertx` so there might be a conflict with your running containers.
### 1. Download the code: ### 1. Download the code:
- `mkdir /development` - `mkdir /development`
@@ -91,7 +101,7 @@ Most code changes can be tested without rebuilding the container. When working o
- `sudo docker exec -it netalertx /bin/bash` - `sudo docker exec -it netalertx /bin/bash`
- `pkill -f "python /app/server" && python /app/server & ` - `pkill -f "python /app/server" && python /app/server & `
3. If none of the above work, restart the docker caontainer. 3. If none of the above work, restart the docker container.
- This is usually the last resort as sometimes the Docker engine becomes unresponsive and the whole engine needs to be restarted. - This is usually the last resort as sometimes the Docker engine becomes unresponsive and the whole engine needs to be restarted.
@@ -119,3 +129,6 @@ Most code changes can be tested without rebuilding the container. When working o
- Updating a Device - Updating a Device
- Plugin functionality. - Plugin functionality.
- Error log inspection. - Error log inspection.
> [!NOTE]
> Always run all available tests as per the [Testing documentation](API_TESTS.md).

View File

@@ -69,7 +69,7 @@ services:
network_mode: "host" network_mode: "host"
restart: unless-stopped restart: unless-stopped
volumes: volumes:
- ${APP_DATA_LOCATION}/netalertx/config:/app/config - ${APP_CONFIG_LOCATION}/netalertx/config:/app/config
- ${APP_DATA_LOCATION}/netalertx/db/:/app/db/ - ${APP_DATA_LOCATION}/netalertx/db/:/app/db/
# (optional) useful for debugging if you have issues setting up the container # (optional) useful for debugging if you have issues setting up the container
- ${LOGS_LOCATION}:/app/log - ${LOGS_LOCATION}:/app/log
@@ -137,3 +137,67 @@ networks:
``` ```
### Example 5: same as 3 but with a top-level root directory; also works in Portainer as-is
`docker-compose.yml`
```yaml
services:
netalertx:
container_name: netalertx
# use the below line if you want to test the latest dev image instead of the stable release
# image: "ghcr.io/jokob-sk/netalertx-dev:latest"
image: "ghcr.io/jokob-sk/netalertx:latest"
network_mode: "host"
restart: unless-stopped
volumes:
- ${APP_FOLDER}/netalertx/config:/app/config
- ${APP_FOLDER}/netalertx/db:/app/db
# (optional) useful for debugging if you have issues setting up the container
- ${APP_FOLDER}/netalertx/log:/app/log
# (API: OPTION 1) default -> use for performance
- type: tmpfs
target: /app/api
# (API: OPTION 2) use when debugging issues
# - ${APP_FOLDER}/netalertx/api:/app/api
environment:
- TZ=${TZ}
- PORT=${PORT}
- PUID=${PUID}
- PGID=${PGID}
- LISTEN_ADDR=${LISTEN_ADDR}
```
`.env` file
```yaml
APP_FOLDER=/path/to/local/NetAlertX/location
#ENVIRONMENT VARIABLES
PUID=200
PGID=300
TZ=America/New_York
LISTEN_ADDR=0.0.0.0
PORT=20211
#GLOBAL PATH VARIABLE
# you may want to create a dedicated user and group to run the container with
# sudo groupadd -g 300 nax-g
# sudo useradd -u 200 -g 300 nax-u
# mkdir -p $APP_FOLDER/{db,config,log}
# chown -R 200:300 $APP_FOLDER
# chmod -R 775 $APP_FOLDER
# DEVELOPMENT VARIABLES
# you can create multiple env files called .env.dev1, .env.dev2 etc and use them by running:
# docker compose --env-file .env.dev1 up -d
# you can then clone multiple dev copies of NetAlertX just make sure to change the APP_FOLDER and PORT variables in each .env.devX file
```
To run the container execute: `sudo docker-compose --env-file /path/to/.env up`

97
docs/DOCKER_PORTAINER.md Executable file
View File

@@ -0,0 +1,97 @@
# Deploying NetAlertX in Portainer (via Stacks)
This guide shows you how to set up **NetAlertX** using Portainers **Stacks** feature.
![Portainer > Stacks](./img/DOCKER/DOCKER_PORTAINER.png)
---
## 1. Prepare Your Host
Before deploying, make sure you have a folder on your Docker host for NetAlertX data. Replace `APP_FOLDER` with your preferred location, for example `/opt` here:
```bash
mkdir -p /opt/netalertx/config
mkdir -p /opt/netalertx/db
mkdir -p /opt/netalertx/log
```
---
## 2. Open Portainer Stacks
1. Log in to your **Portainer UI**.
2. Navigate to **Stacks****Add stack**.
3. Give your stack a name (e.g., `netalertx`).
---
## 3. Paste the Stack Configuration
Copy and paste the following YAML into the **Web editor**:
```yaml
services:
netalertx:
container_name: netalertx
# Use this line for stable release
image: "ghcr.io/jokob-sk/netalertx:latest"
# Or, use this for the latest development build
# image: "ghcr.io/jokob-sk/netalertx-dev:latest"
network_mode: "host"
restart: unless-stopped
volumes:
- ${APP_FOLDER}/netalertx/config:/app/config
- ${APP_FOLDER}/netalertx/db:/app/db
# Optional: logs (useful for debugging setup issues, comment out for performance)
- ${APP_FOLDER}/netalertx/log:/app/log
# API storage options:
# (Option 1) tmpfs (default, best performance)
- type: tmpfs
target: /app/api
# (Option 2) bind mount (useful for debugging)
# - ${APP_FOLDER}/netalertx/api:/app/api
environment:
- TZ=${TZ}
- PORT=${PORT}
- APP_CONF_OVERRIDE=${APP_CONF_OVERRIDE}
```
---
## 4. Configure Environment Variables
In the **Environment variables** section of Portainer, add the following:
* `APP_FOLDER=/opt` (or wherever you created the directories in step 1)
* `TZ=Europe/Berlin` (replace with your timezone)
* `PORT=22022` (or another port if needed)
* `APP_CONF_OVERRIDE={"GRAPHQL_PORT":"22023"}` (optional advanced settings)
---
## 5. Deploy the Stack
1. Scroll down and click **Deploy the stack**.
2. Portainer will pull the image and start NetAlertX.
3. Once running, access the app at:
```
http://<your-docker-host-ip>:22022
```
---
## 6. Verify and Troubleshoot
* Check logs via Portainer → **Containers**`netalertx`**Logs**.
* Logs are stored under `${APP_FOLDER}/netalertx/log` if you enabled that volume.
Once the application is running, configure it by reading the [initial setup](INITIAL_SETUP.md) guide, or [troubleshoot common issues](COMMON_ISSUES.md).

View File

@@ -5,7 +5,7 @@ To download and install NetAlertX on the hardware/server directly use the `curl`
> [!NOTE] > [!NOTE]
> This is an Experimental feature 🧪 and it relies on community support. > This is an Experimental feature 🧪 and it relies on community support.
> >
> 🙏 Looking for maintainers for this installation method 🙂 Curent community volunteers: > 🙏 Looking for maintainers for this installation method 🙂 Current community volunteers:
> - [slammingprogramming](https://github.com/slammingprogramming) > - [slammingprogramming](https://github.com/slammingprogramming)
> >
> There is no guarantee that the install script or any other script will gracefully handle other installed software. > There is no guarantee that the install script or any other script will gracefully handle other installed software.

View File

@@ -1,63 +1,110 @@
## How to setup your Network page ## How to Set Up 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) set to a network device type (e.g.: **Type**:`Router`). The **Network** page lets you map how devices connect — visually and logically.
Its especially useful for planning infrastructure, assigning parent-child relationships, and spotting gaps.
> 💡 Tip: You can add dummy devices via the [Create dummy device](./DEVICE_MANAGEMENT.md#dummy-devices) button in the Devices listing page. ![Network tree details](./img/NETWORK_TREE/Network_Sample.png)
> 💡 Tip: Export your configuration of the Network and Devices once in a while via the Export CSV feature under **Maintenance** -> **Backup/Restore** -> **CSV Export**. To get started, youll need to define at least one root node and mark certain devices as network nodes (like Switches or Routers).
## ⚡Quick setup: ---
* Go to a Device you want to use as network device (network nodes, such as a Switch). Start by creating a root device with the MAC address `Internet`, if the application didnt create one already.
* 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 (you can create a custom network type device with in Settings -> General -> `NETWORK_DEVICE_TYPES`). This special MAC address (`Internet`) is required for the root network node — no other value is currently supported.
* 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. Set its **Type** to a valid network type — such as `Router` or `Gateway`.
* You can now assign the Unassigend devices to the network node.
* If port is empty or 0 a wifi icon is rendered, otherwise a ethernet port icon.
> [!TIP]
> If you dont have one, use the [Create new device](./DEVICE_MANAGEMENT.md#dummy-devices) button on the **Devices** page to add a root device.
> [!NOTE] ---
>
> [Bulk-edit devices](./DEVICES_BULK_EDITING.md) by using the _CSV Export_ functionality in the _Maintenance_ section. You can use this to fix `Internet` node assignment issues.
## 🔍Detailed example: ## ⚡ Quick Setup
In this example you will setup a device named `rapberrypi` as a `Switch` in our network. 1. Open the device you want to use as a network node (e.g. a Switch).
2. Set its **Type** to one of the following:
`AP`, `Firewall`, `Gateway`, `PLC`, `Powerline`, `Router`, `Switch`, `USB LAN Adapter`, `USB WIFI Adapter`, `WLAN`
*(Or add custom types under **Settings → General → `NETWORK_DEVICE_TYPES`**.)*
3. Save the device.
4. Go to the **Network** page — supported device types will appear as tabs.
5. Use the **Assign** button to connect unassigned devices to a network node.
6. If the **Port** is `0` or empty, a Wi-Fi icon is shown. Otherwise, an Ethernet icon appears.
### 1. Device details page > [!NOTE]
> Use [bulk editing](./DEVICES_BULK_EDITING.md) with _CSV Export_ to fix `Internet` root assignments or update many devices at once.
- Go to the `Devices` (1) page: ---
![Device details](./img/NETWORK_TREE/Device_Details_Network_Type.png) ## Example: Setting up a `raspberrypi` as a Switch
- In the (2) `Details` tab navigate to the the `Type` (3) dropdown and select the type `Switch` (4). Lets walk through setting up a device named `raspberrypi` to act as a network Switch that other devices connect through.
> 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. Custom types can be added via the `NETWORK_DEVICE_TYPES` setting.
- 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). ### 1. Set Device Type and Parent
- Save your changes (7) - Go to the **Devices** page
- Open the device detail view for `raspberrypi`
- In the **Type** dropdown, select `Switch`
### 2. Network page ![Device details](./img/NETWORK_TREE/Network_Device_Details.png)
- Navigate to your `Network` (1) page: - Optionally assign a **Parent Node** (where this device connects to) and the **Relationship type** of the connection.
The `nic` relationship type can affect parent notifications — see the setting description and [Notifications documentation](./NOTIFICATIONS.md) for more.
![Network page](./img/NETWORK_TREE/Network_Page.png) ![Device details](./img/NETWORK_TREE/Network_Device_Details_Parent.png)
- Notice the newly added `raspberrypi` (2) tab which now represents a network node, also showing up in the tree (3). > [!NOTE]
- 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) > Only certain device types can act as network nodes:
- We can now assign the device `(AppleTV)` (5) to this `raspberrypi` node, representing a network Switch in this example > `AP`, `Firewall`, `Gateway`, `Hypervisor`, `PLC`, `Powerline`, `Router`, `Switch`, `USB LAN Adapter`, `USB WIFI Adapter`, `WLAN`
> You can add custom types via the `NETWORK_DEVICE_TYPES` setting.
### 3. Network page with 2 levels - Click **Save**
- After clicking the `Assign` button in the previous section, the `(AppleTV)` (1) device is now connected to our `raspberrypi` (2). ---
![Network page with 2 levels](./img/NETWORK_TREE/Network_Page_2_Levels.png) ### 2. Confirm The Device Appears as a Network Node
- You can see the `raspberrypi` represents the Network node type `Switch` (3) You can confirm that `raspberrypi` now acts as a network device in two places:
- 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.
- Navigate to a different device and verify that `raspberrypi` now appears as an option for a **Parent Node**:
![Parent Node dropdown](./img/NETWORK_TREE/Network_Device_ParentDropdown.png)
- Go to the **Network** page — you'll now see a `raspberrypi` tab, meaning it's recognized as a network node (Switch):
![Network page](./img/NETWORK_TREE/Network_Assign.png)
- You can now assign other devices to it.
---
### 3. Assign Connected Devices
- Use the **Assign** button to link other devices (e.g. PCs) to `raspberrypi`.
- After assigning, connected devices will appear beneath the `raspberrypi` switch node.
![Assigned nodes](./img/NETWORK_TREE/Network_Assigned_Nodes.png)
- Relationship lines may vary in color based on the selected Relationship type. These are editable on the device details page where you can also assign a parent node.
![Hover detail](./img/NETWORK_TREE/Network_tree_setup_hover.png)
> Hovering over devices in the tree reveals connection details and tooltips for quick inspection.
> [!NOTE]
> Selecting certain relationship types hides the device in the default device views.
> You can change this behavior by adjusting the `UI_hide_rel_types` setting, which by default is set to `["nic","virtual"]`.
> This means devices with `devParentRelType` set to `nic` or `virtual` will not be shown.
> All devices, regardless of relationship type, are always accessible in the **All devices** view.
---
## ✅ Summary
To configure devices on the **Network** page:
- Ensure a device with MAC `Internet` is set up as the root
- Assign valid **Type** values to switches, routers, and other supported nodes that represent network devices
- Use the **Assign** button to connect devices logically to their parent node
Need to reset or undo changes? [Use backups](./BACKUPS.md) or [bulk editing](./DEVICES_BULK_EDITING.md) to manage devices at scale. You can also automate device assignment with [Workflows](./WORKFLOWS.md).

View File

@@ -15,11 +15,12 @@ There are 4 ways how to influence notifications:
![Device notification settings](./img/NOTIFICATIONS/Device-notification-settings.png) ![Device notification settings](./img/NOTIFICATIONS/Device-notification-settings.png)
There are 4 settings on the device for influencing notifications. You can: The following device properties influence notifications. You can:
1. **Alert Events** - Enables alerts of connections, disconnections, IP changes (down and down reconnected notifications are still sent even if this is disabled). 1. **Alert Events** - Enables alerts of connections, disconnections, IP changes (down and down reconnected notifications are still sent even if this is disabled).
2. **Alert Down** - Alerts when a device goes down. This setting overrides a disabled **Alert Events** setting, so you will get a notification of a device going down even if you don't have **Alert Events** ticked. Disabling this will disable down and down reconnected notifications on the device. 2. **Alert Down** - Alerts when a device goes down. This setting overrides a disabled **Alert Events** setting, so you will get a notification of a device going down even if you don't have **Alert Events** ticked. Disabling this will disable down and down reconnected notifications on the device.
3. **Skip repeated notifications**, if for example you know there is a temporary issue and want to pause the same notification for this device for a given time. 3. **Skip repeated notifications**, if for example you know there is a temporary issue and want to pause the same notification for this device for a given time.
4. **Require NICs Online** - Indicates whether this device should be considered online only if all associated NICs (devices with the `nic` relationship type) are online. If disabled, the device is considered online if any NIC is online. If a NIC is online it sets the parent (this) device's status to online irrespectivelly of the detected device's status. The Relationship type is set on the childern device.
> [!NOTE] > [!NOTE]
> Please read through the [NTFPRCS plugin](https://github.com/jokob-sk/NetAlertX/blob/main/front/plugins/notification_processing/README.md) documentation to understand how device and global settings influence the notification processing. > Please read through the [NTFPRCS plugin](https://github.com/jokob-sk/NetAlertX/blob/main/front/plugins/notification_processing/README.md) documentation to understand how device and global settings influence the notification processing.

View File

@@ -43,51 +43,51 @@ NetAlertX supports additional plugins to extend its functionality, each with its
Device-detecting plugins insert values into the `CurrentScan` database table. The plugins that are not required are safe to ignore, however, it makes sense to have at least some device-detecting plugins enabled, such as `ARPSCAN` or `NMAPDEV`. Device-detecting plugins insert values into the `CurrentScan` database table. The plugins that are not required are safe to ignore, however, it makes sense to have at least some device-detecting plugins enabled, such as `ARPSCAN` or `NMAPDEV`.
| ID | Plugin docs | Type | Description | Features | Required |
| ID | Type | Description | Features | Required | Data source | Detailed docs | | --------------- | ------------------------------------------------------------------------------------------------------------------ | -------- | ----------------------------------------- | -------- | -------- |
|---------------|---------|--------------------------------------------|----------|----------|--------------|---------------------------------------------------------------------| | `APPRISE` | [_publisher_apprise](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/_publisher_apprise/) | ▶️ | Apprise notification proxy | | |
| `APPRISE` | ▶️ | Apprise notification proxy | | | Script | [_publisher_apprise](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/_publisher_apprise/) | | `ARPSCAN` | [arp_scan](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/arp_scan/) | 🔍 | ARP-scan on current network | | |
| `ARPSCAN` | 🔍 | ARP-scan on current network | | | Script | [arp_scan](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/arp_scan/) | | `AVAHISCAN` | [avahi_scan](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/avahi_scan/) | 🆎 | Avahi (mDNS-based) name resolution | | |
| `AVAHISCAN` | 🆎 | Avahi (mDNS-based) name resolution | | | Script | [avahi_scan](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/avahi_scan/) | | `ASUSWRT` | [asuswrt_import](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/asuswrt_import/) | 🔍 | Import connected devices from AsusWRT | | |
| `ASUSWRT` | 🔍 | Import connected devices from AsusWRT | | | Script | [asuswrt_import](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/asuswrt_import/) | | `CSVBCKP` | [csv_backup](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/csv_backup/) | ⚙ | CSV devices backup | | |
| `CSVBCKP` | ⚙ | CSV devices backup | | | Script | [csv_backup](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/csv_backup/) | | `CUSTPROP` | [custom_props](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/custom_props/) | ⚙ | Managing custom device properties values | | Yes |
| `CUSTPROP` | ⚙ | Managing custom device properties values | | Yes | Template | [custom_props](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/custom_props/) | | `DBCLNP` | [db_cleanup](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/db_cleanup/) | ⚙ | Database cleanup | | Yes\* |
| `DBCLNP` | ⚙ | Database cleanup | | Yes* | Script | [db_cleanup](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/db_cleanup/) | | `DDNS` | [ddns_update](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/ddns_update/) | ⚙ | DDNS update | | |
| `DDNS` | ⚙ | DDNS update | | | Script | [ddns_update](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/ddns_update/) | | `DHCPLSS` | [dhcp_leases](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/dhcp_leases/) | 🔍/📥/🆎 | Import devices from DHCP leases | | |
| `DHCPLSS` | 🔍/📥/🆎| Import devices from DHCP leases | | | Script | [dhcp_leases](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/dhcp_leases/) | | `DHCPSRVS` | [dhcp_servers](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/dhcp_servers/) | ♻ | DHCP servers | | |
| `DHCPSRVS` | ♻ | DHCP servers | | | Script | [dhcp_servers](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/dhcp_servers/) | | `DIGSCAN` | [dig_scan](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/dig_scan/) | 🆎 | Dig (DNS) Name resolution | | |
| `DIGSCAN` | 🆎 | Dig (DNS) Name resolution | | | Script | [dig_scan](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/dig_scan/) | | `FREEBOX` | [freebox](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/freebox/) | 🔍/♻/🆎 | Pull data and names from Freebox/Iliadbox | | |
| `FREEBOX` | 🔍/♻/🆎| Pull data and names from Freebox/Iliadbox | | | Script | [freebox](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/freebox/) | | `ICMP` | [icmp_scan](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/icmp_scan/) | ♻ | ICMP (ping) status checker | | |
| `ICMP` | ♻ | ICMP (ping) status checker | | | Script | [icmp_scan](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/icmp_scan/) | | `INTRNT` | [internet_ip](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/internet_ip/) | 🔍 | Internet IP scanner | | |
| `INTRNT` | 🔍 | Internet IP scanner | | | Script | [internet_ip](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/internet_ip/) | | `INTRSPD` | [internet_speedtest](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/internet_speedtest/) | ♻ | Internet speed test | | |
| `INTRSPD` | ♻ | Internet speed test | | | Script | [internet_speedtest](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/internet_speedtest/) | | `IPNEIGH` | [ipneigh](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/ipneigh/) | 🔍 | Scan ARP (IPv4) and NDP (IPv6) tables | | |
| `IPNEIGH` | 🔍 | Scan ARP (IPv4) and NDP (IPv6) tables | | | Script | [ipneigh](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/ipneigh/) | | `LUCIRPC` | [luci_import](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/luci_import/) | 🔍 | Import connected devices from OpenWRT | | |
| `LUCIRPC` | 🔍 | Import connected devices from OpenWRT | | | Script | [luci_import](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/luci_import/) | | `MAINT` | [maintenance](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/maintenance/) | ⚙ | Maintenance of logs, etc. | | |
| `MAINT` | ⚙ | Maintenance of logs, etc. | | | Script | [maintenance](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/maintenance/) | | `MQTT` | [_publisher_mqtt](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/_publisher_mqtt/) | ▶️ | MQTT for synching to Home Assistant | | |
| `MQTT` | ▶️ | MQTT for synching to Home Assistant | | | Script | [_publisher_mqtt](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/_publisher_mqtt/) | | `NBTSCAN` | [nbtscan_scan](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/nbtscan_scan/) | 🆎 | Nbtscan (NetBIOS-based) name resolution | | |
| `NBTSCAN` | 🆎 | Nbtscan (NetBIOS-based) name resolution | | | Script | [nbtscan_scan](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/nbtscan_scan/) | | `NEWDEV` | [newdev_template](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/newdev_template/) | ⚙ | New device template | | Yes |
| `NEWDEV` | ⚙ | New device template | | Yes | Template | [newdev_template](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/newdev_template/) | | `NMAP` | [nmap_scan](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/nmap_scan/) | ♻ | Nmap port scanning & discovery | | |
| `NMAP` | ♻ | Nmap port scanning & discovery | | | Script | [nmap_scan](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/nmap_scan/) | | `NMAPDEV` | [nmap_dev_scan](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/nmap_dev_scan/) | 🔍 | Nmap dev scan on current network | | |
| `NMAPDEV` | 🔍 | Nmap dev scan on current network | | | Script | [nmap_dev_scan](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/nmap_dev_scan/) | | `NSLOOKUP` | [nslookup_scan](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/nslookup_scan/) | 🆎 | NSLookup (DNS-based) name resolution | | |
| `NSLOOKUP` | 🆎 | NSLookup (DNS-based) name resolution | | | Script | [nslookup_scan](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/nslookup_scan/) | | `NTFPRCS` | [notification_processing](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/notification_processing/) | ⚙ | Notification processing | | Yes |
| `NTFPRCS` | ⚙ | Notification processing | | Yes | Template | [notification_processing](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/notification_processing/)| | `NTFY` | [_publisher_ntfy](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/_publisher_ntfy/) | ▶️ | NTFY notifications | | |
| `NTFY` | ▶️ | NTFY notifications | | | Script | [_publisher_ntfy](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/_publisher_ntfy/) | | `OMDSDN` | [omada_sdn_imp](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/omada_sdn_imp/) | 📥/🆎 ❌ | UNMAINTAINED use `OMDSDNOPENAPI` | 🖧 🔄 | |
| `OMDSDN` | 📥/🆎 ❌ | UNMAINTAINED use `OMDSDNOPENAPI` | 🖧 🔄 | | Script | [omada_sdn_imp](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/omada_sdn_imp/) | | `OMDSDNOPENAPI` | [omada_sdn_openapi](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/omada_sdn_openapi/) | 📥/🆎 | OMADA TP-Link import via OpenAPI | 🖧 | |
| `OMDSDNOPENAPI`| 📥/🆎 | OMADA TP-Link import via OpenAPI | 🖧 | | Script | [omada_sdn_openapi](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/omada_sdn_openapi/) | | `PIHOLE` | [pihole_scan](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/pihole_scan/) | 🔍/🆎/📥 | Pi-hole device import & sync | | |
| `PIHOLE` | 🔍/🆎/📥| Pi-hole device import & sync | | | SQLite DB | [pihole_scan](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/pihole_scan/) | | `PUSHSAFER` | [_publisher_pushsafer](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/_publisher_pushsafer/) | ▶️ | Pushsafer notifications | | |
| `PUSHSAFER` | ▶️ | Pushsafer notifications | | | Script | [_publisher_pushsafer](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/_publisher_pushsafer/) | | `PUSHOVER` | [_publisher_pushover](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/_publisher_pushover/) | ▶️ | Pushover notifications | | |
| `PUSHOVER` | ▶️ | Pushover notifications | | | Script | [_publisher_pushover](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/_publisher_pushover/) | | `SETPWD` | [set_password](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/set_password/) | ⚙ | Set password | | Yes |
| `SETPWD` | ⚙ | Set password | | Yes | Template | [set_password](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/set_password/) | | `SMTP` | [_publisher_email](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/_publisher_email/) | ▶️ | Email notifications | | |
| `SMTP` | ▶️ | Email notifications | | | Script | [_publisher_email](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/_publisher_email/) | | `SNMPDSC` | [snmp_discovery](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/snmp_discovery/) | 🔍/📥 | SNMP device import & sync | | |
| `SNMPDSC` | 🔍/📥 | SNMP device import & sync | | | Script | [snmp_discovery](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/snmp_discovery/) | | `SYNC` | [sync](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/sync/) | 🔍/⚙/📥 | Sync & import from NetAlertX instances | 🖧 🔄 | Yes |
| `SYNC` | 🔍/⚙/📥| Sync & import from NetAlertX instances | 🖧 🔄 | Yes | Script | [sync](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/sync/) | | `TELEGRAM` | [_publisher_telegram](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/_publisher_telegram/) | ▶️ | Telegram notifications | | |
| `TELEGRAM` | ▶️ | Telegram notifications | | | Script | [_publisher_telegram](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/_publisher_telegram/) | | `UI` | [ui_settings](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/ui_settings/) | ♻ | UI specific settings | | Yes |
| `UI` | ♻ | UI specific settings | | Yes | Template | [ui_settings](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/ui_settings/) | | `UNFIMP` | [unifi_import](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/unifi_import/) | 🔍/📥/🆎 | UniFi device import & sync | 🖧 | |
| `UNFIMP` | 🔍/📥/🆎| UniFi device import & sync | 🖧 | | Script | [unifi_import](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/unifi_import/) | | `UNIFIAPI` | [unifi_api_import](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/unifi_api_import/) | 🔍/📥/🆎 | UniFi device import (SM API, multi-site) | | |
| `VNDRPDT` | ⚙ | Vendor database update | | | Script | [vendor_update](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/vendor_update/) | | `VNDRPDT` | [vendor_update](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/vendor_update/) | ⚙ | Vendor database update | | |
| `WEBHOOK` | ▶️ | Webhook notifications | | | Script | [_publisher_webhook](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/_publisher_webhook/) | | `WEBHOOK` | [_publisher_webhook](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/_publisher_webhook/) | ▶️ | Webhook notifications | | |
| `WEBMON` | ♻ | Website down monitoring | | | Script | [website_monitor](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/website_monitor/) | | `WEBMON` | [website_monitor](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/website_monitor/) | ♻ | Website down monitoring | | |
| `WOL` | ♻ | Automatic wake-on-lan | | | Script | [wake_on_lan](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/wake_on_lan/) | | `WOL` | [wake_on_lan](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/wake_on_lan/) | ♻ | Automatic wake-on-lan | | |
> \* The database cleanup plugin (`DBCLNP`) is not _required_ but the app will become unusable after a while if not executed. > \* The database cleanup plugin (`DBCLNP`) is not _required_ but the app will become unusable after a while if not executed.

View File

@@ -1,13 +1,14 @@
# Docker Update Strategies to upgrade NetAlertX # Docker Update Strategies to upgrade NetAlertX
> [!WARNING] > [!WARNING]
> For versions prior to `v25.6.7` upgrade to version `v25.5.24` first (`docker pull ghcr.io/jokob-sk/netalertx:25.5.24`) as later versions don't support a full upgrade. Alternatovelly, devices and settings can be migrated manually, e.g. via [CSV import](./DEVICES_BULK_EDITING.md). > For versions prior to `v25.6.7` upgrade to version `v25.5.24` first (`docker pull ghcr.io/jokob-sk/netalertx:25.5.24`) as later versions don't support a full upgrade. Alternatively, devices and settings can be migrated manually, e.g. via [CSV import](./DEVICES_BULK_EDITING.md).
This guide outlines approaches for updating Docker containers, usually when upgrading to a newer version of NetAlertX. Each method offers different benefits depending on the situation. Here are the methods: This guide outlines approaches for updating Docker containers, usually when upgrading to a newer version of NetAlertX. Each method offers different benefits depending on the situation. Here are the methods:
- Manual: Direct commands to stop, remove, and rebuild containers. - Manual: Direct commands to stop, remove, and rebuild containers.
- Dockcheck: Semi-automated with more control, suited for bulk updates. - Dockcheck: Semi-automated with more control, suited for bulk updates.
- Watchtower: Fully automated, runs continuously to check and update containers. - Watchtower: Fully automated, runs continuously to check and update containers.
- Portainer: Manual with UI.
You can choose any approach that fits your workflow. You can choose any approach that fits your workflow.
@@ -107,10 +108,42 @@ docker run -d \
``` ```
## 4. Portainer controlled image
This assumes you're using Portainer to manage Docker (or Docker Swarm) and want to pull the latest version of an image and redeploy the container.
> [!NOTE]
> * Portainer does **not auto-update** containers. For automation, use **Watchtower** or similar tools.
> * Make sure you have the [persistent volumes mounted or backups ready](BACKUPS.md) before recreating.
### 4.1 Steps to Update an Image in Portainer (Standalone Docker)
1. **Login to Portainer.**
2. Go to **"Containers"** in the left sidebar.
3. Find the container you want to update, click its name.
4. Click **"Recreate"** (top right).
5. **Tick**: _Pull latest image_ (this ensures Portainer fetches the newest version from Docker Hub or your registry).
6. Click **"Recreate"** again.
7. Wait for the container to be stopped, removed, and recreated with the updated image.
### 4.2 For Docker Swarm Services
If you're using Docker Swarm (under **"Stacks"** or **"Services"**):
1. Go to **"Stacks"**.
2. Select the stack managing the container.
3. Click **"Editor"** (or "Update the Stack").
4. Add a version tag or use `:latest` if your image tag is `latest` (not recommended for production).
5. Click **"Update the Stack"**. ⚠ Portainer will not pull the new image unless the tag changes OR the stack is forced to recreate.
6. If image tag hasn't changed, go to **"Services"**, find the service, and click **"Force Update"**.
## Summary ## Summary
- Manual: Ideal for individual or critical updates. | Method | Type | Pros | Cons |
- Dockcheck: Suitable for controlled, mass updates. |------------|--------------|----------------------------------|------------------------------|
- Watchtower: Fully automated, best for continuous deployment setups. | Manual | CLI | Full control, no dependencies | Tedious for many containers |
| Dockcheck | CLI Script | Great for batch updates | Needs setup, semi-automated |
| Watchtower | Daemonized | Fully automated updates | Less control, version drift |
| Portainer | UI | Easy via web interface | No auto-updates |
These approaches allow you to maintain flexibility in how you update Docker containers, depending on the urgency and scale of the update. These approaches allow you to maintain flexibility in how you update Docker containers, depending on the urgency and scale of the update.

View File

@@ -63,68 +63,8 @@ You can include multiple actions that should execute once the conditions are met
# Examples # Examples
Below you can find a couple of configuration examples. You can find a couple of configuration examples in [Workflow Examples](WORKFLOW_EXAMPLES.md).
![Workflow example](./img/WORKFLOWS/workflows.png)
---
## Example 1: Assign Device to Network Node Based on IP
This workflow assigns newly added devices with IP addresses in the `192.168.1.*` range to the device with the MAC address `6c:6d:6d:6c:6c:6c`.
### Trigger:
- **Object Type**: `Devices`
- **Event Type**: `insert`
### Conditions:
- **Logic**: `AND`
- `Field`: `devLastIP`
- `Operator`: `contains`
- `Value`: `192.168.1.`
This condition ensures that the workflow only applies to devices with an IP address in the `192.168.1.*` range.
### Actions:
- **Action Type**: `update_field`
- **Field**: `devNetworkNode`
- **Value**: `6c:6d:6d:6c:6c:6c`
---
## Example 2: Mark Device as Not New and Delete If from Google Vendor
This workflow automates the process of marking Google devices as not new and deleting them if they meet the criteria.
### Trigger:
- **Object Type**: `Devices`
- **Event Type**: `update`
### Conditions:
- **Logic**: `AND`
- `Field`: `devVendor`
- `Operator`: `contains`
- `Value`: `Google`
This condition checks if the device's vendor is `Google`.
- **Logic**: `AND`
- `Field`: `devIsNew`
- `Operator`: `equals`
- `Value`: `1`
This ensures the workflow applies only to new devices.
### Actions:
1. **Action Type**: `update_field`
- **Field**: `devIsNew`
- **Value**: `0`
This action marks the device as no longer new.
2. **Action Type**: `delete_device`
This action deletes the device after it is marked as not new.
> [!TIP] > [!TIP]
> Share your workflows in [Discord](https://discord.com/invite/NczTUTWyRr) or [GitHub Discussions](https://github.com/jokob-sk/NetAlertX/discussions). > Share your workflows in [Discord](https://discord.com/invite/NczTUTWyRr) or [GitHub Discussions](https://github.com/jokob-sk/NetAlertX/discussions).

View File

@@ -2,7 +2,7 @@
Workflows in NetAlertX automate actions based on real-time events and conditions. Below are practical examples that demonstrate how to build automation using triggers, conditions, and actions. Workflows in NetAlertX automate actions based on real-time events and conditions. Below are practical examples that demonstrate how to build automation using triggers, conditions, and actions.
## Un-archive devices if detected online ## Example 1: Un-archive devices if detected online
This workflow automatically unarchives a device if it was previously archived but has now been detected as online. This workflow automatically unarchives a device if it was previously archived but has now been detected as online.
@@ -57,4 +57,129 @@ Sometimes devices are manually archived (e.g., no longer expected on the network
### ✅ Result ### ✅ Result
Whenever a previously archived device shows up during a network scan, it will be automatically unarchived — allowing it to reappear in your device lists and dashboards. Whenever a previously archived device shows up during a network scan, it will be automatically unarchived — allowing it to reappear in your device lists and dashboards.
Here is your updated version of **Example 2** and **Example 3**, fully aligned with the format and structure of **Example 1** for consistency and professionalism:
---
## Example 2: Assign Device to Network Node Based on IP
This workflow assigns newly added devices with IP addresses in the `192.168.1.*` range to a specific network node with MAC address `6c:6d:6d:6c:6c:6c`.
### 📋 Use Case
When new devices join your network, assigning them to the correct network node is important for accurate topology and grouping. This workflow ensures devices in a specific subnet are automatically linked to the intended node.
### ⚙️ Workflow Configuration
```json
{
"name": "Assign Device to Network Node Based on IP",
"trigger": {
"object_type": "Devices",
"event_type": "insert"
},
"conditions": [
{
"logic": "AND",
"conditions": [
{
"field": "devLastIP",
"operator": "contains",
"value": "192.168.1."
}
]
}
],
"actions": [
{
"type": "update_field",
"field": "devNetworkNode",
"value": "6c:6d:6d:6c:6c:6c"
}
],
"enabled": "Yes"
}
```
### 🔍 Explanation
* **Trigger**: Activates when a new device is added.
* **Condition**:
* `devLastIP` contains `192.168.1.` (matches subnet).
* **Action**:
* Sets `devNetworkNode` to the specified MAC address.
### ✅ Result
New devices with IPs in the `192.168.1.*` subnet are automatically assigned to the correct network node, streamlining device organization and reducing manual work.
---
## Example 3: Mark Device as Not New and Delete If from Google Vendor
This workflow automatically marks newly detected Google devices as not new and deletes them immediately.
### 📋 Use Case
You may want to automatically clear out newly detected Google devices (such as Chromecast or Google Home) if theyre not needed in your device database. This workflow handles that clean-up automatically.
### ⚙️ Workflow Configuration
```json
{
"name": "Mark Device as Not New and Delete If from Google Vendor",
"trigger": {
"object_type": "Devices",
"event_type": "update"
},
"conditions": [
{
"logic": "AND",
"conditions": [
{
"field": "devVendor",
"operator": "contains",
"value": "Google"
},
{
"field": "devIsNew",
"operator": "equals",
"value": "1"
}
]
}
],
"actions": [
{
"type": "update_field",
"field": "devIsNew",
"value": "0"
},
{
"type": "delete_device"
}
],
"enabled": "Yes"
}
```
### 🔍 Explanation
* **Trigger**: Runs on device updates.
* **Conditions**:
* Vendor contains `Google`.
* Device is marked as new (`devIsNew` is `1`).
* **Actions**:
1. Set `devIsNew` to `0` (mark as not new).
2. Delete the device.
### ✅ Result
Any newly detected Google devices are cleaned up instantly — first marked as not new, then deleted — helping you avoid clutter in your device records.

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 185 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,7 @@
<?php <?php
require 'php/templates/header.php'; require 'php/templates/header.php';
require 'php/templates/notification.php'; require 'php/templates/modals.php';
?> ?>
<!-- ----------------------------------------------------------------------- --> <!-- ----------------------------------------------------------------------- -->

View File

@@ -1,3 +1,8 @@
<span class="helpIcon">
<a target="_blank" href="https://github.com/jokob-sk/NetAlertX/blob/main/docs/WORKFLOWS_DEBUGGING.md">
<i class="fa fa-circle-question"></i>
</a>
</span>
<section class="content"> <section class="content">
<div class="nav-tabs-custom app-event-content" style="margin-bottom: 0px;"> <div class="nav-tabs-custom app-event-content" style="margin-bottom: 0px;">
<ul id="tabs-location" class="nav nav-tabs col-sm-2 hidden"> <ul id="tabs-location" class="nav nav-tabs col-sm-2 hidden">

View File

@@ -12,10 +12,13 @@
----------------------------------------------------------------------------- */ ----------------------------------------------------------------------------- */
:root { :root {
--color-aqua: #00c0ef; --color-aqua: #00c0ef;
--color-lightblue: #3c8dbc;
--color-blue: #0060df; --color-blue: #0060df;
--color-green: #00a65a; --color-green: #00a65a;
--color-yellow: #f39c12; --color-yellow: #f39c12;
--color-red: #dd4b39; --color-red: #dd4b39;
--color-gray: #8c8c8c;
--color-black: #000;
} }
.input-group .checkbox .input-group .checkbox
@@ -28,6 +31,45 @@ h5
font-size: medium; font-size: medium;
} }
a[target="_blank"] {
position: relative;
display: inline-block; /* Needed for positioning */
padding-right: 0.6em; /* Space for the icon */
}
a[target="_blank"]::after {
content: '↗';
position: absolute;
top: 0;
right: 0;
font-size: 0.75em;
line-height: 1;
}
.select2 .hover-node-info::after {
padding-left: 1px ;
}
/* .node-standard-device .netNodeText::after
{
right: -7px;
top: 1px;
} */
/* .select2-container--default .select2-selection--multiple .select2-selection__choice
{
padding-right: 15px !important;
} */
.hoverHighlight
{
opacity: 0.7;
}
.hoverHighlight:hover
{
opacity: 1;
}
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
Helper Classes Helper Classes
----------------------------------------------------------------------------- */ ----------------------------------------------------------------------------- */
@@ -48,6 +90,7 @@ h5
float: inline-end; float: inline-end;
} }
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
Text Classes Text Classes
----------------------------------------------------------------------------- */ ----------------------------------------------------------------------------- */
@@ -340,6 +383,21 @@ body
width: 100%; width: 100%;
} }
.networkTable .nav-tabs-custom
{
margin-bottom: 0px;
}
.plugin-content #tabs-location .nav-tabs-custom > .nav-tabs > li
{
display: contents;
}
.plugin-content .left-nav
{
display: contents;
}
.pa-small-box-2 .inner h3 { .pa-small-box-2 .inner h3 {
margin-left: 0em; margin-left: 0em;
margin-bottom: 1.3em; margin-bottom: 1.3em;
@@ -474,7 +532,7 @@ body
} }
.bottom-border-primary { .bottom-border-primary {
border-bottom-color: #3c8dbc; border-bottom-color: var(--color-lightblue);
border-bottom-style: solid; border-bottom-style: solid;
border-bottom-width: 3px border-bottom-width: 3px
} }
@@ -547,6 +605,20 @@ body
cursor: default; cursor: default;
} }
.btn-outline:hover
{
border: 1px solid var(--color-black);
background: transparent;
color: var(--color-black);
}
.btn-outline
{
border: 1px solid var(--color-gray);
background: transparent;
color: var(--color-gray);
}
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
Customized Full Calendar Customized Full Calendar
----------------------------------------------------------------------------- */ ----------------------------------------------------------------------------- */
@@ -879,6 +951,10 @@ height: 50px;
margin: 10px; margin: 10px;
padding: 10px; padding: 10px;
} }
#notifications .notification-box{
min-height: 90vh;
}
#notificationData textarea{ #notificationData textarea{
width: 100%; width: 100%;
@@ -1032,7 +1108,7 @@ height: 50px;
.myhidden .myhidden
{ {
display:none; display:none !important;
} }
.center .center
@@ -1354,11 +1430,13 @@ input[readonly] {
.iconPreview { .iconPreview {
min-width: 40px; min-width: 40px;
/* display: inherit; */
} }
.iconPreview svg{ .iconPreview svg{
min-width: 20px; min-width: 20px;
max-width: 20px; max-width: 20px;
margin-bottom: -3px;
} }
@@ -1399,7 +1477,8 @@ input[readonly] {
cursor: -webkit-grab; cursor: -webkit-grab;
} }
.select2-container--default .select2-selection--multiple .select2-selection__choice #settingsPage .select2-container--default .select2-selection--multiple .select2-selection__choice,
#maintenancePage .select2-container--default .select2-selection--multiple .select2-selection__choice
{ {
background-color:#258744 !important; background-color:#258744 !important;
} }
@@ -1413,6 +1492,15 @@ input[readonly] {
background-color:#606060 !important; background-color:#606060 !important;
} }
.select2-container--default .select2-selection--multiple,
.select2-container--default .select2-selection--single
{
border-radius: 0px !important;
border-color: #d2d6de !important;
min-height: 42px;
}
.helpIconSmallTopRight{ .helpIconSmallTopRight{
position: absolute; position: absolute;
font-size: x-small; font-size: x-small;
@@ -1427,7 +1515,7 @@ input[readonly] {
} }
#tableDevicesBox td svg, #tableDevicesBox td i{ #tableDevicesBox td svg, #tableDevicesBox td i{
height: 1.5em !important; height: 1em !important;
} }
#TileCards .tile .inner #TileCards .tile .inner
@@ -1449,6 +1537,11 @@ input[readonly] {
text-align: left; text-align: left;
} }
#panDetails .input-group {
min-height: 40px;
}
#devicePageInfoPlc #devicePageInfoPlc
{ {
display: none; display: none;
@@ -1527,18 +1620,113 @@ input[readonly] {
} }
/* #panDetails .dataTables_wrapper .bottom .paging_simple_numbers */ /* #panDetails .dataTables_wrapper .bottom .paging_simple_numbers */
#panDetails #NEWDEV_devIcon
{
display: none;
}
#panDetails #NEWDEV_devCustomProps_label #panDetails #NEWDEV_devCustomProps_label
{ {
display: none; display: none;
} }
#deviceDetailsEdit .select2-container--default .select2-selection--multiple .select2-selection__choice a
{
color: #fff;
}
#deviceDetailsEdit .iconPreview svg
{
height: 14px;
}
#deviceDetailsEdit .select2-container--default .select2-selection--multiple .select2-selection__choice
{
height: 20px;
}
#deviceDetailsEdit .select2-container--disabled
{
background-color: #606060;
}
#deviceDetailsEdit .select2-container--default .select2-selection--multiple .select2-selection__choice span
{
font-size: 14px;
}
#deviceDetailsEdit .select2-selection
{
width: initial;
display: inline-block;
min-height: 42px;
}
/* Remove the default Select2 chevron (the down arrow) */
.select2-container .select2-selection__arrow b {
display: none !important;
}
/* Add custom icon */
.select2-container .select2-selection__arrow::after {
font-family: 'Font Awesome 6 Free';
content: "\f078"; /* fa-chevron-down */
font-weight: 700;
position: absolute;
top: 75%;
left: 30%;
transform: translate(-50%, -50%);
pointer-events: none;
}
.custom-badge a
{
color: #fff !important;
font-size: 14px;
}
.custom-badge
{
border: 1px solid #aaa;
border-radius: 4px;
border-style: solid;
padding: 0 5px;
font-size: 14px;
display: inline-block;
}
#deviceDetailsEdit .form-control
{
min-height: 42px;
}
.select2-selection--single .custom-chip
{
margin-top: 11px;
display: flex;
}
.select2-container--default .select2-selection--single .select2-selection__rendered,
.select2-container--default .select2-selection--single, .select2-selection .select2-selection--single
{
padding: 0px 0px;
min-height: 42px;
}
/* .select2-container--default .select2-selection--single .select2-selection__rendered, */
.select2-container--default .select2-selection--single
{
/* color:initial !important; */
background-color:initial !important;
}
#deviceDetailsEdit .select2-container
{
width: 100% !important;
}
#deviceDetailsEdit .select2-container .selection
{
width: 100% !important;
display: inline-grid;
}
/* ----------------------------------------------------------------- */ /* ----------------------------------------------------------------- */
/* MODAL popups */ /* MODAL popups */
/* ----------------------------------------------------------------- */ /* ----------------------------------------------------------------- */
@@ -1553,14 +1741,44 @@ input[readonly] {
width: 92%; width: 92%;
} }
#modal-ok
{
z-index: 1051; /*highest priority*/
}
#modal-form-plc
{
display: grid;
}
/* ----------------------------------------------------------------- */ /* ----------------------------------------------------------------- */
/* NETWORK page */ /* NETWORK page */
/* ----------------------------------------------------------------- */ /* ----------------------------------------------------------------- */
.hide-node-names .node-name {
display: none;
}
#toggleFilters
{
display: block;
position: fixed;
padding-left: 32px;
padding-top: 10px;
background-color: inherit;
z-index: 3;
width: 190px;
box-shadow: 4px 4px 4px rgba(0, 0, 0, 0.1);
}
/* AdminLTE overrides */ /* AdminLTE overrides */
.content-wrapper {
min-height: calc(100vh - 31px) !important;
}
#networkTree .box #networkTree .box
{ {
/* border-top:1px; */ border-width:1px;
border-top-color:grey; border-top-color:grey;
padding:0px; padding:0px;
margin:0px; margin:0px;
@@ -1596,6 +1814,7 @@ input[readonly] {
opacity: 0.3; opacity: 0.3;
display: initial; display: initial;
float: left; float: left;
width: 1em;
} }
#networkTree #networkTree
@@ -1619,6 +1838,42 @@ input[readonly] {
width: auto; width: auto;
} }
#hover-box
{
background-color: #ffffff;;
}
#hover-box .iconPreview
{
padding: 0px;
display: flex;
}
#hover-box .devName
{
font-size: larger;
display: contents;
}
#hover-box b
{
float: left;
}
#hover-box .line
{
float: left;
width: 100%;
}
#hover-box span
{
float: right;
text-overflow: ellipsis;
overflow: hidden;
display: block;
max-width: 200px;
}
#networkTree .netCollapse #networkTree .netCollapse
{ {
@@ -1626,11 +1881,39 @@ input[readonly] {
right: 0; right: 0;
margin-right: -3px; margin-right: -3px;
} }
/* var(--color-aqua);
--color-aqua: #00c0ef;
--color-blue: #0060df;
--color-green: #00a65a;
--color-yellow: #f39c12;
--color-red: #dd4b39; */
#networkTree .node-inner.node-network-device:hover
{
box-shadow: var(--color-aqua) 0px 0px 20px;
}
#networkTree .node-inner.node-standard-device:hover
{
box-shadow: var(--color-gray) 0px 0px 10px;
}
#networkTree .network-hw-icon
{
position: absolute;
margin-left: -0.4em;
opacity: 0.3;
margin-top: 0.1em;
}
#networkTree .highlightedNode #networkTree .highlightedNode
{ {
/* border: solid; */ /* border: solid; */
border-color:cyan; border-color:var(--color-lightblue);
box-shadow: var(--color-lightblue) 0px 0px 20px;
} }
#networkTree .netStatus-Off-line i, #networkTree .netStatus-Off-line i,
#networkTree .netStatus-Off-line svg #networkTree .netStatus-Off-line svg
{ {
@@ -1654,6 +1937,23 @@ input[readonly] {
/* margin-left: 0.2em; */ /* margin-left: 0.2em; */
} }
.networkTable
{
padding-bottom: 1px;
z-index: 3;
position: relative;
}
.networkNodeTabHeaders .icon i
{
padding-top: 8px !important;
padding-left: 6px !important;
}
.networkTable .box-body {
padding-top: 5px;
}
.networkTable .networkNodeTabHeaders a { .networkTable .networkNodeTabHeaders a {
display: block; display: block;
height: 3em; height: 3em;
@@ -1682,6 +1982,8 @@ input[readonly] {
text-wrap: nowrap; text-wrap: nowrap;
} }
@media (max-width: 767px) { @media (max-width: 767px) {
.networkNodeTabHeaders .node-name .networkNodeTabHeaders .node-name
@@ -1712,7 +2014,10 @@ input[readonly] {
/* PLUGINS page */ /* PLUGINS page */
/* ----------------------------------------------------------------- */ /* ----------------------------------------------------------------- */
#tabs-location
{
padding-right: 0px;
}
.plugin-filters .plugin-filters
{ {
@@ -1727,15 +2032,31 @@ input[readonly] {
padding-bottom: 0px; padding-bottom: 0px;
} }
.plugin-content .left-nav{ .plugin-content .nav-tabs li a
{
border-right-width: 0px;
}
#tabs-content-location-wrap
{
min-height: 90vh;
}
#tabs-content-location textarea {
width: 100%; width: 100%;
}
.plugin-content .left-nav{
width: calc(100%);
padding-right: 0px; padding-right: 0px;
z-index: 2;
background-color: inherit !important;
} }
.plugin-content #tabs-content-location .plugin-content #tabs-content-location
{ {
margin: 0px; margin: 0px;
/* padding-top: 0; */ padding-top: 0;
} }
.integrations-plugins .content .integrations-plugins .content
@@ -1803,6 +2124,9 @@ input[readonly] {
.pluginBadge .pluginBadge
{ {
float: right; float: right;
margin-right: 10px;
opacity: 0.6;
margin-top: 4px;
} }
.pluginBadgeWrap .pluginBadgeWrap
@@ -1811,42 +2135,56 @@ input[readonly] {
display: ruby; display: ruby;
z-index: 1; z-index: 1;
position: sticky; position: sticky;
margin-top: 1px; margin-top: 4px;
} }
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
Spin Spin
----------------------------------------------------------------------------- */ ----------------------------------------------------------------------------- */
.pa_semitransparent-panel { #loadingSpinner {
position: absolute; position: fixed;
width: 100%; /*calc (100% -40px);*/ z-index: 1000;
height: 100%; /* top: 0; */
left: 0; /* left: 0; */
top: 0; /* width: 100%; */
/* height: 100%; */
opacity: 0;
transition: opacity 0.3s ease-in-out;
pointer-events: none;
display: block; display: block;
opacity: 0.8;
background-color: #fff;
z-index: 800; z-index: 800;
} }
.pa_spinner { .fa-spinner
position: fixed; {
left: 0; font-size: initial;
right: 0; }
#loadingSpinner.visible {
opacity: 1;
pointer-events: auto;
}
.nax_semitransparent-panel {
position: absolute;
width: 100%;
height: 100%;
background-color: #fff;
opacity: 0.5;
z-index: 99;
}
.nax_spinner {
position: absolute;
top: 100px; top: 100px;
margin-left: auto; left: 50%;
margin-right: auto; transform: translateX(-50%);
padding: 15px; padding: 15px;
width: 200px; width: 200px;
background-color: #fff; background-color: #fff;
z-index: 801; z-index: 1000;
} }
#loadingSpinner
{
z-index: 100;
}
/* Multi-edit adjustements */ /* Multi-edit adjustements */
.box-header .box-header
@@ -1873,9 +2211,10 @@ input[readonly] {
} }
.pia-top-left-logo .top-left-logo
{ {
height:50px; height:35px;
width:35px;
} }
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------

View File

@@ -10,6 +10,16 @@
* *
* Additional fixes For Pi.Alert UI by leiweibau */ * Additional fixes For Pi.Alert UI by leiweibau */
:root {
--color-aqua: #00c0ef;
--color-lightblue: #3c8dbc;
--color-blue: #0060df;
--color-green: #00a65a;
--color-yellow: #f39c12;
--color-red: #dd4b39;
--color-gray: #8c8c8c;
}
:root { :root {
--datatable-bgcolor: rgba(64, 76, 88, 0.8); --datatable-bgcolor: rgba(64, 76, 88, 0.8);
} }
@@ -409,6 +419,12 @@ td.highlight {
border: 1px solid #353c42; border: 1px solid #353c42;
} }
.btn-outline {
border: 1px solid var(--color-black);
background: transparent;
color: var(--color-white);
}
/* Used in debug log page */ /* Used in debug log page */
.log-red { .log-red {
color: #ff4038; color: #ff4038;
@@ -649,8 +665,14 @@ input[type="password"]::-webkit-caps-lock-indicator {
border-color: #888888; border-color: #888888;
} }
.table-hover tbody tr:hover td, .table-hover tbody tr:hover th { .table-hover tbody tr:hover td, .table-hover tbody tr:hover th {
background-color: rgb(189,192,198); background-color: var(--datatable-bgcolor);
color: #444; color: var(--fbc-white);
}
table.dataTable tbody tr.selected, table.dataTable tbody tr .selected
{
background-color: var(--datatable-bgcolor);
color: var(--fbc-white);
} }
.db_info_table_cell:nth-child(1) {background: #272c30} .db_info_table_cell:nth-child(1) {background: #272c30}
@@ -722,16 +744,46 @@ input[type="password"]::-webkit-caps-lock-indicator {
margin-left: 0px; margin-left: 0px;
} }
.small-box:hover .icon { .small-box:hover .icon {
font-size: 3.74em; font-size: 3em;
} }
.small-box .icon { .small-box .icon {
top: 0.01em; top: 0.01em;
font-size: 3.25em; font-size: 3.25em;
} }
.pa_semitransparent-panel{ .nax_semitransparent-panel{
background-color: #000 !important; background-color: #000 !important;
} }
.select2-container--default .select2-selection--single {
color: initial !important;
background-color: #353c42 !important;
}
/* Chevron color */
.select2-container .select2-selection__arrow::after {
color: #bec5cb;
}
/* Chevron color */
.select2-selection .select2-selection--single {
color: #bec5cb;
}
.select2-container--default .select2-selection--multiple, .select2-container--default .select2-selection--single {
border-color: #3d444b !important;
}
.select2-container--default .select2-selection--single .select2-selection__rendered .custom-chip
{
color: #bec5cb;
}
#hover-box
{
background-color: #353c42 !important;
}
.callout code { .callout code {
background-color: #fff !important; background-color: #fff !important;
color:#000 !important; color:#000 !important;
@@ -740,4 +792,9 @@ input[type="password"]::-webkit-caps-lock-indicator {
.thresholdFormControl .thresholdFormControl
{ {
color:#000; color:#000;
}
.btn:hover
{
color: var(--color-gray);
} }

View File

@@ -11,6 +11,17 @@
* Additional fixes For Pi.Alert UI by leiweibau */ * Additional fixes For Pi.Alert UI by leiweibau */
@media (prefers-color-scheme: dark) { @media (prefers-color-scheme: dark) {
:root {
--color-aqua: #00c0ef;
--color-lightblue: #3c8dbc;
--color-blue: #0060df;
--color-green: #00a65a;
--color-yellow: #f39c12;
--color-red: #dd4b39;
--color-gray: #8c8c8c;
--color-white: #fff;
}
:root { :root {
--datatable-bgcolor: rgba(64, 76, 88, 0.8); --datatable-bgcolor: rgba(64, 76, 88, 0.8);
@@ -411,6 +422,12 @@
border: 1px solid #353c42; border: 1px solid #353c42;
} }
.btn-outline {
border: 1px solid var(--color-black);
background: transparent;
color: var(--color-white);
}
/* Used in debug log page */ /* Used in debug log page */
.log-red { .log-red {
color: #ff4038; color: #ff4038;
@@ -651,8 +668,14 @@
border-color: #888888; border-color: #888888;
} }
.table-hover tbody tr:hover td, .table-hover tbody tr:hover th { .table-hover tbody tr:hover td, .table-hover tbody tr:hover th {
background-color: rgb(189,192,198); background-color: var(--datatable-bgcolor);
color: #444; color: var(--fbc-white);
}
table.dataTable tbody tr.selected, table.dataTable tbody tr .selected
{
background-color: var(--datatable-bgcolor);
color: var(--fbc-white);
} }
.db_info_table_cell:nth-child(1) {background: #272c30} .db_info_table_cell:nth-child(1) {background: #272c30}
@@ -724,16 +747,45 @@
margin-left: 0px; margin-left: 0px;
} }
.small-box:hover .icon { .small-box:hover .icon {
font-size: 3.74em; font-size: 3em;
} }
.small-box .icon { .small-box .icon {
top: 0.01em; top: 0.01em;
font-size: 3.25em; font-size: 3.25em;
} }
.pa_semitransparent-panel{ .nax_semitransparent-panel{
background-color: #000 !important; background-color: #000 !important;
} }
.select2-container--default .select2-selection--single {
color: initial !important;
background-color: #353c42 !important;
}
/* Chevron color */
.select2-container .select2-selection__arrow::after {
color: #bec5cb;
}
/* Chevron color */
.select2-selection .select2-selection--single {
color: #bec5cb;
}
.select2-container--default .select2-selection--multiple, .select2-container--default .select2-selection--single {
border-color: #3d444b !important;
}
.select2-container--default .select2-selection--single .select2-selection__rendered .custom-chip
{
color: #bec5cb;
}
#hover-box
{
background-color: #353c42 !important;
}
} }
.callout code { .callout code {
@@ -746,3 +798,7 @@
color:#000; color:#000;
} }
.btn:hover
{
color: var(--color-white);
}

View File

@@ -16,15 +16,16 @@
require 'php/templates/header.php'; require 'php/templates/header.php';
?> ?>
<script>
showSpinner();
</script>
<!-- Page ------------------------------------------------------------------ --> <!-- Page ------------------------------------------------------------------ -->
<div class="content-wrapper"> <div class="content-wrapper">
<!-- Content header--------------------------------------------------------- --> <!-- Content header--------------------------------------------------------- -->
<section class="content-header"> <section class="content-header">
<?php require 'php/templates/notification.php'; ?> <?php require 'php/templates/modals.php'; ?>
<h1 id="pageTitle"> <h1 id="pageTitle">
&nbsp<small>Quering device info...</small> &nbsp<small>Quering device info...</small>
@@ -122,18 +123,14 @@
</div> </div>
</ul> </ul>
<div class="tab-content" style="min-height: 430px;"> <div class="tab-content spinnerTarget" style="min-height: 430px;">
<!-- tab page 1 ------------------------------------------------------------ --> <!-- tab page 1 ------------------------------------------------------------ -->
<!--
<div class="tab-pane fade in active" id="panDetails">
-->
<div class="tab-pane fade" id="panDetails">
<div class="tab-pane fade" id="panDetails">
<?php <?php
require 'deviceDetailsEdit.php'; require 'deviceDetailsEdit.php';
?> ?>
</div> </div>
<!-- tab page 2 ------------------------------------------------------------ --> <!-- tab page 2 ------------------------------------------------------------ -->
@@ -141,51 +138,38 @@
<?php <?php
require 'deviceDetailsSessions.php'; require 'deviceDetailsSessions.php';
?> ?>
</div> </div>
<!-- tab page "Tools" ------------------------------------------------------------ --> <!-- tab page "Tools" ------------------------------------------------------------ -->
<div class="tab-pane fade" id="panTools"> <div class="tab-pane fade" id="panTools">
<?php <?php
require 'deviceDetailsTools.php'; require 'deviceDetailsTools.php';
?> ?>
</div> </div>
<!-- tab page 3 ------------------------------------------------------------ --> <!-- tab page 3 ------------------------------------------------------------ -->
<div class="tab-pane fade table-responsive" id="panPresence"> <div class="tab-pane fade table-responsive" id="panPresence">
<?php <?php
// Include the other page // Include the other page
include 'deviceDetailsPresence.php'; include 'deviceDetailsPresence.php';
?> ?>
</div> </div>
<!-- tab page 4 ------------------------------------------------------------ --> <!-- tab page 4 ------------------------------------------------------------ -->
<div class="tab-pane fade table-responsive" id="panEvents"> <div class="tab-pane fade table-responsive" id="panEvents">
<?php <?php
// Include the other page // Include the other page
include 'deviceDetailsEvents.php'; include 'deviceDetailsEvents.php';
?> ?>
</div> </div>
<!-- tab page 7 ------------------------------------------------------------ --> <!-- tab page 7 ------------------------------------------------------------ -->
<div class="tab-pane fade table-responsive" id="panPlugins"> <div class="tab-pane fade table-responsive" id="panPlugins">
<?php <?php
// Include the other page // Include the other page
include 'pluginsCore.php'; include 'pluginsCore.php';
?> ?>
</div> </div>
</div> </div>
@@ -241,13 +225,6 @@ switch ($UI_THEME) {
var selectedTab = 'tabDetails'; var selectedTab = 'tabDetails';
var emptyArr = ['undefined', "", undefined, null]; var emptyArr = ['undefined', "", undefined, null];
// Call renderSmallBoxes, then main
(async () => {
await renderSmallBoxes();
main();
})();
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
function main () { function main () {
@@ -273,7 +250,7 @@ function main () {
period = '1 day'; period = '1 day';
sessionsRows = 50; sessionsRows = 50;
eventsRows = 50; eventsRows = 50;
$('#chkHideConnectionEvents')[0].checked = eval(eventsHide == 'true'); // $('#chkHideConnectionEvents')[0].checked = eval(eventsHide == 'true');
// Initialize components with parameters // Initialize components with parameters
@@ -282,26 +259,7 @@ function main () {
$( document ).ready(function() { $( document ).ready(function() {
initializeTabs(); initializeTabs();
}); });
// Events tab toggle conenction events
$('input').on('ifToggled', function(event){
// Hide / Show Events
if (event.currentTarget.id == 'chkHideConnectionEvents') {
getDeviceEvents();
} else {
// Activate save & restore
// activateSaveRestoreData();
// Ask skip notifications
// if (event.currentTarget.id == 'chkArchived' ) {
// askSkipNotifications();
// }
}
});
} }
@@ -328,6 +286,63 @@ function recordSwitch(direction) {
} }
} }
// ----------------------------------------
// Handle previous/next arrows/chevrons
function updateChevrons(currentMac) {
const devicesList = getDevicesList();
pos = devicesList.findIndex(item => item.devMac === currentMac);
if (pos === -1) {
console.warn('Device not found in cache. Re-caching devices...', currentMac);
showSpinner();
cacheDevices().then(() => {
hideSpinner();
// Retry after re-caching
const refreshedList = getDevicesList();
pos = refreshedList.findIndex(item => item.devMac === currentMac);
if (pos === -1) {
console.error('Still not found after re-cache:', currentMac);
return;
}
console.log('Device found after re-cache:', refreshedList[pos]);
// Proceed with using `refreshedList[pos]`
}).catch((err) => {
hideSpinner();
console.error('Failed to cache devices:', err);
});
return;
}
// Update the record number display
$('#txtRecord').html((pos + 1) + ' / ' + devicesList.length);
// Enable/disable previous button
if (pos <= 0) {
$('#btnPrevious').attr('disabled', '');
$('#btnPrevious').addClass('text-gray50');
} else {
$('#btnPrevious').removeAttr('disabled');
$('#btnPrevious').removeClass('text-gray50');
}
// Enable/disable next button
if (pos >= devicesList.length - 1) {
$('#btnNext').attr('disabled', '');
$('#btnNext').addClass('text-gray50');
} else {
$('#btnNext').removeAttr('disabled');
$('#btnNext').removeClass('text-gray50');
}
}
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
function performSwitch(direction) function performSwitch(direction)
@@ -338,7 +353,9 @@ function performSwitch(direction)
// Update the global position in the devices list variable 'pos' // Update the global position in the devices list variable 'pos'
if (direction === "next") { if (direction === "next") {
if (pos < devicesList.length - 1) { console.log("direction:" + direction);
if (pos < devicesList.length) {
pos++; pos++;
} }
} else if (direction === "prev") { } else if (direction === "prev") {
@@ -358,15 +375,12 @@ function performSwitch(direction)
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// Activate save & restore on any value change // Activate save & restore on any value change
$(document).on('input', 'input:text', function() { $(document).on('input', 'input:text', function() {
settingsChanged(); settingsChanged();
}); });
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
function initializeTabs () { function initializeTabs () {
@@ -380,8 +394,6 @@ function initializeTabs () {
} }
$('.nav-tabs a[id='+ selectedTab +']').tab('show'); $('.nav-tabs a[id='+ selectedTab +']').tab('show');
// $('.nav-tabs a[id='+ selectedTab +']').parent().click();
// $('.nav-tabs a[id="tabPlugins"]').tab('show');
// When changed save new current tab // When changed save new current tab
$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) { $('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
@@ -391,11 +403,6 @@ function initializeTabs () {
// events on tab change // events on tab change
$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) { $('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
var target = $(e.target).attr("href") // activated tab var target = $(e.target).attr("href") // activated tab
// if(target == "#panTools")
// {
// // loadTools();
// }
}); });
} }
@@ -415,7 +422,6 @@ async function renderSmallBoxes() {
} }
const deviceData = await response.json(); const deviceData = await response.json();
console.log(deviceData);
// Prepare custom data // Prepare custom data
const customData = [ const customData = [
@@ -447,7 +453,7 @@ async function renderSmallBoxes() {
"labelLang": "DevDetail_Shortcut_Presence", "labelLang": "DevDetail_Shortcut_Presence",
"iconId": "deviceEventsIcon", "iconId": "deviceEventsIcon",
"iconClass": "fa fa-calendar", "iconClass": "fa fa-calendar",
"dataValue": `${deviceData.devPresenceHours}h` "dataValue": `${deviceData.devPresenceHours ?? 0}h`
}, },
{ {
"onclickEvent": "$('#tabEvents').trigger('click');", "onclickEvent": "$('#tabEvents').trigger('click');",
@@ -482,22 +488,65 @@ async function renderSmallBoxes() {
console.error('Error in renderSmallBoxes:', error); console.error('Error in renderSmallBoxes:', error);
} finally { } finally {
// Hide loading dialog // Hide loading dialog
hideSpinner(); // hideSpinner();
} }
} }
function updateDevicePageName(mac) {
let name = getDevDataByMac(mac, "devName");
let owner = getDevDataByMac(mac, "devOwner");
// If data is missing, re-cache and retry once
if (mac != 'new' && (name === null|| owner === null)) {
console.warn("Device not found in cache, retrying after re-cache:", mac);
showSpinner();
cacheDevices().then(() => {
hideSpinner();
// Retry after successful cache
updateDevicePageName(mac);
}).catch((err) => {
hideSpinner();
console.error("Failed to refresh devices:", err);
});
return; // Exit early to avoid showing bad data
}
// Page title - Name
if (mac == "new") {
$('#pageTitle').html(
`<i title="${getString("Gen_create_new_device")}" class="fa fa-square-plus"></i> ` + getString("Gen_create_new_device")
);
$('#devicePageInfoPlc .inner').html(
`<i class="fa fa-circle-info"></i> ` + getString("Gen_create_new_device_info")
);
$('#devicePageInfoPlc').show();
} else if (!owner || (name.toString()).indexOf(owner) !== -1) {
$('#pageTitle').html(name);
$('#devicePageInfoPlc').hide();
} else {
$('#pageTitle').html(name + ' (' + owner + ')');
$('#devicePageInfoPlc').hide();
}
}
//----------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------
// Call renderSmallBoxes, then main
(async () => {
await renderSmallBoxes();
main();
})();
window.onload = function async() window.onload = function async()
{ {
initializeTabs(); // initializeTabs();
updateChevrons(mac);
updateDevicePageName(mac);
} }
</script> </script>

View File

@@ -5,7 +5,7 @@
?> ?>
<div class="row"> <div class="row" id="deviceDetailsEdit">
<div class="box-body form-horizontal"> <div class="box-body form-horizontal">
<form id="edit-form"> <form id="edit-form">
<!-- Form fields will be appended here --> <!-- Form fields will be appended here -->
@@ -39,7 +39,7 @@
// ------------------------------------------------------------------- // -------------------------------------------------------------------
// Get plugin and settings data from API endpoints // Get plugin and settings data from API endpoints
function getDeviceData(readAllData){ function getDeviceData(){
mac = getMac() mac = getMac()
@@ -53,17 +53,13 @@
var deviceData = JSON.parse(data); var deviceData = JSON.parse(data);
// Deactivate next previous buttons
if (readAllData) {
$('#btnPrevious').attr ('disabled','');
$('#btnPrevious').addClass ('text-gray50');
$('#btnNext').attr ('disabled','');
$('#btnNext').addClass ('text-gray50');
}
// some race condition, need to implement delay // some race condition, need to implement delay
setTimeout(() => { setTimeout(() => {
$.get('php/server/query_json.php', { file: 'table_settings.json', nocache: Date.now() }, function(res) { $.get('php/server/query_json.php', {
file: 'table_settings.json',
// nocache: Date.now()
},
function(res) {
settingsData = res["data"]; settingsData = res["data"];
@@ -85,7 +81,7 @@
}, },
// Group for event and alert settings // Group for event and alert settings
DevDetail_EveandAl_Title: { DevDetail_EveandAl_Title: {
data: ["devAlertEvents", "devAlertDown", "devSkipRepeated"], data: ["devAlertEvents", "devAlertDown", "devSkipRepeated", "devReqNicsOnline", "devChildrenNicsDynamic"],
docs: "https://github.com/jokob-sk/NetAlertX/blob/main/docs/NOTIFICATIONS.md", docs: "https://github.com/jokob-sk/NetAlertX/blob/main/docs/NOTIFICATIONS.md",
iconClass: "fa fa-bell", iconClass: "fa fa-bell",
inputGroupClasses: "field-group alert-group col-lg-4 col-sm-6 col-xs-12", inputGroupClasses: "field-group alert-group col-lg-4 col-sm-6 col-xs-12",
@@ -94,9 +90,9 @@
}, },
// Group for network details // Group for network details
DevDetail_MainInfo_Network_Title: { DevDetail_MainInfo_Network_Title: {
data: ["devParentMAC", "devParentPort", "devSSID", "devSite", "devSyncHubNode"], data: ["devParentMAC", "devParentRelType", "devParentPort", "devSSID", "devSite", "devSyncHubNode"],
docs: "https://github.com/jokob-sk/NetAlertX/blob/main/docs/NETWORK_TREE.md", docs: "https://github.com/jokob-sk/NetAlertX/blob/main/docs/NETWORK_TREE.md",
iconClass: "fa fa-network-wired", iconClass: "fa fa-sitemap fa-rotate-270",
inputGroupClasses: "field-group network-group col-lg-4 col-sm-6 col-xs-12", inputGroupClasses: "field-group network-group col-lg-4 col-sm-6 col-xs-12",
labelClasses: "col-sm-4 col-xs-12 control-label", labelClasses: "col-sm-4 col-xs-12 control-label",
inputClasses: "col-sm-8 col-xs-12 input-group" inputClasses: "col-sm-8 col-xs-12 input-group"
@@ -119,12 +115,21 @@
labelClasses: "col-sm-4 col-xs-12 control-label", labelClasses: "col-sm-4 col-xs-12 control-label",
inputClasses: "col-sm-8 col-xs-12 input-group" inputClasses: "col-sm-8 col-xs-12 input-group"
}, },
// Group for Children.
DevDetail_Children_Title: {
data: ["devChildrenDynamic"],
docs: "https://github.com/jokob-sk/NetAlertX/blob/main/docs/NETWORK_TREE.md",
iconClass: "fa fa-list",
inputGroupClasses: "field-group cutprop-group col-lg-6 col-sm-12 col-xs-12",
labelClasses: "col-sm-12 col-xs-12 control-label",
inputClasses: "col-sm-12 col-xs-12 input-group"
},
// Group for Custom properties. // Group for Custom properties.
DevDetail_CustomProperties_Title: { DevDetail_CustomProperties_Title: {
data: ["devCustomProps"], data: ["devCustomProps"],
docs: "https://github.com/jokob-sk/NetAlertX/blob/main/docs/CUSTOM_PROPERTIES.md", docs: "https://github.com/jokob-sk/NetAlertX/blob/main/docs/CUSTOM_PROPERTIES.md",
iconClass: "fa fa-list", iconClass: "fa fa-list",
inputGroupClasses: "field-group cutprop-group col-lg-12 col-sm-12 col-xs-12", inputGroupClasses: "field-group cutprop-group col-lg-6 col-sm-12 col-xs-12",
labelClasses: "col-sm-12 col-xs-12 control-label", labelClasses: "col-sm-12 col-xs-12 control-label",
inputClasses: "col-sm-12 col-xs-12 input-group" inputClasses: "col-sm-12 col-xs-12 input-group"
} }
@@ -167,6 +172,7 @@
// Get the field data (replace 'NEWDEV_' prefix from the key) // Get the field data (replace 'NEWDEV_' prefix from the key)
fieldData = deviceData[setting.setKey.replace('NEWDEV_', '')] fieldData = deviceData[setting.setKey.replace('NEWDEV_', '')]
fieldData = fieldData == null ? "" : fieldData; fieldData = fieldData == null ? "" : fieldData;
fieldOptionsOverride = null;
// console.log(setting.setKey); // console.log(setting.setKey);
// console.log(fieldData); // console.log(fieldData);
@@ -198,16 +204,21 @@
<i class="fa-solid fa-dice" ></i> <i class="fa-solid fa-dice" ></i>
</span>`; </span>`;
} }
// handle generate IP for new device
if (setting.setKey == "NEWDEV_devIcon") {
inlineControl += `<span class="input-group-addon pointer"
onclick="showIconSelection()"
title="${getString("Gen_Select")}">
<i class="fa-solid fa-chevron-down" ></i>
</span>`;
}
// handle devChildrenDynamic or NEWDEV_devChildrenNicsDynamic - selected values and options are the same
if (
Array.isArray(fieldData) &&
(setting.setKey == "NEWDEV_devChildrenDynamic" ||
setting.setKey == "NEWDEV_devChildrenNicsDynamic" )
)
{
fieldDataNew = []
fieldData.forEach(child => {
fieldDataNew.push(child.devMac)
})
fieldData = fieldDataNew;
fieldOptionsOverride = fieldDataNew;
}
// Generate the input field HTML // Generate the input field HTML
const inputFormHtml = `<div class="form-group col-xs-12"> const inputFormHtml = `<div class="form-group col-xs-12">
@@ -219,7 +230,7 @@
</i> </i>
</label> </label>
<div class="${obj.inputClasses}"> <div class="${obj.inputClasses}">
${generateFormHtml(settingsData, setting, fieldData.toString(), null, null)} ${generateFormHtml(settingsData, setting, fieldData.toString(), fieldOptionsOverride, null)}
${inlineControl} ${inlineControl}
</div> </div>
</div>`; </div>`;
@@ -236,81 +247,29 @@
updateAllIconPreviews(); updateAllIconPreviews();
// update readonly fields // update readonly fields
handleReadOnly(settingsData, disabledFields); handleReadOnly(settingsData, disabledFields);
};
// Page title - Name // console.log(relevantSettings)
if (mac == "new") {
$('#pageTitle').html(`<i title="${getString("Gen_create_new_device")}" class="fa fa-square-plus"></i> ` + getString("Gen_create_new_device"));
$('#devicePageInfoPlc .inner').html(`<i class="fa fa-circle-info"></i> ` + getString("Gen_create_new_device_info"));
$('#devicePageInfoPlc').show();
} else if (deviceData['devOwner'] == null || deviceData['devOwner'] == '' ||
(deviceData['devName'].toString()).indexOf(deviceData['devOwner']) != -1) {
$('#pageTitle').html(deviceData['devName']);
$('#devicePageInfoPlc').hide();
} else {
$('#pageTitle').html(deviceData['devName'] + ' (' + deviceData['devOwner'] + ')');
$('#devicePageInfoPlc').hide();
}
};
// console.log(relevantSettings) generateSimpleForm(relevantSettings);
generateSimpleForm(relevantSettings); toggleNetworkConfiguration(mac == 'Internet')
// <> chevrons initSelect2();
updateChevrons(deviceData) initHoverNodeInfo();
toggleNetworkConfiguration(mac == 'Internet') hideSpinner();
hideSpinner(); })
}) }, 100);
});
}, 100); }
});
}
// ----------------------------------------
// Handle previous/next arrows/chevrons
function updateChevrons(deviceData) {
devicesList = getDevicesList();
// console.log(devicesList);
// Check if device is part of the devicesList
pos = devicesList.findIndex(item => item.rowid == deviceData['rowid']);
// console.log(pos);
if (pos == -1) {
devicesList.push({"rowid" : deviceData['rowid'], "mac" : deviceData['devMac'], "name": deviceData['devName'], "type": deviceData['devType']});
pos=0;
}
// Record number
$('#txtRecord').html (pos+1 +' / '+ devicesList.length);
// Deactivate previous button
if (pos <= 0) {
$('#btnPrevious').attr ('disabled','');
$('#btnPrevious').addClass ('text-gray50');
} else {
$('#btnPrevious').removeAttr ('disabled');
$('#btnPrevious').removeClass ('text-gray50');
}
// Deactivate next button
if (pos >= (devicesList.length-1)) {
$('#btnNext').attr ('disabled','');
$('#btnNext').addClass ('text-gray50');
} else {
$('#btnNext').removeAttr ('disabled');
$('#btnNext').removeClass ('text-gray50');
}
}
// ---------------------------------------- // ----------------------------------------
// Handle the read-only fields // Handle the read-only fields
@@ -325,18 +284,6 @@
}); });
} }
// ----------------------------------------
// Show the description of a setting
function showDescriptionPopup(e) {
console.log($(e).attr("my-set-key"));
showModalOK("Info", getString($(e).attr("my-set-key") + '_description'))
}
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// Save device data to DB // Save device data to DB
function setDeviceData(direction = '', refreshCallback = '') { function setDeviceData(direction = '', refreshCallback = '') {
@@ -364,7 +311,7 @@
mac: $('#NEWDEV_devMac').val(), mac: $('#NEWDEV_devMac').val(),
name: encodeURIComponent($('#NEWDEV_devName').val().replace(/'/g, "")), name: encodeURIComponent($('#NEWDEV_devName').val().replace(/'/g, "")),
owner: encodeURIComponent($('#NEWDEV_devOwner').val().replace(/'/g, "")), owner: encodeURIComponent($('#NEWDEV_devOwner').val().replace(/'/g, "")),
type: $('#NEWDEV_devType').val().replace(/'/g, ""), type: $('#NEWDEV_devType').val().replace(/'/g, ""),
vendor: encodeURIComponent($('#NEWDEV_devVendor').val().replace(/'/g, "")), vendor: encodeURIComponent($('#NEWDEV_devVendor').val().replace(/'/g, "")),
icon: encodeURIComponent($('#NEWDEV_devIcon').val()), icon: encodeURIComponent($('#NEWDEV_devIcon').val()),
favorite: ($('#NEWDEV_devFavorite')[0].checked * 1), favorite: ($('#NEWDEV_devFavorite')[0].checked * 1),
@@ -380,6 +327,8 @@
alertevents: ($('#NEWDEV_devAlertEvents')[0].checked * 1), alertevents: ($('#NEWDEV_devAlertEvents')[0].checked * 1),
alertdown: ($('#NEWDEV_devAlertDown')[0].checked * 1), alertdown: ($('#NEWDEV_devAlertDown')[0].checked * 1),
skiprepeated: $('#NEWDEV_devSkipRepeated').val().split(' ')[0], skiprepeated: $('#NEWDEV_devSkipRepeated').val().split(' ')[0],
relType: $('#NEWDEV_devParentRelType').val().replace(/'/g, ""),
reqNics: ($('#NEWDEV_devReqNicsOnline')[0].checked * 1),
newdevice: ($('#NEWDEV_devIsNew')[0].checked * 1), newdevice: ($('#NEWDEV_devIsNew')[0].checked * 1),
archived: ($('#NEWDEV_devIsArchived')[0].checked * 1), archived: ($('#NEWDEV_devIsArchived')[0].checked * 1),
devFirstConnection: ($('#NEWDEV_devFirstConnection').val()), devFirstConnection: ($('#NEWDEV_devFirstConnection').val()),
@@ -427,9 +376,47 @@
} }
} }
// -----------------------------------------------
// INIT with polling for panel element visibility
// -----------------------------------------------
var deviceDetailsPageInitialized = false;
function initdeviceDetailsPage()
{
// Only proceed if .plugin-content is visible
if (!$('#panDetails:visible').length) {
return; // exit early if nothing is visible
}
// init page once
if (deviceDetailsPageInitialized) return; // ENSURE ONCE
deviceDetailsPageInitialized = true;
showSpinner();
getDeviceData();
}
// -----------------------------------------------------------------------------
// Recurring function to monitor the URL and reinitialize if needed
function deviceDetailsPageUpdater() {
initdeviceDetailsPage();
// Run updater again after delay
setTimeout(deviceDetailsPageUpdater, 200);
}
// if visible, load immediately, if not start updater
if (!$('#panDetails:visible').length) {
deviceDetailsPageUpdater();
}
else
{
getDeviceData();
}
// -------------------- INIT ------------------------
getDeviceData(true);
</script> </script>

View File

@@ -7,11 +7,11 @@
<!-- Hide Connections --> <!-- Hide Connections -->
<div class="text-center"> <div class="col-sm-12 col-xs-12">
<label> <label class="col-sm-3 col-xs-10">
<input class="checkbox blue hidden" id="chkHideConnectionEvents" type="checkbox" checked> <?= lang('DevDetail_Events_CheckBox');?>
<?= lang('DevDetail_Events_CheckBox');?>
</label> </label>
<input class="checkbox blue col-sm-1 col-xs-2" id="chkHideConnectionEvents" type="checkbox" onChange="loadEventsData()">
</div> </div>
<!-- Datatable Events --> <!-- Datatable Events -->
@@ -19,6 +19,7 @@
<thead> <thead>
<tr> <tr>
<th><?= lang("DevDetail_Tab_EventsTableDate");?></th> <th><?= lang("DevDetail_Tab_EventsTableDate");?></th>
<th><?= lang("DevDetail_Tab_EventsTableDate");?></th>
<th><?= lang("DevDetail_Tab_EventsTableEvent");?></th> <th><?= lang("DevDetail_Tab_EventsTableEvent");?></th>
<th><?= lang("DevDetail_Tab_EventsTableIP");?></th> <th><?= lang("DevDetail_Tab_EventsTableIP");?></th>
<th><?= lang("DevDetail_Tab_EventsTableInfo");?></th> <th><?= lang("DevDetail_Tab_EventsTableInfo");?></th>
@@ -29,66 +30,135 @@
<script> <script>
var eventsRows = 10;
var eventsHide = true;
var parEventsRows = 'Front_Details_Events_Rows';
var parEventsHide = 'Front_Details_Events_Hide';
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
function loadEventsData() {
const hideConnections = $('#chkHideConnectionEvents')[0].checked;
const hideConnectionsStr = hideConnections ? 'true' : 'false';
function loadEventsData() { mac = getMac()
// Define Events datasource and query dada
hideConnections = $('#chkHideConnectionEvents')[0].checked;
$('#tableEvents').DataTable().ajax.url('php/server/events.php?action=getDeviceEvents&mac=' + mac +'&period='+ period +'&hideConnections='+ hideConnections).load();
}
function initializeSessionsDatatable () { const rawSql = `
SELECT eve_DateTime, eve_DateTime, eve_EventType, eve_IP, eve_AdditionalInfo
FROM Events
WHERE eve_MAC = "${mac}"
AND (
(eve_EventType NOT IN ("Connected", "Disconnected", "VOIDED - Connected", "VOIDED - Disconnected"))
OR "${hideConnectionsStr}" = "false"
)
`;
// Events datatable const apiUrl = `php/server/dbHelper.php?action=read&rawSql=${btoa(encodeURIComponent(rawSql))}`;
$('#tableEvents').DataTable({
'paging' : true,
'lengthChange': true,
'lengthMenu' : [[10, 25, 50, 100, 500, -1], [10, 25, 50, 100, 500, 'All']],
'searching' : true,
'ordering' : true,
'info' : true,
'autoWidth' : false,
'order' : [[0,'desc']],
// Parameters // Manually load the data first
'pageLength' : eventsRows, $.get(apiUrl, function (data) {
const parsed = JSON.parse(data);
const rows = parsed.map(row => {
const rawDate = row.eve_DateTime;
const formattedDate = rawDate ? localizeTimestamp(rawDate) : '-';
return [
formattedDate,
row.eve_DateTime,
row.eve_EventType,
row.eve_IP,
row.eve_AdditionalInfo
];
});
'columnDefs' : [ // Fill the table manually
// Replace HTML codes const table = $('#tableEvents').DataTable();
{targets: [0], table.clear();
'createdCell': function (td, cellData, rowData, row, col) { table.rows.add(rows); // assuming each row is an array
$(td).html (translateHTMLcodes (localizeTimestamp(cellData))); table.draw();
} }
],
// Processing
'processing' : true,
'language' : {
processing: '<table><td width="130px" align="middle"><?= lang("DevDetail_Loading");?></td>'+
'<td><i class="ion ion-ios-loop-strong fa-spin fa-2x fa-fw">'+
'</td></table>',
emptyTable: 'No data',
"lengthMenu": "<?= lang('Events_Tablelenght');?>",
"search": "<?= lang('Events_Searchbox');?>: ",
"paginate": {
"next": "<?= lang('Events_Table_nav_next');?>",
"previous": "<?= lang('Events_Table_nav_prev');?>"
},
"info": "<?= lang('Events_Table_info');?>",
}
});
hideSpinner();
});
} }
initializeSessionsDatatable(); function initializeEventsDatatable (eventsRows) {
loadEventsData();
if ($.fn.dataTable.isDataTable('#tableEvents')) {
$('#tableEvents').DataTable().clear().destroy();
}
$('#tableEvents').DataTable({
'paging' : true,
'lengthChange': true,
'lengthMenu' : [[10, 25, 50, 100, 500, -1], [10, 25, 50, 100, 500, 'All']],
'searching' : true,
'ordering' : true,
'info' : true,
'autoWidth' : false,
'order' : [[0,'desc']],
'pageLength' : eventsRows,
'columnDefs' : [
{ orderData: [1], targets: [0] },
{ visible: false, targets: [1] },
{
targets: [0],
'createdCell': function (td, cellData, rowData, row, col) {
$(td).html(translateHTMLcodes(localizeTimestamp(cellData)));
}
}
],
'processing' : true,
'language' : {
processing: '<table><td width="130px" align="middle"><?= lang("DevDetail_Loading");?></td>'+
'<td><i class="fa-solid fa-spinner fa-spin-pulse"></i></td></table>',
emptyTable: 'No data',
"lengthMenu": "<?= lang('Events_Tablelenght');?>",
"search": "<?= lang('Events_Searchbox');?>: ",
"paginate": {
"next": "<?= lang('Events_Table_nav_next');?>",
"previous": "<?= lang('Events_Table_nav_prev');?>"
},
"info": "<?= lang('Events_Table_info');?>",
}
});
}
// -----------------------------------------------
// INIT with polling for panel element visibility
// -----------------------------------------------
var eventsPageInitialized = false;
function initDeviceEventsPage()
{
// Only proceed if .plugin-content is visible
if (!$('#panEvents:visible').length) {
return; // exit early if nothing is visible
}
// init page once
if (eventsPageInitialized) return; // ENSURE ONCE
eventsPageInitialized = true;
showSpinner();
var eventsRows = 10;
var eventsHide = true;
initializeEventsDatatable(eventsRows);
loadEventsData();
}
// -----------------------------------------------------------------------------
// Recurring function to monitor the URL and reinitialize if needed
function deviceEventsPageUpdater() {
initDeviceEventsPage();
// Run updater again after delay
setTimeout(deviceEventsPageUpdater, 200);
}
deviceEventsPageUpdater();
</script> </script>

View File

@@ -23,8 +23,6 @@
<script> <script>
initializeCalendar();
loadPresenceData();
// Force re-render calendar on tab change // Force re-render calendar on tab change
// (bugfix for render error at left panel) // (bugfix for render error at left panel)
@@ -234,6 +232,37 @@ function initializeCalendar() {
}) })
} }
// -----------------------------------------------
// INIT with polling for panel element visibility
// -----------------------------------------------
var presencePageInitialized = false;
function initDevicePresencePage() {
// Only proceed if the Presence tab is visible
if (!$('#panPresence:visible').length) {
return; // Exit early if nothing is visible
}
// Ensure initialization only happens once
if (presencePageInitialized) return;
presencePageInitialized = true;
showSpinner();
initializeCalendar();
loadPresenceData();
}
// Recurring check to initialize when visible
function devicePresencePageUpdater() {
initDevicePresencePage();
setTimeout(devicePresencePageUpdater, 200);
}
devicePresencePageUpdater();
</script> </script>

View File

@@ -24,77 +24,126 @@
<script> <script>
var parSessionsRows = 'Front_Details_Sessions_Rows';
function initializeSessionsDatatable (sessionsRows) {
// Sessions datatable
$('#tableSessions').DataTable({
'paging' : true,
'lengthChange': true,
'lengthMenu' : [[10, 25, 50, 100, 500, -1], [10, 25, 50, 100, 500, 'All']],
'searching' : true,
'ordering' : true,
'info' : true,
'autoWidth' : false,
'order' : [[0,'desc'], [1,'desc']],
// Parameters
'pageLength' : sessionsRows,
'columnDefs' : [
{visible: false, targets: [0]},
// Replace HTML codes
{targets: [3,5],
'createdCell': function (td, cellData, rowData, row, col) {
$(td).html (translateHTMLcodes (cellData));
} },
// Date
{targets: [1,2],
"createdCell": function (td, cellData, rowData, row, col) {
// console.log(cellData);
if (!cellData.includes("missing event") && !cellData.includes("..."))
{
if (cellData.includes("+")) { // Check if timezone offset is present
cellData = cellData.split('+')[0]; // Remove timezone offset
}
// console.log(cellData);
result = localizeTimestamp(cellData);
} else
{
result = translateHTMLcodes(cellData)
}
$(td).html (result);
} }
],
// Processing
'processing' : true,
'language' : {
processing: '<table><td width="130px" align="middle"><?= lang("DevDetail_Loading");?></td>'+
'<td><i class="fa-solid fa-spinner fa-spin-pulse"></i>'+
'</td></table>',
emptyTable: 'No data',
"lengthMenu": "<?= lang('Events_Tablelenght');?>",
"search": "<?= lang('Events_Searchbox');?>: ",
"paginate": {
"next": "<?= lang('Events_Table_nav_next');?>",
"previous": "<?= lang('Events_Table_nav_prev');?>"
},
"info": "<?= lang('Events_Table_info');?>",
}
});
}
// -----------------------------------------------
// INIT with polling for panel element visibility
// -----------------------------------------------
// -----------------------------------------------------------
// Init datatable
function loadSessionsData(period){
const table = $('#tableSessions').DataTable();
showSpinner();
// table.clear().draw(); // Clear existing data before reloading
table.ajax
.url('php/server/events.php?action=getDeviceSessions&mac=' + getMac() + '&period=' + period)
.load(function () {
hideSpinner();
});
}
var sessionsPageInitialized = false;
// -----------------------------------------------------------
// Main init function
function initDeviceSessionsPage()
{
// Only proceed if .plugin-content is visible
if (!$('#panSessions:visible').length) {
return; // exit early if nothing is visible
}
// init page once
if (sessionsPageInitialized) return;
sessionsPageInitialized = true;
showSpinner();
var sessionsRows = 10; var sessionsRows = 10;
var period = '1 month'; var period = '1 month';
function initializeSessionsDatatable () { initializeSessionsDatatable(sessionsRows);
// Sessions datatable loadSessionsData(period);
$('#tableSessions').DataTable({ }
'paging' : true,
'lengthChange': true,
'lengthMenu' : [[10, 25, 50, 100, 500, -1], [10, 25, 50, 100, 500, 'All']],
'searching' : true,
'ordering' : true,
'info' : true,
'autoWidth' : false,
'order' : [[0,'desc'], [1,'desc']],
// Parameters // -----------------------------------------------------------------------------
'pageLength' : sessionsRows, // Recurring function to monitor the URL and reinitialize if needed
function deviceSessionsPageUpdater() {
initDeviceSessionsPage();
'columnDefs' : [ // Run updater again after delay
{visible: false, targets: [0]}, setTimeout(deviceSessionsPageUpdater, 200);
}
// Replace HTML codes // start updater
{targets: [3,5], deviceSessionsPageUpdater();
'createdCell': function (td, cellData, rowData, row, col) {
$(td).html (translateHTMLcodes (cellData));
} },
// Date
{targets: [1,2],
"createdCell": function (td, cellData, rowData, row, col) {
// console.log(cellData);
if (!cellData.includes("missing event") && !cellData.includes("..."))
{
if (cellData.includes("+")) { // Check if timezone offset is present
cellData = cellData.split('+')[0]; // Remove timezone offset
}
// console.log(cellData);
result = localizeTimestamp(cellData);
} else
{
result = translateHTMLcodes(cellData)
}
$(td).html (result);
} }
],
// Processing
'processing' : true,
'language' : {
processing: '<table><td width="130px" align="middle"><?= lang("DevDetail_Loading");?></td>'+
'<td><i class="ion ion-ios-loop-strong fa-spin fa-2x fa-fw">'+
'</td></table>',
emptyTable: 'No data',
"lengthMenu": "<?= lang('Events_Tablelenght');?>",
"search": "<?= lang('Events_Searchbox');?>: ",
"paginate": {
"next": "<?= lang('Events_Table_nav_next');?>",
"previous": "<?= lang('Events_Table_nav_prev');?>"
},
"info": "<?= lang('Events_Table_info');?>",
}
});
}
function loadSessionsData(){
$('#tableSessions').DataTable().ajax.url('php/server/events.php?action=getDeviceSessions&mac=' + getMac() +'&period='+ period).load();
}
initializeSessionsDatatable();
loadSessionsData();
</script> </script>

View File

@@ -14,7 +14,7 @@
<?= lang("DevDetail_Tab_Tools_Internet_Info_Description") ?> <?= lang("DevDetail_Tab_Tools_Internet_Info_Description") ?>
</h5> </h5>
<br> <br>
<div style="width:100%; text-align: center; margin-bottom: 50px;"> <div style="width:100%; text-align: center;">
<button type="button" id="internetinfo" class="btn btn-primary pa-btn" style="margin: auto;" onclick="internetinfo()"> <button type="button" id="internetinfo" class="btn btn-primary pa-btn" style="margin: auto;" onclick="internetinfo()">
<?= lang("DevDetail_Tab_Tools_Internet_Info_Start") ?></button> <?= lang("DevDetail_Tab_Tools_Internet_Info_Start") ?></button>
<br> <br>
@@ -33,13 +33,13 @@
<?= lang("DevDetail_Copy_Device_Tooltip") ?> <?= lang("DevDetail_Copy_Device_Tooltip") ?>
</h5> </h5>
<br> <br>
<div style="width:100%; text-align: center; margin-bottom: 50px;"> <div style="width:100%; text-align: center;">
<select class="form-control" <select class="form-control"
title="<?= lang('DevDetail_Copy_Device_Tooltip');?>" title="<?= lang('DevDetail_Copy_Device_Tooltip');?>"
id="txtCopyFromDevice" > id="txtCopyFromDevice" >
<option value="lemp_loading" id="lemp_loading">Loading</option> <option value="lemp_loading" id="lemp_loading">Loading</option>
</select> </select>
<button type="button" id="internetinfo" class="btn btn-primary pa-btn" style="margin: auto;" onclick="()"> <button type="button" id="internetinfo" class="btn btn-primary pa-btn" style="margin: auto; margin-top:10px;" onclick="copyFromDevice()">
<?= lang("BackDevDetail_Copy_Title") ?></button> <?= lang("BackDevDetail_Copy_Title") ?></button>
<br> <br>
</div> </div>
@@ -56,7 +56,7 @@
<?= lang("DevDetail_Tools_WOL_noti_text") ?> <?= lang("DevDetail_Tools_WOL_noti_text") ?>
</h5> </h5>
<br> <br>
<div style="width:100%; text-align: center; margin-bottom: 50px;"> <div style="width:100%; text-align: center;">
<button type="button" id="internetinfo" class="btn btn-primary pa-btn" style="margin: auto;" onclick="wakeonlan()"> <button type="button" id="internetinfo" class="btn btn-primary pa-btn" style="margin: auto;" onclick="wakeonlan()">
<?= lang("DevDetail_Tools_WOL_noti") ?></button> <?= lang("DevDetail_Tools_WOL_noti") ?></button>
<br> <br>
@@ -74,7 +74,7 @@
<?= lang("DevDetail_button_DeleteEvents_Warning") ?> <?= lang("DevDetail_button_DeleteEvents_Warning") ?>
</h5> </h5>
<br> <br>
<div style="width:100%; text-align: center; margin-bottom: 50px;"> <div style="width:100%; text-align: center;">
<button type="button" <button type="button"
class="btn btn-default pa-btn pa-btn-delete" class="btn btn-default pa-btn pa-btn-delete"
style="margin-left:0px;" style="margin-left:0px;"
@@ -94,7 +94,7 @@
<?= lang("DevDetail_CustomProps_reset_info") ?> <?= lang("DevDetail_CustomProps_reset_info") ?>
</h5> </h5>
<br> <br>
<div style="width:100%; text-align: center; margin-bottom: 50px;"> <div style="width:100%; text-align: center;">
<button type="button" <button type="button"
class="btn btn-default pa-btn pa-btn-delete" class="btn btn-default pa-btn pa-btn-delete"
style="margin-left:0px;" style="margin-left:0px;"
@@ -116,7 +116,7 @@
<?= lang("DevDetail_Tab_Tools_Speedtest_Description") ?> <?= lang("DevDetail_Tab_Tools_Speedtest_Description") ?>
</h5> </h5>
<br> <br>
<div style="width:100%; text-align: center; margin-bottom: 50px;"> <div style="width:100%; text-align: center;">
<button type="button" id="speedtestcli" class="btn btn-primary pa-btn" style="margin: auto;" onclick="speedtestcli()"> <button type="button" id="speedtestcli" class="btn btn-primary pa-btn" style="margin: auto;" onclick="speedtestcli()">
<?= lang("DevDetail_Tab_Tools_Speedtest_Start") ?></button> <?= lang("DevDetail_Tab_Tools_Speedtest_Start") ?></button>
<br> <br>
@@ -133,7 +133,7 @@
<h5 class=""> <h5 class="">
<?= lang("DevDetail_Tab_Tools_Traceroute_Description") ?> <?= lang("DevDetail_Tab_Tools_Traceroute_Description") ?>
</h5> </h5>
<div style="width:100%; text-align: center; margin-bottom: 50px;"> <div style="width:100%; text-align: center;">
<button type="button" id="traceroute" class="btn btn-primary pa-btn" style="margin: auto;" onclick="traceroute()"> <button type="button" id="traceroute" class="btn btn-primary pa-btn" style="margin: auto;" onclick="traceroute()">
<?= lang("DevDetail_Tab_Tools_Traceroute_Start") ?> <?= lang("DevDetail_Tab_Tools_Traceroute_Start") ?>
</button> </button>
@@ -151,7 +151,7 @@
<h5 class=""> <h5 class="">
<?= lang("DevDetail_Tab_Tools_Nslookup_Description") ?> <?= lang("DevDetail_Tab_Tools_Nslookup_Description") ?>
</h5> </h5>
<div style="width:100%; text-align: center; margin-bottom: 50px;"> <div style="width:100%; text-align: center;">
<button type="button" id="nslookup" class="btn btn-primary pa-btn" style="margin: auto;" onclick="nslookup()"> <button type="button" id="nslookup" class="btn btn-primary pa-btn" style="margin: auto;" onclick="nslookup()">
<?= lang("DevDetail_Tab_Tools_Nslookup_Start") ?> <?= lang("DevDetail_Tab_Tools_Nslookup_Start") ?>
</button> </button>
@@ -295,7 +295,7 @@
function initCopyFromDevice() { function initCopyFromDevice() {
const devices = getVisibleDevicesList() const devices = getVisibleDevicesList()
console.log(devices); // console.log(devices);
const $select = $('#txtCopyFromDevice'); const $select = $('#txtCopyFromDevice');
$select.empty(); // Clear existing options $select.empty(); // Clear existing options
@@ -443,6 +443,37 @@
} }
// init first time // init first time
initNmapButtons(); // -----------------------------------------------------------
initCopyFromDevice(); var toolsPageInitialized = false;
function initDeviceToolsPage()
{
// Only proceed if .panTools is visible
if (!$('#panTools:visible').length) {
return; // exit early if nothing is visible
}
// init page once
if (toolsPageInitialized) return;
toolsPageInitialized = true;
initNmapButtons();
initCopyFromDevice();
hideSpinner();
}
// -----------------------------------------------------------------------------
// Recurring function to monitor the URL and reinitialize if needed
function deviceToolsPageUpdater() {
initDeviceToolsPage();
// Run updater again after delay
setTimeout(deviceToolsPageUpdater, 200);
}
// start updater
deviceToolsPageUpdater();
</script> </script>

View File

@@ -148,10 +148,7 @@ function main () {
//initialize the table headers in the correct order //initialize the table headers in the correct order
var availableColumns = getSettingOptions("UI_device_columns").split(","); var availableColumns = getSettingOptions("UI_device_columns").split(",");
headersDefaultOrder = availableColumns.map(val => getString(val)); headersDefaultOrder = availableColumns.map(val => getString(val));
console.log(headersDefaultOrder);
var selectedColumns = JSON.parse(getSetting("UI_device_columns").replace(/'/g, '"')); var selectedColumns = JSON.parse(getSetting("UI_device_columns").replace(/'/g, '"'));
@@ -266,14 +263,16 @@ function getDevicesTotals() {
function processDeviceTotals(devicesData) { function processDeviceTotals(devicesData) {
// Define filter conditions and corresponding objects // Define filter conditions and corresponding objects
const filters = [ const filters = [
{ status: 'my_devices', color: 'bg-aqua', label: getString('Device_Shortcut_AllDevices'), icon: 'fa-laptop' }, { status: 'my_devices', color: 'bg-aqua', label: getString('Device_Shortcut_AllDevices'), icon: 'fa-laptop' },
{ status: 'all', color: 'bg-aqua', label: getString('Gen_All_Devices'), icon: 'fa-laptop' }, { status: 'all', color: 'bg-aqua', label: getString('Gen_All_Devices'), icon: 'fa-laptop' },
{ status: 'connected', color: 'bg-green', label: getString('Device_Shortcut_Connected'), icon: 'fa-plug' }, { status: 'connected', color: 'bg-green', label: getString('Device_Shortcut_Connected'), icon: 'fa-plug' },
{ status: 'favorites', color: 'bg-yellow', label: getString('Device_Shortcut_Favorites'), icon: 'fa-star' }, { status: 'favorites', color: 'bg-yellow', label: getString('Device_Shortcut_Favorites'), icon: 'fa-star' },
{ status: 'new', color: 'bg-yellow', label: getString('Device_Shortcut_NewDevices'), icon: 'fa-plus' }, { status: 'new', color: 'bg-yellow', label: getString('Device_Shortcut_NewDevices'), icon: 'fa-plus' },
{ status: 'down', color: 'bg-red', label: getString('Device_Shortcut_DownOnly'), icon: 'fa-warning' }, { status: 'down', color: 'bg-red', label: getString('Device_Shortcut_DownOnly'), icon: 'fa-warning' },
{ status: 'archived', color: 'bg-gray', label: getString('Device_Shortcut_Archived'), icon: 'fa-eye-slash' }, { status: 'archived', color: 'bg-gray', label: getString('Device_Shortcut_Archived'), icon: 'fa-eye-slash' },
{ status: 'offline', color: 'bg-gray', label: getString('Gen_Offline'), icon: 'fa-xmark' } { status: 'offline', color: 'bg-gray', label: getString('Gen_Offline'), icon: 'fa-xmark' },
{ status: 'all_devices', color: 'bg-gray', label: getString('Gen_All_Devices'), icon: 'fa-laptop' },
{ status: 'network_devices', color: 'bg-aqua', label: getString('Network_Devices'), icon: 'fa-sitemap fa-rotate-270' }
]; ];
// Initialize an empty array to store the final objects // Initialize an empty array to store the final objects
@@ -299,13 +298,7 @@ function processDeviceTotals(devicesData) {
} }
}); });
// Render info boxes/tile cards // Render info boxes/tile cards
console.log(getSetting('UI_hide_empty'));
console.log(dataArray);
console.log(devicesData);
renderInfoboxes(dataArray); renderInfoboxes(dataArray);
} }
@@ -357,8 +350,6 @@ function initFilters() {
// Clear any existing filters in the DOM // Clear any existing filters in the DOM
$('#columnFilters').empty(); $('#columnFilters').empty();
console.log(displayedFilters);
// Ensure displayedFilters is an array and not empty // Ensure displayedFilters is an array and not empty
if (Array.isArray(displayedFilters) && displayedFilters.length > 0) { if (Array.isArray(displayedFilters) && displayedFilters.length > 0) {
$('#columnFiltersWrap').removeClass("hidden"); $('#columnFiltersWrap').removeClass("hidden");
@@ -512,34 +503,36 @@ function collectFilters() {
function mapColumnIndexToFieldName(index, tableColumnVisible) { function mapColumnIndexToFieldName(index, tableColumnVisible) {
// the order is important, don't change it! // the order is important, don't change it!
const columnNames = [ const columnNames = [
"devName", "devName", // 0
"devOwner", "devOwner", // 1
"devType", "devType", // 2
"devIcon", "devIcon", // 3
"devFavorite", "devFavorite", // 4
"devGroup", "devGroup", // 5
"devFirstConnection", "devFirstConnection", // 6
"devLastConnection", "devLastConnection", // 7
"devLastIP", "devLastIP", // 8
"devIsRandomMac", // resolved on the fly "devIsRandomMac", // 9 resolved on the fly
"devStatus", // resolved on the fly "devStatus", // 10 resolved on the fly
"devMac", "devMac", // 11
"devIpLong", //formatIPlong(device.devLastIP) || "", // IP orderable "devIpLong", // 12 formatIPlong(device.devLastIP) || "", // IP orderable
"rowid", "rowid", // 13
"devParentMAC", "devParentMAC", // 14
"devParentChildrenCount", // resolved on the fly "devParentChildrenCount", // 15 resolved on the fly
"devLocation", "devLocation", // 16
"devVendor", "devVendor", // 17
"devParentPort", "devParentPort", // 18
"devGUID", "devGUID", // 19
"devSyncHubNode", "devSyncHubNode", // 20
"devSite", "devSite", // 21
"devSSID", "devSSID", // 22
"devSourcePlugin", "devSourcePlugin", // 23
"devPresentLastScan", "devPresentLastScan", // 24
"devAlertDown", "devAlertDown", // 25
"devCustomProps", "devCustomProps", // 26
"devFQDN" "devFQDN", // 27
"devParentRelType", // 28
"devReqNicsOnline" // 29
]; ];
// console.log("OrderBy: " + columnNames[tableColumnOrder[index]]); // console.log("OrderBy: " + columnNames[tableColumnOrder[index]]);
@@ -562,15 +555,17 @@ function initializeDatatable (status) {
// Define color & title for the status selected // Define color & title for the status selected
switch (deviceStatus) { switch (deviceStatus) {
case 'my_devices': tableTitle = getString('Device_Shortcut_AllDevices'); color = 'aqua'; break; case 'my_devices': tableTitle = getString('Device_Shortcut_AllDevices'); color = 'aqua'; break;
case 'connected': tableTitle = getString('Device_Shortcut_Connected'); color = 'green'; break; case 'connected': tableTitle = getString('Device_Shortcut_Connected'); color = 'green'; break;
case 'all': tableTitle = getString('Gen_All_Devices'); color = 'aqua'; break; case 'all': tableTitle = getString('Gen_All_Devices'); color = 'aqua'; break;
case 'favorites': tableTitle = getString('Device_Shortcut_Favorites'); color = 'yellow'; break; case 'favorites': tableTitle = getString('Device_Shortcut_Favorites'); color = 'yellow'; break;
case 'new': tableTitle = getString('Device_Shortcut_NewDevices'); color = 'yellow'; break; case 'new': tableTitle = getString('Device_Shortcut_NewDevices'); color = 'yellow'; break;
case 'down': tableTitle = getString('Device_Shortcut_DownOnly'); color = 'red'; break; case 'down': tableTitle = getString('Device_Shortcut_DownOnly'); color = 'red'; break;
case 'archived': tableTitle = getString('Device_Shortcut_Archived'); color = 'gray'; break; case 'archived': tableTitle = getString('Device_Shortcut_Archived'); color = 'gray'; break;
case 'offline': tableTitle = getString('Gen_Offline'); color = 'gray'; break; case 'offline': tableTitle = getString('Gen_Offline'); color = 'gray'; break;
default: tableTitle = getString('Device_Shortcut_Devices'); color = 'gray'; break; case 'all_devices': tableTitle = getString('Gen_All_Devices'); color = 'gray'; break;
case 'network_devices': tableTitle = getString('Network_Devices'); color = 'aqua'; break;
default: tableTitle = getString('Device_Shortcut_Devices'); color = 'gray'; break;
} }
// Set title and color // Set title and color
@@ -599,7 +594,6 @@ function initializeDatatable (status) {
} }
} }
// todo: dynamically filter based on status
var table = $('#tableDevices').DataTable({ var table = $('#tableDevices').DataTable({
"serverSide": true, "serverSide": true,
"processing": true, "processing": true,
@@ -650,6 +644,8 @@ function initializeDatatable (status) {
devIpLong devIpLong
devCustomProps devCustomProps
devFQDN devFQDN
devParentRelType
devReqNicsOnline
} }
count count
} }
@@ -687,13 +683,19 @@ function initializeDatatable (status) {
return JSON.stringify(query); // Send the JSON request return JSON.stringify(query); // Send the JSON request
}, },
"dataSrc": function (json) { "dataSrc": function (res) {
console.log(json);
// Set the total number of records for pagination console.log("Raw response:", res);
json.recordsTotal = json.devices.count || 0; const json = res["data"];
json.recordsFiltered = json.devices.count || 0;
// Set the total number of records for pagination at the *root level* so DataTables sees them
res.recordsTotal = json.devices.count || 0;
res.recordsFiltered = json.devices.count || 0;
// console.log("recordsTotal:", res.recordsTotal, "recordsFiltered:", res.recordsFiltered);
// console.log("tableRows:", tableRows);
// Return only the array of rows for the table
return json.devices.devices.map(device => { return json.devices.devices.map(device => {
// Convert each device record into the required DataTable row format // Convert each device record into the required DataTable row format
// Order has to be the same as in the UI_device_columns setting options // Order has to be the same as in the UI_device_columns setting options
@@ -707,10 +709,10 @@ function initializeDatatable (status) {
device.devFirstConnection || "", device.devFirstConnection || "",
device.devLastConnection || "", device.devLastConnection || "",
device.devLastIP || "", device.devLastIP || "",
device.devIsRandomMac || "", // Custom logic for randomized MAC device.devIsRandomMac || "",
device.devStatus || "", device.devStatus || "",
device.devMac || "", // hidden device.devMac || "",
device.devIpLong || "", // IP orderable device.devIpLong || "",
device.rowid || "", device.rowid || "",
device.devParentMAC || "", device.devParentMAC || "",
device.devParentChildrenCount || 0, device.devParentChildrenCount || 0,
@@ -725,7 +727,9 @@ function initializeDatatable (status) {
device.devPresentLastScan || "", device.devPresentLastScan || "",
device.devAlertDown || "", device.devAlertDown || "",
device.devCustomProps || "", device.devCustomProps || "",
device.devFQDN || "" device.devFQDN || "",
device.devParentRelType || "",
device.devReqNicsOnline || 0
]; ];
const newRow = []; const newRow = [];
@@ -733,7 +737,6 @@ function initializeDatatable (status) {
for (let index = 0; index < tableColumnOrder.length; index++) { for (let index = 0; index < tableColumnOrder.length; index++) {
newRow.push(originalRow[tableColumnOrder[index]]); newRow.push(originalRow[tableColumnOrder[index]]);
} }
return newRow; return newRow;
}); });
} }
@@ -770,17 +773,34 @@ function initializeDatatable (status) {
// Device Name and FQDN // Device Name and FQDN
{targets: [mapIndx(0), mapIndx(27)], {targets: [mapIndx(0), mapIndx(27)],
'createdCell': function (td, cellData, rowData, row, col) { 'createdCell': function (td, cellData, rowData, row, col) {
// console.log(cellData) // console.log(cellData)
$(td).html ('<b class="anonymizeDev"><a href="deviceDetails.php?mac='+ rowData[mapIndx(11)] +'" class="">'+ cellData +'</a></b>'); $(td).html (
`<b class="anonymizeDev "
>
<a href="deviceDetails.php?mac=${rowData[mapIndx(11)]}" class="hover-node-info"
data-name="${cellData}"
data-ip="${rowData[mapIndx(8)]}"
data-mac="${rowData[mapIndx(11)]}"
data-vendor="${rowData[mapIndx(17)]}"
data-type="${rowData[mapIndx(2)]}"
data-firstseen="${rowData[mapIndx(6)]}"
data-lastseen="${rowData[mapIndx(7)]}"
data-relationship="${rowData[mapIndx(28)]}"
data-status="${rowData[mapIndx(10)]}"
data-present="${rowData[mapIndx(24)]}"
data-alert="${rowData[mapIndx(25)]}"
data-icon="${rowData[mapIndx(3)]}">
${cellData}
</a>
</b>`
);
} }, } },
// Connected Devices // Connected Devices
{targets: [mapIndx(15)], {targets: [mapIndx(15)],
'createdCell': function (td, cellData, rowData, row, col) { 'createdCell': function (td, cellData, rowData, row, col) {
// check if this is a network device // check if this is a network device
if(getSetting("NETWORK_DEVICE_TYPES").includes(`'${rowData[mapIndx(2)]}'`) ) if(getSetting("NETWORK_DEVICE_TYPES").includes(`'${rowData[mapIndx(2)]}'`) )
{ {
@@ -822,7 +842,7 @@ function initializeDatatable (status) {
<a href="http://${cellData}" class="pointer" target="_blank"> <a href="http://${cellData}" class="pointer" target="_blank">
${cellData} ${cellData}
</a> </a>
<span class="alignRight"> <span class="alignRight lockIcon">
<a href="https://${cellData}" class="pointer" target="_blank"> <a href="https://${cellData}" class="pointer" target="_blank">
<i class="fa fa-lock "></i> <i class="fa fa-lock "></i>
</a> </a>
@@ -886,6 +906,28 @@ function initializeDatatable (status) {
} }
} }, } },
// Parent Mac
{targets: [mapIndx(14)],
'createdCell': function (td, cellData, rowData, row, col) {
if (!isValidMac(cellData)) {
$(td).html('');
return;
}
const data = {
id: cellData, // MAC address
text: cellData // Optional display text (you could use a name or something else)
};
spanWrap = $(`<span class="custom-badge text-white"></span>`)
$(td).html(spanWrap);
const chipHtml = renderDeviceLink(data, spanWrap, true); // pass the td as container
$(spanWrap).append(chipHtml);
}
},
// Status color // Status color
{targets: [mapIndx(10)], {targets: [mapIndx(10)],
'createdCell': function (td, cellData, rowData, row, col) { 'createdCell': function (td, cellData, rowData, row, col) {
@@ -893,25 +935,14 @@ function initializeDatatable (status) {
tmp_devPresentLastScan = rowData[mapIndx(24)] tmp_devPresentLastScan = rowData[mapIndx(24)]
tmp_devAlertDown = rowData[mapIndx(25)] tmp_devAlertDown = rowData[mapIndx(25)]
if (tmp_devPresentLastScan == 1) const badge = getStatusBadgeParts(
{ rowData[mapIndx(24)], // tmp_devPresentLastScan
css = "green text-white statusOnline" rowData[mapIndx(25)], // tmp_devAlertDown
icon = '<i class="fa-solid fa-plug"></i>' rowData[mapIndx(11)], // MAC
} else if (tmp_devPresentLastScan != 1 && tmp_devAlertDown == 1) cellData // optional text
{ );
css = "red text-white statusDown"
icon = '<i class="fa-solid fa-triangle-exclamation"></i>'
} else if(tmp_devPresentLastScan != 1)
{
css = "gray text-white statusOffline"
icon = '<i class="fa-solid fa-xmark"></i>'
} else
{
css = "gray text-white statusUnknown"
icon = '<i class="fa-solid fa-question"></i>'
}
$(td).html (`<a href="deviceDetails.php?mac=${rowData[mapIndx(11)]}" class="badge bg-${css}">${icon} ${cellData.replace('-', '')}</a>`); $(td).html (`<a href="${badge.url}" class="badge ${badge.cssClass}">${badge.iconHtml} ${badge.text}</a>`);
} }, } },
], ],
@@ -970,7 +1001,7 @@ function initializeDatatable (status) {
}, debounceTime); }, debounceTime);
}); });
initHoverNodeInfo();
hideSpinner(); hideSpinner();
}, },
@@ -980,9 +1011,7 @@ function initializeDatatable (status) {
} }
}); });
} }
@@ -1035,40 +1064,24 @@ function multiEditDevices()
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// Function collects shown devices from the DataTable // Function collects shown devices from the DataTable
function getMacsOfShownDevices() { function getMacsOfShownDevices() {
rows = $('#tableDevices')[0].rows; var table = $('#tableDevices').DataTable();
macs = [];
// var devicesDataTableData = $('#tableDevices').dataTable().fnGetData(); var macs = [];
var devicesDataTableData = $('#tableDevices').DataTable().rows({ selected: false, page: 'current' }).data().toArray();
console.log(devicesDataTableData); // Get all row indexes on current page, in display order
var allIndexes = table.rows({ page: 'current' }).indexes();
var selectedDevices = []; allIndexes.each(function(idx) {
var rowData = table.row(idx).data();
// first row is the heading, skip if (rowData) {
for (var i = 1; i < rows.length; i++) { macs.push(rowData[mapIndx(11)]); // mapIndx(11) == MAC column
var rowIndex = rows[i]._DT_RowIndex;
// Ensure the rowIndex is valid and within bounds of devicesDataTableData
if (rowIndex >= 0 && rowIndex < devicesDataTableData.length) {
selectedDevices.push(devicesDataTableData[rowIndex]);
} else {
console.log(`Invalid rowIndex: ${rowIndex} at row ${i}`);
} }
} });
for (var j = 0; j < selectedDevices.length; j++) {
// Ensure that selectedDevices[j] is not undefined
if (selectedDevices[j]) {
macs.push(selectedDevices[j][mapIndx(11)]); // mapIndx(11) == MAC
} else {
console.log(`selectedDevices[${j}] is undefined`);
}
}
return macs; return macs;
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// Handle custom actions/properties on a device // Handle custom actions/properties on a device
function renderCustomProps(custProps, mac) { function renderCustomProps(custProps, mac) {

View File

@@ -2,6 +2,10 @@
require 'php/templates/header.php'; require 'php/templates/header.php';
?> ?>
<script>
showSpinner();
</script>
<!-- ----------------------------------------------------------------------- --> <!-- ----------------------------------------------------------------------- -->
<!-- Page ------------------------------------------------------------------ --> <!-- Page ------------------------------------------------------------------ -->
@@ -67,7 +71,7 @@
<div class="inner"> <h3 id="eventsNewDevices"> -- </h3> <div class="inner"> <h3 id="eventsNewDevices"> -- </h3>
<p class="infobox_label"><?= lang('Events_Shortcut_NewDevices');?></p> <p class="infobox_label"><?= lang('Events_Shortcut_NewDevices');?></p>
</div> </div>
<div class="icon"> <i class="ion ion-plus-round text-yellow-40"></i> </div> <div class="icon"> <i class="fa-solid fa-circle-plus text-yellow-40"></i> </div>
</div> </div>
</a> </a>
</div> </div>
@@ -238,7 +242,7 @@ function initializeDatatable () {
// Processing // Processing
'processing' : true, 'processing' : true,
'language' : { 'language' : {
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>', processing: '<table><td width="130px" align="middle"><?= lang("Events_Loading");?></td><td><i class="fa-solid fa-spinner fa-spin-pulse"></i></td></table>',
emptyTable: 'No data', emptyTable: 'No data',
"lengthMenu": "<?= lang('Events_Tablelenght');?>", "lengthMenu": "<?= lang('Events_Tablelenght');?>",
"search": "<?= lang('Events_Searchbox');?>: ", "search": "<?= lang('Events_Searchbox');?>: ",
@@ -247,6 +251,9 @@ function initializeDatatable () {
"previous": "<?= lang('Events_Table_nav_prev');?>" "previous": "<?= lang('Events_Table_nav_prev');?>"
}, },
"info": "<?= lang('Events_Table_info');?>", "info": "<?= lang('Events_Table_info');?>",
},
initComplete: function(settings, json) {
hideSpinner(); // Called after the DataTable is fully initialized
} }
}); });

View File

@@ -4,7 +4,7 @@
"display": "standalone", "display": "standalone",
"icons": [ "icons": [
{ {
"src": "", "src": "/img/NetAlertX_logo.png",
"sizes": "180x180", "sizes": "180x180",
"type": "image/png" "type": "image/png"
} }

View File

@@ -99,18 +99,6 @@ if (isset ($_SESSION["login"]) == FALSE || $_SESSION["login"] != 1)
<!-- Favicon --> <!-- Favicon -->
<link id="favicon" rel="icon" type="image/x-icon" href="img/NetAlertX_logo.png"> <link id="favicon" rel="icon" type="image/x-icon" href="img/NetAlertX_logo.png">
<!-- Dark-Mode Patch -->
<?php
switch ($UI_THEME) {
case "Dark":
echo '<link rel="stylesheet" href="css/dark-patch.css">';
break;
case "System":
echo '<link rel="stylesheet" href="css/system-dark-patch.css">';
break;
}
?>
<link rel="stylesheet" href="/css/offline-font.css"> <link rel="stylesheet" href="/css/offline-font.css">
</head> </head>
<body class="hold-transition login-page col-sm-12 col-sx-12"> <body class="hold-transition login-page col-sm-12 col-sx-12">

View File

@@ -12,7 +12,7 @@ var timerRefreshData = ''
var emptyArr = ['undefined', "", undefined, null, 'null']; var emptyArr = ['undefined', "", undefined, null, 'null'];
var UI_LANG = "English"; var UI_LANG = "English";
const allLanguages = ["en_us", "es_es", "de_de", "fr_fr", "it_it", "ru_ru", "nb_no", "pl_pl", "pt_br", "tr_tr", "zh_cn", "cs_cz", "ar_ar", "ca_ca", "uk_ua"]; // needs to be same as in lang.php const allLanguages = ["en_us", "es_es", "de_de", "fr_fr", "it_it", "ru_ru", "nb_no", "pl_pl", "pt_br", "pt_pt", "tr_tr", "zh_cn", "cs_cz", "ar_ar", "ca_ca", "uk_ua"]; // needs to be same as in lang.php
var settingsJSON = {} var settingsJSON = {}
@@ -328,6 +328,9 @@ function getLangCode() {
case 'Portuguese (pt_br)': case 'Portuguese (pt_br)':
lang_code = 'pt_br'; lang_code = 'pt_br';
break; break;
case 'Portuguese (pt_pt)':
lang_code = 'pt_pt';
break;
case 'Turkish (tr_tr)': case 'Turkish (tr_tr)':
lang_code = 'tr_tr'; lang_code = 'tr_tr';
break; break;
@@ -362,31 +365,72 @@ function getLangCode() {
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// String utilities // String utilities
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
function localizeTimestamp(input) {
let tz = getSetting("TIMEZONE") || 'Europe/Berlin';
input = String(input || '').trim();
// ✅ 1. Unix timestamps (10 or 13 digits)
if (/^\d+$/.test(input)) {
const ms = input.length === 10 ? parseInt(input, 10) * 1000 : parseInt(input, 10);
return new Intl.DateTimeFormat('default', {
timeZone: tz,
year: 'numeric', month: '2-digit', day: '2-digit',
hour: '2-digit', minute: '2-digit', second: '2-digit',
hour12: false
}).format(new Date(ms));
}
function localizeTimestamp(result) // ✅ 2. European DD/MM/YYYY
{ let match = input.match(/^(\d{1,2})\/(\d{1,2})\/(\d{4})(?:[ ,]+(\d{1,2}:\d{2}(?::\d{2})?))?(.*)$/);
// contains TZ in format Europe/Berlin if (match) {
tz = getSetting("TIMEZONE") let [ , d, m, y, t = "00:00:00", tzPart = "" ] = match;
const iso = `${y}-${m.padStart(2,'0')}-${d.padStart(2,'0')}T${t.length===5?t+":00":t}${tzPart}`;
return formatSafe(iso, tz);
}
// set default if not available or app still loading // ✅ 3. US MM/DD/YYYY
tz == "" ? tz = 'Europe/Berlin' : tz = tz; match = input.match(/^(\d{1,2})\/(\d{1,2})\/(\d{4})(?:[ ,]+(\d{1,2}:\d{2}(?::\d{2})?))?(.*)$/);
if (match) {
const date = new Date(result); // Assumes result is a timestamp or ISO string let [ , m, d, y, t = "00:00:00", tzPart = "" ] = match;
const formatter = new Intl.DateTimeFormat('default', { const iso = `${y}-${m.padStart(2,'0')}-${d.padStart(2,'0')}T${t.length===5?t+":00":t}${tzPart}`;
timeZone: tz, return formatSafe(iso, tz);
year: 'numeric', }
month: '2-digit',
day: '2-digit',
hour: '2-digit',
minute: '2-digit',
second: '2-digit',
hour12: false // change to true if you want AM/PM format
});
return formatter.format(date); // ✅ 4. ISO-style (with T, Z, offsets)
match = input.match(/^(\d{4}-\d{1,2}-\d{1,2})[ T](\d{1,2}:\d{2}(?::\d{2})?)(Z|[+-]\d{2}:?\d{2})?$/);
if (match) {
let [ , ymd, time, offset = "" ] = match;
// normalize to YYYY-MM-DD
let [y, m, d] = ymd.split('-').map(x => x.padStart(2,'0'));
const iso = `${y}-${m}-${d}T${time.length===5?time+":00":time}${offset}`;
return formatSafe(iso, tz);
}
// ✅ 5. RFC2822 / "25 Aug 2025 13:45:22 +0200"
match = input.match(/^\d{1,2} [A-Za-z]{3,} \d{4}/);
if (match) {
return formatSafe(input, tz);
}
// ✅ 6. Fallback (whatever Date() can parse)
return formatSafe(input, tz);
function formatSafe(str, tz) {
const date = new Date(str);
if (!isFinite(date)) {
console.error(`ERROR: Couldn't parse date: '${str}' with TIMEZONE ${tz}`);
return 'Failed conversion - Check browser console';
}
return new Intl.DateTimeFormat('default', {
timeZone: tz,
year: 'numeric', month: '2-digit', day: '2-digit',
hour: '2-digit', minute: '2-digit', second: '2-digit',
hour12: false
}).format(date);
}
} }
// ---------------------------------------------------- // ----------------------------------------------------
/** /**
* Replaces double quotes within single-quoted strings, then converts all single quotes to double quotes, * Replaces double quotes within single-quoted strings, then converts all single quotes to double quotes,
@@ -563,7 +607,7 @@ function createDeviceLink(input)
{ {
if(checkMacOrInternet(input)) if(checkMacOrInternet(input))
{ {
return `<span class="anonymizeMac"><a href="/deviceDetails.php?mac=${input}" target="_blank">${getNameByMacAddress(input)}</a><span>` return `<span class="anonymizeMac"><a href="/deviceDetails.php?mac=${input}" target="_blank">${getDevDataByMac(input, "devName")}</a><span>`
} }
return input; return input;
@@ -767,7 +811,6 @@ function forceLoadUrl(relativeUrl) {
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
function navigateToDeviceWithIp (ip) { function navigateToDeviceWithIp (ip) {
@@ -790,11 +833,6 @@ function navigateToDeviceWithIp (ip) {
}); });
} }
// -----------------------------------------------------------------------------
function getNameByMacAddress(macAddress) {
return getDevDataByMac(macAddress, "devName")
}
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// Check if MAC or Internet // Check if MAC or Internet
function checkMacOrInternet(inputStr) { function checkMacOrInternet(inputStr) {
@@ -967,7 +1005,7 @@ function getDevDataByMac(macAddress, dbColumn) {
if (!devicesCache || devicesCache == "") { if (!devicesCache || devicesCache == "") {
console.error(`Session variable "${sessionDataKey}" not found.`); console.error(`Session variable "${sessionDataKey}" not found.`);
return "Unknown"; return null;
} }
const devices = JSON.parse(devicesCache); const devices = JSON.parse(devicesCache);
@@ -986,18 +1024,16 @@ function getDevDataByMac(macAddress, dbColumn) {
} }
} }
return "Unknown"; // Return a default value if MAC address is not found console.error("⚠ Device with MAC not found:" + macAddress)
return null; // Return a default value if MAC address is not found
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// Cache the devices as one JSON // Cache the devices as one JSON
function cacheDevices() function cacheDevices()
{ {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
// if(!getCache('completedCalls').includes('cacheDevices'))
// {
$.get('php/server/query_json.php', { file: 'table_devices.json', nocache: Date.now() }, function(data) { $.get('php/server/query_json.php', { file: 'table_devices.json', nocache: Date.now() }, function(data) {
// console.log(data) // console.log(data)
@@ -1021,8 +1057,7 @@ function cacheDevices()
// console.log(getCache('devicesListAll_JSON')) // console.log(getCache('devicesListAll_JSON'))
}).then(() => handleSuccess('cacheDevices', resolve())).catch(() => handleFailure('cacheDevices', reject("cacheDevices already completed"))); // handle AJAX synchronization }).then(() => handleSuccess('cacheDevices', resolve())).catch(() => handleFailure('cacheDevices', reject("cacheDevices already completed"))); // handle AJAX synchronization
} }
// } );
);
} }
var devicesListAll_JSON = []; // this will contain a list off all devices var devicesListAll_JSON = []; // this will contain a list off all devices
@@ -1063,47 +1098,102 @@ function getGuid() {
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// Loading Spinner overlay // Loading Spinner overlay
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
spinnerHtml = `
<!-- spinner -->
<div id="loadingSpinner" style="display: block">
<div class="pa_semitransparent-panel"></div>
<div class="panel panel-default pa_spinner">
<table>
<td width="130px" align="middle">_text_</td>
<td><i class="ion ion-ios-loop-strong fa-spin fa-2x fa-fw"></td>
</table>
</div>
</div>
`
function showSpinner(stringKey='Loading') let spinnerTimeout = null;
{ let animationTime = 300
if(stringKey == "") function showSpinner(stringKey = 'Loading') {
{ const text = isEmpty(stringKey) ? "Loading" : getString(stringKey || "Loading");
text = '' const spinner = $("#loadingSpinner");
} else const target = $(".spinnerTarget").first(); // Only use the first one if multiple exist
{
text = getString(stringKey) $("#loadingSpinnerText").text(text);
if (target.length) {
// Position relative to target
const offset = target.offset();
const width = target.outerWidth();
const height = target.outerHeight();
spinner.css({
position: "absolute",
top: offset.top,
left: offset.left,
width: width,
height: height,
zIndex: 800
});
} else {
// Fullscreen fallback
spinner.css({
position: "fixed",
top: 0,
left: 0,
width: "100%",
height: "100%",
zIndex: 800
});
} }
text = isEmpty(text) ? "Loading" : text; requestAnimationFrame(() => {
spinner.addClass("visible");
if($("#loadingSpinner").length) spinner.fadeIn(animationTime);
{ });
$("#loadingSpinner").show();
}
else{
$(".wrapper").append(spinnerHtml.replace('_text_',text))
}
}
// -----------------------------------------------------------------------------
function hideSpinner()
{
$("#loadingSpinner").hide()
} }
function hideSpinner() {
clearTimeout(spinnerTimeout);
const spinner = $("#loadingSpinner");
if (!spinner.length) return;
const target = $(".spinnerTarget").first();
if (target.length) {
// Lock position to target
const offset = target.offset();
const width = target.outerWidth();
const height = target.outerHeight();
spinner.css({
position: "absolute",
top: offset.top,
left: offset.left,
width: width,
height: height,
zIndex: 800
});
} else {
// Fullscreen fallback
spinner.css({
position: "fixed",
top: 0,
left: 0,
width: "100%",
height: "100%",
zIndex: 800
});
}
// Trigger fade-out and only remove styles AFTER fade completes AND display is none
spinner.removeClass("visible").fadeOut(animationTime, () => {
// Ensure it's really hidden before resetting styles
spinner.css({
display: "none"
});
spinner.css({
position: "",
top: "",
left: "",
width: "",
height: "",
zIndex: ""
});
});
}
// -------------------------------------------------------- // --------------------------------------------------------
// Calls a backend function to add a front-end event to an execution queue // Calls a backend function to add a front-end event to an execution queue
function updateApi(apiEndpoints) function updateApi(apiEndpoints)

View File

@@ -161,6 +161,139 @@ function showModalFieldInput(
$(`#${prefix}`).modal("show"); $(`#${prefix}`).modal("show");
} }
// -----------------------------------------------------------------------------
function showModalPopupForm(
title,
message,
btnCancel = getString("Gen_Cancel"),
btnOK = getString("Gen_Okay"),
curValue = null,
popupFormJson = null,
parentSettingKey = null,
triggeredBy = null
) {
// set captions
prefix = "modal-form";
console.log(popupFormJson);
$(`#${prefix}-title`).html(title);
$(`#${prefix}-message`).html(message);
$(`#${prefix}-cancel`).html(btnCancel);
$(`#${prefix}-OK`).html(btnOK);
// if curValue not null
if (curValue)
{
initialValues = JSON.parse(atob(curValue));
}
outputHtml = "";
if (Array.isArray(popupFormJson)) {
popupFormJson.forEach((field, index) => {
// You'll need to define these or map them from `field`
const setKey = field.function || `field_${index}`;
const setName = getString(`${parentSettingKey}_popupform_${setKey}_name`);
const labelClasses = "col-sm-2"; // example, or from your obj.labelClasses
const inputClasses = "col-sm-10"; // example, or from your obj.inputClasses
let initialValue = '';
if (curValue && Array.isArray(initialValues)) {
const match = initialValues.find(
v => v[1] == setKey
);
if (match) {
initialValue = match[3];
}
}
const fieldOptionsOverride = field.type?.elements[0]?.elementOptions || [];
const setValue = initialValue;
const setType = JSON.stringify(field.type);
const setEvents = field.events || []; // default to empty array if missing
const setObj = { setKey, setValue, setType, setEvents };
// Generate the input field HTML
const inputFormHtml = `
<div class="form-group col-xs-12">
<label id="${setKey}_label" class="${labelClasses}"> ${setName}
<i my-set-key="${parentSettingKey}_popupform_${setKey}"
title="${getString("Settings_Show_Description")}"
class="fa fa-circle-info pointer helpIconSmallTopRight"
onclick="showDescriptionPopup(this)">
</i>
</label>
<div class="${inputClasses}">
${generateFormHtml(
null, // settingsData only required for datatables
setObj,
null,
fieldOptionsOverride,
null
)}
</div>
</div>
`;
// Append to result
outputHtml += inputFormHtml;
});
}
$(`#modal-form-plc`).html(outputHtml);
// Bind OK button click event
$(`#${prefix}-OK`).off("click").on("click", function() {
let settingsArray = [];
if (Array.isArray(popupFormJson)) {
popupFormJson.forEach(field => {
collectSetting(
`${parentSettingKey}_popupform`, // prefix
field.function, // setCodeName
field.type, // setType (object)
settingsArray
);
});
}
// Encode settings
const jsonData = JSON.stringify(settingsArray);
const encodedValue = btoa(jsonData);
// Get label from the FIRST field (value in 4th column)
const label = settingsArray[0][3]
// Add new option to target select
const selectId = parentSettingKey;
// If triggered by an option, update it; otherwise append new
if (triggeredBy && $(triggeredBy).is("option")) {
// Update existing option
$(triggeredBy)
.attr("value", encodedValue)
.text(label);
} else {
const newOption = $("<option class='interactable-option'></option>")
.attr("value", encodedValue)
.text(label);
$("#" + selectId).append(newOption);
initListInteractionOptions(newOption);
}
console.log("Collected popup form settings:", settingsArray);
if (typeof modalCallbackFunction === "function") {
modalCallbackFunction(settingsArray);
}
$(`#${prefix}`).modal("hide");
});
// Show modal
$(`#${prefix}`).modal("show");
}
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
function modalDefaultOK() { function modalDefaultOK() {
// Hide modal // Hide modal
@@ -224,7 +357,7 @@ function modalWarningOK() {
} else if (typeof modalCallbackFunction === "string" && typeof window[modalCallbackFunction] === "function") { } else if (typeof modalCallbackFunction === "string" && typeof window[modalCallbackFunction] === "function") {
window[modalCallbackFunction](); // Call via window window[modalCallbackFunction](); // Call via window
} else { } else {
console.error("Invalid callback function"); console.error("Invalid callback function: " + modalCallbackFunction);
} }
}, 100); }, 100);
} }

View File

@@ -67,6 +67,15 @@ function getPluginConfig(pluginsData, prefix) {
return result; return result;
} }
// ----------------------------------------
// Show the description of a setting
function showDescriptionPopup(e) {
console.log($(e).attr("my-set-key"));
showModalOK("Info", getString($(e).attr("my-set-key") + '_description'))
}
// ------------------------------------------------------------------- // -------------------------------------------------------------------
// Generate plugin HTML card based on prefixes in an array // Generate plugin HTML card based on prefixes in an array
function pluginCards(prefixesOfEnabledPlugins, includeSettings) { function pluginCards(prefixesOfEnabledPlugins, includeSettings) {
@@ -237,13 +246,6 @@ function settingsCollectedCorrectly(settingsArray, settingsJSON_DB) {
// Manipulating Editable List options // Manipulating Editable List options
// ------------------------------------------------------------------- // -------------------------------------------------------------------
// ---------------------------------------------------------
// Add row to datatable
function addDataTableRow(el)
{
alert("a")
}
// --------------------------------------------------------- // ---------------------------------------------------------
// Clone datatable row // Clone datatable row
function cloneDataTableRow(el){ function cloneDataTableRow(el){
@@ -299,6 +301,33 @@ function removeDataTableRow(el) {
} }
} }
// ---------------------------------------------------------
// Add item via pop up form dialog
function addViaPopupForm(element) {
console.log(element);
const toId = $(element).attr("my-input-to");
const curValue = $(`#${toId}`).val();
const parsed = JSON.parse(atob($(`#${toId}`).data("elementoptionsbase64")));
const popupFormJson = parsed.find(obj => "popupForm" in obj)?.popupForm ?? null;
console.log(`toId | curValue: ${toId} | ${curValue}`);
showModalPopupForm(
`<i class="fa-solid fa-square-plus"></i> ${getString("Gen_Add")}`, // title
"", // message
getString("Gen_Cancel"), // btnCancel
getString("Gen_Add"), // btnOK
null, // curValue
popupFormJson, // popupform
toId, // parentSettingKey
element // triggeredBy
);
// flag something changes to prevent navigating from page
settingsChanged();
}
// --------------------------------------------------------- // ---------------------------------------------------------
// Add item to list // Add item to list
function addList(element, clearInput = true) { function addList(element, clearInput = true) {
@@ -363,8 +392,6 @@ function removeAllOptions(element) {
function selectAll(element) { function selectAll(element) {
settingsChanged(); settingsChanged();
// Get the <select> element with the class 'deviceSelector'
// var selectElement = $('.deviceSelector select');
var selectElement = $(`#${$(element).attr("my-input-to")}`); var selectElement = $(`#${$(element).attr("my-input-to")}`);
// Iterate over each option within the select element // Iterate over each option within the select element
@@ -381,8 +408,6 @@ function selectAll(element) {
// UN-Select All // UN-Select All
function unselectAll(element) { function unselectAll(element) {
settingsChanged(); settingsChanged();
// Get the <select> element with the class 'deviceSelector'
// var selectElement = $('.deviceSelector select');
var selectElement = $(`#${$(element).attr("my-input-to")}`); var selectElement = $(`#${$(element).attr("my-input-to")}`);
// Iterate over each option within the select element // Iterate over each option within the select element
@@ -399,8 +424,7 @@ function unselectAll(element) {
// Trigger change to open up the dropdown filed // Trigger change to open up the dropdown filed
function selectChange(element) { function selectChange(element) {
settingsChanged(); settingsChanged();
// Get the <select> element with the class 'deviceSelector'
// var selectElement = $('.deviceSelector select');
var selectElement = $(`#${$(element).attr("my-input-to")}`); var selectElement = $(`#${$(element).attr("my-input-to")}`);
selectElement.parent().find("input").focus().click(); selectElement.parent().find("input").focus().click();
@@ -432,18 +456,41 @@ function initListInteractionOptions(element) {
// Perform action based on click count // Perform action based on click count
if (clickCounter === 1) { if (clickCounter === 1) {
// Single-click action // Single-click action
showModalFieldInput(
`<i class="fa fa-pen-to-square"></i> ${getString( const $parent = $option.parent();
"Gen_Update_Value" const transformers = $parent.attr("my-transformers");
)}`,
getString("settings_update_item_warning"), if (transformers && transformers === "name|base64") {
getString("Gen_Cancel"), // Parent has my-transformers="name|base64"
getString("Gen_Update"), const toId = $parent.attr("id");
$option.html(), const curValue = $option.val();
function () { const parsed = JSON.parse(atob($parent.data("elementoptionsbase64")));
updateOptionItem($option, $(`#modal-field-input-field`).val()); const popupFormJson = parsed.find(obj => "popupForm" in obj)?.popupForm ?? null;
}
); showModalPopupForm(
`<i class="fa fa-pen-to-square"></i> ${getString("Gen_Update_Value")}`, // title
"", // message
getString("Gen_Cancel"), // btnCancel
getString("Gen_Update"), // btnOK
curValue, // curValue
popupFormJson, // popupform
toId, // parentSettingKey
this // triggeredBy
);
} else {
// Fallback to normal field input
showModalFieldInput(
`<i class="fa fa-pen-to-square"></i> ${getString("Gen_Update_Value")}`,
getString("settings_update_item_warning"),
getString("Gen_Cancel"),
getString("Gen_Update"),
$option.html(),
function () {
updateOptionItem($option, $(`#modal-field-input-field`).val());
}
);
}
} else if (clickCounter === 2) { } else if (clickCounter === 2) {
// Double-click action // Double-click action
removeOptionItem($option); removeOptionItem($option);
@@ -624,10 +671,9 @@ function generateOptionsOrSetOptions(
// console.log( setKey); // console.log( setKey);
// NOTE {value} options to replace with a setting or SQL value are handled in the cacheSettings() function // NOTE {value} options to replace with a setting or SQL value are handled in the cacheSettings() function
// obj.push({ id: item, name: item })
options = arrayToObject(createArray(overrideOptions ? overrideOptions : getSettingOptions(setKey))) options = arrayToObject(createArray(overrideOptions ? overrideOptions : getSettingOptions(setKey)))
// Call to render lists // Call to render lists
renderList( renderList(
options, options,
@@ -637,8 +683,6 @@ function generateOptionsOrSetOptions(
targetField, targetField,
transformers transformers
); );
} }
@@ -659,6 +703,13 @@ function applyTransformers(val, transformers) {
val = btoa(val); val = btoa(val);
} }
break; break;
case "name|base64":
// // Implement base64 logic
// if (!isBase64(val)) {
// val = btoa(val);
// }
val = val; // probably TODO ⚠
break;
case "getString": case "getString":
// no change // no change
val = val; val = val;
@@ -671,7 +722,7 @@ function applyTransformers(val, transformers) {
} }
// ------------------------------------------------------------ // ------------------------------------------------------------
// Function to reverse transformers applied to a value // Function to reverse transformers applied to a value - returns the LABEL
function reverseTransformers(val, transformers) { function reverseTransformers(val, transformers) {
transformers.reverse().forEach((transformer) => { transformers.reverse().forEach((transformer) => {
switch (transformer) { switch (transformer) {
@@ -685,10 +736,24 @@ function reverseTransformers(val, transformers) {
val = atob(val); val = atob(val);
} }
break; break;
case "name|base64":
// Implement base64 decoding logic
if (isBase64(val)) {
val = JSON.parse(atob(val))[0][3];
}
val = val; // probably TODO ⚠
break;
case "getString": case "getString":
// retrieve string // retrieve string
val = getString(val); val = getString(val);
break; break;
case "deviceChip":
mac = val // value is mac
val = `${getDevDataByMac(mac, "devName")}`
break;
case "deviceRelType":
val = val; // nothing to do
break;
default: default:
console.warn(`Unknown transformer: ${transformer}`); console.warn(`Unknown transformer: ${transformer}`);
} }
@@ -717,8 +782,8 @@ const handleElementOptions = (setKey, elementOptions, transformers, val) => {
let customParams = ""; let customParams = "";
let customId = ""; let customId = "";
let columns = []; let columns = [];
let base64Regex = ""; let base64Regex = "";
let elementOptionsBase64 = btoa(JSON.stringify(elementOptions));
elementOptions.forEach((option) => { elementOptions.forEach((option) => {
if (option.prefillValue) { if (option.prefillValue) {
@@ -801,7 +866,8 @@ const handleElementOptions = (setKey, elementOptions, transformers, val) => {
customParams, customParams,
customId, customId,
columns, columns,
base64Regex base64Regex,
elementOptionsBase64
}; };
}; };
@@ -822,13 +888,14 @@ function arrayToObject(array) {
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// Processor to generate options // Processor to generate options
// options - available options
// valuesArray - values = selected options
function generateOptions(options, valuesArray, targetField, transformers, placeholder) { function generateOptions(options, valuesArray, targetField, transformers, placeholder) {
var optionsHtml = ""; var optionsHtml = "";
resultArray = [] resultArray = []
selectedArray = [] selectedArray = []
cssClass = "" cssClass = ""
// determine if options or values are used in the listing // determine if options or values are used in the listing
if (valuesArray.length > 0 && options.length > 0){ if (valuesArray.length > 0 && options.length > 0){
@@ -847,7 +914,6 @@ function generateOptions(options, valuesArray, targetField, transformers, placeh
// dropdown -> options only (value == 1 STRING not ARRAY) // dropdown -> options only (value == 1 STRING not ARRAY)
resultArray = options; resultArray = options;
} }
// Create a map to track the index of each item in valuesArray // Create a map to track the index of each item in valuesArray
const orderMap = new Map(valuesArray.map((item, index) => [item, index])); const orderMap = new Map(valuesArray.map((item, index) => [item, index]));
@@ -931,13 +997,102 @@ function genListWithInputSet(options, valuesArray, targetField, transformers, pl
$("#" + placeholder).replaceWith(listHtml); $("#" + placeholder).replaceWith(listHtml);
} }
// -----------------------------------------------------------------
// Collects a setting based on code name
function collectSetting(prefix, setCodeName, setType, settingsArray) {
// Parse setType if it's a JSON string
const setTypeObject = (typeof setType === "string")
? JSON.parse(processQuotes(setType))
: setType;
const dataType = setTypeObject.dataType;
// Pick element with input value
let elements = setTypeObject.elements.filter(el => el.elementHasInputValue === 1);
let elementWithInputValue = elements.length === 0
? setTypeObject.elements[setTypeObject.elements.length - 1]
: elements[0];
const { elementType, elementOptions = [], transformers = [] } = elementWithInputValue;
const opts = handleElementOptions('none', elementOptions, transformers, val = "");
// Map of handlers
const handlers = {
datatableString: () => {
const value = collectTableData(`#${setCodeName}_table`);
return btoa(JSON.stringify(value));
},
simpleValue: () => {
let value = $(`#${setCodeName}`).val();
return applyTransformers(value, transformers);
},
checkbox: () => {
let value = $(`#${setCodeName}`).is(':checked') ? 1 : 0;
if (dataType === "boolean") {
value = value === 1 ? "True" : "False";
}
return applyTransformers(value, transformers);
},
array: () => {
let temps = [];
if (opts.isOrdeable) {
temps = $(`#${setCodeName}`).val();
} else {
const sel = $(`#${setCodeName}`).attr("my-editable") === "true" ? "" : ":selected";
$(`#${setCodeName} option${sel}`).each(function() {
const vl = $(this).val();
if (vl !== '') {
temps.push(applyTransformers(vl, transformers));
}
});
}
return JSON.stringify(temps);
},
none: () => "",
json: () => {
let value = $(`#${setCodeName}`).val();
value = applyTransformers(value, transformers);
return JSON.stringify(value, null, 2);
},
fallback: () => {
console.error(`[collectSetting] Couldn't determine how to handle (${setCodeName}|${dataType}|${opts.inputType})`);
let value = $(`#${setCodeName}`).val();
return applyTransformers(value, transformers);
}
};
// Select handler key
let handlerKey;
if (dataType === "string" && elementType === "datatable") {
handlerKey = "datatableString";
} else if (dataType === "string" ||
(dataType === "integer" && (opts.inputType === "number" || opts.inputType === "text"))) {
handlerKey = "simpleValue";
} else if (opts.inputType === "checkbox") {
handlerKey = "checkbox";
} else if (dataType === "array") {
handlerKey = "array";
} else if (dataType === "none") {
handlerKey = "none";
} else if (dataType === "json") {
handlerKey = "json";
} else {
handlerKey = "fallback";
}
const value = handlers[handlerKey]();
settingsArray.push([prefix, setCodeName, dataType, value]);
return settingsArray;
}
// ------------------------------------------------------------------------------ // ------------------------------------------------------------------------------
// Generate the form control for setting // Generate the form control for setting
function generateFormHtml(settingsData, set, overrideValue, overrideOptions, originalSetKey) { function generateFormHtml(settingsData, set, overrideValue, overrideOptions, originalSetKey) {
let inputHtml = ''; let inputHtml = '';
isEmpty(overrideValue) ? inVal = set['setValue'] : inVal = overrideValue; isEmpty(overrideValue) ? inVal = set['setValue'] : inVal = overrideValue;
const setKey = set['setKey']; const setKey = set['setKey'];
const setType = set['setType']; const setType = set['setType'];
@@ -952,6 +1107,8 @@ function generateFormHtml(settingsData, set, overrideValue, overrideOptions, ori
// } // }
// Parse the setType JSON string // Parse the setType JSON string
// console.log(processQuotes(setType));
const setTypeObject = JSON.parse(processQuotes(setType)) const setTypeObject = JSON.parse(processQuotes(setType))
const dataType = setTypeObject.dataType; const dataType = setTypeObject.dataType;
const elements = setTypeObject.elements || []; const elements = setTypeObject.elements || [];
@@ -979,7 +1136,8 @@ function generateFormHtml(settingsData, set, overrideValue, overrideOptions, ori
customParams, customParams,
customId, customId,
columns, columns,
base64Regex base64Regex,
elementOptionsBase64
} = handleElementOptions(setKey, elementOptions, transformers, inVal); } = handleElementOptions(setKey, elementOptions, transformers, inVal);
// Override value // Override value
@@ -1007,10 +1165,13 @@ function generateFormHtml(settingsData, set, overrideValue, overrideOptions, ori
class="form-control ${addCss} ${cssClasses}" class="form-control ${addCss} ${cssClasses}"
name="${setKey}" name="${setKey}"
id="${setKey}" id="${setKey}"
my-transformers=${transformers}
my-customparams="${customParams}" my-customparams="${customParams}"
my-customid="${customId}" my-customid="${customId}"
my-originalSetKey="${originalSetKey}" my-originalSetKey="${originalSetKey}"
${multi}> data-elementoptionsbase64="${elementOptionsBase64}"
${multi}
${readOnly ? "disabled" : ""}>
<option value="" id="${setKey + "_temp_"}"></option> <option value="" id="${setKey + "_temp_"}"></option>
</select>`; </select>`;
@@ -1046,6 +1207,7 @@ function generateFormHtml(settingsData, set, overrideValue, overrideOptions, ori
my-originalSetKey="${originalSetKey}" my-originalSetKey="${originalSetKey}"
my-input-from="${sourceIds}" my-input-from="${sourceIds}"
my-input-to="${setKey}" my-input-to="${setKey}"
data-elementoptionsbase64="${elementOptionsBase64}"
onclick="${onClick}"> onclick="${onClick}">
${getString(getStringKey)} ${getString(getStringKey)}
</button>`; </button>`;
@@ -1188,22 +1350,49 @@ function generateFormHtml(settingsData, set, overrideValue, overrideOptions, ori
const eventsList = createArray(set['setEvents']); const eventsList = createArray(set['setEvents']);
// inline buttons events // inline buttons events
if (eventsList.length > 0) {
eventsList.forEach(event => {
let eventIcon = "fa-play";
if (eventsList.length > 0) { switch (event) {
eventsList.forEach(event => { case "select_icon":
eventIcon = "fa-chevron-down";
break;
case "add_icon":
case "add_option":
eventIcon = "fa-square-plus";
break;
case "copy_icons":
eventIcon = "fa-copy";
break;
case "go_to_device":
eventIcon = "fa-square-up-right";
break;
case "go_to_node":
eventIcon = "fa-sitemap fa-rotate-270";
break;
case "run":
eventIcon = "fa-play";
break;
case "test":
eventIcon = "fa-vial-circle-check";
break;
default:
eventIcon = "fa-play";
break;
}
eventsHtml += `<span class="input-group-addon pointer" eventsHtml += `<span class="input-group-addon pointer"
id="${`${event}_${setKey}`}" id="${`${event}_${setKey}`}"
data-myparam-setkey="${setKey}" data-myparam-setkey="${setKey}"
data-myparam="${setKey}" data-myparam="${setKey}"
data-myparam-plugin="${setKey.split('_')[0] || ''}" data-myparam-plugin="${setKey.split('_')[0] || ''}"
data-myevent="${event}" data-myevent="${event}"
onclick="execute_settingEvent(this)"> onclick="execute_settingEvent(this)">
<i title="${getString(event + "_event_tooltip")}" class="fa ${getString(event + "_event_icon")}"></i> <i title="${getString(event + "_event_tooltip")}" class="fa ${eventIcon}"></i>
</span>`; </span>`;
}); });
} }
// Combine and return the final HTML // Combine and return the final HTML
return inputHtml + eventsHtml; return inputHtml + eventsHtml;

View File

@@ -8,64 +8,6 @@
----------------------------------------------------------------------------- */ ----------------------------------------------------------------------------- */
// -----------------------------------------------------------------------------
// Initialize device selectors / pickers fields
// -----------------------------------------------------------------------------
function initDeviceSelectors(devicesListAll_JSON) {
// Check if both device list exists
if (devicesListAll_JSON) {
// Parse the JSON string to get the device list array
var devicesList = JSON.parse(devicesListAll_JSON);
var selectorFieldsHTML = ''
// Loop through the devices list
devicesList.forEach(function(device) {
selectorFieldsHTML += `<option value="${device.devMac}">${device.devName}</option>`;
});
selector = `<div class="db_info_table_row col-sm-12" >
<div class="form-group" >
<div class="input-group col-sm-12 " >
<select class="form-control select2 select2-hidden-accessible" multiple="" style="width: 100%;" tabindex="-1" aria-hidden="true">
${selectorFieldsHTML}
</select>
</div>
</div>
</div>`
// Find HTML elements with class "deviceSelector" and append selector field
$('.deviceSelector').append(selector);
}
// Initialize selected items after a delay so selected macs are available in the context
setTimeout(function(){
// Retrieve MAC addresses from query string or cache
var macs = getQueryString('macs') || getCache('selectedDevices');
if(macs)
{
// Split MAC addresses if they are comma-separated
macs = macs.split(',');
console.log(macs)
// Loop through macs to be selected list
macs.forEach(function(mac) {
// Create the option and append to Select2
var option = new Option($('.deviceSelector select option[value="' + mac + '"]').html(), mac, true, true);
$('.deviceSelector select').append(option).trigger('change');
});
}
}, 10);
}
// ------------------------------------------------------------------- // -------------------------------------------------------------------
// Utility function to generate a random API token in the format t_<random string of specified length> // Utility function to generate a random API token in the format t_<random string of specified length>
@@ -128,9 +70,6 @@ function getRandomBytes(elem, length) {
targetElement.val(formattedHex); targetElement.val(formattedHex);
} }
// ---------------------------------------------- // ----------------------------------------------
// Updates the icon preview // Updates the icon preview
function updateAllIconPreviews() { function updateAllIconPreviews() {
@@ -342,6 +281,7 @@ function execute_settingEvent(element) {
feSetKey = $(element).attr('data-myparam-setkey'); feSetKey = $(element).attr('data-myparam-setkey');
feParam = $(element).attr('data-myparam'); feParam = $(element).attr('data-myparam');
feSourceId = $(element).attr('id'); feSourceId = $(element).attr('id');
feValue = $("#"+feSetKey).val();
if (["test", "run"].includes(feEvent)) { if (["test", "run"].includes(feEvent)) {
// Calls a backend function to add a front-end event (specified by the attributes 'data-myevent' and 'data-myparam-plugin' on the passed element) to an execution queue // Calls a backend function to add a front-end event (specified by the attributes 'data-myevent' and 'data-myparam-plugin' on the passed element) to an execution queue
@@ -383,8 +323,12 @@ function execute_settingEvent(element) {
() => addIconAsBase64(element), // Wrap in an arrow function () => addIconAsBase64(element), // Wrap in an arrow function
feSourceId // triggered by id feSourceId // triggered by id
); );
} else if (["copy_icons"].includes(feEvent)) { } else if (["select_icon"].includes(feEvent)) {
showIconSelection(feSetKey)
// myparam-setkey
} else if (["copy_icons"].includes(feEvent)) {
// Ask overwrite icon types // Ask overwrite icon types
showModalWarning ( showModalWarning (
@@ -392,28 +336,78 @@ function execute_settingEvent(element) {
getString('DevDetail_button_OverwriteIcons_Warning'), getString('DevDetail_button_OverwriteIcons_Warning'),
getString('Gen_Cancel'), getString('Gen_Cancel'),
getString('Gen_Okay'), getString('Gen_Okay'),
'overwriteIconType' 'overwriteIconType',
feSourceId // triggered by id
); );
} else if (["go_to_node"].includes(feEvent)) { } else if (["go_to_device"].includes(feEvent)) {
goToNetworkNode('NEWDEV_devParentMAC'); goToDevice(feValue);
} else if (["go_to_node"].includes(feEvent)) {
goToNetworkNode(feValue);
} else { } else {
console.warn(`🔺Not implemented: ${feEvent}`) console.warn(`🔺Not implemented: ${feEvent}`)
} }
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// Go to the correct network node in the Network section // Go to the correct network node in the Network section
function goToNetworkNode(dropdownId) function overwriteIconType()
{ {
setCache('activeNetworkTab', $('#'+dropdownId).val().replaceAll(":","_")+'_id'); const mac = getMac();
if (!isValidMac(mac)) {
showModalOK("Error", getString("Gen_InvalidMac"))
return;
}
// Construct SQL query
const rawSql = `
UPDATE Devices
SET devIcon = (
SELECT devIcon FROM Devices WHERE devMac = "${mac}"
)
WHERE devType IN (
SELECT devType FROM Devices WHERE devMac = "${mac}"
)
`;
const apiUrl = `php/server/dbHelper.php?action=write&rawSql=${btoa(encodeURIComponent(rawSql))}`;
$.get(apiUrl, function(response) {
if (response === 'OK') {
showMessage (response);
updateApi("devices")
} else {
showMessage (response, 3000, "modal_red");
}
});
}
// -----------------------------------------------------------------------------
// Go to the correct network node in the Network section
function goToNetworkNode(mac)
{
setCache('activeNetworkTab', mac.replaceAll(":","_")+'_id');
window.location.href = './network.php'; window.location.href = './network.php';
} }
// -----------------------------------------------------------------------------
// Go to the device
function goToDevice(mac, newtab = false) {
const url = './deviceDetails.php?mac=' + encodeURIComponent(mac);
if (newtab) {
window.open(url, '_blank');
} else {
window.location.href = url;
}
}
// -------------------------------------------------------- // --------------------------------------------------------
@@ -494,10 +488,11 @@ function addIconAsBase64 (el) {
} }
// -----------------------------------------------
// modal pop up for icon selection
function showIconSelection(setKey) {
const selectElement = document.getElementById(setKey);
function showIconSelection() {
const selectElement = document.getElementById('NEWDEV_devIcon');
const modalId = 'dynamicIconModal'; const modalId = 'dynamicIconModal';
// Create modal HTML dynamically // Create modal HTML dynamically
@@ -574,19 +569,9 @@ function showIconSelection() {
} }
// "Device_TableHead_Owner",
// "Device_TableHead_Type",
// "Device_TableHead_Group",
// "Device_TableHead_Status",
// "Device_TableHead_Location",
// "Device_TableHead_Vendor",
// "Device_TableHead_SyncHubNodeName",
// "Device_TableHead_NetworkSite",
// "Device_TableHead_SSID",
// "Device_TableHead_SourcePlugin"
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// Get teh correct db column code name based on table header title string // Get the correct db column code name based on table header title string
function getColumnNameFromLangString(headStringKey) { function getColumnNameFromLangString(headStringKey) {
columnNameMap = { columnNameMap = {
"Device_TableHead_Name": "devName", "Device_TableHead_Name": "devName",
@@ -615,12 +600,96 @@ function getColumnNameFromLangString(headStringKey) {
"Device_TableHead_SourcePlugin": "devSourcePlugin", "Device_TableHead_SourcePlugin": "devSourcePlugin",
"Device_TableHead_PresentLastScan": "devPresentLastScan", "Device_TableHead_PresentLastScan": "devPresentLastScan",
"Device_TableHead_AlertDown": "devAlertDown", "Device_TableHead_AlertDown": "devAlertDown",
"Device_TableHead_CustomProps": "devCustomProps" "Device_TableHead_CustomProps": "devCustomProps",
"Device_TableHead_FQDN": "devFQDN",
"Device_TableHead_ParentRelType": "devParentRelType",
"Device_TableHead_ReqNicsOnline": "devReqNicsOnline"
}; };
return columnNameMap[headStringKey] || ""; return columnNameMap[headStringKey] || "";
} }
//--------------------------------------------------------------
// Generating the device status chip
function getStatusBadgeParts(devPresentLastScan, devAlertDown, devMac, statusText = '') {
let css = 'bg-gray text-white statusUnknown';
let icon = '<i class="fa-solid fa-question"></i>';
let status = 'unknown';
let cssText = '';
if (devPresentLastScan == 1) {
css = 'bg-green text-white statusOnline';
cssText = 'text-green';
icon = '<i class="fa-solid fa-plug"></i>';
status = 'online';
} else if (devAlertDown == 1) {
css = 'bg-red text-white statusDown';
cssText = 'text-red';
icon = '<i class="fa-solid fa-triangle-exclamation"></i>';
status = 'down';
} else if (devPresentLastScan != 1) {
css = 'bg-gray text-white statusOffline';
cssText = 'text-gray50';
icon = '<i class="fa-solid fa-xmark"></i>';
status = 'offline';
}
const cleanedText = statusText.replace(/-/g, '');
const url = `deviceDetails.php?mac=${encodeURIComponent(devMac)}`;
return {
cssClass: css,
cssText: cssText,
iconHtml: icon,
mac: devMac,
text: cleanedText,
status: status,
url: url
};
}
//--------------------------------------------------------------
// Getting the color and css class for device relationships
function getRelationshipConf(relType) {
let cssClass = '';
let color = '';
// --color-aqua: #00c0ef;
// --color-blue: #0060df;
// --color-green: #00a65a;
// --color-yellow: #f39c12;
// --color-red: #dd4b39;
switch (relType) {
case "child":
color = "#f39c12"; // yellow
cssClass = "text-yellow";
break;
case "nic":
color = "#dd4b39"; // red
cssClass = "text-red";
break;
case "virtual":
color = "#0060df"; // blue
cssClass = "text-blue";
break;
case "logical":
color = "#00a65a"; // green
cssClass = "text-green";
break;
default:
color = "#5B5B66"; // grey
cssClass = "text-light-grey";
break;
}
return {
cssClass: cssClass,
color: color
};
}
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// initialize // initialize
@@ -634,17 +703,52 @@ function initSelect2() {
// check if cache ready // check if cache ready
if(isValidJSON(devicesListAll_JSON)) if(isValidJSON(devicesListAll_JSON))
{ {
// prepare HTML DOM before initializing the frotend
initDeviceSelectors(devicesListAll_JSON)
// -------------------------------------------------------- // --------------------------------------------------------
//Initialize Select2 Elements and make them sortable //Initialize Select2 Elements and make them sortable
$(function () { $(function () {
// Iterate over each Select2 dropdown // Iterate over each Select2 dropdown
$('.select2').each(function() { $('.select2').each(function() {
var selectEl = $(this).select2(); // handle Device chips, if my-transformers="deviceChip"
if($(this).attr("my-transformers") == "deviceChip")
{
var selectEl = $(this).select2({
templateSelection: function (data, container) {
return $(renderDeviceLink(data, container));
},
escapeMarkup: function (m) {
return m; // Allow HTML
}
});
} else if($(this).attr("my-transformers") == "deviceRelType") // handling dropdown for relationships
{
var selectEl = $(this).select2({
minimumResultsForSearch: Infinity,
templateSelection: function (data, container) {
if (!data.id) return data.text; // default for placeholder etc.
const relConf = getRelationshipConf(data.text);
// Custom HTML
const html = $(`
<span class="custom-chip ${relConf.cssClass}" >
${data.text}
</span>
`);
return html;
},
escapeMarkup: function (m) {
return m; // Allow HTML
}
});
} else // default handling - default template
{
var selectEl = $(this).select2();
}
// Apply sortable functionality to the dropdown's dropdown-container // Apply sortable functionality to the dropdown's dropdown-container
selectEl.next().children().children().children().sortable({ selectEl.next().children().children().children().sortable({
@@ -675,14 +779,178 @@ function initSelect2() {
} }
} }
// init functions after dom loaded // ------------------------------------------
window.addEventListener("load", function() { // Render a device link with hover-over functionality
// try to initialize function renderDeviceLink(data, container, useName = false) {
setTimeout(() => { // If no valid MAC, return placeholder text
initSelect2() if (!data.id || !isValidMac(data.id)) {
// initializeiCheck(); return `<span>${data.text}<span/>`;
}, 1000); }
});
const device = getDevDataByMac(data.id);
if (!device) {
return data.text;
}
// Build and return badge parts
const badge = getStatusBadgeParts(
device.devPresentLastScan,
device.devAlertDown,
device.devMac
);
// badge class and hover-info class to container
$(container)
.addClass(`${badge.cssClass} hover-node-info`)
.attr({
'data-name': device.devName,
'data-ip': device.devLastIP,
'data-mac': device.devMac,
'data-vendor': device.devVendor,
'data-type': device.devType,
'data-lastseen': device.devLastConnection,
'data-firstseen': device.devFirstConnection,
'data-relationship': device.devParentRelType,
'data-status': device.devStatus,
'data-present': device.devPresentLastScan,
'data-alert': device.devAlertDown,
'data-icon': device.devIcon
});
return `
<a href="${badge.url}" target="_blank">
<span class="custom-chip">
<span class="iconPreview">${atob(device.devIcon)}</span>
${useName ? device.devName : data.text}
<span>
(${badge.iconHtml})
</span>
</span>
</a>
`;
}
// ------------------------------------------
// Display device info on hover (attach only once)
function initHoverNodeInfo() {
if ($('#hover-box').length === 0) {
$('<div id="hover-box"></div>').appendTo('body').hide().css({
position: 'absolute',
zIndex: 9999,
border: '1px solid #ccc',
borderRadius: '8px',
padding: '10px',
boxShadow: '0 4px 12px rgba(0,0,0,0.15)',
minWidth: '200px',
maxWidth: '300px',
fontSize: '14px',
pointerEvents: 'none',
backgroundColor: '#fff'
});
}
// check if handlers already attached to prevent flickering
if (initHoverNodeInfo._handlersAttached) return;
initHoverNodeInfo._handlersAttached = true;
let hoverTimeout = null;
let lastTarget = null;
// remove title as it's replaced by the hover-box
$(document).on('mouseover', '.hover-node-info', function () {
this.removeAttribute('title');
$(this).attr("title", ""); // remove title as it's replaced by the hover-box
});
$(document).on('mouseenter', '.hover-node-info', function (e) {
const $el = $(this);
lastTarget = this;
// use timeout to prevent a quick hover and exit toi flash a card when navigating to a target node with your mouse
clearTimeout(hoverTimeout);
hoverTimeout = setTimeout(() => {
if (lastTarget !== this) return;
const icon = $el.data('icon');
const name = $el.data('name') || 'Unknown';
const ip = $el.data('ip') || 'N/A';
const mac = $el.data('mac') || 'N/A';
const vendor = $el.data('vendor') || 'Unknown';
const type = $el.data('type') || 'Unknown';
const lastseen = $el.data('lastseen') || 'Unknown';
const firstseen = $el.data('firstseen') || 'Unknown';
const relationship = $el.data('relationship') || 'Unknown';
const badge = getStatusBadgeParts( $el.data('present'), $el.data('alert'), $el.data('mac'))
const status =`<span class="badge ${badge.cssClass}">${badge.iconHtml} ${badge.status}</span>`
const html = `
<div>
<b> <div class="iconPreview">${atob(icon)}</div> </b><b class="devName"> ${name}</b><br>
</div>
<hr/>
<div class="line">
<b>Status:</b> <span>${status}</span><br>
</div>
<div class="line">
<b>IP:</b> <span>${ip}</span><br>
</div>
<div class="line">
<b>MAC:</b> <span>${mac}</span><br>
</div>
<div class="line">
<b>Vendor:</b> <span>${vendor}</span><br>
</div>
<div class="line">
<b>Type:</b> <span>${type}</span><br>
</div>
<div class="line">
<b>First seen:</b> <span>${firstseen}</span><br>
</div>
<div class="line">
<b>Last seen:</b> <span>${lastseen}</span><br>
</div>
<div class="line">
<b>Relationship:</b> <span class="${getRelationshipConf(relationship).cssClass}">${relationship}</span>
</div>
`;
$('#hover-box').html(html).fadeIn(150);
}, 300);
});
$(document).on('mousemove', '.hover-node-info', function (e) {
const hoverBox = $('#hover-box');
const boxWidth = hoverBox.outerWidth();
const boxHeight = hoverBox.outerHeight();
const padding = 15;
const winWidth = $(window).width();
const winHeight = $(window).height();
let left = e.pageX + padding;
let top = e.pageY + padding;
// Position leftward if close to right edge
if (e.pageX + boxWidth + padding > winWidth) {
left = e.pageX - boxWidth - padding;
}
// Position upward if close to bottom edge
if (e.pageY + boxHeight + padding > winHeight) {
top = e.pageY - boxHeight - padding;
}
hoverBox.css({ top: top + 'px', left: left + 'px' });
});
$(document).on('mouseleave', '.hover-node-info', function () {
clearTimeout(hoverTimeout);
lastTarget = null;
$('#hover-box').fadeOut(100);
});
}
console.log("init ui_components.js") console.log("init ui_components.js")

Binary file not shown.

File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 326 KiB

After

Width:  |  Height:  |  Size: 305 KiB

Binary file not shown.

Binary file not shown.

BIN
front/lib/fonts/ionicons.woff2 Executable file

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1,6 +1,6 @@
<?php <?php
require 'php/templates/header.php'; require 'php/templates/header.php';
require 'php/templates/notification.php'; require 'php/templates/modals.php';
?> ?>
<!-- Page ------------------------------------------------------------------ --> <!-- Page ------------------------------------------------------------------ -->
@@ -8,7 +8,10 @@
<!-- Main content ---------------------------------------------------------- --> <!-- Main content ---------------------------------------------------------- -->
<section class="content"> <section class="content">
<script>
showSpinner();
</script>
<?php <?php
@@ -143,7 +146,7 @@ $db->close();
</a> </a>
</li> </li>
</ul> </ul>
<div class="tab-content"> <div class="tab-content spinnerTarget">
<div class="tab-pane active" id="tab_DBTools"> <div class="tab-pane active" id="tab_DBTools">
<div class="db_info_table"> <div class="db_info_table">
<div class="db_info_table_row"> <div class="db_info_table_row">
@@ -182,6 +185,12 @@ $db->close();
</div> </div>
<div class="db_tools_table_cell_b"><?= lang('Maintenance_Tool_del_ActHistory_text');?></div> <div class="db_tools_table_cell_b"><?= lang('Maintenance_Tool_del_ActHistory_text');?></div>
</div> </div>
<div class="db_info_table_row">
<div class="db_tools_table_cell_a" >
<button type="button" class="btn btn-default pa-btn pa-btn-delete bg-red dbtools-button" id="btnRestartServer" onclick="askRestartBackend()"><?= lang('Maint_RestartServer');?></button>
</div>
<div class="db_tools_table_cell_b"><?= lang('Maint_Restart_Server_noti_text');?></div>
</div>
</div> </div>
</div> </div>
@@ -709,6 +718,8 @@ window.onload = function asyncFooter() {
</script> </script>
<script>
hideSpinner();
</script>

View File

@@ -17,18 +17,21 @@
<h3 class="box-title"><?= lang('Gen_Selected_Devices');?></h3> <h3 class="box-title"><?= lang('Gen_Selected_Devices');?></h3>
</div> </div>
<div class="deviceSelector col-md-11 col-sm-11" style="z-index:5"></div> <div class="deviceSelector col-md-11 col-sm-11" style="z-index:5">
<div class="db_info_table_row col-sm-12" >
<div class="col-md-1"> <div class="form-group" >
<button type="button" class="btn btn-default col-md-12" onclick="markAllSelected()" title="<?= lang('Gen_Add_All');?>"> <div class="input-group col-sm-12 " >
<i class="fa-solid fa-circle-check"></i> <select class="form-control select2 select2-hidden-accessible" multiple="" style="width: 100%;" tabindex="-1" aria-hidden="true">
</button>
<button type="button" class="btn btn-default col-md-12" onclick="markAllNotSelected()" title="<?= lang('Gen_Remove_All');?>"> </select>
<i class="fa-solid fa-circle-xmark"></i> </div>
</button> </div>
</div>
</div>
<div class="col-md-1 hoverHighlight">
<i class="fa-solid fa-circle-check hoverHighlight pointer" onclick="markAllSelected()" title="<?= lang('Gen_Add_All');?>"></i>
<i class="fa-solid fa-circle-xmark hoverHighlight pointer" onclick="markAllNotSelected()" title="<?= lang('Gen_Remove_All');?>"></i>
</div> </div>
</div> </div>
@@ -77,7 +80,7 @@
settingsData = res["data"]; settingsData = res["data"];
excludedColumns = ["NEWDEV_devMac", "NEWDEV_devFirstConnection", "NEWDEV_devLastConnection", "NEWDEV_devLastNotification", "NEWDEV_devScan", "NEWDEV_devPresentLastScan", "NEWDEV_devCustomProps" ] excludedColumns = ["NEWDEV_devMac", "NEWDEV_devFirstConnection", "NEWDEV_devLastConnection", "NEWDEV_devLastNotification", "NEWDEV_devScan", "NEWDEV_devPresentLastScan", "NEWDEV_devCustomProps", "NEWDEV_devChildrenNicsDynamic", "NEWDEV_devChildrenDynamic" ]
const relevantColumns = settingsData.filter(set => const relevantColumns = settingsData.filter(set =>
set.setGroup === "NEWDEV" && set.setGroup === "NEWDEV" &&
@@ -133,7 +136,8 @@
customParams, customParams,
customId, customId,
columns, columns,
base64Regex base64Regex,
elementOptionsBase64
} = handleElementOptions('none', elementOptions, transformers, val = ""); } = handleElementOptions('none', elementOptions, transformers, val = "");
// render based on element type // render based on element type
@@ -208,13 +212,64 @@
generateSimpleForm(relevantColumns); generateSimpleForm(relevantColumns);
initSelect2();
initDeviceSelectors();
}) })
}, 500); }, 100);
} }
// -----------------------------------------------------------------------------
// Initialize device selectors / pickers fields
function initDeviceSelectors() {
// Parse device list
devicesList = JSON.parse(getCache('devicesListAll_JSON'));
// Check if the device list exists and is an array
if (Array.isArray(devicesList)) {
const $select = $(".deviceSelector select");
$select.append(
devicesList
.filter(d => d.devMac && d.devName)
.map(d => `<option value="${d.devMac}">${d.devName}</option>`)
.join('')
).trigger('change');
}
// Initialize selected items after a delay so selected macs are available in the context
setTimeout(function(){
// Retrieve MAC addresses from query string or cache
var macs = getQueryString('macs') || getCache('selectedDevices');
if(macs)
{
// Split MAC addresses if they are comma-separated
macs = macs.split(',');
console.log(macs)
// Loop through macs to be selected list
macs.forEach(function(mac) {
// Create the option and append to Select2
var option = new Option($('.deviceSelector select option[value="' + mac + '"]').html(), mac, true, true);
$('.deviceSelector select').append(option).trigger('change');
});
}
}, 10);
}
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// Get selected devices Macs // Get selected devices Macs

File diff suppressed because it is too large Load Diff

View File

@@ -7,6 +7,10 @@
# Puche 2022+ jokob jokob@duck.com GNU GPLv3 # Puche 2022+ jokob jokob@duck.com GNU GPLv3
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// 🔺----- API ENDPOINTS SUPERSEDED -----🔺
// check server/api_server/api_server_start.py for equivalents
// equivalent: /dbquery
// 🔺----- API ENDPOINTS SUPERSEDED -----🔺
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// External files // External files
@@ -63,7 +67,7 @@ require_once $_SERVER['DOCUMENT_ROOT'] . '/php/templates/security.php';
} }
if (isset ($_REQUEST['rawSql'])) { if (isset ($_REQUEST['rawSql'])) {
$rawSql = urldecode(base64_decode($_REQUEST['rawSql'])); $rawSql = urldecode(base64_decode($_REQUEST['rawSql'])); // base64 encoded SQL
} }
if (isset ($_REQUEST['dbtable'])) { if (isset ($_REQUEST['dbtable'])) {
@@ -76,6 +80,7 @@ require_once $_SERVER['DOCUMENT_ROOT'] . '/php/templates/security.php';
switch ($action) { switch ($action) {
case 'create': create($defaultValue, $expireMinutes, $dbtable, $columns, $values ); break; case 'create': create($defaultValue, $expireMinutes, $dbtable, $columns, $values ); break;
case 'read' : read($rawSql); break; case 'read' : read($rawSql); break;
case 'write' : write($rawSql); break;
case 'update': update($columnName, $id, $defaultValue, $expireMinutes, $dbtable, $columns, $values); break; case 'update': update($columnName, $id, $defaultValue, $expireMinutes, $dbtable, $columns, $values); break;
case 'delete': delete($columnName, $id, $dbtable); break; case 'delete': delete($columnName, $id, $dbtable); break;
case 'lockDatabase': lockDatabase($delay); break; case 'lockDatabase': lockDatabase($delay); break;
@@ -120,6 +125,31 @@ function read($rawSql) {
} }
} }
//------------------------------------------------------------------------------
// write
//------------------------------------------------------------------------------
function write($rawSql) {
global $db;
// Construct the SQL query to select values
$sql = $rawSql;
// Execute the SQL query
$result = $db->query($sql);
// Check if the query executed successfully
if (! $result == TRUE) {
// Output an error message if the query failed
echo "Error writing data\n\n " .$sql." \n\n". $db->lastErrorMsg();
return;
} else
{
// Output
echo "OK";
return;
}
}
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// update // update

View File

@@ -8,6 +8,10 @@
# Puche 2021 / 2022+ jokob jokob@duck.com GNU GPLv3 # Puche 2021 / 2022+ jokob jokob@duck.com GNU GPLv3
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// 🔺----- API ENDPOINTS SUPERSEDED -----🔺
// check server/api_server/api_server_start.py for equivalents
// 🔺----- API ENDPOINTS SUPERSEDED -----🔺
// External files // External files
require dirname(__FILE__).'/init.php'; require dirname(__FILE__).'/init.php';
@@ -26,37 +30,31 @@
if (isset ($_REQUEST['action']) && !empty ($_REQUEST['action'])) { if (isset ($_REQUEST['action']) && !empty ($_REQUEST['action'])) {
$action = $_REQUEST['action']; $action = $_REQUEST['action'];
switch ($action) { switch ($action) {
case 'getServerDeviceData': getServerDeviceData(); break; // check server/api_server/api_server_start.py for equivalents
case 'setDeviceData': setDeviceData(); break; case 'getServerDeviceData': getServerDeviceData(); break; // equivalent: get_device_data
case 'deleteDevice': deleteDevice(); break; case 'setDeviceData': setDeviceData(); break; // equivalent: set_device_data
case 'deleteAllWithEmptyMACs': deleteAllWithEmptyMACs(); break; case 'deleteDevice': deleteDevice(); break; // equivalent: delete_device(mac)
case 'deleteAllWithEmptyMACs': deleteAllWithEmptyMACs(); break; // equivalent: delete_all_with_empty_macs
case 'deleteAllDevices': deleteAllDevices(); break; case 'deleteAllDevices': deleteAllDevices(); break; // equivalent: delete_devices(macs)
case 'deleteUnknownDevices': deleteUnknownDevices(); break; case 'deleteUnknownDevices': deleteUnknownDevices(); break; // equivalent: delete_unknown_devices
case 'deleteEvents': deleteEvents(); break; case 'deleteEvents': deleteEvents(); break; // equivalent: delete_events
case 'deleteEvents30': deleteEvents30(); break; case 'deleteEvents30': deleteEvents30(); break; // equivalent: delete_events_30
case 'deleteActHistory': deleteActHistory(); break; case 'deleteActHistory': deleteActHistory(); break; // equivalent: delete_online_history
case 'deleteDeviceEvents': deleteDeviceEvents(); break; case 'deleteDeviceEvents': deleteDeviceEvents(); break; // equivalent: delete_device_events(mac)
case 'resetDeviceProps': resetDeviceProps(); break; case 'resetDeviceProps': resetDeviceProps(); break; // equivalent: reset_device_props
case 'PiaBackupDBtoArchive': PiaBackupDBtoArchive(); break; case 'ExportCSV': ExportCSV(); break; // equivalent: export_devices
case 'PiaRestoreDBfromArchive': PiaRestoreDBfromArchive(); break; case 'ImportCSV': ImportCSV(); break; // equivalent: import_csv
case 'PiaPurgeDBBackups': PiaPurgeDBBackups(); break;
case 'ExportCSV': ExportCSV(); break;
case 'ImportCSV': ImportCSV(); break;
case 'getDevicesTotals': getDevicesTotals(); break; case 'getDevicesTotals': getDevicesTotals(); break; // equivalent: devices_totals
case 'getDevicesList': getDevicesList(); break; case 'getDevicesListCalendar': getDevicesListCalendar(); break; // equivalent: devices_by_status
case 'getDevicesListCalendar': getDevicesListCalendar(); break;
case 'updateNetworkLeaf': updateNetworkLeaf(); break; case 'updateNetworkLeaf': updateNetworkLeaf(); break; // equivalent: update_device_column(mac, column_name, column_value)
case 'overwriteIconType': overwriteIconType(); break;
case 'getIcons': getIcons(); break;
case 'getActions': getActions(); break;
case 'getDevices': getDevices(); break;
case 'copyFromDevice': copyFromDevice(); break;
case 'wakeonlan': wakeonlan(); break;
default: logServerConsole ('Action: '. $action); break; case 'copyFromDevice': copyFromDevice(); break; // equivalent: copy_device(mac_from, mac_to)
case 'wakeonlan': wakeonlan(); break; // equivalent: wakeonlan
default: logServerConsole ('Action: '. $action); break; // equivalent:
} }
} }
@@ -92,6 +90,8 @@ function getServerDeviceData() {
"devLogEvents" => 0, "devLogEvents" => 0,
"devAlertEvents" => 0, "devAlertEvents" => 0,
"devAlertDown" => 0, "devAlertDown" => 0,
"devParentRelType" => "default",
"devReqNicsOnline" => 0,
"devSkipRepeated" => 0, "devSkipRepeated" => 0,
"devLastNotification" => "", "devLastNotification" => "",
"devPresentLastScan" => 0, "devPresentLastScan" => 0,
@@ -120,69 +120,87 @@ function getServerDeviceData() {
} }
// Device Data // Get current date (used in presence calc)
$sql = 'SELECT rowid, *, $currentdate = date("Y-m-d H:i:s");
CASE WHEN devAlertDown !=0 AND devPresentLastScan=0 THEN "Down"
WHEN devPresentLastScan=1 THEN "On-line" // Fetch Device Info + Children + Events Stats
ELSE "Off-line" END as devStatus $sql =<<<SQL
FROM Devices SELECT
WHERE devMac="'. $mac .'" or cast(rowid as text)="'. $mac. '"'; d.rowid,
$result = $db->query($sql); d.*,
$row = $result -> fetchArray (SQLITE3_ASSOC); CASE
WHEN d.devAlertDown != 0 AND d.devPresentLastScan = 0 THEN "Down"
WHEN d.devPresentLastScan = 1 THEN "On-line"
ELSE "Off-line"
END AS devStatus,
-- Event counters
(SELECT COUNT(*) FROM Sessions
WHERE ses_MAC = d.devMac AND (
ses_DateTimeConnection >= $periodDate OR
ses_DateTimeDisconnection >= $periodDate OR
ses_StillConnected = 1
)
) AS devSessions,
(SELECT COUNT(*) FROM Events
WHERE eve_MAC = d.devMac AND
eve_DateTime >= $periodDate AND
eve_EventType NOT IN ("Connected", "Disconnected")
) AS devEvents,
(SELECT COUNT(*) FROM Events
WHERE eve_MAC = d.devMac AND
eve_DateTime >= $periodDate AND
eve_EventType = "Device Down"
) AS devDownAlerts,
(SELECT CAST(( MAX (0, SUM (julianday (IFNULL (ses_DateTimeDisconnection,'$currentdate'))
- julianday (CASE WHEN ses_DateTimeConnection < $periodDate
THEN $periodDate
ELSE ses_DateTimeConnection END)) *24 )) AS INT)
FROM Sessions
WHERE ses_MAC = d.devMac AND
ses_DateTimeConnection IS NOT NULL AND
(ses_DateTimeDisconnection IS NOT NULL OR ses_StillConnected = 1) AND
(
ses_DateTimeConnection >= $periodDate OR
ses_DateTimeDisconnection >= $periodDate OR
ses_StillConnected = 1
)
) AS devPresenceHours
FROM Devices d
WHERE d.devMac = "$mac" OR CAST(d.rowid AS TEXT) = "$mac"
SQL;
$row = $db->query($sql)->fetchArray(SQLITE3_ASSOC);
$deviceData = $row; $deviceData = $row;
$mac = $deviceData['devMac']; $mac = $deviceData['devMac'];
$deviceData['devParentMAC'] = $row['devParentMAC']; $deviceData['devFirstConnection'] = formatDate($deviceData['devFirstConnection']);
$deviceData['devParentPort'] = $row['devParentPort']; $deviceData['devLastConnection'] = formatDate($deviceData['devLastConnection']);
$deviceData['devFirstConnection'] = formatDate ($row['devFirstConnection']); // Date formated $deviceData['devIsRandomMAC'] = isRandomMAC($mac);
$deviceData['devLastConnection'] = formatDate ($row['devLastConnection']); // Date formated
$deviceData['devIsRandomMAC'] = isRandomMAC($mac); // Fetch children once and split in PHP
$sql = 'SELECT rowid, * FROM Devices WHERE devParentMAC = "' . $mac . '" ORDER BY devPresentLastScan DESC';
// Count Totals
$condition = ' WHERE eve_MAC="'. $mac .'" AND eve_DateTime >= '. $periodDate;
// Connections
$sql = 'SELECT COUNT(*) FROM Sessions
WHERE ses_MAC="'. $mac .'"
AND ( ses_DateTimeConnection >= '. $periodDate .'
OR ses_DateTimeDisconnection >= '. $periodDate .'
OR ses_StillConnected = 1 )';
$result = $db->query($sql); $result = $db->query($sql);
$row = $result -> fetchArray (SQLITE3_NUM); $children = [];
$deviceData['devSessions'] = $row[0]; $childrenNics = [];
// Events
$sql = 'SELECT COUNT(*) FROM Events '. $condition .' AND eve_EventType <> "Connected" AND eve_EventType <> "Disconnected" ';
$result = $db->query($sql);
$row = $result -> fetchArray (SQLITE3_NUM);
$deviceData['devEvents'] = $row[0];
// Down Alerts while ($row = $result->fetchArray(SQLITE3_ASSOC)) {
$sql = 'SELECT COUNT(*) FROM Events '. $condition .' AND eve_EventType = "Device Down"'; $children[] = $row;
$result = $db->query($sql); if ($row['devParentRelType'] === 'nic') {
$row = $result -> fetchArray (SQLITE3_NUM); $childrenNics[] = $row;
$deviceData['devDownAlerts'] = $row[0]; }
}
// Get current date using php, sql datetime does not return time respective to timezone. $deviceData['devChildrenDynamic'] = $children;
$currentdate = date("Y-m-d H:i:s"); $deviceData['devChildrenNicsDynamic'] = $childrenNics;
// Presence hours
$sql = 'SELECT CAST(( MAX (0, SUM (julianday (IFNULL (ses_DateTimeDisconnection,"'. $currentdate .'" )) // Return JSON
- julianday (CASE WHEN ses_DateTimeConnection < '. $periodDate .' THEN '. $periodDate .' echo json_encode($deviceData);
ELSE ses_DateTimeConnection END)) *24 )) AS INT)
FROM Sessions
WHERE ses_MAC="'. $mac .'"
AND ses_DateTimeConnection IS NOT NULL
AND (ses_DateTimeDisconnection IS NOT NULL OR ses_StillConnected = 1 )
AND ( ses_DateTimeConnection >= '. $periodDate .'
OR ses_DateTimeDisconnection >= '. $periodDate .'
OR ses_StillConnected = 1 )';
$result = $db->query($sql);
$row = $result -> fetchArray (SQLITE3_NUM);
$deviceData['devPresenceHours'] = round ($row[0]);
// Return json
echo (json_encode ($deviceData));
} }
@@ -211,6 +229,8 @@ function setDeviceData() {
$scancycle = quotes($_POST['scancycle']); $scancycle = quotes($_POST['scancycle']);
$alertevents = quotes($_POST['alertevents']); $alertevents = quotes($_POST['alertevents']);
$alertdown = quotes($_POST['alertdown']); $alertdown = quotes($_POST['alertdown']);
$relType = quotes($_POST['relType']);
$reqNics = quotes($_POST['reqNics']);
$skiprepeated = quotes($_POST['skiprepeated']); $skiprepeated = quotes($_POST['skiprepeated']);
$newdevice = quotes($_POST['newdevice']); $newdevice = quotes($_POST['newdevice']);
$archived = quotes($_POST['archived']); $archived = quotes($_POST['archived']);
@@ -242,6 +262,8 @@ function setDeviceData() {
devScan = '$scancycle', devScan = '$scancycle',
devAlertEvents = '$alertevents', devAlertEvents = '$alertevents',
devAlertDown = '$alertdown', devAlertDown = '$alertdown',
devParentRelType = '$relType',
devReqNicsOnline = '$reqNics',
devSkipRepeated = '$skiprepeated', devSkipRepeated = '$skiprepeated',
devIsNew = '$newdevice', devIsNew = '$newdevice',
devIsArchived = '$archived', devIsArchived = '$archived',
@@ -267,6 +289,8 @@ function setDeviceData() {
devScan, devScan,
devAlertEvents, devAlertEvents,
devAlertDown, devAlertDown,
devParentRelType,
devReqNicsOnline,
devSkipRepeated, devSkipRepeated,
devIsNew, devIsNew,
devIsArchived, devIsArchived,
@@ -295,6 +319,8 @@ function setDeviceData() {
'$scancycle', '$scancycle',
'$alertevents', '$alertevents',
'$alertdown', '$alertdown',
'$relType',
'$reqNics',
'$skiprepeated', '$skiprepeated',
'$newdevice', '$newdevice',
'$archived', '$archived',
@@ -491,92 +517,6 @@ function deleteActHistory() {
} }
} }
//------------------------------------------------------------------------------
// Backup DB to Archiv
//------------------------------------------------------------------------------
function PiaBackupDBtoArchive() {
// prepare fast Backup
$dbfilename = 'app.db';
$file = '../../../db/'.$dbfilename;
$newfile = '../../../db/'.$dbfilename.'.latestbackup';
// copy files as a fast Backup
if (!copy($file, $newfile)) {
echo lang('BackDevices_Backup_CopError');
} else {
// Create archive with actual date
$Pia_Archive_Name = 'appdb_'.date("Ymd_His").'.zip';
$Pia_Archive_Path = '../../../db/';
exec('zip -j '.$Pia_Archive_Path.$Pia_Archive_Name.' ../../../db/'.$dbfilename, $output);
// chheck if archive exists
if (file_exists($Pia_Archive_Path.$Pia_Archive_Name) && filesize($Pia_Archive_Path.$Pia_Archive_Name) > 0) {
echo lang('BackDevices_Backup_okay').': ('.$Pia_Archive_Name.')';
unlink($newfile);
echo("<meta http-equiv='refresh' content='1'>");
} else {
echo lang('BackDevices_Backup_Failed').' ('.$dbfilename.'.latestbackup)';
}
}
}
//------------------------------------------------------------------------------
// Restore DB from Archiv
//------------------------------------------------------------------------------
function PiaRestoreDBfromArchive() {
// prepare fast Backup
$file = '../../../db/'.$dbfilename;
$oldfile = '../../../db/'.$dbfilename.'.prerestore';
// copy files as a fast Backup
if (!copy($file, $oldfile)) {
echo lang('BackDevices_Restore_CopError');
} else {
// extract latest archive and overwrite the actual .db
$Pia_Archive_Path = '../../../db/';
exec('/bin/ls -Art '.$Pia_Archive_Path.'*.zip | /bin/tail -n 1 | /usr/bin/xargs -n1 /bin/unzip -o -d ../../../db/', $output);
// check if the .db exists
if (file_exists($file)) {
echo lang('BackDevices_Restore_okay');
unlink($oldfile);
echo("<meta http-equiv='refresh' content='1'>");
} else {
echo lang('BackDevices_Restore_Failed');
}
}
}
//------------------------------------------------------------------------------
// Purge Backups
//------------------------------------------------------------------------------
function PiaPurgeDBBackups() {
$Pia_Archive_Path = '../../../db';
$Pia_Backupfiles = array();
$files = array_diff(scandir($Pia_Archive_Path, SCANDIR_SORT_DESCENDING), array('.', '..', $dbfilename, 'netalertxdb-reset.zip'));
foreach ($files as &$item)
{
$item = $Pia_Archive_Path.'/'.$item;
if (stristr($item, 'setting_') == '') {array_push($Pia_Backupfiles, $item);}
}
if (sizeof($Pia_Backupfiles) > 3)
{
rsort($Pia_Backupfiles);
unset($Pia_Backupfiles[0], $Pia_Backupfiles[1], $Pia_Backupfiles[2]);
$Pia_Backupfiles_Purge = array_values($Pia_Backupfiles);
for ($i = 0; $i < sizeof($Pia_Backupfiles_Purge); $i++)
{
unlink($Pia_Backupfiles_Purge[$i]);
}
}
echo lang('BackDevices_DBTools_Purge');
echo("<meta http-equiv='refresh' content='1'>");
}
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// Export CSV of devices // Export CSV of devices
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
@@ -744,143 +684,6 @@ function getDevicesTotals() {
echo ($resultJSON); echo ($resultJSON);
} }
//------------------------------------------------------------------------------
// Query the List of devices in a determined Status
//------------------------------------------------------------------------------
function getDevicesList() {
global $db;
$forceDefaultOrder = FALSE;
if (isset ($_REQUEST['forceDefaultOrder']) )
{
$forceDefaultOrder = TRUE;
}
// This object is used to map from the old order ( second parameter, first number) to the new mapping, that is represented by the 3rd parameter (Second number)
$columnOrderMapping = array(
array("devName", 0, 0),
array("devOwner", 1, 1),
array("devType", 2, 2),
array("devIcon", 3, 3),
array("devFavorite", 4, 4),
array("devGroup", 5, 5),
array("devFirstConnection", 6, 6),
array("devLastConnection", 7, 7),
array("devLastIP", 8, 8),
array("devMac", 9, 9),
array("devStatus", 10, 10),
array("devMac_full", 11, 11),
array("devLastIP_orderable", 12, 12),
array("rowid", 13, 13),
array("devParentMAC", 14, 14),
array("connected_devices", 15, 15),
array("devLocation", 16, 16),
array("devVendor", 17, 17),
array("devParentPort", 18, 18),
array("devGUID", 19, 19),
array("devSyncHubNode", 20, 20),
array("devSite", 21, 21),
array("devSSID", 22, 22),
array("devSourcePlugin", 23, 23)
);
if($forceDefaultOrder == FALSE)
{
// get device columns order
$sql = 'SELECT par_Value FROM Parameters where par_ID = "Front_Devices_Columns_Order"';
$result = $db->query($sql);
$row = $result -> fetchArray (SQLITE3_NUM);
if($row != NULL && count($row) == 1)
{
// ordered columns setting from the maintenance page
$orderedColumns = createArray($row[0]);
// init ordered columns
for($i = 0; $i < count($orderedColumns); $i++) {
$columnOrderMapping[$i][2] = $orderedColumns[$i];
}
}
}
// SQL
$condition = getDeviceCondition ($_REQUEST['status']);
$sql = 'SELECT * FROM (
SELECT rowid, *, CASE
WHEN t1.devAlertDown !=0 AND t1.devPresentLastScan=0 THEN "Down"
WHEN t1.devIsNew=1 THEN "New"
WHEN t1.devPresentLastScan=1 THEN "On-line"
ELSE "Off-line" END AS devStatus
FROM Devices t1 '.$condition.') t3
LEFT JOIN
(
SELECT devParentMAC as devParentMAC_t2, devMac as devMac_t2,
count() as connected_devices
FROM Devices b
WHERE b.devParentMAC NOT NULL group by b.devParentMAC
) t2
ON (t3.devMac = t2.devParentMAC_t2);';
$result = $db->query($sql);
// arrays of rows
$tableData = array();
while ($row = $result -> fetchArray (SQLITE3_ASSOC)) {
$defaultOrder = array (
$row['devName'],
$row['devOwner'],
handleNull($row['devType']),
handleNull($row['devIcon'], "PGkgY2xhc3M9J2ZhIGZhLWxhcHRvcCc+PC9pPg=="), // laptop icon
$row['devFavorite'],
$row['devGroup'],
// ----
formatDate ($row['devFirstConnection']),
formatDate ($row['devLastConnection']),
$row['devLastIP'],
( isRandomMAC($row['devMac']) ),
$row['devStatus'],
$row['devMac'], // MAC (hidden)
formatIPlong ($row['devLastIP']), // IP orderable
$row['rowid'], // Rowid (hidden)
handleNull($row['devParentMAC']),
handleNull($row['connected_devices']),
handleNull($row['devLocation']),
handleNull($row['devVendor']),
handleNull($row['devParentPort']),
handleNull($row['devGUID']),
handleNull($row['devSyncHubNode']),
handleNull($row['devSite']),
handleNull($row['devSSID']),
handleNull($row['devSourcePlugin'])
);
$newOrder = array();
// reorder columns based on user settings
for($index = 0; $index < count($columnOrderMapping); $index++)
{
array_push($newOrder, $defaultOrder[$columnOrderMapping[$index][2]]);
}
$tableData['data'][] = $newOrder;
}
// Control no rows
if (empty($tableData['data'])) {
$tableData['data'] = '';
}
// Return json
echo (json_encode ($tableData));
}
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// Determine if Random MAC // Determine if Random MAC
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
@@ -938,75 +741,6 @@ function getDevicesListCalendar() {
// Query Device Data // Query Device Data
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
//------------------------------------------------------------------------------
function getIcons() {
global $db;
// Device Data
$sql = 'select devIcon from Devices group by devIcon';
$result = $db->query($sql);
// arrays of rows
$tableData = array();
while ($row = $result -> fetchArray (SQLITE3_ASSOC)) {
$icon = handleNull($row['devIcon'], "<i class='fa fa-laptop'></i>");
// Push row data
$tableData[] = array('id' => $icon,
'name' => $icon );
}
// Control no rows
if (empty($tableData)) {
$tableData = [];
}
// Return json
echo (json_encode ($tableData));
}
//------------------------------------------------------------------------------
function getActions() {
$tableData = array(
array('id' => 'wake-on-lan',
'name' => lang('DevDetail_WOL_Title'))
);
// Return json
echo (json_encode ($tableData));
}
//------------------------------------------------------------------------------
function getDevices() {
global $db;
// Device Data
$sql = 'select devMac, devName from Devices';
$result = $db->query($sql);
// arrays of rows
$tableData = array();
while ($row = $result -> fetchArray (SQLITE3_ASSOC)) {
$name = handleNull($row['devName'], "(unknown)");
$mac = handleNull($row['devMac'], "(unknown)");
// Push row data
$tableData[] = array('id' => $mac,
'name' => $name );
}
// Control no rows
if (empty($tableData)) {
$tableData = [];
}
// Return json
echo (json_encode ($tableData));
}
// ---------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------
function updateNetworkLeaf() function updateNetworkLeaf()
{ {
@@ -1034,33 +768,6 @@ function updateNetworkLeaf()
} }
// ----------------------------------------------------------------------------------------
function overwriteIconType()
{
$mac = $_REQUEST['mac'];
$icon = $_REQUEST['icon'];
if ((false === filter_var($mac , FILTER_VALIDATE_MAC) && $mac != "Internet" && $mac != "") ) {
throw new Exception('Invalid mac address');
}
else
{
global $db;
// sql
$sql = 'UPDATE Devices SET "devIcon" = "'. $icon .'" where devType in (select devType from Devices where devMac = "' . $mac.'")' ;
// update Data
$result = $db->query($sql);
// check result
if ($result == TRUE) {
echo 'OK';
} else {
echo lang('BackDevices_Device_UpdDevError');
}
}
}
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// Wake-on-LAN // Wake-on-LAN
// Inspired by @leiweibau: https://github.com/leiweibau/Pi.Alert/commit/30427c7fea180670c71a2b790699e5d9e9e88ffd // Inspired by @leiweibau: https://github.com/leiweibau/Pi.Alert/commit/30427c7fea180670c71a2b790699e5d9e9e88ffd

View File

@@ -8,6 +8,12 @@
# Puche 2021 / 2022+ jokob jokob@duck.com GNU GPLv3 # Puche 2021 / 2022+ jokob jokob@duck.com GNU GPLv3
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// 🔺----- API ENDPOINTS SUPERSEDED -----🔺
// check server/api_server/api_server_start.py for equivalents
// equivalent: /sessions /events
// 🔺----- API ENDPOINTS SUPERSEDED -----🔺
// External files // External files
require dirname(__FILE__).'/init.php'; require dirname(__FILE__).'/init.php';
@@ -29,7 +35,6 @@ require_once $_SERVER['DOCUMENT_ROOT'] . '/php/templates/security.php';
case 'getEvents': getEvents(); break; case 'getEvents': getEvents(); break;
case 'getDeviceSessions': getDeviceSessions(); break; case 'getDeviceSessions': getDeviceSessions(); break;
case 'getDevicePresence': getDevicePresence(); break; case 'getDevicePresence': getDevicePresence(); break;
case 'getDeviceEvents': getDeviceEvents(); break;
case 'getEventsCalendar': getEventsCalendar(); break; case 'getEventsCalendar': getEventsCalendar(); break;
default: logServerConsole ('Action: '. $action); break; default: logServerConsole ('Action: '. $action); break;
} }
@@ -410,41 +415,4 @@ function getEventsCalendar() {
echo (json_encode($tableData)); echo (json_encode($tableData));
} }
//------------------------------------------------------------------------------
// Query Device events
//------------------------------------------------------------------------------
function getDeviceEvents() {
global $db;
// Request Parameters
$mac = $_REQUEST['mac'];
$periodDate = getDateFromPeriod();
$hideConnections = $_REQUEST ['hideConnections'];
// SQL
$SQL = 'SELECT eve_DateTime, eve_EventType, eve_IP, eve_AdditionalInfo
FROM Events
WHERE eve_MAC="'. $mac .'" AND eve_DateTime >= '. $periodDate .'
AND ( (eve_EventType <> "Connected" AND eve_EventType <> "Disconnected" AND
eve_EventType <> "VOIDED - Connected" AND eve_EventType <> "VOIDED - Disconnected")
OR "'. $hideConnections .'" = "false" ) ';
$result = $db->query($SQL);
// arrays of rows
$tableData = array();
while ($row = $result -> fetchArray (SQLITE3_NUM)) {
$row[0] = formatDate ($row[0]);
$tableData['data'][] = $row;
}
// Control no rows
if (empty($tableData['data'])) {
$tableData['data'] = '';
}
// Return json
echo (json_encode ($tableData));
}
?> ?>

View File

@@ -12,6 +12,12 @@
# cvc90 2023 https://github.com/cvc90 GNU GPLv3 # # cvc90 2023 https://github.com/cvc90 GNU GPLv3 #
################################################################################### ###################################################################################
// 🔺----- API ENDPOINTS SUPERSEDED -----🔺
// check server/api_server/api_server_start.py for equivalents
// equivalent: /nettools
// 🔺----- API ENDPOINTS SUPERSEDED -----🔺
// Get init.php // Get init.php
require dirname(__FILE__).'/../server/init.php'; require dirname(__FILE__).'/../server/init.php';

View File

@@ -1,5 +1,10 @@
<?php <?php
// 🔺----- API ENDPOINTS SUPERSEDED -----🔺
// check server/api_server/api_server_start.py for equivalents
// equivalent: /nettools
// 🔺----- API ENDPOINTS SUPERSEDED -----🔺
require 'util.php'; require 'util.php';
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------

View File

@@ -12,6 +12,11 @@
# cvc90 2023 https://github.com/cvc90 GNU GPLv3 # # cvc90 2023 https://github.com/cvc90 GNU GPLv3 #
################################################################################### ###################################################################################
// 🔺----- API ENDPOINTS SUPERSEDED -----🔺
// check server/api_server/api_server_start.py for equivalents
// equivalent: /nettools
// 🔺----- API ENDPOINTS SUPERSEDED -----🔺
// Get init.php // Get init.php
require dirname(__FILE__).'/../server/init.php'; require dirname(__FILE__).'/../server/init.php';

View File

@@ -1,6 +1,11 @@
<?php <?php
require dirname(__FILE__).'/../server/init.php'; require dirname(__FILE__).'/../server/init.php';
// 🔺----- API ENDPOINTS SUPERSEDED -----🔺
// check server/api_server/api_server_start.py for equivalents
// equivalent: /nettools
// 🔺----- API ENDPOINTS SUPERSEDED -----🔺
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// check if authenticated // check if authenticated
require_once $_SERVER['DOCUMENT_ROOT'] . '/php/templates/security.php'; require_once $_SERVER['DOCUMENT_ROOT'] . '/php/templates/security.php';

View File

@@ -12,6 +12,11 @@
# cvc90 2023 https://github.com/cvc90 GNU GPLv3 # # cvc90 2023 https://github.com/cvc90 GNU GPLv3 #
################################################################################### ###################################################################################
// 🔺----- API ENDPOINTS SUPERSEDED -----🔺
// check server/api_server/api_server_start.py for equivalents
// equivalent: /nettools
// 🔺----- API ENDPOINTS SUPERSEDED -----🔺
// Get init.php // Get init.php
require dirname(__FILE__).'/../server/init.php'; require dirname(__FILE__).'/../server/init.php';
@@ -19,6 +24,8 @@ require dirname(__FILE__).'/../server/init.php';
// check if authenticated // check if authenticated
require_once $_SERVER['DOCUMENT_ROOT'] . '/php/templates/security.php'; require_once $_SERVER['DOCUMENT_ROOT'] . '/php/templates/security.php';
// NEW ENDPOINT EQUIVALENT: /nettools/traceroute
// Get IP // Get IP
$ip = $_GET['ip']; $ip = $_GET['ip'];

View File

@@ -587,7 +587,9 @@ function getDevicesColumns(){
"devSSID", "devSSID",
"devSourcePlugin", "devSourcePlugin",
"devCustomProps", "devCustomProps",
"devFQDN" "devFQDN",
"devParentRelType",
"devReqNicsOnline"
]; ];
return $columns; return $columns;

View File

@@ -42,7 +42,6 @@
<script src="lib/datatables.net/js/jquery.dataTables.min.js"></script> <script src="lib/datatables.net/js/jquery.dataTables.min.js"></script>
<script src="lib/datatables.net-bs/js/dataTables.bootstrap.min.js"></script> <script src="lib/datatables.net-bs/js/dataTables.bootstrap.min.js"></script>
<script src="lib/datatables.net/js/dataTables.select.min.js"></script> <script src="lib/datatables.net/js/dataTables.select.min.js"></script>
<script src="lib/popper_tooltip/popper.min.js"></script>
<script src="js/common.js?v=<?php include 'php/templates/version.php'; ?>"></script> <script src="js/common.js?v=<?php include 'php/templates/version.php'; ?>"></script>
<script src="js/modal.js?v=<?php include 'php/templates/version.php'; ?>"></script> <script src="js/modal.js?v=<?php include 'php/templates/version.php'; ?>"></script>
@@ -51,8 +50,6 @@
<script src="js/settings_utils.js?v=<?php include 'php/templates/version.php'; ?>"></script> <script src="js/settings_utils.js?v=<?php include 'php/templates/version.php'; ?>"></script>
<script src="js/device.js?v=<?php include 'php/templates/version.php'; ?>"></script> <script src="js/device.js?v=<?php include 'php/templates/version.php'; ?>"></script>
<!-- iCheck --> <!-- iCheck -->
<link rel="stylesheet" href="lib/iCheck/all.css"> <link rel="stylesheet" href="lib/iCheck/all.css">
@@ -136,7 +133,21 @@
<!-- ----------------------------------------------------------------------- --> <!-- ----------------------------------------------------------------------- -->
<!-- Layout Boxed Yellow --> <!-- Layout Boxed Yellow -->
<body class="hold-transition fixed <?php echo $pia_skin_selected;?> sidebar-mini" onLoad="update_servertime();" > <!-- spinner -->
<body class="hold-transition fixed <?php echo $pia_skin_selected;?> theme-<?php echo $UI_THEME;?> sidebar-mini" onLoad="update_servertime();" >
<div id="loadingSpinner">
<div class="nax_semitransparent-panel"></div>
<div class="panel panel-default nax_spinner">
<table>
<td id="loadingSpinnerText" width="130px" ></td>
<td><i class="fa-solid fa-spinner fa-spin-pulse"></i></td>
</table>
</div>
</div>
<!-- Site wrapper --> <!-- Site wrapper -->
<div class="wrapper"> <div class="wrapper">
@@ -149,7 +160,7 @@
<a href="devices.php" class="logo"> <a href="devices.php" class="logo">
<!-- mini logo for sidebar mini 50x50 pixels --> <!-- mini logo for sidebar mini 50x50 pixels -->
<span class="logo-mini"> <span class="logo-mini">
<img src="img/NetAlertX_logo.png" class="pia-top-left-logo" alt="NetAlertX Logo"/> <img src="img/NetAlertX_logo.png" class="top-left-logo" alt="NetAlertX Logo"/>
</span> </span>
<!-- logo for regular state and mobile devices --> <!-- logo for regular state and mobile devices -->
<span class="logo-lg">Net<b>Alert</b><sup>x</sup> <span class="logo-lg">Net<b>Alert</b><sup>x</sup>
@@ -297,6 +308,12 @@
<li> <li>
<a href="devices.php#archived" onclick="forceLoadUrl('devices.php#archived')" > <?= lang("Device_Shortcut_Archived");?> </a> <a href="devices.php#archived" onclick="forceLoadUrl('devices.php#archived')" > <?= lang("Device_Shortcut_Archived");?> </a>
</li> </li>
<li>
<a href="devices.php#all_devices" onclick="forceLoadUrl('devices.php#all_devices')" > <?= lang("Gen_All_Devices");?> </a>
</li>
<li>
<a href="devices.php#network_devices" onclick="forceLoadUrl('devices.php#network_devices')" > <?= lang("Network_Devices");?> </a>
</li>
</ul> </ul>
</li> </li>
@@ -329,7 +346,7 @@
<!-- Network menu item --> <!-- Network menu item -->
<li class=" <?php if (in_array (basename($_SERVER['SCRIPT_NAME']), array('network.php') ) ){ echo 'active'; } ?>"> <li class=" <?php if (in_array (basename($_SERVER['SCRIPT_NAME']), array('network.php') ) ){ echo 'active'; } ?>">
<a href="network.php"><i class="fa fa-fw fa-network-wired"></i> <span><?= lang('Navigation_Network');?></span></a> <a href="network.php"><i class="fa fa-fw fa-sitemap fa-rotate-270"></i> <span><?= lang('Navigation_Network');?></span></a>
</li> </li>
<!-- Maintenance menu item --> <!-- Maintenance menu item -->
@@ -419,8 +436,24 @@
</li> </li>
<!-- system info menu item --> <!-- system info menu item -->
<li class=" <?php if (in_array (basename($_SERVER['SCRIPT_NAME']), array('systeminfo.php') ) ){ echo 'active'; } ?>"> <li class=" treeview <?php if (in_array (basename($_SERVER['SCRIPT_NAME']), array('systeminfo.php') ) ){ echo 'active menu-open'; } ?>">
<a href="systeminfo.php"><i class="fa fa-fw fa-info-circle"></i> <span><?= lang('Navigation_SystemInfo');?></span></a> <a href="#">
<i class="fa fa-fw fa-info-circle"></i> <span><?= lang('Navigation_SystemInfo');?></span>
<span class="pull-right-container">
<i class="fa fa-angle-left pull-right"></i>
</span>
</a>
<ul class="treeview-menu " style="display: <?php if (in_array (basename($_SERVER['SCRIPT_NAME']), array('systeminfo.php') ) ){ echo 'block'; } else {echo 'none';} ?>;">
<li>
<a href="systeminfo.php#panServer" onclick="setCache('activeSysinfoTab','tabServer');initializeTabs()"><?= lang('Systeminfo_System');?></a>
</li>
<li>
<a href="systeminfo.php#panNetwork" onclick="setCache('activeSysinfoTab','tabNetwork');initializeTabs()"><?= lang('Systeminfo_Network');?></a>
</li>
<li>
<a href="systeminfo.php#panStorage" onclick="setCache('activeSysinfoTab','tabStorage');initializeTabs()"><?= lang('Systeminfo_Storage');?></a>
</li>
</ul>
</li> </li>
</ul> </ul>
@@ -433,24 +466,6 @@
<script defer> <script defer>
// Generate work-in-progress icons
function workInProgress() {
if($(".work-in-progress").length > 0 && $(".work-in-progress").html().trim() == "")
{
$(".work-in-progress").append(`
<a href="https://github.com/jokob-sk/NetAlertX/issues" target="_blank">
<b class="pointer" title="${getString("Gen_Work_In_Progress")}">🦺</b>
</a>
`)
}
}
//--------------------------------------------------------------
//--------------------------------------------------------------
function toggleFullscreen() { function toggleFullscreen() {
if (document.fullscreenElement) { if (document.fullscreenElement) {
@@ -468,6 +483,5 @@ function workInProgress() {
// Update server state in the header // Update server state in the header
updateState() updateState()
workInProgress()
</script> </script>

View File

@@ -66,6 +66,7 @@
"DAYS_TO_KEEP_EVENTS_name": "مدة الاحتفاظ بالأحداث", "DAYS_TO_KEEP_EVENTS_name": "مدة الاحتفاظ بالأحداث",
"DISCOVER_PLUGINS_description": "اكتشاف المكونات الإضافية المتاحة", "DISCOVER_PLUGINS_description": "اكتشاف المكونات الإضافية المتاحة",
"DISCOVER_PLUGINS_name": "اكتشاف المكونات الإضافية", "DISCOVER_PLUGINS_name": "اكتشاف المكونات الإضافية",
"DevDetail_Children_Title": "",
"DevDetail_Copy_Device_Title": "نسخ التفاصيل من الجهاز", "DevDetail_Copy_Device_Title": "نسخ التفاصيل من الجهاز",
"DevDetail_Copy_Device_Tooltip": "انسخ تفاصيل الجهاز من القائمة المنسدلة. سيتم استبدال كل ما في هذه الصفحة.", "DevDetail_Copy_Device_Tooltip": "انسخ تفاصيل الجهاز من القائمة المنسدلة. سيتم استبدال كل ما في هذه الصفحة.",
"DevDetail_CustomProperties_Title": "الخصائص المخصصة", "DevDetail_CustomProperties_Title": "الخصائص المخصصة",
@@ -102,6 +103,7 @@
"DevDetail_MainInfo_Type": "النوع", "DevDetail_MainInfo_Type": "النوع",
"DevDetail_MainInfo_Vendor": "المصنع", "DevDetail_MainInfo_Vendor": "المصنع",
"DevDetail_MainInfo_mac": "عنوان MAC", "DevDetail_MainInfo_mac": "عنوان MAC",
"DevDetail_NavToChildNode": "",
"DevDetail_Network_Node_hover": "انقر للذهاب إلى عقدة الشبكة", "DevDetail_Network_Node_hover": "انقر للذهاب إلى عقدة الشبكة",
"DevDetail_Network_Port_hover": "منفذ الشبكة", "DevDetail_Network_Port_hover": "منفذ الشبكة",
"DevDetail_Nmap_Scans": "عمليات فحص Nmap", "DevDetail_Nmap_Scans": "عمليات فحص Nmap",
@@ -200,6 +202,7 @@
"Device_MultiEdit_Tooltip": "تعديل الأجهزة المحددة", "Device_MultiEdit_Tooltip": "تعديل الأجهزة المحددة",
"Device_Searchbox": "بحث", "Device_Searchbox": "بحث",
"Device_Shortcut_AllDevices": "جميع الأجهزة", "Device_Shortcut_AllDevices": "جميع الأجهزة",
"Device_Shortcut_AllNodes": "",
"Device_Shortcut_Archived": "مؤرشف", "Device_Shortcut_Archived": "مؤرشف",
"Device_Shortcut_Connected": "متصل", "Device_Shortcut_Connected": "متصل",
"Device_Shortcut_Devices": "الأجهزة", "Device_Shortcut_Devices": "الأجهزة",
@@ -226,9 +229,11 @@
"Device_TableHead_Name": "الاسم", "Device_TableHead_Name": "الاسم",
"Device_TableHead_NetworkSite": "موقع الشبكة", "Device_TableHead_NetworkSite": "موقع الشبكة",
"Device_TableHead_Owner": "المالك", "Device_TableHead_Owner": "المالك",
"Device_TableHead_ParentRelType": "",
"Device_TableHead_Parent_MAC": "عنوان MAC الأصل", "Device_TableHead_Parent_MAC": "عنوان MAC الأصل",
"Device_TableHead_Port": "المنفذ", "Device_TableHead_Port": "المنفذ",
"Device_TableHead_PresentLastScan": "موجود في آخر فحص", "Device_TableHead_PresentLastScan": "موجود في آخر فحص",
"Device_TableHead_ReqNicsOnline": "",
"Device_TableHead_RowID": "معرف الصف", "Device_TableHead_RowID": "معرف الصف",
"Device_TableHead_Rowid": "معرف الصف", "Device_TableHead_Rowid": "معرف الصف",
"Device_TableHead_SSID": "معرف الشبكة اللاسلكية", "Device_TableHead_SSID": "معرف الشبكة اللاسلكية",
@@ -296,6 +301,7 @@
"Gen_Cancel": "إلغاء", "Gen_Cancel": "إلغاء",
"Gen_Change": "تغيير", "Gen_Change": "تغيير",
"Gen_Copy": "نسخ", "Gen_Copy": "نسخ",
"Gen_CopyToClipboard": "",
"Gen_DataUpdatedUITakesTime": "تم تحديث البيانات. قد يستغرق تحديث واجهة المستخدم بعض الوقت", "Gen_DataUpdatedUITakesTime": "تم تحديث البيانات. قد يستغرق تحديث واجهة المستخدم بعض الوقت",
"Gen_Delete": "حذف", "Gen_Delete": "حذف",
"Gen_DeleteAll": "حذف الكل", "Gen_DeleteAll": "حذف الكل",
@@ -303,7 +309,9 @@
"Gen_Error": "خطأ", "Gen_Error": "خطأ",
"Gen_Filter": "تصفية", "Gen_Filter": "تصفية",
"Gen_Generate": "إنشاء", "Gen_Generate": "إنشاء",
"Gen_InvalidMac": "",
"Gen_LockedDB": "قاعدة البيانات مقفلة", "Gen_LockedDB": "قاعدة البيانات مقفلة",
"Gen_NetworkMask": "",
"Gen_Offline": "غير متصل", "Gen_Offline": "غير متصل",
"Gen_Okay": "موافق", "Gen_Okay": "موافق",
"Gen_Online": "متصل", "Gen_Online": "متصل",
@@ -321,6 +329,7 @@
"Gen_SelectIcon": "اختيار أيقونة", "Gen_SelectIcon": "اختيار أيقونة",
"Gen_SelectToPreview": "اختر للمعاينة", "Gen_SelectToPreview": "اختر للمعاينة",
"Gen_Selected_Devices": "الأجهزة المحددة", "Gen_Selected_Devices": "الأجهزة المحددة",
"Gen_Subnet": "",
"Gen_Switch": "تبديل", "Gen_Switch": "تبديل",
"Gen_Upd": "تحديث", "Gen_Upd": "تحديث",
"Gen_Upd_Fail": "فشل التحديث", "Gen_Upd_Fail": "فشل التحديث",
@@ -486,8 +495,10 @@
"Navigation_Workflows": "تدفقات العمل", "Navigation_Workflows": "تدفقات العمل",
"Network_Assign": "تعيين", "Network_Assign": "تعيين",
"Network_Cant_Assign": "لا يمكن التعيين", "Network_Cant_Assign": "لا يمكن التعيين",
"Network_Cant_Assign_No_Node_Selected": "",
"Network_Configuration_Error": "خطأ في التكوين", "Network_Configuration_Error": "خطأ في التكوين",
"Network_Connected": "متصل", "Network_Connected": "متصل",
"Network_Devices": "",
"Network_ManageAdd": "إضافة إدارة", "Network_ManageAdd": "إضافة إدارة",
"Network_ManageAdd_Name": "اسم الإدارة", "Network_ManageAdd_Name": "اسم الإدارة",
"Network_ManageAdd_Name_text": "نص اسم الإدارة", "Network_ManageAdd_Name_text": "نص اسم الإدارة",
@@ -522,6 +533,8 @@
"Network_Root": "الجذر", "Network_Root": "الجذر",
"Network_Root_Not_Configured": "الجذر غير مكون", "Network_Root_Not_Configured": "الجذر غير مكون",
"Network_Root_Unconfigurable": "الجذر غير قابل للتكوين", "Network_Root_Unconfigurable": "الجذر غير قابل للتكوين",
"Network_ShowArchived": "",
"Network_ShowOffline": "",
"Network_Table_Hostname": "اسم المضيف", "Network_Table_Hostname": "اسم المضيف",
"Network_Table_IP": "عنوان IP", "Network_Table_IP": "عنوان IP",
"Network_Table_State": "الحالة", "Network_Table_State": "الحالة",
@@ -585,6 +598,7 @@
"Settings_device_Scanners_desync": "عدم تزامن ماسحات الأجهزة", "Settings_device_Scanners_desync": "عدم تزامن ماسحات الأجهزة",
"Settings_device_Scanners_desync_popup": "نافذة عدم تزامن ماسحات الأجهزة", "Settings_device_Scanners_desync_popup": "نافذة عدم تزامن ماسحات الأجهزة",
"Speedtest_Results": "نتائج اختبار السرعة", "Speedtest_Results": "نتائج اختبار السرعة",
"Systeminfo_AvailableIps": "",
"Systeminfo_CPU": "المعالج", "Systeminfo_CPU": "المعالج",
"Systeminfo_CPU_Cores": "أنوية المعالج", "Systeminfo_CPU_Cores": "أنوية المعالج",
"Systeminfo_CPU_Name": "اسم المعالج", "Systeminfo_CPU_Name": "اسم المعالج",
@@ -704,24 +718,21 @@
"WF_Trigger": "المشغل", "WF_Trigger": "المشغل",
"WF_Trigger_event_type": "نوع حدث المشغل", "WF_Trigger_event_type": "نوع حدث المشغل",
"WF_Trigger_type": "نوع المشغل", "WF_Trigger_type": "نوع المشغل",
"add_icon_event_icon": "أيقونة إضافة أيقونة",
"add_icon_event_tooltip": "تلميح إضافة أيقونة", "add_icon_event_tooltip": "تلميح إضافة أيقونة",
"add_option_event_icon": "أيقونة إضافة خيار",
"add_option_event_tooltip": "تلميح إضافة خيار", "add_option_event_tooltip": "تلميح إضافة خيار",
"copy_icons_event_icon": "أيقونة نسخ الأيقونات",
"copy_icons_event_tooltip": "تلميح نسخ الأيقونات", "copy_icons_event_tooltip": "تلميح نسخ الأيقونات",
"devices_old": "الأجهزة القديمة", "devices_old": "الأجهزة القديمة",
"general_event_description": "وصف الحدث العام", "general_event_description": "وصف الحدث العام",
"general_event_title": "عنوان الحدث العام", "general_event_title": "عنوان الحدث العام",
"go_to_node_event_icon": "أيقونة الانتقال إلى العقدة", "go_to_device_event_tooltip": "",
"go_to_node_event_tooltip": "تلميح الانتقال إلى العقدة", "go_to_node_event_tooltip": "تلميح الانتقال إلى العقدة",
"new_version_available": "يتوفر إصدار جديد", "new_version_available": "يتوفر إصدار جديد",
"report_guid": "معرف التقرير", "report_guid": "معرف التقرير",
"report_guid_missing": "معرف التقرير مفقود", "report_guid_missing": "معرف التقرير مفقود",
"report_select_format": "اختر تنسيق التقرير", "report_select_format": "اختر تنسيق التقرير",
"report_time": "وقت التقرير", "report_time": "وقت التقرير",
"run_event_icon": "أيقونة تشغيل الحدث",
"run_event_tooltip": "تلميح تشغيل الحدث", "run_event_tooltip": "تلميح تشغيل الحدث",
"select_icon_event_tooltip": "",
"settings_core_icon": "أيقونة الإعدادات الأساسية", "settings_core_icon": "أيقونة الإعدادات الأساسية",
"settings_core_label": "تسمية الإعدادات الأساسية", "settings_core_label": "تسمية الإعدادات الأساسية",
"settings_device_scanners": "ماسحات الأجهزة", "settings_device_scanners": "ماسحات الأجهزة",
@@ -748,6 +759,5 @@
"settings_system_icon": "أيقونة النظام", "settings_system_icon": "أيقونة النظام",
"settings_system_label": "تسمية النظام", "settings_system_label": "تسمية النظام",
"settings_update_item_warning": "تحذير تحديث العنصر", "settings_update_item_warning": "تحذير تحديث العنصر",
"test_event_icon": "أيقونة اختبار الحدث",
"test_event_tooltip": "تلميح اختبار الحدث" "test_event_tooltip": "تلميح اختبار الحدث"
} }

View File

@@ -40,7 +40,7 @@
"BackDevices_Backup_Failed": "La còpia de seguretat s'ha executat parcialment. L'arxiu no es pot crear o està buit.", "BackDevices_Backup_Failed": "La còpia de seguretat s'ha executat parcialment. L'arxiu no es pot crear o està buit.",
"BackDevices_Backup_okay": "La còpia de seguretat s'ha executat en un nou arxiu", "BackDevices_Backup_okay": "La còpia de seguretat s'ha executat en un nou arxiu",
"BackDevices_DBTools_DelDevError_a": "Error esborrant el Dispositiu", "BackDevices_DBTools_DelDevError_a": "Error esborrant el Dispositiu",
"BackDevices_DBTools_DelDevError_b": "Error esborrant els Dispositius", "BackDevices_DBTools_DelDevError_b": "Error esborrant dispositius",
"BackDevices_DBTools_DelDev_a": "Dispositiu esborrat", "BackDevices_DBTools_DelDev_a": "Dispositiu esborrat",
"BackDevices_DBTools_DelDev_b": "Dispositius esborrats", "BackDevices_DBTools_DelDev_b": "Dispositius esborrats",
"BackDevices_DBTools_DelEvents": "Esdeveniments esborrats", "BackDevices_DBTools_DelEvents": "Esdeveniments esborrats",
@@ -66,6 +66,7 @@
"DAYS_TO_KEEP_EVENTS_name": "Esborrar esdeveniments més vells de", "DAYS_TO_KEEP_EVENTS_name": "Esborrar esdeveniments més vells de",
"DISCOVER_PLUGINS_description": "Desactiva aquesta opció per accelerar la inicialització i l'estalvi de configuració. Quan està desactivat, els connectors no es descobreixen, i no podeu afegir nous connectors a la configuració <code>LOADED_PLUGINS</code>.", "DISCOVER_PLUGINS_description": "Desactiva aquesta opció per accelerar la inicialització i l'estalvi de configuració. Quan està desactivat, els connectors no es descobreixen, i no podeu afegir nous connectors a la configuració <code>LOADED_PLUGINS</code>.",
"DISCOVER_PLUGINS_name": "Descobreix els plugins", "DISCOVER_PLUGINS_name": "Descobreix els plugins",
"DevDetail_Children_Title": "Relacions filles",
"DevDetail_Copy_Device_Title": "<i class=\"fa fa-copy\"></i> Copiar detalls des del dispositiu", "DevDetail_Copy_Device_Title": "<i class=\"fa fa-copy\"></i> Copiar detalls des del dispositiu",
"DevDetail_Copy_Device_Tooltip": "Copiar detalls del dispositius des de la llista desplegable. Tot el d'aquesta pàgina es sobre-escriurà", "DevDetail_Copy_Device_Tooltip": "Copiar detalls del dispositius des de la llista desplegable. Tot el d'aquesta pàgina es sobre-escriurà",
"DevDetail_CustomProperties_Title": "Propietats personalitzades", "DevDetail_CustomProperties_Title": "Propietats personalitzades",
@@ -74,7 +75,7 @@
"DevDetail_EveandAl_AlertAllEvents": "Alertes", "DevDetail_EveandAl_AlertAllEvents": "Alertes",
"DevDetail_EveandAl_AlertDown": "Cancel·lar alerta", "DevDetail_EveandAl_AlertDown": "Cancel·lar alerta",
"DevDetail_EveandAl_Archived": "Arxivat", "DevDetail_EveandAl_Archived": "Arxivat",
"DevDetail_EveandAl_NewDevice": "Nou Dispositiu", "DevDetail_EveandAl_NewDevice": "Nou dispositiu",
"DevDetail_EveandAl_NewDevice_Tooltip": "Es mostrarà el nou estat del dispositiu i s'inclourà a les llistes quan el filtre New Devices estigui actiu. No afecta les notificacions.", "DevDetail_EveandAl_NewDevice_Tooltip": "Es mostrarà el nou estat del dispositiu i s'inclourà a les llistes quan el filtre New Devices estigui actiu. No afecta les notificacions.",
"DevDetail_EveandAl_RandomMAC": "MAC aleatori", "DevDetail_EveandAl_RandomMAC": "MAC aleatori",
"DevDetail_EveandAl_ScanCycle": "Dispositiu d'escaneig", "DevDetail_EveandAl_ScanCycle": "Dispositiu d'escaneig",
@@ -86,7 +87,7 @@
"DevDetail_GoToNetworkNode": "Navegació a la pàgina de la Xarxa del node donat.", "DevDetail_GoToNetworkNode": "Navegació a la pàgina de la Xarxa del node donat.",
"DevDetail_Icon": "Icona", "DevDetail_Icon": "Icona",
"DevDetail_Icon_Descr": "Si us plau, introdueix dins de la caixa de text els caràcters que veu a la imatge de sota. Això és requerit per evitar enviaments automàtics.", "DevDetail_Icon_Descr": "Si us plau, introdueix dins de la caixa de text els caràcters que veu a la imatge de sota. Això és requerit per evitar enviaments automàtics.",
"DevDetail_Loading": "Carregant ...", "DevDetail_Loading": "Carregant ",
"DevDetail_MainInfo_Comments": "Comentaris", "DevDetail_MainInfo_Comments": "Comentaris",
"DevDetail_MainInfo_Favorite": "Favorit", "DevDetail_MainInfo_Favorite": "Favorit",
"DevDetail_MainInfo_Group": "Grup", "DevDetail_MainInfo_Group": "Grup",
@@ -102,10 +103,11 @@
"DevDetail_MainInfo_Type": "Tipus", "DevDetail_MainInfo_Type": "Tipus",
"DevDetail_MainInfo_Vendor": "Venedor", "DevDetail_MainInfo_Vendor": "Venedor",
"DevDetail_MainInfo_mac": "MAC", "DevDetail_MainInfo_mac": "MAC",
"DevDetail_NavToChildNode": "Obrir un node fill",
"DevDetail_Network_Node_hover": "Seleccioneu el dispositiu de xarxa al qual aquest dispositiu està connectat, per poder omplir l'arbre de xarxa.", "DevDetail_Network_Node_hover": "Seleccioneu el dispositiu de xarxa al qual aquest dispositiu està connectat, per poder omplir l'arbre de xarxa.",
"DevDetail_Network_Port_hover": "El port on el dispositiu està connectat al dispositiu de xarxa del pare. Si es deixa buit, sortirà una icona wifi a la representació de la Xarxa.", "DevDetail_Network_Port_hover": "El port on el dispositiu està connectat al dispositiu de xarxa del pare. Si es deixa buit, sortirà una icona wifi a la representació de la Xarxa.",
"DevDetail_Nmap_Scans": "Escaneig manual Nmap", "DevDetail_Nmap_Scans": "Escaneig manual Nmap",
"DevDetail_Nmap_Scans_desc": "Aquí podeu executar les exploracions NMAP manuals. També podeu programar les exploracions NMAP automàtiques a través del connector Serveis i Ports (NMAP). Ves a <a href='/settings.php' target='_blank'>Configuració</a> per saber-ne més", "DevDetail_Nmap_Scans_desc": "Aquí podeu executar les exploracions NMAP manuals. També podeu programar les exploracions NMAP automàtiques a través del connector Serveis i Ports (NMAP). Ves a <a href=\"https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/nmap_scan\" target='_blank'>Docs</a> per saber-ne més",
"DevDetail_Nmap_buttonDefault": "Escaneig predeterminat", "DevDetail_Nmap_buttonDefault": "Escaneig predeterminat",
"DevDetail_Nmap_buttonDefault_text": "Escaneig predeterminat: Nmap escaneja els 1000 ports superiors per a cada protocol d'exploració sol·licitat. El 93% dels ports TCP i el 49% dels ports UDP. (uns 5 segons)", "DevDetail_Nmap_buttonDefault_text": "Escaneig predeterminat: Nmap escaneja els 1000 ports superiors per a cada protocol d'exploració sol·licitat. El 93% dels ports TCP i el 49% dels ports UDP. (uns 5 segons)",
"DevDetail_Nmap_buttonDetail": "Escaneig Detallat", "DevDetail_Nmap_buttonDetail": "Escaneig Detallat",
@@ -194,12 +196,13 @@
"DevDetail_button_Save": "Guardar", "DevDetail_button_Save": "Guardar",
"DeviceEdit_ValidMacIp": "Entra una adreça <b>IP</b> i <b>Mac</b> vàlides.", "DeviceEdit_ValidMacIp": "Entra una adreça <b>IP</b> i <b>Mac</b> vàlides.",
"Device_MultiEdit": "Multi-edició", "Device_MultiEdit": "Multi-edició",
"Device_MultiEdit_Backup": "Atenció, entrar valors incorrectes a continuació trencarà la configuració. Si us plau, abans feu còpia de seguretat la vostra base de dades o configuració de Dispositius (<a href=\"php/server/devices.php?action=ExportCSV\">clic per descarregar <i class=\"fa-solid fa-download fa-bounce\"></i></a>). Llegiu com per recuperar Dispositius des d'aquest fitxer al <a href=\"https://github.com/jokob-sk/NetAlertX/blob/main/docs/BACKUPS.md#scenario-2-corrupted-database\" target=\"_blank\">documentació de Còpies de seguretat</a>.", "Device_MultiEdit_Backup": "Atenció, entrar valors incorrectes a continuació trencarà la configuració. Si us plau, abans feu còpia de seguretat la vostra base de dades o configuració de Dispositius (<a href=\"php/server/devices.php?action=ExportCSV\">clic per descarregar <i class=\"fa-solid fa-download fa-bounce\"></i></a>). Llegiu com per recuperar Dispositius des d'aquest fitxer al <a href=\"https://github.com/jokob-sk/NetAlertX/blob/main/docs/BACKUPS.md#scenario-2-corrupted-database\" target=\"_blank\">documentació de Còpies de seguretat</a>. Per aplicar els canvis, feu click a la <b>Save<i class=\"fa-solid fa-save\"></i></b> icona de cada camp que volgueu actualitzar.",
"Device_MultiEdit_Fields": "Editar camps:", "Device_MultiEdit_Fields": "Editar camps:",
"Device_MultiEdit_MassActions": "Accions massives:", "Device_MultiEdit_MassActions": "Accions massives:",
"Device_MultiEdit_Tooltip": "Atenció. Si feu clic a això s'aplicarà el valor de l'esquerra a tots els dispositius seleccionats a dalt.", "Device_MultiEdit_Tooltip": "Atenció. Si feu clic a això s'aplicarà el valor de l'esquerra a tots els dispositius seleccionats a dalt.",
"Device_Searchbox": "Cerca", "Device_Searchbox": "Cerca",
"Device_Shortcut_AllDevices": "Els meus dispositius", "Device_Shortcut_AllDevices": "Els meus dispositius",
"Device_Shortcut_AllNodes": "Tots els nodes",
"Device_Shortcut_Archived": "Arxivat", "Device_Shortcut_Archived": "Arxivat",
"Device_Shortcut_Connected": "Connectat", "Device_Shortcut_Connected": "Connectat",
"Device_Shortcut_Devices": "Dispositius", "Device_Shortcut_Devices": "Dispositius",
@@ -226,9 +229,11 @@
"Device_TableHead_Name": "Nom", "Device_TableHead_Name": "Nom",
"Device_TableHead_NetworkSite": "Network Site", "Device_TableHead_NetworkSite": "Network Site",
"Device_TableHead_Owner": "Propietari", "Device_TableHead_Owner": "Propietari",
"Device_TableHead_ParentRelType": "Tipus de relació",
"Device_TableHead_Parent_MAC": "Node pare de xarxa", "Device_TableHead_Parent_MAC": "Node pare de xarxa",
"Device_TableHead_Port": "Port", "Device_TableHead_Port": "Port",
"Device_TableHead_PresentLastScan": "Presència", "Device_TableHead_PresentLastScan": "Presència",
"Device_TableHead_ReqNicsOnline": "Requereix NICs En línia",
"Device_TableHead_RowID": "ID de fila", "Device_TableHead_RowID": "ID de fila",
"Device_TableHead_Rowid": "ID de fila", "Device_TableHead_Rowid": "ID de fila",
"Device_TableHead_SSID": "SSID", "Device_TableHead_SSID": "SSID",
@@ -251,7 +256,7 @@
"ENCRYPTION_KEY_name": "Clau d'encriptació", "ENCRYPTION_KEY_name": "Clau d'encriptació",
"Email_display_name": "Correu electrònic", "Email_display_name": "Correu electrònic",
"Email_icon": "<i class=\"fa fa-at\"></i>", "Email_icon": "<i class=\"fa fa-at\"></i>",
"Events_Loading": "Carregant ...", "Events_Loading": "Carregant ",
"Events_Periodselect_All": "Tota la informació", "Events_Periodselect_All": "Tota la informació",
"Events_Periodselect_LastMonth": "Darrer Mes", "Events_Periodselect_LastMonth": "Darrer Mes",
"Events_Periodselect_LastWeek": "Darrera setmana", "Events_Periodselect_LastWeek": "Darrera setmana",
@@ -296,6 +301,7 @@
"Gen_Cancel": "Cancel·lar", "Gen_Cancel": "Cancel·lar",
"Gen_Change": "Canviar", "Gen_Change": "Canviar",
"Gen_Copy": "Executar", "Gen_Copy": "Executar",
"Gen_CopyToClipboard": "Copia a portapapers",
"Gen_DataUpdatedUITakesTime": "D'acord - Pot passar una estona perquè la interfície d'usuari s'actualitzi si s'està executant una exploració.", "Gen_DataUpdatedUITakesTime": "D'acord - Pot passar una estona perquè la interfície d'usuari s'actualitzi si s'està executant una exploració.",
"Gen_Delete": "Esborrar", "Gen_Delete": "Esborrar",
"Gen_DeleteAll": "Esborrar tot", "Gen_DeleteAll": "Esborrar tot",
@@ -303,7 +309,9 @@
"Gen_Error": "Error", "Gen_Error": "Error",
"Gen_Filter": "Filtrar", "Gen_Filter": "Filtrar",
"Gen_Generate": "Generar", "Gen_Generate": "Generar",
"Gen_InvalidMac": "Mac address invàlida.",
"Gen_LockedDB": "ERROR - DB podria estar bloquejada - Fes servir F12 Eines desenvolupament -> Consola o provar-ho més tard.", "Gen_LockedDB": "ERROR - DB podria estar bloquejada - Fes servir F12 Eines desenvolupament -> Consola o provar-ho més tard.",
"Gen_NetworkMask": "Màscara de xarxa",
"Gen_Offline": "Fora de línia", "Gen_Offline": "Fora de línia",
"Gen_Okay": "Ok", "Gen_Okay": "Ok",
"Gen_Online": "En línia", "Gen_Online": "En línia",
@@ -321,6 +329,7 @@
"Gen_SelectIcon": "<i class=\"fa-solid fa-chevron-down fa-fade\"></i>", "Gen_SelectIcon": "<i class=\"fa-solid fa-chevron-down fa-fade\"></i>",
"Gen_SelectToPreview": "Seleccioneu la vista prèvia", "Gen_SelectToPreview": "Seleccioneu la vista prèvia",
"Gen_Selected_Devices": "Dispositius seleccionats:", "Gen_Selected_Devices": "Dispositius seleccionats:",
"Gen_Subnet": "Subxarxa",
"Gen_Switch": "Switch", "Gen_Switch": "Switch",
"Gen_Upd": "Actualitzat correctament", "Gen_Upd": "Actualitzat correctament",
"Gen_Upd_Fail": "Actualització fallida", "Gen_Upd_Fail": "Actualització fallida",
@@ -341,7 +350,7 @@
"LOADED_PLUGINS_name": "Connectors carregats", "LOADED_PLUGINS_name": "Connectors carregats",
"LOG_LEVEL_description": "Aquest paràmetre permetrà un registre més detallat. Útil per a la depuració d'esdeveniments d'escriptura a la base de dades.", "LOG_LEVEL_description": "Aquest paràmetre permetrà un registre més detallat. Útil per a la depuració d'esdeveniments d'escriptura a la base de dades.",
"LOG_LEVEL_name": "Imprimeix el registre addicional", "LOG_LEVEL_name": "Imprimeix el registre addicional",
"Loading": "Carregant ...", "Loading": "Carregant",
"Login_Box": "Introduïu la vostra contrasenya", "Login_Box": "Introduïu la vostra contrasenya",
"Login_Default_PWD": "Contrasenya per defecte \"123456\" encara és activa.", "Login_Default_PWD": "Contrasenya per defecte \"123456\" encara és activa.",
"Login_Info": "Les contrasenyes es canvien al connector(plugin) Configurar Contrasenya. Comprova el <a target=\"_blank\" href=\"https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/set_password\">SETPWD docs</a> si tens dubtes fent logging.", "Login_Info": "Les contrasenyes es canvien al connector(plugin) Configurar Contrasenya. Comprova el <a target=\"_blank\" href=\"https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/set_password\">SETPWD docs</a> si tens dubtes fent logging.",
@@ -410,7 +419,7 @@
"Maintenance_Tool_del_allevents": "Elimina deteccions (presència)", "Maintenance_Tool_del_allevents": "Elimina deteccions (presència)",
"Maintenance_Tool_del_allevents30": "Suprimeix tots els esdeveniments anteriors a 30 dies", "Maintenance_Tool_del_allevents30": "Suprimeix tots els esdeveniments anteriors a 30 dies",
"Maintenance_Tool_del_allevents30_noti": "Eliminar Esdeveniments", "Maintenance_Tool_del_allevents30_noti": "Eliminar Esdeveniments",
"Maintenance_Tool_del_allevents30_noti_text": "T'és segur vols eliminar tot els successos més vells que 30 dies? Això elimina tots els dispositius presents.", "Maintenance_Tool_del_allevents30_noti_text": "Estàs segur que vols eliminar tot els successos més vells que 30 dies? Això elimina tots els dispositius presents.",
"Maintenance_Tool_del_allevents30_text": "Abans d'utilitzar aquesta funció, feu una còpia de seguretat. La supressió no es pot desfer. S'eliminaran tots els esdeveniments mes vells de 30 dies a la base de dades. També es restablirà la detecció de presència de tots els dispositius. Això pot portar a sessions no vàlides. Això significa que els dispositius es mostren com a \"presents/detectats\" encara que estiguin fora de línia. Una anàlisi mentre el dispositiu en qüestió està en línia resol el problema.", "Maintenance_Tool_del_allevents30_text": "Abans d'utilitzar aquesta funció, feu una còpia de seguretat. La supressió no es pot desfer. S'eliminaran tots els esdeveniments mes vells de 30 dies a la base de dades. També es restablirà la detecció de presència de tots els dispositius. Això pot portar a sessions no vàlides. Això significa que els dispositius es mostren com a \"presents/detectats\" encara que estiguin fora de línia. Una anàlisi mentre el dispositiu en qüestió està en línia resol el problema.",
"Maintenance_Tool_del_allevents_noti": "Eliminar Esdeveniments", "Maintenance_Tool_del_allevents_noti": "Eliminar Esdeveniments",
"Maintenance_Tool_del_allevents_noti_text": "Estàs segur que vols eliminar tots els esdeveniments? Això reinicialitza la detecció de presència de tots els dispositius.", "Maintenance_Tool_del_allevents_noti_text": "Estàs segur que vols eliminar tots els esdeveniments? Això reinicialitza la detecció de presència de tots els dispositius.",
@@ -446,7 +455,7 @@
"Maintenance_Tools_Tab_UISettings": "Configuració UI", "Maintenance_Tools_Tab_UISettings": "Configuració UI",
"Maintenance_arp_status": "Estat de Scan", "Maintenance_arp_status": "Estat de Scan",
"Maintenance_arp_status_off": "actualment està desactivat", "Maintenance_arp_status_off": "actualment està desactivat",
"Maintenance_arp_status_on": "scan(s) actualment en execució", "Maintenance_arp_status_on": "s'està fent un scan",
"Maintenance_built_on": "Construït", "Maintenance_built_on": "Construït",
"Maintenance_current_version": "Ets actual. Dona un cop d'ull al que <a href=\"https://github.com/jokob-sk/NetAlertX/issues/138\" target=\"_blank\">estic treballant</a>.", "Maintenance_current_version": "Ets actual. Dona un cop d'ull al que <a href=\"https://github.com/jokob-sk/NetAlertX/issues/138\" target=\"_blank\">estic treballant</a>.",
"Maintenance_database_backup": "Còpies de seguretat de BBDD", "Maintenance_database_backup": "Còpies de seguretat de BBDD",
@@ -486,8 +495,10 @@
"Navigation_Workflows": "Workflows", "Navigation_Workflows": "Workflows",
"Network_Assign": "Connecta el <i class=\"fa fa-server\"></i> node de Xarxa", "Network_Assign": "Connecta el <i class=\"fa fa-server\"></i> node de Xarxa",
"Network_Cant_Assign": "No es pot assignar el node arrel d'Internet com a node fill.", "Network_Cant_Assign": "No es pot assignar el node arrel d'Internet com a node fill.",
"Network_Cant_Assign_No_Node_Selected": "No es pot assignar, no s'ha seleccionat cap node pare.",
"Network_Configuration_Error": "Error de configuració", "Network_Configuration_Error": "Error de configuració",
"Network_Connected": "Dispositius connectats", "Network_Connected": "Dispositius connectats",
"Network_Devices": "Dispositius de xarxa",
"Network_ManageAdd": "Afegir dispositiu", "Network_ManageAdd": "Afegir dispositiu",
"Network_ManageAdd_Name": "Nom del dispositiu", "Network_ManageAdd_Name": "Nom del dispositiu",
"Network_ManageAdd_Name_text": "Nom sense caràcters especials", "Network_ManageAdd_Name_text": "Nom sense caràcters especials",
@@ -522,6 +533,8 @@
"Network_Root": "Node arrel", "Network_Root": "Node arrel",
"Network_Root_Not_Configured": "Seleccioneu un tipus de dispositiu de xarxa, per exemple un tipus <b>Gateway</b>, al camp <b>Tipus</b>del <a href=\"deviceDetails.php?mac=Internet\">dispositiu arrel d'Internet</a> per començar a configurar aquesta pantalla. <br/><br/>. Podeu trobar més documentació a la <a href=\"https://github.com/jokob-sk/NetAlertX/blob/main/docs/NETWORK_TREE.md\" target=\"_blank\">Guia de com configurar la vostra pàgina de xarxa</a>", "Network_Root_Not_Configured": "Seleccioneu un tipus de dispositiu de xarxa, per exemple un tipus <b>Gateway</b>, al camp <b>Tipus</b>del <a href=\"deviceDetails.php?mac=Internet\">dispositiu arrel d'Internet</a> per començar a configurar aquesta pantalla. <br/><br/>. Podeu trobar més documentació a la <a href=\"https://github.com/jokob-sk/NetAlertX/blob/main/docs/NETWORK_TREE.md\" target=\"_blank\">Guia de com configurar la vostra pàgina de xarxa</a>",
"Network_Root_Unconfigurable": "Arrel no configurable", "Network_Root_Unconfigurable": "Arrel no configurable",
"Network_ShowArchived": "Mostra els arxivats",
"Network_ShowOffline": "Mostra fora de línia",
"Network_Table_Hostname": "Hostname", "Network_Table_Hostname": "Hostname",
"Network_Table_IP": "IP", "Network_Table_IP": "IP",
"Network_Table_State": "Estat", "Network_Table_State": "Estat",
@@ -556,7 +569,7 @@
"Presence_Key_OnlinePastMiss": "Anteriorment en línia (miss-match)", "Presence_Key_OnlinePastMiss": "Anteriorment en línia (miss-match)",
"Presence_Key_OnlinePastMiss_desc": "El dispositiu estava en línia anteriorment, i actualment està fora de línia. podria ser que a la sessió d'inici li faltin dades conflictives (o podria ser un bug) - si us plau, envií una petició de canvi dins de la caixa de text si sap com solucionar-ho (millor en anglès)", "Presence_Key_OnlinePastMiss_desc": "El dispositiu estava en línia anteriorment, i actualment està fora de línia. podria ser que a la sessió d'inici li faltin dades conflictives (o podria ser un bug) - si us plau, envií una petició de canvi dins de la caixa de text si sap com solucionar-ho (millor en anglès)",
"Presence_Key_OnlinePast_desc": "Dispositiu en línia en el passat, però actualment fora de línia.", "Presence_Key_OnlinePast_desc": "Dispositiu en línia en el passat, però actualment fora de línia.",
"Presence_Loading": "Carregant...", "Presence_Loading": "Carregant",
"Presence_Shortcut_AllDevices": "Els meus Dispositius", "Presence_Shortcut_AllDevices": "Els meus Dispositius",
"Presence_Shortcut_Archived": "Arxivat", "Presence_Shortcut_Archived": "Arxivat",
"Presence_Shortcut_Connected": "Connectat", "Presence_Shortcut_Connected": "Connectat",
@@ -564,7 +577,7 @@
"Presence_Shortcut_DownAlerts": "Aturar alertes", "Presence_Shortcut_DownAlerts": "Aturar alertes",
"Presence_Shortcut_Favorites": "Favorits", "Presence_Shortcut_Favorites": "Favorits",
"Presence_Shortcut_NewDevices": "Nous dispositius", "Presence_Shortcut_NewDevices": "Nous dispositius",
"Presence_Title": "Detecció de dispositius", "Presence_Title": "Presència per dispositiu",
"REFRESH_FQDN_description": "Re-escaneja tots dispositius i refresca el seu (FQDN). Si està desactivat, nomes s'escanegen els noms coneguts per fer-ho més ràpid. En aquest cas, FQDN s'actualitza només durant descoberta inicial de dispositius.", "REFRESH_FQDN_description": "Re-escaneja tots dispositius i refresca el seu (FQDN). Si està desactivat, nomes s'escanegen els noms coneguts per fer-ho més ràpid. En aquest cas, FQDN s'actualitza només durant descoberta inicial de dispositius.",
"REFRESH_FQDN_name": "Refresc FQDN", "REFRESH_FQDN_name": "Refresc FQDN",
"REPORT_DASHBOARD_URL_description": "Aquesta URL s'utilitza com a base per generar enllaços en informes HTML (per exemple: correus electrònics). Introduïu la URL completa començant per <code>http://</code> incloent el número de port (sense barra inicial <code>/</code>).", "REPORT_DASHBOARD_URL_description": "Aquesta URL s'utilitza com a base per generar enllaços en informes HTML (per exemple: correus electrònics). Introduïu la URL completa començant per <code>http://</code> incloent el número de port (sense barra inicial <code>/</code>).",
@@ -585,6 +598,7 @@
"Settings_device_Scanners_desync": "⚠ Els horaris d'escàner de dispositius no estan en sincronia.", "Settings_device_Scanners_desync": "⚠ Els horaris d'escàner de dispositius no estan en sincronia.",
"Settings_device_Scanners_desync_popup": "Els horaris dels escàners de dispositius (<code>*_RUN_SCHD</code>) no són iguals. Això donarà lloc a notificacions inconsistents del dispositiu en línia / fora de línia. Si no és intencionat, utilitzeu el mateix horari per a tots els <b>🔍 escàners de dispositius</b>.", "Settings_device_Scanners_desync_popup": "Els horaris dels escàners de dispositius (<code>*_RUN_SCHD</code>) no són iguals. Això donarà lloc a notificacions inconsistents del dispositiu en línia / fora de línia. Si no és intencionat, utilitzeu el mateix horari per a tots els <b>🔍 escàners de dispositius</b>.",
"Speedtest_Results": "Speedtest Resultats", "Speedtest_Results": "Speedtest Resultats",
"Systeminfo_AvailableIps": "IPs disponibles",
"Systeminfo_CPU": "CPU", "Systeminfo_CPU": "CPU",
"Systeminfo_CPU_Cores": "Nuclis de CPU:", "Systeminfo_CPU_Cores": "Nuclis de CPU:",
"Systeminfo_CPU_Name": "Nom de CPU:", "Systeminfo_CPU_Name": "Nom de CPU:",
@@ -669,7 +683,7 @@
"UI_LANG_description": "Seleccioneu l'idioma d'usuari preferit. Ajudeu a traduir o suggerir idiomes al portal en línia de <a href=\"https://hosted.weblate.org/projects/pialert/core/\" target=\"_blank\">Weblate</a>.", "UI_LANG_description": "Seleccioneu l'idioma d'usuari preferit. Ajudeu a traduir o suggerir idiomes al portal en línia de <a href=\"https://hosted.weblate.org/projects/pialert/core/\" target=\"_blank\">Weblate</a>.",
"UI_LANG_name": "Llenguatge UI", "UI_LANG_name": "Llenguatge UI",
"UI_MY_DEVICES_description": "Els dispositius dels quals s'han de mostrar en la vista predeterminada <b> Els meus dispositius</b>.", "UI_MY_DEVICES_description": "Els dispositius dels quals s'han de mostrar en la vista predeterminada <b> Els meus dispositius</b>.",
"UI_MY_DEVICES_name": "Veure a la vista els meus dispositius", "UI_MY_DEVICES_name": "Veure a la vista Els Meus Dispositius",
"UI_NOT_RANDOM_MAC_description": "Prefixos MAC que no s'han de marcar com a dispositius aleatoris. Introduïu per exemple <code> 52</code> per excloure els dispositius començant per <code> 52:xx:xx:xx:xx:xx</code> de ser marcats com a dispositius amb una adreça MAC aleatòria.", "UI_NOT_RANDOM_MAC_description": "Prefixos MAC que no s'han de marcar com a dispositius aleatoris. Introduïu per exemple <code> 52</code> per excloure els dispositius començant per <code> 52:xx:xx:xx:xx:xx</code> de ser marcats com a dispositius amb una adreça MAC aleatòria.",
"UI_NOT_RANDOM_MAC_name": "No marqueu com a aleatori", "UI_NOT_RANDOM_MAC_name": "No marqueu com a aleatori",
"UI_PRESENCE_description": "Seleccioneu quins estats s'han de mostrar al gràfic <b> Presència de dispositius</b> a la pàgina <a href=\"/devices.php\" target=\"_blank\">Dispositius</a>.", "UI_PRESENCE_description": "Seleccioneu quins estats s'han de mostrar al gràfic <b> Presència de dispositius</b> a la pàgina <a href=\"/devices.php\" target=\"_blank\">Dispositius</a>.",
@@ -704,24 +718,21 @@
"WF_Trigger": "Disparador(Trigger)", "WF_Trigger": "Disparador(Trigger)",
"WF_Trigger_event_type": "Tipus d'esdeveniment", "WF_Trigger_event_type": "Tipus d'esdeveniment",
"WF_Trigger_type": "Tipus de disparador", "WF_Trigger_type": "Tipus de disparador",
"add_icon_event_icon": "fa-square-plus",
"add_icon_event_tooltip": "Afegir nova icona", "add_icon_event_tooltip": "Afegir nova icona",
"add_option_event_icon": "fa-square-plus",
"add_option_event_tooltip": "Afegir nou valor", "add_option_event_tooltip": "Afegir nou valor",
"copy_icons_event_icon": "fa-copy",
"copy_icons_event_tooltip": "Sobreescriure icones de tots els dispositius amb el mateix tipus de dispositiu", "copy_icons_event_tooltip": "Sobreescriure icones de tots els dispositius amb el mateix tipus de dispositiu",
"devices_old": "Refrescant...", "devices_old": "Refrescant",
"general_event_description": "L'esdeveniment que has desencadenat pot trigar un temps fins que acabin els processos de fons. L'execució acabarà una cop buida la cua d'execució (Comprova el registre d'errors <a href='/maintenance.php#tab_Logging'></a> si hi ha problemes). <br/> <br/> Cua d'execució:", "general_event_description": "L'esdeveniment que has desencadenat pot trigar un temps fins que acabin els processos de fons. L'execució acabarà una cop buida la cua d'execució (Comprova el registre d'errors <a href='/maintenance.php#tab_Logging'></a> si hi ha problemes). <br/> <br/> Cua d'execució:",
"general_event_title": "Execució d'un esdeveniment ad-hoc", "general_event_title": "Execució d'un esdeveniment ad-hoc",
"go_to_node_event_icon": "fa-square-up-right", "go_to_device_event_tooltip": "Navegar al dispositiu",
"go_to_node_event_tooltip": "Navegació a la pàgina de la Xarxa del node donat", "go_to_node_event_tooltip": "Navegació a la pàgina de la Xarxa del node donat",
"new_version_available": "Ja està disponible una nova versió.", "new_version_available": "Ja està disponible una nova versió.",
"report_guid": "Notificació guid:", "report_guid": "Notificació guid:",
"report_guid_missing": "No s'ha trobat la notificació enllaçada. Hi ha un petit retard entre les notificacions enviades recentment i que estiguin disponibles. Refresqui la pàgina i la memòria cau d'aquí uns segons. També és possible que la notificació seleccionada s'hagi esborrat durant el manteniment tal com s'especifica a la configuració <code>DBCLNP_NOTIFI_HIST</code>. <br/> <br/>L'última notificació es mostra en el seu lloc. La notificació perduda té el següent GUID:", "report_guid_missing": "No s'ha trobat la notificació enllaçada. Hi ha un petit retard entre les notificacions enviades recentment i que estiguin disponibles. Refresqui la pàgina i la memòria cau d'aquí uns segons. També és possible que la notificació seleccionada s'hagi esborrat durant el manteniment tal com s'especifica a la configuració <code>DBCLNP_NOTIFI_HIST</code>. <br/> <br/>L'última notificació es mostra en el seu lloc. La notificació perduda té el següent GUID:",
"report_select_format": "Seleccioneu Format:", "report_select_format": "Seleccioneu Format:",
"report_time": "Data de recepció:", "report_time": "Data de recepció:",
"run_event_icon": "fa-play",
"run_event_tooltip": "Habiliteu la configuració i deseu els canvis al principi abans d'executar-lo.", "run_event_tooltip": "Habiliteu la configuració i deseu els canvis al principi abans d'executar-lo.",
"select_icon_event_tooltip": "Selecciona la icona",
"settings_core_icon": "fa-solid fa-gem", "settings_core_icon": "fa-solid fa-gem",
"settings_core_label": "Nucli", "settings_core_label": "Nucli",
"settings_device_scanners": "Escàners de dispositius utilitzats per descobrir dispositius que escriuen a la taula de base de dades CurrentScan.", "settings_device_scanners": "Escàners de dispositius utilitzats per descobrir dispositius que escriuen a la taula de base de dades CurrentScan.",
@@ -735,7 +746,7 @@
"settings_imported_label": "Configuració importada", "settings_imported_label": "Configuració importada",
"settings_missing": "No tots els paràmetres carregats! Alta càrrega en la seqüència d'inici de la base de dades o aplicació. Feu clic al botó de recarregar 🔄 a la part superior.", "settings_missing": "No tots els paràmetres carregats! Alta càrrega en la seqüència d'inici de la base de dades o aplicació. Feu clic al botó de recarregar 🔄 a la part superior.",
"settings_missing_block": "Error: els paràmetres no carregats correctament. Fer clic el botó recarregar 🔄 dalt de tot, o també comprova el registre de navegador per a detalls (F12).", "settings_missing_block": "Error: els paràmetres no carregats correctament. Fer clic el botó recarregar 🔄 dalt de tot, o també comprova el registre de navegador per a detalls (F12).",
"settings_old": "Importar la configuració i re-inicialitzar ...", "settings_old": "Importar la configuració i re-iniciar…",
"settings_other_scanners": "Uns altres plugins no relacionats amb dispositius que estan actualment activats.", "settings_other_scanners": "Uns altres plugins no relacionats amb dispositius que estan actualment activats.",
"settings_other_scanners_icon": "fa-solid fa-recycle", "settings_other_scanners_icon": "fa-solid fa-recycle",
"settings_other_scanners_label": "Altres escàners", "settings_other_scanners_label": "Altres escàners",
@@ -748,6 +759,5 @@
"settings_system_icon": "fa-solid fa-gear", "settings_system_icon": "fa-solid fa-gear",
"settings_system_label": "Sistema", "settings_system_label": "Sistema",
"settings_update_item_warning": "Actualitza el valor sota. Sigues curós de seguir el format anterior. <b>No hi ha validació.</b>", "settings_update_item_warning": "Actualitza el valor sota. Sigues curós de seguir el format anterior. <b>No hi ha validació.</b>",
"test_event_icon": "fa-vial-circle-check",
"test_event_tooltip": "Deseu els canvis primer abans de comprovar la configuració." "test_event_tooltip": "Deseu els canvis primer abans de comprovar la configuració."
} }

View File

@@ -66,6 +66,7 @@
"DAYS_TO_KEEP_EVENTS_name": "", "DAYS_TO_KEEP_EVENTS_name": "",
"DISCOVER_PLUGINS_description": "", "DISCOVER_PLUGINS_description": "",
"DISCOVER_PLUGINS_name": "", "DISCOVER_PLUGINS_name": "",
"DevDetail_Children_Title": "",
"DevDetail_Copy_Device_Title": "", "DevDetail_Copy_Device_Title": "",
"DevDetail_Copy_Device_Tooltip": "", "DevDetail_Copy_Device_Tooltip": "",
"DevDetail_CustomProperties_Title": "", "DevDetail_CustomProperties_Title": "",
@@ -102,6 +103,7 @@
"DevDetail_MainInfo_Type": "", "DevDetail_MainInfo_Type": "",
"DevDetail_MainInfo_Vendor": "", "DevDetail_MainInfo_Vendor": "",
"DevDetail_MainInfo_mac": "", "DevDetail_MainInfo_mac": "",
"DevDetail_NavToChildNode": "",
"DevDetail_Network_Node_hover": "", "DevDetail_Network_Node_hover": "",
"DevDetail_Network_Port_hover": "", "DevDetail_Network_Port_hover": "",
"DevDetail_Nmap_Scans": "", "DevDetail_Nmap_Scans": "",
@@ -200,6 +202,7 @@
"Device_MultiEdit_Tooltip": "", "Device_MultiEdit_Tooltip": "",
"Device_Searchbox": "", "Device_Searchbox": "",
"Device_Shortcut_AllDevices": "", "Device_Shortcut_AllDevices": "",
"Device_Shortcut_AllNodes": "",
"Device_Shortcut_Archived": "", "Device_Shortcut_Archived": "",
"Device_Shortcut_Connected": "", "Device_Shortcut_Connected": "",
"Device_Shortcut_Devices": "", "Device_Shortcut_Devices": "",
@@ -226,9 +229,11 @@
"Device_TableHead_Name": "", "Device_TableHead_Name": "",
"Device_TableHead_NetworkSite": "", "Device_TableHead_NetworkSite": "",
"Device_TableHead_Owner": "", "Device_TableHead_Owner": "",
"Device_TableHead_ParentRelType": "",
"Device_TableHead_Parent_MAC": "", "Device_TableHead_Parent_MAC": "",
"Device_TableHead_Port": "", "Device_TableHead_Port": "",
"Device_TableHead_PresentLastScan": "", "Device_TableHead_PresentLastScan": "",
"Device_TableHead_ReqNicsOnline": "",
"Device_TableHead_RowID": "", "Device_TableHead_RowID": "",
"Device_TableHead_Rowid": "", "Device_TableHead_Rowid": "",
"Device_TableHead_SSID": "", "Device_TableHead_SSID": "",
@@ -296,6 +301,7 @@
"Gen_Cancel": "Zrušit", "Gen_Cancel": "Zrušit",
"Gen_Change": "Změnit", "Gen_Change": "Změnit",
"Gen_Copy": "Spustit", "Gen_Copy": "Spustit",
"Gen_CopyToClipboard": "",
"Gen_DataUpdatedUITakesTime": "OK - může zabrat chvíli aktualizovat rozhraní, pokud běží scan.", "Gen_DataUpdatedUITakesTime": "OK - může zabrat chvíli aktualizovat rozhraní, pokud běží scan.",
"Gen_Delete": "Smazat", "Gen_Delete": "Smazat",
"Gen_DeleteAll": "Smazat vše", "Gen_DeleteAll": "Smazat vše",
@@ -303,7 +309,9 @@
"Gen_Error": "Chyba", "Gen_Error": "Chyba",
"Gen_Filter": "Filtr", "Gen_Filter": "Filtr",
"Gen_Generate": "Vygenerovat", "Gen_Generate": "Vygenerovat",
"Gen_InvalidMac": "",
"Gen_LockedDB": "CHYBA - Databáze je možná zamčená - Zkontrolujte F12 -> Nástroje pro vývojáře -> Konzole. nebo to zkuste později.", "Gen_LockedDB": "CHYBA - Databáze je možná zamčená - Zkontrolujte F12 -> Nástroje pro vývojáře -> Konzole. nebo to zkuste později.",
"Gen_NetworkMask": "",
"Gen_Offline": "Offline", "Gen_Offline": "Offline",
"Gen_Okay": "Ok", "Gen_Okay": "Ok",
"Gen_Online": "Online", "Gen_Online": "Online",
@@ -321,6 +329,7 @@
"Gen_SelectIcon": "<i class=\"fa-solid fa-chevron-down fa-fade\"></i>", "Gen_SelectIcon": "<i class=\"fa-solid fa-chevron-down fa-fade\"></i>",
"Gen_SelectToPreview": "Vybrat na náhled", "Gen_SelectToPreview": "Vybrat na náhled",
"Gen_Selected_Devices": "Vybraná zařízení:", "Gen_Selected_Devices": "Vybraná zařízení:",
"Gen_Subnet": "",
"Gen_Switch": "Přepnout", "Gen_Switch": "Přepnout",
"Gen_Upd": "Úspěšně aktualizováno", "Gen_Upd": "Úspěšně aktualizováno",
"Gen_Upd_Fail": "Aktualizace se nezdařila", "Gen_Upd_Fail": "Aktualizace se nezdařila",
@@ -486,8 +495,10 @@
"Navigation_Workflows": "", "Navigation_Workflows": "",
"Network_Assign": "", "Network_Assign": "",
"Network_Cant_Assign": "", "Network_Cant_Assign": "",
"Network_Cant_Assign_No_Node_Selected": "",
"Network_Configuration_Error": "", "Network_Configuration_Error": "",
"Network_Connected": "", "Network_Connected": "",
"Network_Devices": "",
"Network_ManageAdd": "", "Network_ManageAdd": "",
"Network_ManageAdd_Name": "", "Network_ManageAdd_Name": "",
"Network_ManageAdd_Name_text": "", "Network_ManageAdd_Name_text": "",
@@ -522,6 +533,8 @@
"Network_Root": "", "Network_Root": "",
"Network_Root_Not_Configured": "", "Network_Root_Not_Configured": "",
"Network_Root_Unconfigurable": "", "Network_Root_Unconfigurable": "",
"Network_ShowArchived": "",
"Network_ShowOffline": "",
"Network_Table_Hostname": "", "Network_Table_Hostname": "",
"Network_Table_IP": "", "Network_Table_IP": "",
"Network_Table_State": "", "Network_Table_State": "",
@@ -585,6 +598,7 @@
"Settings_device_Scanners_desync": "", "Settings_device_Scanners_desync": "",
"Settings_device_Scanners_desync_popup": "", "Settings_device_Scanners_desync_popup": "",
"Speedtest_Results": "", "Speedtest_Results": "",
"Systeminfo_AvailableIps": "",
"Systeminfo_CPU": "", "Systeminfo_CPU": "",
"Systeminfo_CPU_Cores": "", "Systeminfo_CPU_Cores": "",
"Systeminfo_CPU_Name": "", "Systeminfo_CPU_Name": "",
@@ -704,24 +718,21 @@
"WF_Trigger": "", "WF_Trigger": "",
"WF_Trigger_event_type": "", "WF_Trigger_event_type": "",
"WF_Trigger_type": "", "WF_Trigger_type": "",
"add_icon_event_icon": "fa-square-plus",
"add_icon_event_tooltip": "Přidat novou ikonu", "add_icon_event_tooltip": "Přidat novou ikonu",
"add_option_event_icon": "fa-square-plus",
"add_option_event_tooltip": "Přidat novou hodnotu", "add_option_event_tooltip": "Přidat novou hodnotu",
"copy_icons_event_icon": "fa-copy",
"copy_icons_event_tooltip": "Přepiš ikony všech zařízení za stejný typ zařízení", "copy_icons_event_tooltip": "Přepiš ikony všech zařízení za stejný typ zařízení",
"devices_old": "Obnovuji…", "devices_old": "Obnovuji…",
"general_event_description": "", "general_event_description": "",
"general_event_title": "", "general_event_title": "",
"go_to_node_event_icon": "", "go_to_device_event_tooltip": "",
"go_to_node_event_tooltip": "", "go_to_node_event_tooltip": "",
"new_version_available": "", "new_version_available": "",
"report_guid": "", "report_guid": "",
"report_guid_missing": "", "report_guid_missing": "",
"report_select_format": "", "report_select_format": "",
"report_time": "", "report_time": "",
"run_event_icon": "",
"run_event_tooltip": "", "run_event_tooltip": "",
"select_icon_event_tooltip": "",
"settings_core_icon": "", "settings_core_icon": "",
"settings_core_label": "", "settings_core_label": "",
"settings_device_scanners": "", "settings_device_scanners": "",
@@ -748,6 +759,5 @@
"settings_system_icon": "", "settings_system_icon": "",
"settings_system_label": "", "settings_system_label": "",
"settings_update_item_warning": "", "settings_update_item_warning": "",
"test_event_icon": "",
"test_event_tooltip": "" "test_event_tooltip": ""
} }

Some files were not shown because too many files have changed in this diff Show More