mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
Compare commits
73 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4363e083d5 | ||
|
|
e766b19d8c | ||
|
|
b18ee70b8a | ||
|
|
f70bb40ef4 | ||
|
|
844a408ff4 | ||
|
|
a21cc0db85 | ||
|
|
a5427f795b | ||
|
|
6b390b66de | ||
|
|
af1e9b921b | ||
|
|
9503cc6397 | ||
|
|
a16c2dfed6 | ||
|
|
b4fc05d1e8 | ||
|
|
adb99e5f1a | ||
|
|
fbce3e18c2 | ||
|
|
0fcda5ff0a | ||
|
|
a5c6510654 | ||
|
|
6d44ed1bba | ||
|
|
314372a0f2 | ||
|
|
5a84cb5cc2 | ||
|
|
12cc71552c | ||
|
|
6752b7fc40 | ||
|
|
f371515258 | ||
|
|
f1d73f6ad4 | ||
|
|
9fee846436 | ||
|
|
b4ebd640e5 | ||
|
|
e94953b9af | ||
|
|
6718d054dc | ||
|
|
88e4dbf12e | ||
|
|
9f1db5ca1a | ||
|
|
5e7bb207c8 | ||
|
|
6ad90610ea | ||
|
|
c8ff0d79d1 | ||
|
|
61cf87f0d6 | ||
|
|
75bbc8bcf3 | ||
|
|
5582c0bf5e | ||
|
|
8278a92b11 | ||
|
|
d5ac00a307 | ||
|
|
2b02596b17 | ||
|
|
2a736f3c19 | ||
|
|
0b5c0b198a | ||
|
|
2d0a461724 | ||
|
|
74c6faccc7 | ||
|
|
89a154e224 | ||
|
|
8b84e4b325 | ||
|
|
e55002a9b0 | ||
|
|
b4e741568b | ||
|
|
711e0012cb | ||
|
|
ea2e8459b5 | ||
|
|
16d06e8a74 | ||
|
|
9625c36d12 | ||
|
|
f47858d773 | ||
|
|
ac2ce85f33 | ||
|
|
e887a11755 | ||
|
|
73f432c786 | ||
|
|
9c95a79e07 | ||
|
|
f0bbd37812 | ||
|
|
7b0777b805 | ||
|
|
b8dce59138 | ||
|
|
f1d79074ec | ||
|
|
4156bc1669 | ||
|
|
00c4dd86c6 | ||
|
|
979ce8fd75 | ||
|
|
ede926beee | ||
|
|
e1f91ddf17 | ||
|
|
e9539962c9 | ||
|
|
87d18a9067 | ||
|
|
2302cd9a31 | ||
|
|
babe0eab53 | ||
|
|
7c878690ef | ||
|
|
b29dcbfa98 | ||
|
|
8d9c48166b | ||
|
|
540f8e850b | ||
|
|
8316d8e741 |
7
.github/ISSUE_TEMPLATE/i-have-an-issue.yml
vendored
7
.github/ISSUE_TEMPLATE/i-have-an-issue.yml
vendored
@@ -60,10 +60,11 @@ body:
|
||||
required: false
|
||||
- type: dropdown
|
||||
attributes:
|
||||
label: What branch are you running?
|
||||
label: What installation are you running?
|
||||
options:
|
||||
- Production
|
||||
- Dev
|
||||
- Production (netalertx)
|
||||
- Dev (netalertx-dev)
|
||||
- Home Assistant (addon)
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
|
||||
32
.github/workflows/social_post_on_release.yml
vendored
Executable file
32
.github/workflows/social_post_on_release.yml
vendored
Executable file
@@ -0,0 +1,32 @@
|
||||
name: 📧 Twitter and Discord Posts
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
post-release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Wait for 15 minutes
|
||||
run: sleep 900 # 15 minutes delay
|
||||
|
||||
# Post to Twitter
|
||||
- name: Post to Twitter
|
||||
uses: gr2m/twitter-together@v2
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
TWITTER_API_KEY: ${{ secrets.TWITTER_API_KEY }}
|
||||
TWITTER_API_SECRET: ${{ secrets.TWITTER_API_SECRET }}
|
||||
TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }}
|
||||
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
|
||||
with:
|
||||
tweet: |
|
||||
🎉 New release: **${{ github.event.release.name }}** is live! 🚀
|
||||
Check it out here: ${{ github.event.release.html_url }}
|
||||
|
||||
# Post to Discord
|
||||
- name: Post to Discord
|
||||
run: |
|
||||
curl -X POST -H "Content-Type: application/json" \
|
||||
-d '{"content": "🎉 New release: **${{ github.event.release.name }}** is live! 🚀\nCheck it out here: ${{ github.event.release.html_url }}"}' \
|
||||
${{ secrets.DISCORD_WEBHOOK_URL }}
|
||||
29
.github/workflows/update_sponsors_table.yml
vendored
29
.github/workflows/update_sponsors_table.yml
vendored
@@ -1,29 +0,0 @@
|
||||
name: 🤖Automation - Update Sponsors Table
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '50 11 * * *' # Set your preferred schedule (UTC)
|
||||
|
||||
jobs:
|
||||
update-table:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: 3.8
|
||||
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r update_sponsors_requirements.txt # If you have any Python dependencies
|
||||
|
||||
- name: Update Sponsors Table
|
||||
run: |
|
||||
python update_sponsors.py
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -14,7 +14,7 @@ ENV PATH="/opt/venv/bin:$PATH"
|
||||
COPY . ${INSTALL_DIR}/
|
||||
|
||||
|
||||
RUN pip install openwrt-luci-rpc graphene flask netifaces tplink-omada-client wakeonlan pycryptodome requests paho-mqtt scapy cron-converter pytz json2table dhcp-leases pyunifi speedtest-cli chardet python-nmap dnspython librouteros git+https://github.com/foreign-sub/aiofreepybox.git \
|
||||
RUN pip install openwrt-luci-rpc asusrouter asyncio aiohttp graphene flask netifaces tplink-omada-client wakeonlan pycryptodome requests paho-mqtt scapy cron-converter pytz json2table dhcp-leases pyunifi speedtest-cli chardet python-nmap dnspython librouteros git+https://github.com/foreign-sub/aiofreepybox.git \
|
||||
&& 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 \( -name '*.sh' -o -name '*.py' -o -name 'speedtest-cli' \) -exec chmod 750 {} \;"
|
||||
|
||||
@@ -43,7 +43,7 @@ RUN phpenmod -v 8.2 sqlite3
|
||||
RUN apt-get install -y python3-venv
|
||||
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 graphene flask netifaces tplink-omada-client wakeonlan pycryptodome requests paho-mqtt scapy cron-converter pytz json2table dhcp-leases pyunifi speedtest-cli chardet python-nmap dnspython librouteros "
|
||||
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 netifaces tplink-omada-client wakeonlan pycryptodome requests paho-mqtt scapy cron-converter pytz json2table dhcp-leases pyunifi speedtest-cli chardet python-nmap dnspython librouteros "
|
||||
|
||||
# Create a buildtimestamp.txt to later check if a new version was released
|
||||
RUN date +%s > ${INSTALL_DIR}/front/buildtimestamp.txt
|
||||
|
||||
97
README.md
97
README.md
@@ -2,10 +2,11 @@
|
||||
[](https://hub.docker.com/r/jokobsk/netalertx)
|
||||
[](https://github.com/jokob-sk/NetAlertX/releases)
|
||||
[](https://discord.gg/NczTUTWyRr)
|
||||
[](https://my.home-assistant.io/redirect/supervisor_add_addon_repository/?repository_url=https%3A%2F%2Fgithub.com%2Falexbelgium%2Fhassio-addons)
|
||||
|
||||
# 🖧🔍 Network scanner & notification framework
|
||||
# NetAlertX - Network, presence scanner and alert framework
|
||||
|
||||
Get visibility of what's going on on your WIFI/LAN network. Schedule scans for devices, port changes and get alerts if unknown devices or changes are found. Write your own [Plugins](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins#readme) with auto-generated UI and in-build notification system. Build out and easily maintain your network source of truth (NSoT).
|
||||
Get visibility of what's going on on your WIFI/LAN network and enable presence detection of important devices. Schedule scans for devices, port changes and get alerts if unknown devices or changes are found. Write your own [Plugins](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins#readme) with auto-generated UI and in-build notification system. Build out and easily maintain your network source of truth (NSoT).
|
||||
|
||||
|
||||
| [📑 Docker guide](https://github.com/jokob-sk/NetAlertX/blob/main/dockerfiles/README.md) | [🚀 Releases](https://github.com/jokob-sk/NetAlertX/releases) | [📚 Docs](https://github.com/jokob-sk/NetAlertX/tree/main/docs) | [🔌 Plugins](https://github.com/jokob-sk/NetAlertX/blob/main/front/plugins/README.md) | [🤖 Ask AI](https://gurubase.io/g/netalertx)
|
||||
@@ -13,8 +14,6 @@ Get visibility of what's going on on your WIFI/LAN network. Schedule scans for d
|
||||
|
||||
![showcase][showcase]
|
||||
|
||||
Head to [https://netalertx.com/](https://netalertx.com/) for more gifs and screenshots 📷.
|
||||
|
||||
<details>
|
||||
<summary>📷 Click for more screenshots</summary>
|
||||
|
||||
@@ -23,73 +22,59 @@ Head to [https://netalertx.com/](https://netalertx.com/) for more gifs and scree
|
||||
| ![presence][presence] | ![maintenance][maintenance] | ![settings][settings] |
|
||||
| ![sync_hub][sync_hub] | ![report1][report1] | ![device_nmap][device_nmap] |
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>❓ Why use Net<b>Alert</b><sup>x</sup>?</summary>
|
||||
|
||||
<hr>
|
||||
|
||||
Most of us don't know what's going on on our home network, but we want our family and data to be safe. _Command-line tools_ are great, but the output can be _hard to understand_ and action if you are not a network specialist.
|
||||
|
||||
Net<b>Alert</b><sup>x</sup> gives you peace of mind. _Visualize and immediately report 📬_ what is going on in your network - this is the first step to enhance your _network security 🔐_.
|
||||
|
||||
Net<b>Alert</b><sup>x</sup> combines several network and other scanning tools 🔍 with notifications 📧 into one user-friendly package 📦.
|
||||
|
||||
Set up a _kill switch ☠_ for your network via a smart plug with the available [Home Assistant](https://github.com/jokob-sk/NetAlertX/blob/main/docs/HOME_ASSISTANT.md) integration. Implement custom automations with the [CSV device Exports 📤](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/csv_backup), [Webhooks](https://github.com/jokob-sk/NetAlertX/blob/main/docs/WEBHOOK_N8N.md), or [API endpoints](https://github.com/jokob-sk/NetAlertX/blob/main/docs/API.md) features.
|
||||
|
||||
Extend the app if you want to create your own scanner [Plugin](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins#readme) and handle the results and notifications in Net<b>Alert</b><sup>x</sup>.
|
||||
|
||||
Looking forward to your contributions if you decide to share your work with the community ❤.
|
||||
Head to [https://netalertx.com/](https://netalertx.com/) for even more gifs and screenshots 📷.
|
||||
|
||||
</details>
|
||||
|
||||
## Scan Methods, Notifications, Integration, Extension system
|
||||
## 📦 Features
|
||||
|
||||
| Features | Details |
|
||||
|-------------|-------------|
|
||||
| 🔍 | The app scans your network for, **New devices**, **New connections** (re-connections), **Disconnections**, **"Always Connected" devices down**, Devices **IP changes** and **Internet IP address changes**. Discovery & scan methods include: **arp-scan**, **Pi-hole - DB import**, **Pi-hole - DHCP leases import**, **Generic DHCP leases import**. **UNIFI controller import**, **SNMP-enabled router import**. Check the [Plugins](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins#readme) docs for more info on individual scans. |
|
||||
|📧 | Send notifications to more than 80+ services, including Telegram via [Apprise](https://hub.docker.com/r/caronc/apprise), or use [Pushsafer](https://www.pushsafer.com/), [Pushover](https://www.pushover.net/), or [NTFY](https://ntfy.sh/). |
|
||||
|🧩 | Feed your data and device changes into [Home Assistant](https://github.com/jokob-sk/NetAlertX/blob/main/docs/HOME_ASSISTANT.md), read [API endpoints](https://github.com/jokob-sk/NetAlertX/blob/main/docs/API.md), or use [Webhooks](https://github.com/jokob-sk/NetAlertX/blob/main/docs/WEBHOOK_N8N.md) to setup custom automation flows. |
|
||||
|➕ | Build your own scanners with the [Plugin system](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins#readme) |
|
||||
### Scanners
|
||||
|
||||
The app scans your network for **New devices**, **New connections** (re-connections), **Disconnections**, **"Always Connected" devices down**, Devices **IP changes** and **Internet IP address changes**. Discovery & scan methods include: **arp-scan**, **Pi-hole - DB import**, **Pi-hole - DHCP leases import**, **Generic DHCP leases import**, **UNIFI controller import**, **SNMP-enabled router import**. Check the [Plugins](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins#readme) docs for a full lits of avaliable plugins.
|
||||
|
||||
### Notification gateways
|
||||
|
||||
Send notifications to more than 80+ services, including Telegram via [Apprise](https://hub.docker.com/r/caronc/apprise), or use native [Pushsafer](https://www.pushsafer.com/), [Pushover](https://www.pushover.net/), or [NTFY](https://ntfy.sh/) publishers.
|
||||
|
||||
### Integrations and Plugins
|
||||
|
||||
Feed your data and device changes into [Home Assistant](https://github.com/jokob-sk/NetAlertX/blob/main/docs/HOME_ASSISTANT.md), read [API endpoints](https://github.com/jokob-sk/NetAlertX/blob/main/docs/API.md), or use [Webhooks](https://github.com/jokob-sk/NetAlertX/blob/main/docs/WEBHOOK_N8N.md) to setup custom automation flows. You can also
|
||||
build your own scanners with the [Plugin system](https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins#readme) in as little as [15 minutes](https://www.youtube.com/watch?v=cdbxlwiWhv8).
|
||||
|
||||
|
||||
## Installation & Documentation
|
||||
## 📚 Documentation
|
||||
<!--- --------------------------------------------------------------------- --->
|
||||
|
||||
Supported browsers: Chrome, Firefox
|
||||
|
||||
| Docs | Link |
|
||||
|-------------|-------------|
|
||||
| 📥🐳 | [Docker instructions](https://github.com/jokob-sk/NetAlertX/blob/main/dockerfiles/README.md)
|
||||
| 📥🗄️ | [HW install (experimental 🧪)](https://github.com/jokob-sk/NetAlertX/blob/main/docs/HW_INSTALL.md) |
|
||||
| 📥🟧 | [Unraid App](https://unraid.net/community/apps) |
|
||||
| 📚 | [All Documentation](https://github.com/jokob-sk/NetAlertX/blob/main/docs/README.md) (App Usage and Configuration) |
|
||||
- [[Installation] Docker](https://github.com/jokob-sk/NetAlertX/blob/main/dockerfiles/README.md)
|
||||
- [[Installation] Home Assistant](https://github.com/alexbelgium/hassio-addons/tree/master/netalertx)
|
||||
- [[Installation] Bare metal](https://github.com/jokob-sk/NetAlertX/blob/main/docs/HW_INSTALL.md)
|
||||
- [[Installation] Unraid App](https://unraid.net/community/apps)
|
||||
- [[Setup] Usage and Configuration](https://github.com/jokob-sk/NetAlertX/blob/main/docs/README.md)
|
||||
- [[Development] API docs](https://github.com/jokob-sk/NetAlertX/blob/main/docs/API.md)
|
||||
- [[Development] Custom Plugins](https://github.com/jokob-sk/NetAlertX/blob/main/docs/PLUGINS_DEV.md)
|
||||
|
||||
> Other Alternatives
|
||||
>
|
||||
> - Check out [leiweibau's on HW installed fork](https://github.com/leiweibau/Pi.Alert/) (maintained)
|
||||
> - [WatchYourLAN](https://github.com/aceberg/WatchYourLAN) - Lightweight network IP scanner with web GUI (Open source)
|
||||
> - [Fing](https://www.fing.com/) - Network scanner app for your Internet security (Commercial, Phone App, Proprietary hardware)
|
||||
> - [NetBox](https://netboxlabs.com/) - Network management software (Commercial)
|
||||
|
||||
## 🔔 Get notified what's new
|
||||
## 📃 Everything else
|
||||
<!--- --------------------------------------------------------------------- --->
|
||||
|
||||
### 📧 Get notified what's new
|
||||
|
||||
Get notified about a new release, what new functionality you can use and about breaking changes.
|
||||
|
||||
![Follow and star][follow_star]
|
||||
|
||||
### ⭐ Sponsors
|
||||
### 🔀 Other Alternative Apps
|
||||
|
||||
[](https://github.com/sponsors/jokob-sk)
|
||||
- [PiAlert by leiweibau](https://github.com/leiweibau/Pi.Alert/) (maintained, bare-metal install)
|
||||
- [WatchYourLAN](https://github.com/aceberg/WatchYourLAN) - Lightweight network IP scanner with web GUI (Open source)
|
||||
- [Fing](https://www.fing.com/) - Network scanner app for your Internet security (Commercial, Phone App, Proprietary hardware)
|
||||
- [NetBox](https://netboxlabs.com/) - Network management software (Commercial)
|
||||
|
||||
Thank you to all the wonderful people who are sponsoring this project (private sponsors are hidden).
|
||||
### 💙 Donations
|
||||
|
||||
<!-- SPONSORS-LIST DO NOT MODIFY BELOW -->
|
||||
| All Sponsors |
|
||||
|---|
|
||||
|
||||
<!-- SPONSORS-LIST DO NOT MODIFY ABOVE -->
|
||||
Thank you to everyone who appreciates this tool and donates.
|
||||
|
||||
<details>
|
||||
<summary>Click for more ways to donate</summary>
|
||||
@@ -106,26 +91,20 @@ Thank you to all the wonderful people who are sponsoring this project (private s
|
||||
|
||||
</details>
|
||||
|
||||
### 🙏Contributors
|
||||
### 🏗 Contributors
|
||||
|
||||
This project would be nothing without the amazing work of the community, with special thanks to:
|
||||
|
||||
> [pucherot/Pi.Alert](https://github.com/pucherot/Pi.Alert) (the original creator of PiAlert), [leiweibau](https://github.com/leiweibau/Pi.Alert): Dark mode (and much more), [Macleykun](https://github.com/Macleykun) (Help with Dockerfile clean-up), [vladaurosh](https://github.com/vladaurosh) for Alpine re-base help, [Final-Hawk](https://github.com/Final-Hawk) (Help with NTFY, styling and other fixes), [TeroRERO](https://github.com/terorero) (Spanish translations), [Data-Monkey](https://github.com/Data-Monkey), (Split-up of the python.py file and more), [cvc90](https://github.com/cvc90) (Spanish translation and various UI work) to name a few. Check out all the [amazing contributors](https://github.com/jokob-sk/NetAlertX/graphs/contributors).
|
||||
|
||||
|
||||
## Everything else
|
||||
<!--- --------------------------------------------------------------------- --->
|
||||
|
||||
### 🌍 Translations
|
||||
|
||||
Proudly using [Weblate](https://hosted.weblate.org/projects/pialert/).
|
||||
Proudly using [Weblate](https://hosted.weblate.org/projects/pialert/). Help out and suggest languages in the [online portal of Weblate](https://hosted.weblate.org/projects/pialert/core/).
|
||||
|
||||
<a href="https://hosted.weblate.org/engage/pialert/">
|
||||
<img src="https://hosted.weblate.org/widget/pialert/core/multi-auto.svg" alt="Translation status" />
|
||||
</a>
|
||||
|
||||
Help out and suggest languages in the [online portal of Weblate](https://hosted.weblate.org/projects/pialert/core/).
|
||||
|
||||
### License
|
||||
> GPL 3.0 | [Read more here](LICENSE.txt) | Source of the [animated GIF (Loading Animation)](https://commons.wikimedia.org/wiki/File:Loading_Animation.gif) | Source of the [selfhosted Fonts](https://github.com/adobe-fonts/source-sans)
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@ LOG_FILE="${INSTALL_DIR}/log/execution_queue.log"
|
||||
|
||||
# Check if there are any entries with cron_restart_backend
|
||||
if grep -q "cron_restart_backend" "$LOG_FILE"; then
|
||||
# Kill all python processes and restart the server
|
||||
pkill -f "python " && (python ${INSTALL_DIR}/server > /dev/null 2>&1 &) && echo 'done'
|
||||
# Kill all python processes (restart handled by s6 overlay)
|
||||
pkill -f "python " && echo 'done'
|
||||
|
||||
# Remove all lines containing cron_restart_backend from the log file
|
||||
sed -i '/cron_restart_backend/d' "$LOG_FILE"
|
||||
|
||||
@@ -38,7 +38,6 @@ services:
|
||||
- ${DEV_LOCATION}/back/update_vendors.sh:/app/back/update_vendors.sh
|
||||
- ${DEV_LOCATION}/front/lib:/app/front/lib
|
||||
- ${DEV_LOCATION}/front/js:/app/front/js
|
||||
- ${DEV_LOCATION}/front/report_templates:/front/report_templates
|
||||
- ${DEV_LOCATION}/front/php:/app/front/php
|
||||
- ${DEV_LOCATION}/front/deviceDetails.php:/app/front/deviceDetails.php
|
||||
- ${DEV_LOCATION}/front/deviceDetailsEdit.php:/app/front/deviceDetailsEdit.php
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
[](https://hub.docker.com/r/jokobsk/netalertx)
|
||||
[](https://github.com/jokob-sk/NetAlertX/releases)
|
||||
[](https://discord.gg/NczTUTWyRr)
|
||||
[](https://my.home-assistant.io/redirect/supervisor_add_addon_repository/?repository_url=https%3A%2F%2Fgithub.com%2Falexbelgium%2Fhassio-addons)
|
||||
|
||||
|
||||
# NetAlertX 🖧🔍 Network scanner & notification framework
|
||||
# NetAlertX - Network scanner & notification framework
|
||||
|
||||
| [📑 Docker guide](https://github.com/jokob-sk/NetAlertX/blob/main/dockerfiles/README.md) | [🚀 Releases](https://github.com/jokob-sk/NetAlertX/releases) | [📚 Docs](https://github.com/jokob-sk/NetAlertX/tree/main/docs) | [🔌 Plugins](https://github.com/jokob-sk/NetAlertX/blob/main/front/plugins/README.md) | [🤖 Ask AI](https://gurubase.io/g/netalertx)
|
||||
|----------------------| ----------------------| ----------------------| ----------------------| ----------------------|
|
||||
@@ -97,4 +97,4 @@ You can read or watch several [community configuration guides](https://github.co
|
||||
- Bitcoin: `1N8tupjeCK12qRVU2XrV17WvKK7LCawyZM`
|
||||
- Ethereum: `0x6e2749Cb42F4411bc98501406BdcD82244e3f9C7`
|
||||
|
||||
> 📧 Email me at [jokob@duck.com](mailto:jokob@duck.com?subject=NetAlertX) if you want to get in touch or if I should add other sponsorship platforms.
|
||||
> 📧 Email me at [netalertx@gmail.com](mailto:netalertx@gmail.com?subject=NetAlertX Donations) if you want to get in touch or if I should add other sponsorship platforms.
|
||||
|
||||
@@ -13,13 +13,14 @@ sed -i "/^user/c\user = nginx" /etc/php83/php-fpm.d/www.conf
|
||||
sed -i "/^group/c\group = www-data" /etc/php83/php-fpm.d/www.conf
|
||||
|
||||
# s6 overlay setup
|
||||
mkdir -p /etc/s6-overlay/s6-rc.d/{SetupOneshot,php-fpm/dependencies.d,nginx/dependencies.d}
|
||||
mkdir -p /etc/s6-overlay/s6-rc.d/{SetupOneshot,php-fpm/dependencies.d,nginx/dependencies.d,$APP_NAME/dependencies.d}
|
||||
mkdir -p /etc/s6-overlay/s6-rc.d/{SetupOneshot,crond/dependencies.d,php-fpm/dependencies.d,nginx/dependencies.d,$APP_NAME/dependencies.d}
|
||||
echo "oneshot" > /etc/s6-overlay/s6-rc.d/SetupOneshot/type
|
||||
echo "longrun" > /etc/s6-overlay/s6-rc.d/crond/type
|
||||
echo "longrun" > /etc/s6-overlay/s6-rc.d/php-fpm/type
|
||||
echo "longrun" > /etc/s6-overlay/s6-rc.d/nginx/type
|
||||
echo "longrun" > /etc/s6-overlay/s6-rc.d/$APP_NAME/type
|
||||
echo -e "${INSTALL_DIR}/dockerfiles/init.sh" > /etc/s6-overlay/s6-rc.d/SetupOneshot/up
|
||||
echo -e "#!/bin/execlineb -P\n/usr/sbin/crond -f -d 8" > /etc/s6-overlay/s6-rc.d/crond/run
|
||||
echo -e "#!/bin/execlineb -P\n/usr/sbin/php-fpm83 -F" > /etc/s6-overlay/s6-rc.d/php-fpm/run
|
||||
echo -e '#!/bin/execlineb -P\nnginx -g "daemon off;"' > /etc/s6-overlay/s6-rc.d/nginx/run
|
||||
echo -e '#!/bin/execlineb -P
|
||||
@@ -33,8 +34,7 @@ echo -e '#!/bin/execlineb -P
|
||||
|
||||
" }' > /etc/s6-overlay/s6-rc.d/$APP_NAME/run
|
||||
echo -e "python ${INSTALL_DIR}/server" >> /etc/s6-overlay/s6-rc.d/$APP_NAME/run
|
||||
touch /etc/s6-overlay/s6-rc.d/user/contents.d/{SetupOneshot,php-fpm,nginx} /etc/s6-overlay/s6-rc.d/{php-fpm,nginx}/dependencies.d/SetupOneshot
|
||||
touch /etc/s6-overlay/s6-rc.d/user/contents.d/{SetupOneshot,php-fpm,nginx,$APP_NAME} /etc/s6-overlay/s6-rc.d/{php-fpm,nginx,$APP_NAME}/dependencies.d/SetupOneshot
|
||||
touch /etc/s6-overlay/s6-rc.d/user/contents.d/{SetupOneshot,crond,php-fpm,nginx,$APP_NAME} /etc/s6-overlay/s6-rc.d/{crond,php-fpm,nginx,$APP_NAME}/dependencies.d/SetupOneshot
|
||||
touch /etc/s6-overlay/s6-rc.d/nginx/dependencies.d/php-fpm
|
||||
touch /etc/s6-overlay/s6-rc.d/$APP_NAME/dependencies.d/nginx
|
||||
|
||||
|
||||
15
docs/API.md
15
docs/API.md
@@ -124,7 +124,7 @@ The response will be in JSON format, similar to the following:
|
||||
|
||||
## API Endpoint: JSON files
|
||||
|
||||
These API endpoint are static files, that are periodically updated.
|
||||
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)`
|
||||
@@ -144,10 +144,8 @@ You can access the following files:
|
||||
|
||||
| File name | Description |
|
||||
|----------------------|----------------------|
|
||||
| `notification_text.txt` | The plain text version of the last notification. |
|
||||
| `notification_text.html` | The full HTML of the last email notification. |
|
||||
| `notification_json_final.json` | The json version of the last notification (e.g. used for webhooks - [sample JSON](https://github.com/jokob-sk/NetAlertX/blob/main/front/report_templates/webhook_json_sample.json)). |
|
||||
| `table_devices.json` | The current (at the time of the last update as mentioned above on this page) state of all of the available Devices detected by the app. |
|
||||
| `table_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/front/plugins)|
|
||||
@@ -156,7 +154,6 @@ You can access the following files:
|
||||
| `table_settings.json` | The content of the settings table. |
|
||||
| `app_state.json` | Contains the current application state. |
|
||||
|
||||
Current/latest state of the aforementioned files depends on your settings.
|
||||
|
||||
### JSON Data format
|
||||
|
||||
@@ -224,22 +221,22 @@ Example JSON of the `table_devices.json` endpoint with two Devices (database row
|
||||
|
||||
## API Endpoint: /log files
|
||||
|
||||
To retrieve files from the `/app/log` folder.
|
||||
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.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 plugin-related files (not accessible) |
|
||||
| `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 |
|
||||
|
||||
@@ -48,7 +48,9 @@ Historical data is stored in the `app.db` database (See [Database overview](http
|
||||
|
||||
The safest approach to backups is to backup all of the above, by taking regular file system backups (I use [Kopia](https://github.com/kopia/kopia)).
|
||||
|
||||
Arguably, the most time is spent setting up the device list, so if only one file is kept I'd recommend to have a latest backup of the `devices_<timestamp>.csv` or `devices.csv` file, followed by the `app.conf` file.
|
||||
Arguably, the most time is spent setting up the device list, so if only one file is kept I'd recommend to have a latest backup of the `devices_<timestamp>.csv` or `devices.csv` file, followed by the `app.conf` file. You can also download `app.conf` and `devices.csv` file in the Maintenance section:
|
||||
|
||||

|
||||
|
||||
### Scenario 1: Full backup
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ Sometimes specific log sections are needed to debug issues. The Devices and Curr
|
||||
|
||||
### unable to resolve host
|
||||
|
||||
* Check that your `SCAN_SUBNETS` variable is using the correct mask and `--interface` as outlined in the instructions above.
|
||||
* Check that your `SCAN_SUBNETS` variable is using the correct mask and `--interface`. See teh [subnets docs for details](/docs/SUBNETS.md).
|
||||
|
||||
### Invalid JSON
|
||||
|
||||
@@ -95,4 +95,4 @@ The link above will probably break in time too. Go to https://packages.debian.or
|
||||
|
||||
### Only Router and own device show up
|
||||
|
||||
Make sure that the subnet and interface in SCAN_SUBNETS are the correct ones. If your device/NAS has multiple ethernet ports, you probably need to change eth0 to something else!
|
||||
Make sure that the subnet and interface in `SCAN_SUBNETS` are correct. If your device/NAS has multiple ethernet ports, you probably need to change `eth0` to something else.
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
The Main Info section is where most of the device identifiable information is stored and edited. Some of the information is autodetected via various plugins. Initial values for most of the fields can be specified in the `NEWDEV` plugin.
|
||||
|
||||
|
||||
> [!NOTE]
|
||||
>
|
||||
> You can multi-edit devices by selecting them in the main Devices view, from the Mainetence section, or via the CSV Export functionality under Maintenance. More info can be found in the [Devices Bulk-editing docs](https://github.com/jokob-sk/NetAlertX/blob/main/docs/DEVICES_BULK_EDITING.md).
|
||||
@@ -10,12 +9,11 @@ The Main Info section is where most of the device identifiable information is st
|
||||
|
||||

|
||||
|
||||
|
||||
## Main Info
|
||||
|
||||
- **MAC**: MAC addres of the device. Not editable, unless creating a new dummy device.
|
||||
- **Last IP**: IP addres of the device. Not editable, unless creating a new dummy device.
|
||||
- **Name**: Friendly device name. Autodetected via various 🆎 Name discovery [plugins](https://github.com/jokob-sk/NetAlertX/blob/main/front/plugins/README.md).
|
||||
- **Name**: Friendly device name. Autodetected via various 🆎 Name discovery [plugins](https://github.com/jokob-sk/NetAlertX/blob/main/front/plugins/README.md). The app attaches `(IP match)` if the name is discovered via an IP match and not MAC match which could mean the name could be incorrect as IPs might change.
|
||||
- **Icon**: Partially autodetected. Select an existing or [add a custom icon](https://github.com/jokob-sk/NetAlertX/blob/main/docs/ICONS.md). You can also auto-apply the same icon on all devices of the same type.
|
||||
- **Owner**: Device owner (The list is self-populated with existing owners and you can add custom values).
|
||||
- **Type**: Select a device type from the dropdown list (`Smartphone`, `Tablet`,
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
|
||||
NetAlertX comes with MQTT support, allowing you to show all detected devices as devices in Home Assistant. It also supplies a collection of stats, such as number of online devices.
|
||||
|
||||
> [!TIP]
|
||||
> You can install NetAlertX also as a Home Assistant addon [](https://my.home-assistant.io/redirect/supervisor_add_addon_repository/?repository_url=https%3A%2F%2Fgithub.com%2Falexbelgium%2Fhassio-addons) via the [alexbelgium/hassio-addons](https://github.com/alexbelgium/hassio-addons/).
|
||||
|
||||
## ⚠ Note
|
||||
|
||||
- Please note that discovery takes about ~10s per device.
|
||||
|
||||
@@ -38,7 +38,7 @@ Copying the HTML code from [Font Awesome](https://fontawesome.com/search?o=r&m=f
|
||||
> [!NOTE]
|
||||
> If you want to mass-apply an icon to all devices of the same device type (Field: Type), you can click the mass-copy button (next to the "+" button). A confirmation prompt is displayed. If you proceed, icons of all devices set to the same device type as the current device, will be overwritten with the current device's icon.
|
||||
|
||||
- The blue dropdown contains all icons already used in the app for device icons. You need to navigate away or refresh the page once you add a new icon.
|
||||
- The dropdown contains all icons already used in the app for device icons. You might need to navigate away or refresh the page once you add a new icon.
|
||||
|
||||
## 🌟 Pro Font Awesome icons
|
||||
|
||||
|
||||
@@ -660,7 +660,7 @@ The UI will adjust how columns are displayed in the UI based on the resolvers de
|
||||
| Type Definitions | |
|
||||
| `device_mac` | The value is considered to be a MAC address, and a link pointing to the device with the given MAC address is generated. |
|
||||
| `device_ip` | The value is considered to be an IP address. A link pointing to the device with the given IP is generated. The IP is checked against the last detected IP address and translated into a MAC address, which is then used for the link itself. |
|
||||
| `device_name_mac` | The value is considered to be a MAC address, and a link pointing to the device with the given IP is generated. The link label is resolved as the target device name. |
|
||||
| `device_name_mac` | The value is considered to be a MAC address, and a link pointing to the device with the given MAC is generated. The link label is resolved as the target device name. |
|
||||
| `url` | The value is considered to be a URL, so a link is generated. |
|
||||
| `textbox_save` | Generates an editable and saveable text box that saves values in the database. Primarily intended for the `UserData` database column in the `Plugins_Objects` table. |
|
||||
| `url_http_https` | Generates two links with the `https` and `http` prefix as lock icons. |
|
||||
|
||||
@@ -22,7 +22,7 @@ If direct scans are not possible (Wi-Fi Extenders, VPNs and inaccessible network
|
||||
|
||||
* **Examples for one and two subnets:**
|
||||
* One subnet: `SCAN_SUBNETS = ['192.168.1.0/24 --interface=eth0']`
|
||||
* Two subnets: `SCAN_SUBNETS = ['192.168.1.0/24 --interface=eth0','192.168.1.0/24 --interface=eth1 -vlan=107']`
|
||||
* Two subnets: `SCAN_SUBNETS = ['192.168.1.0/24 --interface=eth0','192.168.1.0/24 --interface=eth1 --vlan=107']`
|
||||
|
||||
If you get timeout messages, decrease the network mask (e.g.: from `/16` to `/24`) or increase the `TIMEOUT` setting (e.g.: `ARPSCAN_RUN_TIMEOUT` to `300` (5-minute timeout)) for the plugin and the interval between scans (e.g.: `ARPSCAN_RUN_SCHD` to `*/10 * * * *` (scans every 10 minutes)).
|
||||
|
||||
@@ -89,7 +89,6 @@ By default, Hyper-V only allows untagged packets through to the VM interface, bl
|
||||
2. Within the VM, set up sub-interfaces for each VLAN to enable scanning. On Ubuntu 22.04, Netplan can be used. In /etc/netplan/00-installer-config.yaml, add VLAN definitions:
|
||||
|
||||
```yaml
|
||||
|
||||
network:
|
||||
ethernets:
|
||||
eth0:
|
||||
|
||||
@@ -1,87 +0,0 @@
|
||||
# Pi.Alert Version History
|
||||
<!--- --------------------------------------------------------------------- --->
|
||||
|
||||
| Version | Description |
|
||||
| ------- | --------------------------------------------------------------- |
|
||||
| v3.00 | Major set of New features & Enhancements |
|
||||
| v2.70 | New features & Usability improvements in the web prontal |
|
||||
| v2.61 | Bug fixing |
|
||||
| v2.60 | Improved the compability of installation process (Ubuntu) |
|
||||
| v2.56 | Bug fixing |
|
||||
| v2.55 | Bug fixing |
|
||||
| v2.52 | Bug fixing |
|
||||
| v2.51 | Bug fixing |
|
||||
| v2.50 | First public release |
|
||||
|
||||
|
||||
# 🆕 2022+ [Newest Release notes](https://github.com/jokob-sk/NetAlertX/issues/138)
|
||||
|
||||
## Pi.Alert v3.02
|
||||
<!--- --------------------------------------------------------------------- --->
|
||||
**PENDING UPDATE DOC**
|
||||
- Fixed: UNIQUE constraint failed with Local MAC #114
|
||||
|
||||
|
||||
## Pi.Alert v3.01
|
||||
<!--- --------------------------------------------------------------------- --->
|
||||
**PENDING UPDATE DOC**
|
||||
- Fixed: Problem with local MAC & IP (raspberry) #106
|
||||
|
||||
|
||||
## Pi.Alert v3.00
|
||||
<!--- --------------------------------------------------------------------- --->
|
||||
**PENDING UPDATE DOC**
|
||||
- `arp-scan` config options: interface, several subnets. #101 #15
|
||||
- Next/previos button while editing devices #66 #37
|
||||
- Internet presence/sessions monitoring #63
|
||||
- Logical delete / archive / hide Device #93
|
||||
- Flag to mark device with random MAC's #87
|
||||
- New Device Types predefined in combobox #92
|
||||
- Ask before leave the page with unsaved changes #104
|
||||
- Option to don't mark devices as new during installation #94
|
||||
- Uninstall script #62
|
||||
- Fixed: Error updating name of devices w/o IP #97
|
||||
- Fixed: Deleted devices reappear #84
|
||||
- Fixed: Device running Pi.Alert must be marked as "on-line" #76
|
||||
- Fixed: Incorrect calculation of presence hours #102
|
||||
- Fixed: Problem redirect to homepage clicking in logo #103
|
||||
|
||||
|
||||
## Pi.Alert v2.70
|
||||
<!--- --------------------------------------------------------------------- --->
|
||||
- Added Client names resolution #43
|
||||
- Added Check to mark devices as "known" #16
|
||||
- Remember "Show XXX entries" dropdown value #16 #26
|
||||
- Remember "sorting" in devices #16
|
||||
- Remember "Device panel " in device detail #16
|
||||
- Added "All" option to "Show x Entries" option #16
|
||||
- Added optional Location field (Door, Basement, etc.) to devices #16
|
||||
- "Device updated successfully" message now is not modal #16
|
||||
- Now is possible to delete Devices #16
|
||||
- Added Device Type Singleboard Computer (SBC) #16
|
||||
- Allowed to use " in device name #42
|
||||
|
||||
|
||||
## Pi.Alert v2.60
|
||||
<!--- --------------------------------------------------------------------- --->
|
||||
- `pialert.conf` moved from `back` to `config` folder
|
||||
- `pialert.conf` splitted in two files: `pialert.conf` and `version.conf`
|
||||
- Added compatibility with Python 3 (default version installed with Ubuntu)
|
||||
- Added compatibility in the Installation guide with Ubuntu server
|
||||
- Eliminated some unnecessary packages from the installation
|
||||
|
||||
|
||||
|
||||
### License
|
||||
GPL 3.0
|
||||
[Read more here](../LICENSE.txt)
|
||||
|
||||
### Contact
|
||||
Always use the Issue tracker for the correct fork, for example:
|
||||
|
||||
[jokob-sk/NetAlertX](https://github.com/jokob-sk/NetAlertX/issues). Please also follow the guidelines on:
|
||||
|
||||
- ➕ [Pull Request guidelines](https://github.com/jokob-sk/NetAlertX/tree/main/docs#-pull-requests-prs)
|
||||
- 🙏 [Feature request guidelines](https://github.com/jokob-sk/NetAlertX/tree/main/docs#-feature-requests)
|
||||
- 🐛 [Issue guidelines](https://github.com/jokob-sk/NetAlertX/tree/main/docs#-submitting-an-issue-or-bug)
|
||||
|
||||
BIN
docs/img/BACKUPS/Maintenance_Backup_Restore.png
Executable file
BIN
docs/img/BACKUPS/Maintenance_Backup_Restore.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 88 KiB |
10
front/.well-known/gpc.json
Executable file
10
front/.well-known/gpc.json
Executable file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"gpc": true,
|
||||
"compliance": [
|
||||
{
|
||||
"regulation": "GDPR",
|
||||
"status": "not applicable"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -949,16 +949,6 @@ height: 50px;
|
||||
top:0px;
|
||||
}
|
||||
|
||||
.overview-section
|
||||
{
|
||||
/* border-top: solid;
|
||||
border-width: medium;
|
||||
border-width: medium;
|
||||
border-width: 1px;
|
||||
border-radius: 15px;
|
||||
margin-bottom: 3px; */
|
||||
|
||||
}
|
||||
|
||||
.settings-group i{
|
||||
font-size: 16px;
|
||||
@@ -1310,6 +1300,11 @@ input[readonly] {
|
||||
min-width: 40px;
|
||||
}
|
||||
|
||||
.iconPreview svg{
|
||||
min-width: 20px;
|
||||
max-width: 20px;
|
||||
}
|
||||
|
||||
|
||||
.dummyDevice
|
||||
{
|
||||
@@ -1470,6 +1465,12 @@ input[readonly] {
|
||||
}
|
||||
/* #panDetails .dataTables_wrapper .bottom .paging_simple_numbers */
|
||||
|
||||
#panDetails #NEWDEV_devIcon
|
||||
{
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#panDetails #NEWDEV_devCustomProps_label
|
||||
{
|
||||
@@ -1622,6 +1623,7 @@ input[readonly] {
|
||||
/* ----------------------------------------------------------------- */
|
||||
|
||||
|
||||
|
||||
.plugin-filters
|
||||
{
|
||||
margin: 7px;
|
||||
|
||||
@@ -737,3 +737,7 @@ input[type="password"]::-webkit-caps-lock-indicator {
|
||||
color:#000 !important;
|
||||
}
|
||||
|
||||
.thresholdFormControl
|
||||
{
|
||||
color:#000;
|
||||
}
|
||||
@@ -740,3 +740,8 @@
|
||||
background-color: #fff !important;
|
||||
color:#000 !important;
|
||||
}
|
||||
|
||||
.thresholdFormControl
|
||||
{
|
||||
color:#000;
|
||||
}
|
||||
@@ -79,7 +79,7 @@
|
||||
data: ["devMac", "devLastIP", "devName", "devOwner", "devType", "devVendor", "devGroup", "devIcon", "devLocation", "devComments"],
|
||||
docs: "https://github.com/jokob-sk/NetAlertX/blob/main/docs/DEVICE_MANAGEMENT.md",
|
||||
iconClass: "fa fa-pencil",
|
||||
inputGroupClasses: "field-group col-lg-4 col-sm-6 col-xs-12",
|
||||
inputGroupClasses: "field-group main-group col-lg-4 col-sm-6 col-xs-12",
|
||||
labelClasses: "col-sm-4 col-xs-12 control-label",
|
||||
inputClasses: "col-sm-8 col-xs-12 input-group"
|
||||
},
|
||||
@@ -88,7 +88,7 @@
|
||||
data: ["devStatus", "devLastConnection", "devFirstConnection"],
|
||||
docs: "https://github.com/jokob-sk/NetAlertX/blob/main/docs/SESSION_INFO.md",
|
||||
iconClass: "fa fa-calendar",
|
||||
inputGroupClasses: "field-group col-lg-4 col-sm-6 col-xs-12",
|
||||
inputGroupClasses: "field-group session-group col-lg-4 col-sm-6 col-xs-12",
|
||||
labelClasses: "col-sm-4 col-xs-12 control-label",
|
||||
inputClasses: "col-sm-8 col-xs-12 input-group"
|
||||
},
|
||||
@@ -97,7 +97,7 @@
|
||||
data: ["devAlertEvents", "devAlertDown", "devSkipRepeated"],
|
||||
docs: "https://github.com/jokob-sk/NetAlertX/blob/main/docs/NOTIFICATIONS.md",
|
||||
iconClass: "fa fa-bell",
|
||||
inputGroupClasses: "field-group col-lg-4 col-sm-6 col-xs-12",
|
||||
inputGroupClasses: "field-group alert-group col-lg-4 col-sm-6 col-xs-12",
|
||||
labelClasses: "col-sm-4 col-xs-12 control-label",
|
||||
inputClasses: "col-sm-8 col-xs-12 input-group"
|
||||
},
|
||||
@@ -106,7 +106,7 @@
|
||||
data: ["devParentMAC", "devParentPort", "devSSID", "devSite", "devSyncHubNode"],
|
||||
docs: "https://github.com/jokob-sk/NetAlertX/blob/main/docs/NETWORK_TREE.md",
|
||||
iconClass: "fa fa-network-wired",
|
||||
inputGroupClasses: "field-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",
|
||||
inputClasses: "col-sm-8 col-xs-12 input-group"
|
||||
},
|
||||
@@ -115,7 +115,7 @@
|
||||
data: ["devStaticIP", "devIsNew", "devFavorite", "devIsArchived"],
|
||||
docs: "https://github.com/jokob-sk/NetAlertX/blob/main/docs/DEVICE_DISPLAY_SETTINGS.md",
|
||||
iconClass: "fa fa-list-check",
|
||||
inputGroupClasses: "field-group col-lg-4 col-sm-6 col-xs-12",
|
||||
inputGroupClasses: "field-group display-group col-lg-4 col-sm-6 col-xs-12",
|
||||
labelClasses: "col-sm-4 col-xs-12 control-label",
|
||||
inputClasses: "col-sm-8 col-xs-12 input-group"
|
||||
},
|
||||
@@ -124,7 +124,7 @@
|
||||
data: ["devCustomProps"],
|
||||
docs: "https://github.com/jokob-sk/NetAlertX/blob/main/docs/CUSTOM_PROPERTIES.md",
|
||||
iconClass: "fa fa-list",
|
||||
inputGroupClasses: "field-group col-lg-12 col-sm-12 col-xs-12",
|
||||
inputGroupClasses: "field-group cutprop-group col-lg-12 col-sm-12 col-xs-12",
|
||||
labelClasses: "col-sm-12 col-xs-12 control-label",
|
||||
inputClasses: "col-sm-12 col-xs-12 input-group"
|
||||
}
|
||||
|
||||
@@ -120,8 +120,8 @@
|
||||
<!-- page script ----------------------------------------------------------- -->
|
||||
<script>
|
||||
var deviceStatus = 'all';
|
||||
var tableRows = getCookie ("nax_parTableRows") == "" ? 10 : getCookie ("nax_parTableRows") ;
|
||||
var tableOrder = getCookie ("nax_parTableOrder") == "" ? [[3,'desc'], [0,'asc']] : JSON.parse(getCookie ("nax_parTableOrder")) ;
|
||||
var tableRows = getCache ("nax_parTableRows") == "" ? 10 : getCache ("nax_parTableRows") ;
|
||||
var tableOrder = getCache ("nax_parTableOrder") == "" ? [[3,'desc'], [0,'asc']] : JSON.parse(getCache ("nax_parTableOrder")) ;
|
||||
|
||||
var tableColumnHide = [];
|
||||
var tableColumnOrder = [];
|
||||
@@ -201,8 +201,17 @@ function mapIndx(oldIndex)
|
||||
// Query total numbers of Devices by status
|
||||
//------------------------------------------------------------------------------
|
||||
function getDevicesTotals() {
|
||||
maxDelay = 180; //cap at 180 seconds
|
||||
|
||||
// Fetch data via AJAX
|
||||
let maxRetries = Math.ceil(Math.log2(maxDelay)); // Calculate maximum retries to cap at maxDelay seconds
|
||||
let attempt = 0;
|
||||
let calledUpdateAPI = false;
|
||||
|
||||
function fetchDataWithBackoff() {
|
||||
// Calculate the delay (2^attempt seconds, capped at maxDelay seconds)
|
||||
const delay = Math.min(2 ** attempt, maxDelay) * 1000;
|
||||
|
||||
// Attempt to fetch data
|
||||
$.ajax({
|
||||
url: '/php/server/query_json.php',
|
||||
type: "GET",
|
||||
@@ -213,7 +222,7 @@ function getDevicesTotals() {
|
||||
},
|
||||
success: function(response) {
|
||||
if (response && response.data) {
|
||||
resultJSON = response.data[0]; // Assuming the structure {"data": [ ... ]}
|
||||
const resultJSON = response.data[0]; // Assuming the structure {"data": [ ... ]}
|
||||
|
||||
// Save the result to cache
|
||||
setCache("getDevicesTotals", JSON.stringify(resultJSON));
|
||||
@@ -225,11 +234,28 @@ function getDevicesTotals() {
|
||||
}
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
console.error("Failed to fetch devices data:", error);
|
||||
console.error("Failed to fetch devices data (Attempt " + (attempt + 1) + "):", error);
|
||||
|
||||
// try updating the API once
|
||||
if(calledUpdateAPI == false)
|
||||
{
|
||||
calledUpdateAPI = true;
|
||||
updateApi("devices_tiles");
|
||||
}
|
||||
|
||||
// Retry logic
|
||||
if (attempt < maxRetries) {
|
||||
attempt++;
|
||||
setTimeout(fetchDataWithBackoff, delay);
|
||||
} else {
|
||||
console.error("Maximum retries reached. Unable to fetch devices data.");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// Start the first fetch attempt
|
||||
fetchDataWithBackoff();
|
||||
}
|
||||
|
||||
function processDeviceTotals(devicesData) {
|
||||
@@ -281,6 +307,8 @@ function processDeviceTotals(devicesData) {
|
||||
//------------------------------------------------------------------------------
|
||||
// Render the info boxes/tiles on top
|
||||
function renderInfoboxes(customData) {
|
||||
if(customData.length > 0)
|
||||
{
|
||||
$.ajax({
|
||||
url: 'php/components/tile_cards.php', // PHP script URL
|
||||
type: 'POST', // Use POST method to send data
|
||||
@@ -294,6 +322,7 @@ function renderInfoboxes(customData) {
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Map column index to column name for GraphQL query
|
||||
@@ -711,11 +740,11 @@ function initializeDatatable (status) {
|
||||
|
||||
// Save cookie Rows displayed, and Parameters rows & order
|
||||
$('#tableDevices').on( 'length.dt', function ( e, settings, len ) {
|
||||
setCookie ("nax_parTableRows", len, 129600); // save for 90 days
|
||||
setCache ("nax_parTableRows", len, 129600); // save for 90 days
|
||||
} );
|
||||
|
||||
$('#tableDevices').on( 'order.dt', function () {
|
||||
setCookie ("nax_parTableOrder", JSON.stringify (table.order()), 129600); // save for 90 days
|
||||
setCache ("nax_parTableOrder", JSON.stringify (table.order()), 129600); // save for 90 days
|
||||
} );
|
||||
|
||||
// add multi-edit button
|
||||
@@ -807,7 +836,7 @@ function multiEditDevices()
|
||||
}
|
||||
|
||||
// redirect to the Maintenance section
|
||||
window.location.href = window.location.origin + '/maintenance.php#tab_multiEdit?macs=' + macs.slice(0, -1);
|
||||
window.location.href = './maintenance.php#tab_multiEdit?macs=' + macs.slice(0, -1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -463,8 +463,6 @@ function utf8ToBase64(str) {
|
||||
// General utilities
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
// check if JSON object
|
||||
function isJsonObject(value) {
|
||||
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
||||
@@ -751,7 +749,7 @@ function navigateToDeviceWithIp (ip) {
|
||||
{
|
||||
mac = obj.devMac;
|
||||
|
||||
window.open(window.location.origin +'/deviceDetails.php?mac=' + mac , "_blank");
|
||||
window.open('./deviceDetails.php?mac=' + mac , "_blank");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ function renderList(
|
||||
// remove first item containing the SQL query
|
||||
options.shift();
|
||||
|
||||
const apiUrl = `php/server/dbHelper.php?action=read&rawSql=${encodeURIComponent(sqlQuery)}`;
|
||||
const apiUrl = `php/server/dbHelper.php?action=read&rawSql=${btoa(encodeURIComponent(sqlQuery))}`;
|
||||
|
||||
$.get(apiUrl, function (sqlOptionsData) {
|
||||
|
||||
|
||||
@@ -228,6 +228,18 @@ $db->close();
|
||||
</div>
|
||||
<div class="db_tools_table_cell_b"><?= lang('Maintenance_Tool_ImportPastedCSV_text');?></div>
|
||||
</div>
|
||||
<div class="db_info_table_row">
|
||||
<div class="db_tools_table_cell_a" >
|
||||
<button type="button" class="btn btn-default pa-btn bg-green dbtools-button" id="btnDownloadConfig" onclick="DownloadConfig()"><?= lang('Maintenance_Tool_DownloadConfig');?></button>
|
||||
</div>
|
||||
<div class="db_tools_table_cell_b"><?= lang('Maintenance_Tool_DownloadConfig_text');?></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="btnImportPastedConfig" onclick="askImportPastedConfig()"><?= lang('Maintenance_Tool_ImportPastedConfig');?></button>
|
||||
</div>
|
||||
<div class="db_tools_table_cell_b"><?= lang('Maintenance_Tool_ImportPastedConfig_text');?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ---------------------------Logging-------------------------------------------- -->
|
||||
@@ -445,6 +457,44 @@ function restartBackend() {
|
||||
})
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------
|
||||
// Import pasted Config ASK
|
||||
function askImportPastedConfig() {
|
||||
|
||||
// Add new icon as base64 string
|
||||
showModalInput ('<i class="fa fa-square-plus pointer"></i> <?= lang('Maintenance_Tool_ImportConfig_noti');?>', '<?= lang('Maintenance_Tool_ImportPastedConfig_noti_text');?>',
|
||||
'<?= lang('Gen_Cancel');?>', '<?= lang('Gen_Okay');?>', 'UploadConfig');
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------
|
||||
// Upload Settings Config
|
||||
function UploadConfig()
|
||||
{
|
||||
// alert("aaa")
|
||||
|
||||
appConf = $('#modal-input-textarea').val()
|
||||
// encode for import
|
||||
appConfBase64 = btoa(appConf)
|
||||
|
||||
// import
|
||||
$.post('php/server/query_replace_config.php', { config: appConfBase64 }, function(msg) {
|
||||
console.log(msg);
|
||||
// showMessage(msg);
|
||||
write_notification(`[Maintenance] Settings imported from backup: ${msg}`, 'interrupt');
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------
|
||||
// Download Settings Config
|
||||
function DownloadConfig()
|
||||
{
|
||||
// Execute
|
||||
openInNewTab("php/server/query_config.php?file=app.conf&download=true")
|
||||
}
|
||||
|
||||
|
||||
|
||||
// -----------------------------------------------------------
|
||||
// Export CSV
|
||||
function ExportCSV()
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
|
||||
settingsData = res["data"];
|
||||
|
||||
excludedColumns = ["NEWDEV_devMac", "NEWDEV_devFirstConnection", "NEWDEV_devLastConnection", "NEWDEV_devLastNotification", "NEWDEV_devStaticIP", "NEWDEV_devScan", "NEWDEV_devPresentLastScan", "NEWDEV_devCustomProps" ]
|
||||
excludedColumns = ["NEWDEV_devMac", "NEWDEV_devFirstConnection", "NEWDEV_devLastConnection", "NEWDEV_devLastNotification", "NEWDEV_devScan", "NEWDEV_devPresentLastScan", "NEWDEV_devCustomProps" ]
|
||||
|
||||
const relevantColumns = settingsData.filter(set =>
|
||||
set.setGroup === "NEWDEV" &&
|
||||
|
||||
@@ -11,7 +11,11 @@
|
||||
|
||||
?>
|
||||
|
||||
<!-- ----------------------------------------------------------------------- -->
|
||||
<script>
|
||||
// show spinning icon
|
||||
showSpinner()
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<!-- Page ------------------------------------------------------------------ -->
|
||||
@@ -484,6 +488,8 @@
|
||||
return;
|
||||
}
|
||||
|
||||
orderTopologyBy = createArray(getSetting("UI_TOPOLOGY_ORDER"))
|
||||
|
||||
devicesListnew = rawData["data"].map(item => {
|
||||
return {
|
||||
"name": item[0],
|
||||
@@ -497,13 +503,30 @@
|
||||
"port": item[18]
|
||||
};
|
||||
}).sort((a, b) => {
|
||||
// Helper to safely parse port into an integer; invalid ports become Infinity for sorting
|
||||
const parsePort = (port) => {
|
||||
const parsed = parseInt(port, 10);
|
||||
return isNaN(parsed) ? Infinity : parsed;
|
||||
};
|
||||
|
||||
switch (orderTopologyBy[0]) {
|
||||
case "Name":
|
||||
// First sort by name alphabetically
|
||||
const nameCompare = a.name.localeCompare(b.name);
|
||||
if (nameCompare !== 0) {
|
||||
return nameCompare;
|
||||
}
|
||||
// If names are the same, sort by port numerically
|
||||
return a.port - b.port;
|
||||
return parsePort(a.port) - parsePort(b.port);
|
||||
|
||||
case "Port":
|
||||
// Sort by port numerically
|
||||
return parsePort(a.port) - parsePort(b.port);
|
||||
|
||||
default:
|
||||
// Default: Sort by rowid (as a fallback)
|
||||
return a.rowid - b.rowid;
|
||||
}
|
||||
});
|
||||
|
||||
setCache('devicesListNew', JSON.stringify(devicesListnew));
|
||||
@@ -885,9 +908,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
// show spinning icon
|
||||
showSpinner()
|
||||
|
||||
// init device names where macs are used
|
||||
initDeviceNamesFromMACs();
|
||||
|
||||
|
||||
@@ -10,8 +10,12 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// DB File Path
|
||||
$DBFILE = dirname(__FILE__).'/../../../db/app.db';
|
||||
$DBFILE_LOCKED_FILE = dirname(__FILE__).'/../../../log/db_is_locked.log';
|
||||
// $DBFILE = dirname(__FILE__).'/../../../db/app.db';
|
||||
// $DBFILE_LOCKED_FILE = dirname(__FILE__).'/../../../log/db_is_locked.log';
|
||||
$scriptDir = realpath(dirname(__FILE__)); // Resolves symlinks to the actual physical path
|
||||
$DBFILE = $scriptDir . '/../../../db/app.db';
|
||||
$DBFILE_LOCKED_FILE = $scriptDir . '/../../../log/db_is_locked.log';
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// check if authenticated
|
||||
@@ -32,6 +36,14 @@ function SQLite3_connect($trytoreconnect = true, $retryCount = 0) {
|
||||
global $db_locked;
|
||||
$db_locked = false;
|
||||
|
||||
if (!file_exists($DBFILE)) {
|
||||
die("Database file not found: $DBFILE");
|
||||
}
|
||||
if (!file_exists(dirname($DBFILE_LOCKED_FILE))) {
|
||||
die("Log directory not found: " . dirname($DBFILE_LOCKED_FILE));
|
||||
}
|
||||
|
||||
|
||||
// Write unlock status to the locked file
|
||||
file_put_contents($DBFILE_LOCKED_FILE, '0');
|
||||
|
||||
@@ -70,7 +82,7 @@ class CustomDatabaseWrapper {
|
||||
private $maxRetries;
|
||||
private $retryDelay;
|
||||
|
||||
public function __construct($filename, $flags = SQLITE3_OPEN_READWRITE | SQLITE3_OPEN_CREATE, $maxRetries = 10, $retryDelay = 1000, $encryptionKey = null) {
|
||||
public function __construct($filename, $flags = SQLITE3_OPEN_READWRITE | SQLITE3_OPEN_CREATE, $maxRetries = 3, $retryDelay = 1000, $encryptionKey = null) {
|
||||
$this->sqlite = new SQLite3($filename, $flags, $encryptionKey);
|
||||
$this->maxRetries = $maxRetries;
|
||||
$this->retryDelay = $retryDelay;
|
||||
@@ -116,7 +128,7 @@ class CustomDatabaseWrapper {
|
||||
file_put_contents($DBFILE_LOCKED_FILE, '0');
|
||||
|
||||
$message = 'Error executing query (attempts: ' . $attempts . '), query: ' . $query;
|
||||
write_notification($message);
|
||||
// write_notification($message);
|
||||
error_log("Query failed after {$this->maxRetries} attempts: " . $this->sqlite->lastErrorMsg());
|
||||
}
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ require_once $_SERVER['DOCUMENT_ROOT'] . '/php/templates/security.php';
|
||||
}
|
||||
|
||||
if (isset ($_REQUEST['rawSql'])) {
|
||||
$rawSql = $_REQUEST['rawSql'];
|
||||
$rawSql = urldecode(base64_decode($_REQUEST['rawSql']));
|
||||
}
|
||||
|
||||
if (isset ($_REQUEST['dbtable'])) {
|
||||
|
||||
@@ -273,7 +273,8 @@ function setDeviceData() {
|
||||
devFirstConnection,
|
||||
devLastIP,
|
||||
devGUID,
|
||||
devCustomProps
|
||||
devCustomProps,
|
||||
devSourcePlugin
|
||||
) VALUES (
|
||||
'$mac',
|
||||
'$name',
|
||||
@@ -300,7 +301,8 @@ function setDeviceData() {
|
||||
'$devFirstConnection',
|
||||
'$ip',
|
||||
'$devNewGuid',
|
||||
'$devCustomProps'
|
||||
'$devCustomProps',
|
||||
'DUMMY'
|
||||
)";
|
||||
}
|
||||
|
||||
|
||||
@@ -11,8 +11,9 @@ require dirname(__FILE__).'/../server/init.php';
|
||||
//------------------------------------------------------------------------------
|
||||
// Handle incoming requests
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'GET') {
|
||||
// Get query string parameter ?file=settings_table.json
|
||||
// Get query string parameters ?file=settings_table.json&download=true
|
||||
$file = isset($_GET['file']) ? $_GET['file'] : null;
|
||||
$download = isset($_GET['download']) ? $_GET['download'] === 'true' : false;
|
||||
|
||||
// Check if file parameter is provided
|
||||
if ($file) {
|
||||
@@ -21,9 +22,23 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
|
||||
|
||||
// Check if the file exists
|
||||
if (file_exists($filePath)) {
|
||||
// Send the response back to the client
|
||||
// Handle download behavior
|
||||
if ($download) {
|
||||
// Force file download
|
||||
header('Content-Description: File Transfer');
|
||||
header('Content-Type: application/octet-stream');
|
||||
header('Content-Disposition: attachment; filename="' . basename($filePath) . '"');
|
||||
header('Expires: 0');
|
||||
header('Cache-Control: must-revalidate');
|
||||
header('Pragma: public');
|
||||
header('Content-Length: ' . filesize($filePath));
|
||||
readfile($filePath);
|
||||
exit;
|
||||
} else {
|
||||
// Display file content
|
||||
header('Content-Type: text/plain');
|
||||
echo file_get_contents($filePath);
|
||||
}
|
||||
} else {
|
||||
// File not found response
|
||||
http_response_code(404);
|
||||
|
||||
@@ -28,10 +28,10 @@
|
||||
|
||||
<!-- To the right -->
|
||||
<div class="pull-right no-hidden-xs">
|
||||
| <a href="https://gurubase.io/g/netalertx" target="_blank" title="Ask AI"><i class="fa-regular fa-comment-dots fa-flip-horizontal"></i></a>
|
||||
| <a href="https://github.com/jokob-sk/NetAlertX/tree/main/docs#documentation-overview" target="_blank" title="Documentation"><i class="fa fa-book"></i></a>
|
||||
| <a href="https://github.com/jokob-sk/NetAlertX/issues" target="_blank"><i class="fa-solid fa-bug" title="Report a bug"></i></a>
|
||||
| <a href="https://discord.com/invite/NczTUTWyRr" target="_blank"><i class="fa-brands fa-discord" title="Join Discord"></i></a>
|
||||
| <a href="https://gurubase.io/g/netalertx" class="pointer" target="_blank" title="Ask AI"><i class="fa-regular fa-comment-dots fa-flip-horizontal"></i></a>
|
||||
| <a href="https://github.com/jokob-sk/NetAlertX/tree/main/docs#documentation-overview" class="pointer" target="_blank" title="Documentation"><i class="fa fa-book"></i></a>
|
||||
| <a href="https://github.com/jokob-sk/NetAlertX/issues" class="pointer" target="_blank"><i class="fa-solid fa-bug" title="Report a bug"></i></a>
|
||||
| <a href="https://discord.com/invite/NczTUTWyRr" class="pointer" target="_blank"><i class="fa-brands fa-discord" title="Join Discord"></i></a>
|
||||
| <?= lang('Maintenance_built_on');?>: <?php include 'php/templates/build.php'; ?>
|
||||
| Version: <?php include 'php/templates/version.php'; ?>
|
||||
|
|
||||
|
||||
@@ -70,9 +70,6 @@
|
||||
<!-- Theme style -->
|
||||
<link rel="stylesheet" href="lib/AdminLTE/dist/css/AdminLTE.min.css">
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- AdminLTE Skins. We have chosen the skin-blue for this starter
|
||||
page. However, you can choose any other skin. Make sure you
|
||||
apply the skin class to the body tag so the changes take effect. -->
|
||||
@@ -107,6 +104,8 @@
|
||||
<!-- Servertime to the right of the hostname -->
|
||||
<script>
|
||||
|
||||
// -------------------------------------------------------------
|
||||
// Updates the backend application state/status in the header
|
||||
function updateState(){
|
||||
$.get('/php/server/query_json.php', { file: 'app_state.json', nocache: Date.now() }, function(appState) {
|
||||
|
||||
@@ -117,19 +116,46 @@
|
||||
})
|
||||
}
|
||||
|
||||
function show_pia_servertime() {
|
||||
// -------------------------------------------------------------
|
||||
// updates the date and time in the header
|
||||
function update_servertime() {
|
||||
// Get the current date and time in the specified time zone
|
||||
let timeZone = "<?php echo $timeZone ?>";
|
||||
let now = new Date();
|
||||
|
||||
// datetime in timeZone in the "en-UK" locale
|
||||
let time = new Date().toLocaleString("en-UK", { timeZone: "<?php echo $timeZone?>" });
|
||||
// Convert to the specified time zone
|
||||
let formatter = new Intl.DateTimeFormat("en-UK", {
|
||||
timeZone: timeZone,
|
||||
day: "2-digit",
|
||||
month: "short",
|
||||
year: "numeric",
|
||||
hour: "2-digit",
|
||||
minute: "2-digit",
|
||||
second: "2-digit",
|
||||
hour12: false, // Use 24-hour format
|
||||
});
|
||||
let parts = formatter.formatToParts(now);
|
||||
|
||||
// Extract date components
|
||||
let day = parts.find(p => p.type === "day").value;
|
||||
let month = parts.find(p => p.type === "month").value;
|
||||
let year = parts.find(p => p.type === "year").value;
|
||||
|
||||
// Extract time components
|
||||
let hour = parts.find(p => p.type === "hour").value;
|
||||
let minute = parts.find(p => p.type === "minute").value;
|
||||
let second = parts.find(p => p.type === "second").value;
|
||||
|
||||
// Construct the date and time in DD-MMM-YYYY HH:MM:SS format
|
||||
let formattedDateTime = `${day}-${month}-${year} ${hour}:${minute}:${second}`;
|
||||
|
||||
if (document.getElementById) {
|
||||
document.getElementById("PIA_Servertime_place").innerHTML = '('+time+')';
|
||||
document.getElementById("PIA_Servertime_place").innerHTML = '(' + formattedDateTime + ')';
|
||||
}
|
||||
|
||||
setTimeout("show_pia_servertime()", 1000);
|
||||
setTimeout(update_servertime, 1000); // Call recursively every second
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
@@ -137,7 +163,7 @@
|
||||
<!-- ----------------------------------------------------------------------- -->
|
||||
<!-- Layout Boxed Yellow -->
|
||||
|
||||
<body class="hold-transition fixed <?php echo $pia_skin_selected;?> sidebar-mini" onLoad="show_pia_servertime();" >
|
||||
<body class="hold-transition fixed <?php echo $pia_skin_selected;?> sidebar-mini" onLoad="update_servertime();" >
|
||||
<!-- Site wrapper -->
|
||||
<div class="wrapper">
|
||||
|
||||
@@ -145,8 +171,6 @@
|
||||
<!-- Main Header -->
|
||||
<header class="main-header">
|
||||
|
||||
|
||||
|
||||
<!-- ----------------------------------------------------------------------- -->
|
||||
<!-- Logo -->
|
||||
<a href="devices.php" class="logo">
|
||||
@@ -185,13 +209,13 @@
|
||||
</li>
|
||||
<!-- Clear cache & Reload -->
|
||||
<li>
|
||||
<a id="reload-button" href='#' role="button" span class='fa fa-repeat' onclick='clearCache()'></a>
|
||||
<a id="reload-button" href='#' role="button" span onclick='clearCache()' class='fa-solid fa-rotate'></a>
|
||||
</li>
|
||||
<!-- Full Screen -->
|
||||
<li>
|
||||
<a id="fullscreen-button" href='#' role="button" span class='fa fa-arrows-alt' onclick='toggleFullscreen()'></a>
|
||||
</li>
|
||||
<!-- Full Screen -->
|
||||
<!-- Notifications -->
|
||||
<li>
|
||||
<a id="notifications-button" href='userNotifications.php' role="button" span class='fa-solid fa-bell'></a>
|
||||
<span id="unread-notifications-bell-count" title="" class="badge bg-red unread-notifications-bell" >0</span>
|
||||
@@ -468,7 +492,7 @@ function workInProgress() {
|
||||
//--------------------------------------------------------------
|
||||
|
||||
// Update server time in the header
|
||||
show_pia_servertime()
|
||||
update_servertime()
|
||||
|
||||
// Update server state in the header
|
||||
updateState()
|
||||
|
||||
@@ -398,6 +398,8 @@
|
||||
"Maintenance_Running_Version": "",
|
||||
"Maintenance_Status": "",
|
||||
"Maintenance_Title": "",
|
||||
"Maintenance_Tool_DownloadConfig": "",
|
||||
"Maintenance_Tool_DownloadConfig_text": "",
|
||||
"Maintenance_Tool_ExportCSV": "",
|
||||
"Maintenance_Tool_ExportCSV_noti": "",
|
||||
"Maintenance_Tool_ExportCSV_noti_text": "",
|
||||
@@ -406,9 +408,13 @@
|
||||
"Maintenance_Tool_ImportCSV_noti": "",
|
||||
"Maintenance_Tool_ImportCSV_noti_text": "",
|
||||
"Maintenance_Tool_ImportCSV_text": "",
|
||||
"Maintenance_Tool_ImportConfig_noti": "",
|
||||
"Maintenance_Tool_ImportPastedCSV": "",
|
||||
"Maintenance_Tool_ImportPastedCSV_noti_text": "",
|
||||
"Maintenance_Tool_ImportPastedCSV_text": "",
|
||||
"Maintenance_Tool_ImportPastedConfig": "",
|
||||
"Maintenance_Tool_ImportPastedConfig_noti_text": "",
|
||||
"Maintenance_Tool_ImportPastedConfig_text": "",
|
||||
"Maintenance_Tool_arpscansw": "",
|
||||
"Maintenance_Tool_arpscansw_noti": "",
|
||||
"Maintenance_Tool_arpscansw_noti_text": "",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"API_CUSTOM_SQL_description": "Pots especificar una consulta SQL personalitzada que generarà un fitxer JSON i el mostrarà mitjançant <a href=\"/api/table_custom_endpoint.json\" target=\"_blank\"><code>table_custom_endpoint.json</code> file endpoint</a>.",
|
||||
"API_CUSTOM_SQL_name": "Punt final personalitzat",
|
||||
"API_TOKEN_description": "Token API per assegurar les comunicacions, pots generar-ne una o introduir una clau. S'enviarà a la capçalera de pa petició. Es fa servir al plugin <code>SYNC</code> , del servidor GraphQL.",
|
||||
"API_TOKEN_description": "Token API per assegurar les comunicacions, pots generar-ne un o introduir un valor clau. S'enviarà a la capçalera de la petició <code>SYNC</code> plugin, servidor GraphQL i altres endpoints API. Pots fer servir els endpoints API per crear integracions personalitzades tal com es descriu a <a href=\"https://github.com/jokob-sk/NetAlertX/blob/main/docs/API.md\" target=\"_blank\">la documentació API</a>.",
|
||||
"API_TOKEN_name": "Token API",
|
||||
"API_display_name": "API",
|
||||
"API_icon": "<i class=\"fa fa-arrow-down-up-across-line\"></i>",
|
||||
@@ -60,15 +60,15 @@
|
||||
"BackDevices_darkmode_enabled": "Mode fosc Activat",
|
||||
"CLEAR_NEW_FLAG_description": "Si està habilitat (<code>0</code> està desactivat), els dispositius marcats com <b>Nou dispositiu</b> es desmarcaran si el temps límit (especificat en hores) supera <b>Primera sessió</b>.",
|
||||
"CLEAR_NEW_FLAG_name": "Netejar indicador de nou",
|
||||
"CustProps_cant_remove": "No es pot eliminar, almenys es necessita una propietat.",
|
||||
"CustProps_cant_remove": "No es pot eliminar, es necessita una propietat mínim.",
|
||||
"DAYS_TO_KEEP_EVENTS_description": "Això és una configuració de manteniment. Especifica el nombre de dies que es conservaran els esdeveniments. Els esdeveniments antics s'esborraran periòdicament. També aplica als esdeveniments dels Connectors (Plugins).",
|
||||
"DAYS_TO_KEEP_EVENTS_name": "Esborrar esdeveniments més vells de",
|
||||
"DAYS_TO_KEEP_EVENTS_name": "Esborrar esdeveniments anteriors",
|
||||
"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",
|
||||
"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_CustomProperties_Title": "Propietats personalitzades",
|
||||
"DevDetail_CustomProps_reset_info": "Això eliminarà les seves propietats personalitzades en aquest dispositiu i restablir-les al valor predeterminat.",
|
||||
"DevDetail_CustomProps_reset_info": "Això eliminarà les seves propietats personalitzades en aquest dispositiu i restablirà el valor predeterminat.",
|
||||
"DevDetail_DisplayFields_Title": "Pantalla",
|
||||
"DevDetail_EveandAl_AlertAllEvents": "Alertes",
|
||||
"DevDetail_EveandAl_AlertDown": "Cancel·lar alerta",
|
||||
@@ -77,7 +77,7 @@
|
||||
"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_ScanCycle": "Dispositiu d'escaneig",
|
||||
"DevDetail_EveandAl_ScanCycle_a": "Dispositiu d'escaneig",
|
||||
"DevDetail_EveandAl_ScanCycle_a": "Escanejar Dispositiu",
|
||||
"DevDetail_EveandAl_ScanCycle_z": "No Escanejar Dispositiu",
|
||||
"DevDetail_EveandAl_Skip": "Omet notificacions repetides per",
|
||||
"DevDetail_EveandAl_Title": "Configuració de Successos i Alertes",
|
||||
@@ -183,9 +183,9 @@
|
||||
"DevDetail_button_AddIcon_Help": "Enganxeu en una etiqueta html SVG o en una icona etiqueta html Font Awesome. Llegir el <a href=\"https://github.com/jokob-sk/NetAlertX/blob/main/docs/ICONS.md\" target=\"_blank\">Icons docs</a> per a més detalls.",
|
||||
"DevDetail_button_AddIcon_Tooltip": "Afegir una nova Icona a aquest dispositiu que encara no està disponible al desplegable.",
|
||||
"DevDetail_button_Delete": "Eliminar dispositiu",
|
||||
"DevDetail_button_DeleteEvents": "Eliminar Esdeveniments",
|
||||
"DevDetail_button_DeleteEvents_Warning": "Estàs segur que vols eliminar tots els esdeveniments d'aquest dispositiu?<br><br>(això esborrarà la <b>Historial d'esdeveniments</b> i la <b>Sessions</b> i pot ajudar amb les notificacions constants (persistents)",
|
||||
"DevDetail_button_Delete_ask": "T'és segur vols eliminar aquest dispositiu? També el pots arxivar en comptes d'això.",
|
||||
"DevDetail_button_DeleteEvents": "Esborrar Esdeveniments",
|
||||
"DevDetail_button_DeleteEvents_Warning": "Estàs segur que vols eliminar tots els esdeveniments d'aquest dispositiu?<br><br>(això esborrarà <b>l'Historial d'esdeveniments</b> i les <b>Sessions</b> i pot ajudar amb les notificacions persistents",
|
||||
"DevDetail_button_Delete_ask": "Segur que vols eliminar aquest dispositiu?. En comptes d'això el pots arxivar.",
|
||||
"DevDetail_button_OverwriteIcons": "Sobreescriure icones",
|
||||
"DevDetail_button_OverwriteIcons_Tooltip": "Sobreescriure icones de tots els dispositius amb el mateix tipus de dispositiu",
|
||||
"DevDetail_button_OverwriteIcons_Warning": "Estàs segur que vols sobreescriure totes les icones de tots els dispositius amb el mateix tipus de dispositiu que el tipus de dispositiu actual?",
|
||||
@@ -206,7 +206,7 @@
|
||||
"Device_Shortcut_DownOnly": "Aturat",
|
||||
"Device_Shortcut_Favorites": "Favorits",
|
||||
"Device_Shortcut_NewDevices": "Nous dispositius",
|
||||
"Device_Shortcut_OnlineChart": "Presència de dispositius",
|
||||
"Device_Shortcut_OnlineChart": "Dispositius detectats",
|
||||
"Device_TableHead_AlertDown": "Cancel·lar alerta",
|
||||
"Device_TableHead_Connected_Devices": "Connexions",
|
||||
"Device_TableHead_CustomProps": "Props / Accions",
|
||||
@@ -308,7 +308,7 @@
|
||||
"Gen_Offline": "Fora de línia",
|
||||
"Gen_Okay": "Ok",
|
||||
"Gen_Online": "En línia",
|
||||
"Gen_Purge": "Elimina",
|
||||
"Gen_Purge": "Neteja",
|
||||
"Gen_ReadDocs": "Llegit més dins el docs.",
|
||||
"Gen_Remove_All": "Esborra tot",
|
||||
"Gen_Remove_Last": "Esborra el darrer",
|
||||
@@ -373,9 +373,9 @@
|
||||
"HelpFAQ_Cat_Presence_401_head": "Un dispositiu és mostrat tan present tot i que és Fora de línia \"\".",
|
||||
"HelpFAQ_Cat_Presence_401_text": "Si això passa, tens la possibilitat d'esborrar els esdeveniments del dispositiu en qüestió (veure detalls). Una altra possibilitat seria canviar el dispositiu i esperar fins a NetAlert X reconeix el dispositiu com a \"en línia\" amb la següent exploració i, a continuació, simplement torneu a desactivar el dispositiu. NetAlert X ha de tenir en compte l'estat del dispositiu a la base de dades amb la següent exploració.",
|
||||
"HelpFAQ_Title": "Ajuda / FAQ",
|
||||
"LOADED_PLUGINS_description": "Quins Connectors(Plugins) carregar. Afegir connectors podria alentir l'aplicació. Llegir més sobre quins connectors necessiten estar habilitats, tipus, o opcions d'escanejar dins del <a target=\"_blank\" href=\"https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins#readme\">documents de connectors</a>. Els connectors descarregats perdran els vostres paràmetres. Només <code>desactivats</code> es poden eliminar els connectors.",
|
||||
"LOADED_PLUGINS_description": "Quins Plugins carregar. Afegir plugins podria alentir l'aplicació. Llegir més sobre quins connectors necessiten estar habilitats, els tipus, o les opcions d'escaneig dins del <a target=\"_blank\" href=\"https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins#readme\">documents de connectors</a>. Els connectors descarregats perdran els vostres paràmetres. Només <code>desactivats</code> es poden eliminar els connectors.",
|
||||
"LOADED_PLUGINS_name": "Connectors carregats",
|
||||
"LOG_LEVEL_description": "Aquest paràmetre permetrà un registre més verbal. Útil per a la depuració d'esdeveniments escrivint 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",
|
||||
"Loading": "Carregant ...",
|
||||
"Login_Box": "Introduïu la vostra contrasenya",
|
||||
@@ -384,7 +384,7 @@
|
||||
"Login_Psw-box": "Contrasenya",
|
||||
"Login_Psw_alert": "Alerta de contrasenya!",
|
||||
"Login_Psw_folder": "a la carpeta config.",
|
||||
"Login_Psw_new": "new_password",
|
||||
"Login_Psw_new": "contrasenya_nova",
|
||||
"Login_Psw_run": "Per canviar la contrasenya executar:",
|
||||
"Login_Remember": "Recorda",
|
||||
"Login_Remember_small": "(vàlid per 7 dies)",
|
||||
@@ -398,17 +398,23 @@
|
||||
"Maintenance_Running_Version": "Versió instal·lada",
|
||||
"Maintenance_Status": "Estat",
|
||||
"Maintenance_Title": "Eines de manteniment",
|
||||
"Maintenance_Tool_ExportCSV": "CSV Exportació",
|
||||
"Maintenance_Tool_DownloadConfig": "Exportació de paràmetres",
|
||||
"Maintenance_Tool_DownloadConfig_text": "Descarregueu una còpia de seguretat completa de la vostra configuració de configuració emmagatzemada al fitxer <code>app.conf</code>.",
|
||||
"Maintenance_Tool_ExportCSV": "CSV Exportació de dispositius",
|
||||
"Maintenance_Tool_ExportCSV_noti": "CSV Exportació",
|
||||
"Maintenance_Tool_ExportCSV_noti_text": "Estàs segur que vols generar un fitxer CSV?",
|
||||
"Maintenance_Tool_ExportCSV_text": "Genera un fitxer CSV (comma separated value) que conté la llista dels dispositius incloent les relacions de Xarxa entre Nodes i dispositius connectats. També pots disparar-ho accedint a la URL <code>el vostre NetAlertX url/php/server/devices.php?acció=ExportCSV</code> o activant el connector <a href=\"settings.php#CSVBCKP_header\">CSV Còpia de seguretat</a>.",
|
||||
"Maintenance_Tool_ImportCSV": "CSV Importació",
|
||||
"Maintenance_Tool_ExportCSV_text": "Genera un fitxer CSV (comma separated value) que conté la llista dels dispositius incloent les relacions de Xarxa entre Nodes i dispositius connectats. També pots disparar-ho accedint a la URL <code>el_vostre_NetAlertX_ url/php/server/devices.php?acció=ExportCSV</code> o activant el connector <a href=\"settings.php#CSVBCKP_header\">CSV Còpia de seguretat</a>.",
|
||||
"Maintenance_Tool_ImportCSV": "CSV Importació de dispositius",
|
||||
"Maintenance_Tool_ImportCSV_noti": "CSV Importació",
|
||||
"Maintenance_Tool_ImportCSV_noti_text": "Estàs segur que vols importar el fitxer CSV? Això <b> sobreescriurà</b> completament els dispositius de la seva base de dades.",
|
||||
"Maintenance_Tool_ImportCSV_text": "Abans d'utilitzar aquesta funció, fes una còpia de seguretat, si us plau. Importa un CSV (comma separated value) el fitxer que conté la llista dels dispositius que inclouen les relacions de Xarxa entre Nodes i dispositius connectats. Per fer-ho col·loca el CSV el fitxer anomenat <b>devices.csv</b> a la vostra <b>/config</b> carpeta.",
|
||||
"Maintenance_Tool_ImportPastedCSV": "Importació CSV (Paste)",
|
||||
"Maintenance_Tool_ImportConfig_noti": "Importació de la configuració (app.conf)",
|
||||
"Maintenance_Tool_ImportPastedCSV": "CSV Importació de dispositius (Paste)",
|
||||
"Maintenance_Tool_ImportPastedCSV_noti_text": "Estàs segur que vols importar el CSV copiat? Això <b> sobreescriurà</b> completament els dispositius de la base de dades.",
|
||||
"Maintenance_Tool_ImportPastedCSV_text": "Abans d'utilitzar aquesta funció, feu una còpia de seguretat. Importar un fitxer CSV (comma separated value) que contingui la llista de dispositius, incloent les relacions de xarxa entre els nodes i els dispositius connectats.",
|
||||
"Maintenance_Tool_ImportPastedConfig": "Importació de la configuració (paste)",
|
||||
"Maintenance_Tool_ImportPastedConfig_noti_text": "Estàs segur que vols importar la configuració config enganxada? Això <b> sobreescriurà</b> completament el fitxer <code>app.conf</code>.",
|
||||
"Maintenance_Tool_ImportPastedConfig_text": "Importa el fitxer <code>app.conf</code> que conté tota l'aplicació Configuració. És possible que vulgueu descarregar el fitxer actual <code>app.conf</code> primer amb el <b>Settings Export</b>.",
|
||||
"Maintenance_Tool_arpscansw": "Conmuta arp-Scan (on/off)",
|
||||
"Maintenance_Tool_arpscansw_noti": "Conmuta arp-Scan on or off",
|
||||
"Maintenance_Tool_arpscansw_noti_text": "Quan l'escàner ha estat canviat a off es queda off fins que és activat de bell nou.",
|
||||
@@ -428,25 +434,25 @@
|
||||
"Maintenance_Tool_del_ActHistory_text": "El gràfic d’activitat de la xarxa es reinicialitzarà. No afecta als esdeveniments.",
|
||||
"Maintenance_Tool_del_alldev": "Eliminar tots els dispositius",
|
||||
"Maintenance_Tool_del_alldev_noti": "Eliminar dispositius",
|
||||
"Maintenance_Tool_del_alldev_noti_text": "Estàs segur que vols eliminar tots els dispositius?",
|
||||
"Maintenance_Tool_del_alldev_noti_text": "Segur que vols eliminar tots els dispositius?",
|
||||
"Maintenance_Tool_del_alldev_text": "Abans d'utilitzar aquesta funció, feu una còpia de seguretat. La supressió no es pot desfer. Tots els dispositius s'eliminaran de la base de dades.",
|
||||
"Maintenance_Tool_del_allevents": "Suprimeix esdeveniments (Elimina presència)",
|
||||
"Maintenance_Tool_del_allevents30": "Suprimeix tots els esdeveniments més vells que 30 dies",
|
||||
"Maintenance_Tool_del_allevents": "Elimina deteccions (presència)",
|
||||
"Maintenance_Tool_del_allevents30": "Suprimeix tots els esdeveniments anteriors a 30 dies",
|
||||
"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 la Presencia de tots els Dispositius.",
|
||||
"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 presència de tots els dispositius. Això pot portar a sessions no vàlides. Això significa que els dispositius es mostren com a \"present\" 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_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_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_text": "Estàs segur que vols eliminar tots els esdeveniments? Això reinicialització Presència de tots els dispositius.",
|
||||
"Maintenance_Tool_del_allevents_text": "Abans d'utilitzar aquesta funció, feu una còpia de seguretat. La supressió no es pot desfer. Tots els esdeveniments de la base de dades seran esborrats. Es restablirà dada de presència de tots els dispositius. Les sessions seran invalidades. Això significa que els dispositius es poden mostrar com a \"present\" 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_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_text": "Abans d'utilitzar aquesta funció, feu una còpia de seguretat. La supressió no es pot desfer. Tots els esdeveniments de la base de dades s'esborraran. Es restablirà dada de detecció de tots els dispositius. S'invalidaran les sessions. Això significa que els dispositius es poden mostrar com a \"present\" 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_empty_macs": "Eliminar dispositius amb MAC buits",
|
||||
"Maintenance_Tool_del_empty_macs_noti": "Elimina Dispositius",
|
||||
"Maintenance_Tool_del_empty_macs_noti_text": "Estàs segur que vols eliminar tots els dispositius amb adreces MAC buides?<br>(potser prefereix arxivar-lo)",
|
||||
"Maintenance_Tool_del_empty_macs_text": "Abans d'utilitzar aquesta funció, feu una còpia de seguretat. La supressió no es pot desfer. Tots els dispositius sense MAC s'eliminaran de la base de dades.",
|
||||
"Maintenance_Tool_del_selecteddev": "Suprimeix els dispositius seleccionats",
|
||||
"Maintenance_Tool_del_selecteddev_text": "Abans d'utilitzar aquesta funció, feu una còpia de seguretat. La supressió no es pot desfer. Els dispositius seleccionats s'eliminaran de la base de dades.",
|
||||
"Maintenance_Tool_del_unknowndev": "Suprimeix dispositius (desconeguts)",
|
||||
"Maintenance_Tool_del_unknowndev_noti": "Suprimeix dispositius (desconeguts)",
|
||||
"Maintenance_Tool_del_unknowndev_noti_text": "Estàs segur que vols eliminar tots els dispositius (no coneguts) i amb nom (no trobat)?",
|
||||
"Maintenance_Tool_del_unknowndev": "Elimina dispositius desconeguts",
|
||||
"Maintenance_Tool_del_unknowndev_noti": "Elimina dispositius desconeguts",
|
||||
"Maintenance_Tool_del_unknowndev_noti_text": "Estàs segur que vols eliminar tots els dispositius (no coneguts) o amb nom (no trobat)?",
|
||||
"Maintenance_Tool_del_unknowndev_text": "Abans d'utilitzar aquesta funció, feu una còpia de seguretat. La supressió no es pot desfer. Tots els dispositius anomenats (no coneguts) s'eliminaran de la base de dades.",
|
||||
"Maintenance_Tool_displayed_columns_text": "Canvieu la visibilitat i l'ordre de les columnes a la pàgina <a href=\"devices.php\"><b> <i class=\"fa fa-laptop\"></i> Dispositius</b></a>.",
|
||||
"Maintenance_Tool_drag_me": "Arrossega'm a reorder columnes.",
|
||||
@@ -558,7 +564,7 @@
|
||||
"PIALERT_WEB_PROTECTION_name": "Activa l'accés",
|
||||
"PLUGINS_KEEP_HIST_description": "Quantes entrades de Plugins s'han de mantenir a la història (per Plugin, no per dispositiu).",
|
||||
"PLUGINS_KEEP_HIST_name": "Història dels Plugins",
|
||||
"Plugins_DeleteAll": "Elimina tot (els filtres són ignorats)",
|
||||
"Plugins_DeleteAll": "Elimina tot (s'ignoraran els filtres)",
|
||||
"Plugins_Filters_Mac": "Filtre de MAC",
|
||||
"Plugins_History": "Historial d'Esdeveniments",
|
||||
"Plugins_Obj_DeleteListed": "Suprimeix els objectes mostrats",
|
||||
@@ -587,7 +593,7 @@
|
||||
"Presence_Shortcut_DownAlerts": "Aturar alertes",
|
||||
"Presence_Shortcut_Favorites": "Favorits",
|
||||
"Presence_Shortcut_NewDevices": "Nous dispositius",
|
||||
"Presence_Title": "Presència per dispositiu",
|
||||
"Presence_Title": "Detecció de dispositius",
|
||||
"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_name": "URL NetAlertX",
|
||||
"REPORT_ERROR": "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",
|
||||
@@ -694,7 +700,7 @@
|
||||
"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_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_name": "Mostra al mapa de presència",
|
||||
"UI_PRESENCE_name": "Mostra al mapa de detecció",
|
||||
"UI_REFRESH_description": "Introduïu el nombre de segons després del qual es recarrega la interfície d'usuari. Configura a <code>0</code> per desactivar.",
|
||||
"UI_REFRESH_name": "Auto-refresc UI",
|
||||
"VERSION_description": "Versió o valor timestamp per comprovar si l'aplicació va ser actualitzada.",
|
||||
|
||||
@@ -398,6 +398,8 @@
|
||||
"Maintenance_Running_Version": "",
|
||||
"Maintenance_Status": "",
|
||||
"Maintenance_Title": "",
|
||||
"Maintenance_Tool_DownloadConfig": "",
|
||||
"Maintenance_Tool_DownloadConfig_text": "",
|
||||
"Maintenance_Tool_ExportCSV": "",
|
||||
"Maintenance_Tool_ExportCSV_noti": "",
|
||||
"Maintenance_Tool_ExportCSV_noti_text": "",
|
||||
@@ -406,9 +408,13 @@
|
||||
"Maintenance_Tool_ImportCSV_noti": "",
|
||||
"Maintenance_Tool_ImportCSV_noti_text": "",
|
||||
"Maintenance_Tool_ImportCSV_text": "",
|
||||
"Maintenance_Tool_ImportConfig_noti": "",
|
||||
"Maintenance_Tool_ImportPastedCSV": "",
|
||||
"Maintenance_Tool_ImportPastedCSV_noti_text": "",
|
||||
"Maintenance_Tool_ImportPastedCSV_text": "",
|
||||
"Maintenance_Tool_ImportPastedConfig": "",
|
||||
"Maintenance_Tool_ImportPastedConfig_noti_text": "",
|
||||
"Maintenance_Tool_ImportPastedConfig_text": "",
|
||||
"Maintenance_Tool_arpscansw": "",
|
||||
"Maintenance_Tool_arpscansw_noti": "",
|
||||
"Maintenance_Tool_arpscansw_noti_text": "",
|
||||
|
||||
@@ -424,6 +424,8 @@
|
||||
"Maintenance_Running_Version": "Installierte Version",
|
||||
"Maintenance_Status": "Status",
|
||||
"Maintenance_Title": "Wartungswerkzeuge",
|
||||
"Maintenance_Tool_DownloadConfig": "",
|
||||
"Maintenance_Tool_DownloadConfig_text": "",
|
||||
"Maintenance_Tool_ExportCSV": "CSV Export",
|
||||
"Maintenance_Tool_ExportCSV_noti": "CSV Export",
|
||||
"Maintenance_Tool_ExportCSV_noti_text": "Sind Sie sich sicher, dass Sie die CSV-Datei erstellen wollen?",
|
||||
@@ -432,9 +434,13 @@
|
||||
"Maintenance_Tool_ImportCSV_noti": "CSV Import",
|
||||
"Maintenance_Tool_ImportCSV_noti_text": "Sind Sie sich sicher, dass Sie die CSV-Datei importieren wollen? Dies wird <b>alle Geräte in der Datenbank überschreiben</b>.",
|
||||
"Maintenance_Tool_ImportCSV_text": "Machen Sie ein Backup, bevor Sie diese Funktion nutzen. Importiere eine CSV-Datei (comma separated values) mit einer Liste aller Geräte und deren Beziehungen zwischen Netzwerkknoten und verbundenen Geräten. Um dies zu tun platziere die <b>devices.csv</b> benannte CSV-Datei in deinen <b>/config</b> Ordner.",
|
||||
"Maintenance_Tool_ImportConfig_noti": "",
|
||||
"Maintenance_Tool_ImportPastedCSV": "CSV-Import (Einfügen)",
|
||||
"Maintenance_Tool_ImportPastedCSV_noti_text": "",
|
||||
"Maintenance_Tool_ImportPastedCSV_text": "",
|
||||
"Maintenance_Tool_ImportPastedConfig": "",
|
||||
"Maintenance_Tool_ImportPastedConfig_noti_text": "",
|
||||
"Maintenance_Tool_ImportPastedConfig_text": "",
|
||||
"Maintenance_Tool_arpscansw": "ARP-Scan umschalten (ein/aus)",
|
||||
"Maintenance_Tool_arpscansw_noti": "ARP-Scan ein- oder ausschalten",
|
||||
"Maintenance_Tool_arpscansw_noti_text": "Wenn der Scan aus ist, bleibt er so lange aus bis er wieder aktiviert wird.",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"API_CUSTOM_SQL_description": "You can specify a custom SQL query which will generate a JSON file and then expose it via the <a href=\"/api/table_custom_endpoint.json\" target=\"_blank\"><code>table_custom_endpoint.json</code> file endpoint</a>.",
|
||||
"API_CUSTOM_SQL_name": "Custom endpoint",
|
||||
"API_TOKEN_description": "API token to secure communication, you can generate one or enter any value. It's sent in the request header. Used in the <code>SYNC</code> plugin, GraphQL server.",
|
||||
"API_TOKEN_description": "API token for secure communication. Generate one or enter any value. It's sent in the request header and used in the <code>SYNC</code> plugin, GraphQL server and other API endpoints. You can use the API endpoints to create custom integrations as descibed in the <a href=\"https://github.com/jokob-sk/NetAlertX/blob/main/docs/API.md\" target=\"_blank\">API documentation</a>.",
|
||||
"API_TOKEN_name": "API token",
|
||||
"API_display_name": "API",
|
||||
"API_icon": "<i class=\"fa fa-arrow-down-up-across-line\"></i>",
|
||||
@@ -398,17 +398,23 @@
|
||||
"Maintenance_Running_Version": "Installed version",
|
||||
"Maintenance_Status": "Status",
|
||||
"Maintenance_Title": "Maintenance tools",
|
||||
"Maintenance_Tool_ExportCSV": "CSV Export",
|
||||
"Maintenance_Tool_ExportCSV_noti": "CSV Export",
|
||||
"Maintenance_Tool_DownloadConfig": "Settings Export",
|
||||
"Maintenance_Tool_DownloadConfig_text": "Download a full backup of your Settings configuration stored in the <code>app.conf</code> file.",
|
||||
"Maintenance_Tool_ExportCSV": "Devices Export (csv)",
|
||||
"Maintenance_Tool_ExportCSV_noti": "Devices Export (csv)",
|
||||
"Maintenance_Tool_ExportCSV_noti_text": "Are you sure you want to generate a CSV file?",
|
||||
"Maintenance_Tool_ExportCSV_text": "Generate a CSV (comma separated value) file containing the list of Devices including the Network relationships between Network Nodes and connected devices. You can also trigger this by accessing this URL <code>your NetAlertX url/php/server/devices.php?action=ExportCSV</code> or by enabling the <a href=\"settings.php#CSVBCKP_header\">CSV Backup</a> plugin.",
|
||||
"Maintenance_Tool_ImportCSV": "CSV Import",
|
||||
"Maintenance_Tool_ImportCSV_noti": "CSV Import",
|
||||
"Maintenance_Tool_ExportCSV_text": "Generate a CSV (comma separated value) file containing the list of Devices including the Network relationships between Network Nodes and connected devices. You can also trigger this by accessing this URL <code>your_NetAlertX_url/php/server/devices.php?action=ExportCSV</code> or by enabling the <a href=\"settings.php#CSVBCKP_header\">CSV Backup</a> plugin.",
|
||||
"Maintenance_Tool_ImportCSV": "Devices Import (csv)",
|
||||
"Maintenance_Tool_ImportCSV_noti": "Devices Import (csv)",
|
||||
"Maintenance_Tool_ImportCSV_noti_text": "Are you sure you want to import the CSV file? This will completely <b>overwrite</b> the devices in your database.",
|
||||
"Maintenance_Tool_ImportCSV_text": "Before using this function, please make a backup. Import a CSV (comma separated value) file containing the list of Devices including the Network relationships between Network Nodes and connected devices. To do that place the CSV file named <b>devices.csv</b> into your <b>/config</b> folder.",
|
||||
"Maintenance_Tool_ImportPastedCSV": "CSV Import (Paste)",
|
||||
"Maintenance_Tool_ImportConfig_noti": "Settings Import (app.conf)",
|
||||
"Maintenance_Tool_ImportPastedCSV": "Devices Import (csv) (paste)",
|
||||
"Maintenance_Tool_ImportPastedCSV_noti_text": "Are you sure you want to import the pasted CSV? This will completely <b>overwrite</b> the devices in your database.",
|
||||
"Maintenance_Tool_ImportPastedCSV_text": "Before using this function, please make a backup. Import a CSV (comma separated value) file containing the list of Devices including the Network relationships between Network Nodes and connected devices.",
|
||||
"Maintenance_Tool_ImportPastedConfig": "Settings Import (paste)",
|
||||
"Maintenance_Tool_ImportPastedConfig_noti_text": "Are you sure you want to import the pasted config settings? This will completely <b>overwrite</b> the <code>app.conf</code> file.",
|
||||
"Maintenance_Tool_ImportPastedConfig_text": "Imports the <code>app.conf</code> file containing all the application Settings. You might want to download the current <code>app.conf</code> file first with the <b>Settings Export</b>.",
|
||||
"Maintenance_Tool_arpscansw": "Toggle arp-Scan (on/off)",
|
||||
"Maintenance_Tool_arpscansw_noti": "Toggle arp-Scan on or off",
|
||||
"Maintenance_Tool_arpscansw_noti_text": "When the scan has been switched off it remains off until it is activated again.",
|
||||
@@ -489,7 +495,7 @@
|
||||
"Maintenance_themeselector_lable": "Select Skin",
|
||||
"Maintenance_themeselector_text": "The change takes place on the server side, so it affects all devices in use.",
|
||||
"Maintenance_version": "App updates",
|
||||
"NETWORK_DEVICE_TYPES_description": "Which device types are allowed to be used as network devices in the Network view. The device type has to match exactly the <code>Type</code> setting on a specific device in Device details. Add it on teh Device via the <code>+</code> button. Do not remove existing types, only add new ones.",
|
||||
"NETWORK_DEVICE_TYPES_description": "Which device types are allowed to be used as network devices in the Network view. The device type has to match exactly the <code>Type</code> setting on a specific device in Device details. Add it on the Device via the <code>+</code> button. Do not remove existing types, only add new ones.",
|
||||
"NETWORK_DEVICE_TYPES_name": "Network device types",
|
||||
"Navigation_About": "About",
|
||||
"Navigation_Devices": "Devices",
|
||||
|
||||
@@ -422,6 +422,8 @@
|
||||
"Maintenance_Running_Version": "Versión instalada",
|
||||
"Maintenance_Status": "Situación",
|
||||
"Maintenance_Title": "Herramientas de mantenimiento",
|
||||
"Maintenance_Tool_DownloadConfig": "",
|
||||
"Maintenance_Tool_DownloadConfig_text": "",
|
||||
"Maintenance_Tool_ExportCSV": "Exportación CSV",
|
||||
"Maintenance_Tool_ExportCSV_noti": "Exportación CSV",
|
||||
"Maintenance_Tool_ExportCSV_noti_text": "¿Está seguro de que quiere generar un archivo CSV?",
|
||||
@@ -430,9 +432,13 @@
|
||||
"Maintenance_Tool_ImportCSV_noti": "Importación CSV",
|
||||
"Maintenance_Tool_ImportCSV_noti_text": "¿Estás seguro de que quieres importar el archivo CSV? Esto <b>sobrescribirá</b> completamente los dispositivos en su base de datos.",
|
||||
"Maintenance_Tool_ImportCSV_text": "Antes de usar esta función, haga una copia de seguridad. Importe un archivo CSV (valor separado por comas) que contiene la lista de dispositivos, incluidas las relaciones de red entre nodos de red y dispositivos conectados. Para hacer eso, coloque el archivo CSV llamado <b> devices.csv </b> en su carpeta <b>/config </b>.",
|
||||
"Maintenance_Tool_ImportConfig_noti": "",
|
||||
"Maintenance_Tool_ImportPastedCSV": "Importar CSV (Pegar)",
|
||||
"Maintenance_Tool_ImportPastedCSV_noti_text": "¿Seguro que desea importar el CSV pegado? Esto <b>sobrescribirá</b> completamente los dispositivos en su base de datos.",
|
||||
"Maintenance_Tool_ImportPastedCSV_text": "Antes de usar esta función, por favor haga una copia de seguridad. Importar un archivo CSV (valor separado por comas) que contiene la lista de Dispositivos incluyendo las relaciones de red entre los Nodos de red y los dispositivos conectados.",
|
||||
"Maintenance_Tool_ImportPastedConfig": "",
|
||||
"Maintenance_Tool_ImportPastedConfig_noti_text": "",
|
||||
"Maintenance_Tool_ImportPastedConfig_text": "",
|
||||
"Maintenance_Tool_arpscansw": "Activar arp-scan (on/off)",
|
||||
"Maintenance_Tool_arpscansw_noti": "Activar arp-scan on or off",
|
||||
"Maintenance_Tool_arpscansw_noti_text": "Cuando el escaneo se ha apagado, permanece apagado hasta que se active nuevamente.",
|
||||
|
||||
@@ -248,8 +248,8 @@
|
||||
"Donations_Title": "Dons",
|
||||
"ENABLE_PLUGINS_description": "Active les fonctionnalités des <a target=\"_blank\" href=\"https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins\">Plugins</a>. Charger des plugins nécessite plus de ressources, il est recommandé de les désactiver sur des systèmes de faible puissance.",
|
||||
"ENABLE_PLUGINS_name": "Activer les Plugins",
|
||||
"ENCRYPTION_KEY_description": "",
|
||||
"ENCRYPTION_KEY_name": "",
|
||||
"ENCRYPTION_KEY_description": "Clé de chiffrement des données.",
|
||||
"ENCRYPTION_KEY_name": "Clé de chiffrement",
|
||||
"Email_display_name": "Messagerie",
|
||||
"Email_icon": "<i class=\"fa fa-at\"></i>",
|
||||
"Events_Loading": "Chargement …",
|
||||
@@ -285,7 +285,7 @@
|
||||
"Events_Tablelenght": "Afficher _MENU_ entrées",
|
||||
"Events_Tablelenght_all": "Tous",
|
||||
"Events_Title": "Évènements",
|
||||
"GRAPHQL_PORT_description": "Le numéro de port du serveur GraphQL.",
|
||||
"GRAPHQL_PORT_description": "Le numéro de port du serveur GraphQL. Assurez vous sue le port est unique a l'échelle de toutes les applications sur cet hôte et vos instances NetAlertX.",
|
||||
"GRAPHQL_PORT_name": "Port GraphQL",
|
||||
"Gen_Action": "Action",
|
||||
"Gen_Add": "Ajouter",
|
||||
@@ -398,17 +398,23 @@
|
||||
"Maintenance_Running_Version": "Version installée",
|
||||
"Maintenance_Status": "État",
|
||||
"Maintenance_Title": "Outils de maintenance",
|
||||
"Maintenance_Tool_ExportCSV": "Export en CSV",
|
||||
"Maintenance_Tool_ExportCSV_noti": "Export en CSV",
|
||||
"Maintenance_Tool_DownloadConfig": "Export des paramètres",
|
||||
"Maintenance_Tool_DownloadConfig_text": "Télécharger une sauvegarde complète de vos paramètres stockés dans le fichier <code>app.conf</code>.",
|
||||
"Maintenance_Tool_ExportCSV": "Export des appareils (csv)",
|
||||
"Maintenance_Tool_ExportCSV_noti": "Export des appareils (csv)",
|
||||
"Maintenance_Tool_ExportCSV_noti_text": "Êtes-vous sûr de vouloir générer un fichier CSV ?",
|
||||
"Maintenance_Tool_ExportCSV_text": "Génère un fichier CSV (valeurs séparées par des virgules), contenant la liste des appareils, dont les liens entre nœuds Réseaux et les appareils connectés. Vous pouvez aussi lancer cet export depuis l'URL <code>votre URL de NetAlertX/php/server/devices.php?action=ExportCSV</code> ou en activant le plugin <a href=\"settings.php#CSVBCKP_header\">CSV Backup</a>.",
|
||||
"Maintenance_Tool_ImportCSV": "Import CSV",
|
||||
"Maintenance_Tool_ImportCSV_noti": "Import CSV",
|
||||
"Maintenance_Tool_ImportCSV": "Import des appareils (csv)",
|
||||
"Maintenance_Tool_ImportCSV_noti": "Import des appareils (csv)",
|
||||
"Maintenance_Tool_ImportCSV_noti_text": "Êtes-vous sûr de vouloir importer le fichier CSV ? Cela <b>écrasera</b> complètement les appareils de votre base de données.",
|
||||
"Maintenance_Tool_ImportCSV_text": "Avant d'utiliser cette fonctionnalité, il est recommandé de faire une sauvegarde. La fonctionnalité importe un fichier CSV (valeurs séparées par des virgules) contenant la liste des appareils, dont les liens réseau entre les nœuds du réseau et ces appareils. Pour cela, placer un fichier CSV nommé <b>devices.csv</b> dans votre répertoire <b>/config</b>.",
|
||||
"Maintenance_Tool_ImportPastedCSV": "Import CSV (coller)",
|
||||
"Maintenance_Tool_ImportConfig_noti": "Import des appareils (app.conf)",
|
||||
"Maintenance_Tool_ImportPastedCSV": "Import des appareils (csv) (coller)",
|
||||
"Maintenance_Tool_ImportPastedCSV_noti_text": "Êtes-vous sûr de vouloir importer les CSV copié ? Cela va complètement <b>remplacer</b> les appareils de votre base de données.",
|
||||
"Maintenance_Tool_ImportPastedCSV_text": "Avant d'utiliser cette fonctionnalité, il est recommandé de faire une sauvegarde. Importe un fichier CSV (valeurs séparées par des virgules) contenant la liste des appareils, dont les liens réseaux entre les nœuds du réseau et les appareils connectés.",
|
||||
"Maintenance_Tool_ImportPastedConfig": "Import des paramètres (coller)",
|
||||
"Maintenance_Tool_ImportPastedConfig_noti_text": "",
|
||||
"Maintenance_Tool_ImportPastedConfig_text": "",
|
||||
"Maintenance_Tool_arpscansw": "Basculer l'arp-Scan (activé/désactivé)",
|
||||
"Maintenance_Tool_arpscansw_noti": "Activer ou désactiver l'arp-Scan",
|
||||
"Maintenance_Tool_arpscansw_noti_text": "Une fois le scan désactivé, il reste désactivé jusqu'à ce qu'il soit réactivé.",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"API_CUSTOM_SQL_description": "Puoi specificare una query SQL personalizzata che genererà un file JSON e quindi lo esporrà tramite l'<a href=\"/api/table_custom_endpoint.json\" target=\"_blank\"><code>table_custom_endpoint.json</code>endpoint del file</a>.",
|
||||
"API_CUSTOM_SQL_name": "Endpoint personalizzato",
|
||||
"API_TOKEN_description": "Token API per proteggere la comunicazione, puoi generarne uno o inserire qualsiasi valore. Viene inviato nell'intestazione della richiesta. Usato nel plugin <code>SYNC</code>, server GraphQL.",
|
||||
"API_TOKEN_description": "Token API per comunicazioni sicure. Generane uno o inserisci un valore qualsiasi. Viene inviato nell'intestazione della richiesta e utilizzato nel plugin <code>SYNC</code>, nel server GraphQL e in altri endpoint API. Puoi utilizzare gli endpoint API per creare integrazioni personalizzate come descritto nella <a href=\"https://github.com/jokob-sk/NetAlertX/blob/main/docs/API.md\" target=\"_blank\">documentazione API</a>.",
|
||||
"API_TOKEN_name": "Token API",
|
||||
"API_display_name": "API",
|
||||
"API_icon": "<i class=\"fa fa-arrow-down-up-across-line\"></i>",
|
||||
@@ -398,17 +398,23 @@
|
||||
"Maintenance_Running_Version": "Versione installata",
|
||||
"Maintenance_Status": "Stato",
|
||||
"Maintenance_Title": "Strumenti di manutenzione",
|
||||
"Maintenance_Tool_ExportCSV": "Esporta CSV",
|
||||
"Maintenance_Tool_ExportCSV_noti": "Esporta CSV",
|
||||
"Maintenance_Tool_DownloadConfig": "Impostazioni Esporta",
|
||||
"Maintenance_Tool_DownloadConfig_text": "Scarica un backup completo della configurazione delle tue Impostazioni memorizzata nel file <code>app.conf</code>.",
|
||||
"Maintenance_Tool_ExportCSV": "Esporta dispositivi (csv)",
|
||||
"Maintenance_Tool_ExportCSV_noti": "Esporta dispositivi (csv)",
|
||||
"Maintenance_Tool_ExportCSV_noti_text": "Sei sicuro di voler generare un file CSV?",
|
||||
"Maintenance_Tool_ExportCSV_text": "Genera un file CSV (comma separated value) contenente la lista dei dispositivi incluse le relazioni di rete tra i nodi di rete e i dispositivi connessi. Puoi anche eseguire questa azione accedendo all'URL <code>il_tuo_NetAlertX/php/server/devices.php?action=ExportCSV</code> o abilitando il plugin <a href=\"settings.php#CSVBCKP_header\">Backup CSV</a>.",
|
||||
"Maintenance_Tool_ImportCSV": "Importa CSV",
|
||||
"Maintenance_Tool_ImportCSV_noti": "Importa CSV",
|
||||
"Maintenance_Tool_ImportCSV": "Importa dispositivi (csv)",
|
||||
"Maintenance_Tool_ImportCSV_noti": "Importa dispositivi (csv)",
|
||||
"Maintenance_Tool_ImportCSV_noti_text": "Sei sicuro di voler importare il file CSV? Questa operazione <b>sovrascriverà</b> tutti i dispositivi presenti nel database.",
|
||||
"Maintenance_Tool_ImportCSV_text": "Prima di utilizzare questa funzione, esegui un backup. Importa un file CSV (comma separated value) contenente la lista dei dispositivi incluse le relazioni di rete tra i nodi di rete e i dispositivi connessi. Per far ciò posiziona il file CSV denominato <b>devices.csv</b> nella cartella <b>/config</b>.",
|
||||
"Maintenance_Tool_ImportPastedCSV": "Importazione CSV (incolla)",
|
||||
"Maintenance_Tool_ImportConfig_noti": "Importa impostazioni (app.conf)",
|
||||
"Maintenance_Tool_ImportPastedCSV": "Importa dispositivi (csv) (incolla)",
|
||||
"Maintenance_Tool_ImportPastedCSV_noti_text": "Sei sicuro di voler importare il CSV incollato? Questo <b>sovrascriverà</b> completamente i dispositivi nel tuo database.",
|
||||
"Maintenance_Tool_ImportPastedCSV_text": "Prima di utilizzare questa funzione, esegui un backup. Importa un file CSV (valori separati da virgole) contenente l'elenco dei dispositivi, comprese le relazioni di rete tra i nodi di rete e i dispositivi collegati.",
|
||||
"Maintenance_Tool_ImportPastedConfig": "Importa impostazioni (incolla)",
|
||||
"Maintenance_Tool_ImportPastedConfig_noti_text": "Vuoi davvero importare le impostazioni di configurazione incollate? Questo <b>sovrascriverà</b> completamente il file <code>app.conf</code>.",
|
||||
"Maintenance_Tool_ImportPastedConfig_text": "Importa il file <code>app.conf</code> contenente tutte le impostazioni dell'applicazione. Potresti voler scaricare prima il file <code>app.conf</code> corrente con <b>Esporta impostazioni</b>.",
|
||||
"Maintenance_Tool_arpscansw": "Attiva/disattiva arp-Scan",
|
||||
"Maintenance_Tool_arpscansw_noti": "Attiva o disattiva arp-Scan",
|
||||
"Maintenance_Tool_arpscansw_noti_text": "Una volta disattivata la scansione rimane disattivata finché non viene nuovamente attivata.",
|
||||
|
||||
@@ -398,6 +398,8 @@
|
||||
"Maintenance_Running_Version": "Installert versjon",
|
||||
"Maintenance_Status": "Status",
|
||||
"Maintenance_Title": "Vedlikeholdsverktøy",
|
||||
"Maintenance_Tool_DownloadConfig": "",
|
||||
"Maintenance_Tool_DownloadConfig_text": "",
|
||||
"Maintenance_Tool_ExportCSV": "Eksporter CSV",
|
||||
"Maintenance_Tool_ExportCSV_noti": "Eksporter CSV",
|
||||
"Maintenance_Tool_ExportCSV_noti_text": "Er du sikker på at du vil generere en CSV-fil?",
|
||||
@@ -406,9 +408,13 @@
|
||||
"Maintenance_Tool_ImportCSV_noti": "Importer CSV",
|
||||
"Maintenance_Tool_ImportCSV_noti_text": "Er du sikker på at du vil importere CSV-filen? Dette vil fullstendig overskrive enhetene i databasen din.",
|
||||
"Maintenance_Tool_ImportCSV_text": "Før du bruker denne funksjonen, vennligst ta en sikkerhetskopi. Importer en CSV-fil (kommaseparert verdi) som inneholder listen over enheter, inkludert nettverksrelasjoner mellom nettverksnoder og tilkoblede enheter. For å gjøre det, plasser CSV-filen med navnet <b>devices.csv</b> i mappen <b>/config</b>.",
|
||||
"Maintenance_Tool_ImportConfig_noti": "",
|
||||
"Maintenance_Tool_ImportPastedCSV": "",
|
||||
"Maintenance_Tool_ImportPastedCSV_noti_text": "",
|
||||
"Maintenance_Tool_ImportPastedCSV_text": "",
|
||||
"Maintenance_Tool_ImportPastedConfig": "",
|
||||
"Maintenance_Tool_ImportPastedConfig_noti_text": "",
|
||||
"Maintenance_Tool_ImportPastedConfig_text": "",
|
||||
"Maintenance_Tool_arpscansw": "Slå arp-Scan (på/av)",
|
||||
"Maintenance_Tool_arpscansw_noti": "Slå arp-Scan på eller av",
|
||||
"Maintenance_Tool_arpscansw_noti_text": "Når skanningen er slått av, forblir den slått av til den aktiveres igjen.",
|
||||
|
||||
@@ -398,6 +398,8 @@
|
||||
"Maintenance_Running_Version": "Zainstalowana wersja",
|
||||
"Maintenance_Status": "Status",
|
||||
"Maintenance_Title": "Narzędzia konserwacyjne",
|
||||
"Maintenance_Tool_DownloadConfig": "",
|
||||
"Maintenance_Tool_DownloadConfig_text": "",
|
||||
"Maintenance_Tool_ExportCSV": "Eksport CSV",
|
||||
"Maintenance_Tool_ExportCSV_noti": "Eksport CSV",
|
||||
"Maintenance_Tool_ExportCSV_noti_text": "Jesteś pewien, że chcesz wygenerować plik CSV?",
|
||||
@@ -406,9 +408,13 @@
|
||||
"Maintenance_Tool_ImportCSV_noti": "Import CSV",
|
||||
"Maintenance_Tool_ImportCSV_noti_text": "Jesteś pewien że chcesz zaimportować plik CSV? Nadpisze to wszystkie urządzenie w bazie danych.",
|
||||
"Maintenance_Tool_ImportCSV_text": "Przed użyciem tej funkcji, wykonaj proszę kopię zapasową. Zaimportuj plik CSV (wartości oddzielone przecinkami) zawierający listę Urządzeń, w tym Relacji Sieci między sieciowymi węzłami i podłączonymi urządzeniami. By to zrobić umieść plik CSV nazwany <b>devices.csv</b> do twojego folderu <b>/config</b>.",
|
||||
"Maintenance_Tool_ImportConfig_noti": "",
|
||||
"Maintenance_Tool_ImportPastedCSV": "",
|
||||
"Maintenance_Tool_ImportPastedCSV_noti_text": "",
|
||||
"Maintenance_Tool_ImportPastedCSV_text": "",
|
||||
"Maintenance_Tool_ImportPastedConfig": "",
|
||||
"Maintenance_Tool_ImportPastedConfig_noti_text": "",
|
||||
"Maintenance_Tool_ImportPastedConfig_text": "",
|
||||
"Maintenance_Tool_arpscansw": "Przełącz Skan-arp (wł/wył)",
|
||||
"Maintenance_Tool_arpscansw_noti": "Przełącz Skan-arp na włączony lub wyłączony",
|
||||
"Maintenance_Tool_arpscansw_noti_text": "Kiedy skan zostanie przełączony na wył zostaje wyłączony do czasu ponownej aktywacji.",
|
||||
|
||||
@@ -398,6 +398,8 @@
|
||||
"Maintenance_Running_Version": "",
|
||||
"Maintenance_Status": "",
|
||||
"Maintenance_Title": "",
|
||||
"Maintenance_Tool_DownloadConfig": "",
|
||||
"Maintenance_Tool_DownloadConfig_text": "",
|
||||
"Maintenance_Tool_ExportCSV": "",
|
||||
"Maintenance_Tool_ExportCSV_noti": "",
|
||||
"Maintenance_Tool_ExportCSV_noti_text": "",
|
||||
@@ -406,9 +408,13 @@
|
||||
"Maintenance_Tool_ImportCSV_noti": "",
|
||||
"Maintenance_Tool_ImportCSV_noti_text": "",
|
||||
"Maintenance_Tool_ImportCSV_text": "",
|
||||
"Maintenance_Tool_ImportConfig_noti": "",
|
||||
"Maintenance_Tool_ImportPastedCSV": "",
|
||||
"Maintenance_Tool_ImportPastedCSV_noti_text": "",
|
||||
"Maintenance_Tool_ImportPastedCSV_text": "",
|
||||
"Maintenance_Tool_ImportPastedConfig": "",
|
||||
"Maintenance_Tool_ImportPastedConfig_noti_text": "",
|
||||
"Maintenance_Tool_ImportPastedConfig_text": "",
|
||||
"Maintenance_Tool_arpscansw": "",
|
||||
"Maintenance_Tool_arpscansw_noti": "",
|
||||
"Maintenance_Tool_arpscansw_noti_text": "",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"API_CUSTOM_SQL_description": "Вы можете указать собственный SQL-запрос, который будет генерировать файл JSON, а затем предоставлять его через конечную точку файла <a href=\"/api/table_custom_endpoint.json\" target=\"_blank\"><code>table_custom_endpoint.json</code></a>.",
|
||||
"API_CUSTOM_SQL_name": "Пользовательская конечная точка",
|
||||
"API_TOKEN_description": "API-токен для защиты соединения. Вы можете сгенерировать его или ввести любое значение. Он отправляется в заголовке запроса. Используется в плагине <code>SYNC</code> и GraphQL сервере.",
|
||||
"API_TOKEN_description": "API-токен для безопасной связи. Сгенерируйте его или введите любое значение. Он передается в заголовке запроса и используется в плагине <code>SYNC</code>, сервере GraphQL и других конечных точках API. Вы можете использовать конечные точки API для создания пользовательских интеграций, как описано в <a href=\"https://github.com/jokob-sk/NetAlertX/blob/main/docs/API.md\" target=\"_blank\">документации по API</a>.",
|
||||
"API_TOKEN_name": "API token",
|
||||
"API_display_name": "API",
|
||||
"API_icon": "<i class=\"fa fa-arrow-down-up-across-line\"></i>",
|
||||
@@ -248,8 +248,8 @@
|
||||
"Donations_Title": "Пожертвования",
|
||||
"ENABLE_PLUGINS_description": "Включает функциональность <a target=\"_blank\" href=\"https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins\">плагинов.</a> Загрузка плагинов требует больше аппаратных ресурсов, поэтому вы можете отключить их в маломощной системе.",
|
||||
"ENABLE_PLUGINS_name": "Разрешить плагины",
|
||||
"ENCRYPTION_KEY_description": "",
|
||||
"ENCRYPTION_KEY_name": "",
|
||||
"ENCRYPTION_KEY_description": "Ключ шифрования данных.",
|
||||
"ENCRYPTION_KEY_name": "Ключ шифрования",
|
||||
"Email_display_name": "Эл. почта",
|
||||
"Email_icon": "<i class=\"fa fa-at\"></i>",
|
||||
"Events_Loading": "Загрузка...",
|
||||
@@ -285,7 +285,7 @@
|
||||
"Events_Tablelenght": "Показать _MENU_ записей",
|
||||
"Events_Tablelenght_all": "Все",
|
||||
"Events_Title": "События",
|
||||
"GRAPHQL_PORT_description": "Номер порта сервера GraphQL.",
|
||||
"GRAPHQL_PORT_description": "Номер порта сервера GraphQL. Убедитесь, что порт уникален для всех ваших приложений на этом хосте и экземпляров NetAlertX.",
|
||||
"GRAPHQL_PORT_name": "Порт GraphQL",
|
||||
"Gen_Action": "Действия",
|
||||
"Gen_Add": "Добавить",
|
||||
@@ -398,6 +398,8 @@
|
||||
"Maintenance_Running_Version": "Установленная версия",
|
||||
"Maintenance_Status": "Статус",
|
||||
"Maintenance_Title": "Инструменты обслуживания",
|
||||
"Maintenance_Tool_DownloadConfig": "",
|
||||
"Maintenance_Tool_DownloadConfig_text": "",
|
||||
"Maintenance_Tool_ExportCSV": "Экспорт CSV",
|
||||
"Maintenance_Tool_ExportCSV_noti": "Экспорт CSV",
|
||||
"Maintenance_Tool_ExportCSV_noti_text": "Вы уверены, что хотите создать файл CSV?",
|
||||
@@ -406,9 +408,13 @@
|
||||
"Maintenance_Tool_ImportCSV_noti": "Импорт CSV",
|
||||
"Maintenance_Tool_ImportCSV_noti_text": "Вы уверены, что хотите импортировать файл CSV? Это полностью <b>перезапишет</b> устройства в вашей базе данных.",
|
||||
"Maintenance_Tool_ImportCSV_text": "Прежде чем использовать эту функцию, сделайте резервную копию. Импортируйте файл CSV (значения, разделенные запятыми), содержащий список устройств, включая сетевые отношения между сетевыми узлами и подключенными устройствами. Для этого поместите файл CSV с именем <b>devices.csv</b> в папку <b>/config</b>.",
|
||||
"Maintenance_Tool_ImportConfig_noti": "",
|
||||
"Maintenance_Tool_ImportPastedCSV": "Импорт CSV (вставка)",
|
||||
"Maintenance_Tool_ImportPastedCSV_noti_text": "Вы уверены, что хотите импортировать вставленный CSV? Это полностью <b>перезапишет</b> устройства в вашей базе данных.",
|
||||
"Maintenance_Tool_ImportPastedCSV_text": "Перед использованием этой функции, пожалуйста, создайте резервную копию. Импортируйте файл формата CSV (значения, разделенные запятыми), содержащий список устройств, включая сетевые связи между узлами сети и подключенными устройствами.",
|
||||
"Maintenance_Tool_ImportPastedConfig": "",
|
||||
"Maintenance_Tool_ImportPastedConfig_noti_text": "",
|
||||
"Maintenance_Tool_ImportPastedConfig_text": "",
|
||||
"Maintenance_Tool_arpscansw": "Переключить arp-скан (ВКЛ./ВЫКЛ.)",
|
||||
"Maintenance_Tool_arpscansw_noti": "Включить или выключить arp-скан",
|
||||
"Maintenance_Tool_arpscansw_noti_text": "Когда сканирование было выключено, оно остается выключенным до тех пор, пока не будет активировано снова.",
|
||||
@@ -489,7 +495,7 @@
|
||||
"Maintenance_themeselector_lable": "Выбрать Скин",
|
||||
"Maintenance_themeselector_text": "Изменение происходит на стороне сервера, поэтому оно затрагивает все используемые устройства.",
|
||||
"Maintenance_version": "Обновления приложения",
|
||||
"NETWORK_DEVICE_TYPES_description": "Какие типы устройств разрешено использовать в качестве сетевых устройств в представлении «Сеть». Тип устройства должен точно соответствовать настройке <code>Тип</code> на конкретном устройстве в разделе «Сведения об устройстве». Не удаляйте существующие типы, а только добавляйте новые.",
|
||||
"NETWORK_DEVICE_TYPES_description": "Какие типы устройств разрешено использовать в качестве сетевых устройств в представлении Сеть. Тип устройства должен точно соответствовать настройке <code>Type</code> для конкретного устройства в сведениях об устройстве. Добавьте его на устройство с помощью кнопки <code>+</code>. Не удаляйте существующие типы, а только добавляйте новые.",
|
||||
"NETWORK_DEVICE_TYPES_name": "Типы сетевых устройств",
|
||||
"Navigation_About": "О NetAlertX",
|
||||
"Navigation_Devices": "Устройства",
|
||||
|
||||
@@ -398,6 +398,8 @@
|
||||
"Maintenance_Running_Version": "Yüklenmiş sürüm",
|
||||
"Maintenance_Status": "Durum",
|
||||
"Maintenance_Title": "",
|
||||
"Maintenance_Tool_DownloadConfig": "",
|
||||
"Maintenance_Tool_DownloadConfig_text": "",
|
||||
"Maintenance_Tool_ExportCSV": "",
|
||||
"Maintenance_Tool_ExportCSV_noti": "",
|
||||
"Maintenance_Tool_ExportCSV_noti_text": "Bir CSV dosyası oluşturmak istediğinize emin misiniz?",
|
||||
@@ -406,9 +408,13 @@
|
||||
"Maintenance_Tool_ImportCSV_noti": "",
|
||||
"Maintenance_Tool_ImportCSV_noti_text": "",
|
||||
"Maintenance_Tool_ImportCSV_text": "",
|
||||
"Maintenance_Tool_ImportConfig_noti": "",
|
||||
"Maintenance_Tool_ImportPastedCSV": "",
|
||||
"Maintenance_Tool_ImportPastedCSV_noti_text": "",
|
||||
"Maintenance_Tool_ImportPastedCSV_text": "",
|
||||
"Maintenance_Tool_ImportPastedConfig": "",
|
||||
"Maintenance_Tool_ImportPastedConfig_noti_text": "",
|
||||
"Maintenance_Tool_ImportPastedConfig_text": "",
|
||||
"Maintenance_Tool_arpscansw": "",
|
||||
"Maintenance_Tool_arpscansw_noti": "",
|
||||
"Maintenance_Tool_arpscansw_noti_text": "",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"API_CUSTOM_SQL_description": "Ви можете вказати спеціальний SQL-запит, який створить файл JSON, а потім відкриє його через кінцеву точку файлу <a href=\"/api/table_custom_endpoint.json\" target=\"_blank\"><code>table_custom_endpoint.json</code></a>.",
|
||||
"API_CUSTOM_SQL_name": "Спеціальна кінцева точка",
|
||||
"API_TOKEN_description": "Маркер API для захисту зв’язку, ви можете створити його або ввести будь-яке значення. Його надсилають у заголовку запиту. Використовується в плагіні <code>SYNC</code>, сервер GraphQL.",
|
||||
"API_TOKEN_description": "Маркер API для безпечного зв’язку. Згенеруйте один або введіть будь-яке значення. Він надсилається в заголовку запиту та використовується в плагіні <code>SYNC</code>, сервері GraphQL та інших кінцевих точках API. Ви можете використовувати кінцеві точки API для створення спеціальних інтеграцій, як описано в <a href=\"https://github.com/jokob-sk/NetAlertX/blob/main/docs/API.md\" target=\"_blank\">API документація</a>.",
|
||||
"API_TOKEN_name": "Маркер API",
|
||||
"API_display_name": "API",
|
||||
"API_icon": "<i class=\"fa fa-arrow-down-up-across-line\"></i>",
|
||||
@@ -248,8 +248,8 @@
|
||||
"Donations_Title": "Пожертви",
|
||||
"ENABLE_PLUGINS_description": "Вмикає функції <a target=\"_blank\" href=\"https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins\">плагінів</a>. Завантаження плагінів вимагає більше апаратних ресурсів, тому ви можете вимкнути їх у системі з низьким енергоспоживанням.",
|
||||
"ENABLE_PLUGINS_name": "Увімкнути плагіни",
|
||||
"ENCRYPTION_KEY_description": "",
|
||||
"ENCRYPTION_KEY_name": "",
|
||||
"ENCRYPTION_KEY_description": "Ключ шифрування даних.",
|
||||
"ENCRYPTION_KEY_name": "Ключ шифрування",
|
||||
"Email_display_name": "Електронна пошта",
|
||||
"Email_icon": "<i class=\"fa fa-at\"></i>",
|
||||
"Events_Loading": "Завантаження...",
|
||||
@@ -285,7 +285,7 @@
|
||||
"Events_Tablelenght": "Показати записи _МЕНЮ_",
|
||||
"Events_Tablelenght_all": "все",
|
||||
"Events_Title": "Події",
|
||||
"GRAPHQL_PORT_description": "Номер порту сервера GraphQL.",
|
||||
"GRAPHQL_PORT_description": "Номер порту сервера GraphQL. Переконайтеся, що порт є унікальним для всіх ваших програм на цьому хості та екземплярах NetAlertX.",
|
||||
"GRAPHQL_PORT_name": "Порт GraphQL",
|
||||
"Gen_Action": "Дія",
|
||||
"Gen_Add": "додати",
|
||||
@@ -398,17 +398,23 @@
|
||||
"Maintenance_Running_Version": "Встановлена версія",
|
||||
"Maintenance_Status": "Статус",
|
||||
"Maintenance_Title": "Інструменти обслуговування",
|
||||
"Maintenance_Tool_ExportCSV": "Експорт CSV",
|
||||
"Maintenance_Tool_ExportCSV_noti": "Експорт CSV",
|
||||
"Maintenance_Tool_DownloadConfig": "Експорт налаштувань",
|
||||
"Maintenance_Tool_DownloadConfig_text": "Завантажте повну резервну копію конфігурації налаштувань, яка зберігається у файлі <code>app.conf</code>.",
|
||||
"Maintenance_Tool_ExportCSV": "Експорт пристроїв (csv)",
|
||||
"Maintenance_Tool_ExportCSV_noti": "Експорт пристроїв (csv)",
|
||||
"Maintenance_Tool_ExportCSV_noti_text": "Ви впевнені, що хочете створити файл CSV?",
|
||||
"Maintenance_Tool_ExportCSV_text": "Створіть файл CSV (значення, розділене комами), що містить список пристроїв, включаючи мережеві зв’язки між мережевими вузлами та підключеними пристроями. Ви також можете активувати це, перейшовши за цією URL-адресою <code>ваш NetAlertX url/php/server/devices.php?action=ExportCSV</code> або ввімкнувши <a href=\"settings.php#CSVBCKP_header\">Резервне копіювання CSV</a> плагін.",
|
||||
"Maintenance_Tool_ImportCSV": "Імпорт CSV",
|
||||
"Maintenance_Tool_ImportCSV_noti": "Імпорт CSV",
|
||||
"Maintenance_Tool_ExportCSV_text": "Створіть файл CSV (значення, розділене комами), що містить список пристроїв, включаючи мережеві зв’язки між мережевими вузлами та підключеними пристроями. Ви також можете активувати це, перейшовши за цією URL-адресою <code>your_NetAlertX_url/php/server/devices.php?action=ExportCSV</code> або ввімкнувши <a href=\"settings.php#CSVBCKP_header\">Резервне копіювання CSV</a > плагін.",
|
||||
"Maintenance_Tool_ImportCSV": "Імпорт пристроїв (csv)",
|
||||
"Maintenance_Tool_ImportCSV_noti": "Імпорт пристроїв (csv)",
|
||||
"Maintenance_Tool_ImportCSV_noti_text": "Ви впевнені, що бажаєте імпортувати файл CSV? Це повністю <b>перезапише</b> пристрої у вашій базі даних.",
|
||||
"Maintenance_Tool_ImportCSV_text": "Перед використанням цієї функції зробіть резервну копію. Імпортуйте файл CSV (значення, розділене комами), який містить список пристроїв, включаючи мережеві зв’язки між мережевими вузлами та підключеними пристроями. Для цього помістіть файл CSV під назвою <b>devices.csv</b> у папку <b>/config</b>.",
|
||||
"Maintenance_Tool_ImportPastedCSV": "Імпорт CSV (вставити)",
|
||||
"Maintenance_Tool_ImportConfig_noti": "Імпорт налаштувань (app.conf)",
|
||||
"Maintenance_Tool_ImportPastedCSV": "Імпорт пристроїв (csv) (вставити)",
|
||||
"Maintenance_Tool_ImportPastedCSV_noti_text": "Ви впевнені, що бажаєте імпортувати вставлений CSV? Це повністю <b>перезапише</b> пристрої у вашій базі даних.",
|
||||
"Maintenance_Tool_ImportPastedCSV_text": "Перед використанням цієї функції зробіть резервну копію. Імпортуйте файл CSV (значення, розділене комами), що містить список пристроїв, включаючи мережеві зв’язки між мережевими вузлами та підключеним пристроєм.",
|
||||
"Maintenance_Tool_ImportPastedConfig": "Імпорт налаштувань (вставити)",
|
||||
"Maintenance_Tool_ImportPastedConfig_noti_text": "Ви впевнені, що бажаєте імпортувати вставлені налаштування конфігурації? Це повністю <b>перезапише</b> файл <code>app.conf</code>.",
|
||||
"Maintenance_Tool_ImportPastedConfig_text": "Імпортує файл <code>app.conf</code>, який містить усі налаштування програми. Ви можете спочатку завантажити поточний файл <code>app.conf</code> за допомогою <b>Експорту налаштувань</b>.",
|
||||
"Maintenance_Tool_arpscansw": "Перемикач arp-сканування (увімк./вимк.)",
|
||||
"Maintenance_Tool_arpscansw_noti": "Увімкніть або вимкніть arp-Scan",
|
||||
"Maintenance_Tool_arpscansw_noti_text": "Коли сканування було вимкнено, воно залишається вимкненим, доки не буде активовано знову.",
|
||||
@@ -489,7 +495,7 @@
|
||||
"Maintenance_themeselector_lable": "Виберіть Скін",
|
||||
"Maintenance_themeselector_text": "Зміна відбувається на стороні сервера, тому вона впливає на всі пристрої, які використовуються.",
|
||||
"Maintenance_version": "Оновлення програми",
|
||||
"NETWORK_DEVICE_TYPES_description": "Які типи пристроїв можна використовувати як мережеві пристрої в поданні мережі. Тип пристрою має точно відповідати налаштуванню <code>Тип</code> на певному пристрої в Деталях пристрою. Не видаляйте існуючі типи, лише додайте нові.",
|
||||
"NETWORK_DEVICE_TYPES_description": "Які типи пристроїв дозволено використовувати як мережеві пристрої в поданні мережі. Тип пристрою має точно відповідати налаштуванню <code>Тип</code> на певному пристрої в Деталях пристрою. Додайте його на пристрій за допомогою кнопки <code>+</code>. Не видаляйте існуючі типи, лише додайте нові.",
|
||||
"NETWORK_DEVICE_TYPES_name": "Типи мережевих пристроїв",
|
||||
"Navigation_About": "про",
|
||||
"Navigation_Devices": "Пристрої",
|
||||
|
||||
@@ -398,6 +398,8 @@
|
||||
"Maintenance_Running_Version": "安装版本",
|
||||
"Maintenance_Status": "状态",
|
||||
"Maintenance_Title": "维护工具",
|
||||
"Maintenance_Tool_DownloadConfig": "",
|
||||
"Maintenance_Tool_DownloadConfig_text": "",
|
||||
"Maintenance_Tool_ExportCSV": "CSV 导出",
|
||||
"Maintenance_Tool_ExportCSV_noti": "CSV 导出",
|
||||
"Maintenance_Tool_ExportCSV_noti_text": "您确定要生成 CSV 文件吗?",
|
||||
@@ -406,9 +408,13 @@
|
||||
"Maintenance_Tool_ImportCSV_noti": "CSV 导入",
|
||||
"Maintenance_Tool_ImportCSV_noti_text": "您确定要导入 CSV 文件吗?这将完全<b>覆盖</b>数据库中的设备。",
|
||||
"Maintenance_Tool_ImportCSV_text": "在使用此功能之前,请先备份。导入一个 CSV(逗号分隔值)文件,其中包含设备列表,包括网络节点和连接设备之间的网络关系。为此,请将名为 <b>devices.csv</b> 的 CSV 文件放入您的 <b>/config</b> 文件夹中。",
|
||||
"Maintenance_Tool_ImportConfig_noti": "",
|
||||
"Maintenance_Tool_ImportPastedCSV": "CSV 导入(粘贴)",
|
||||
"Maintenance_Tool_ImportPastedCSV_noti_text": "您确定要导入粘贴的 CSV 吗?这将完全<b>覆盖</b>数据库中的设备。",
|
||||
"Maintenance_Tool_ImportPastedCSV_text": "使用此功能前,请先备份。导入一个包含设备列表(包括网络节点和所连接设备之间的网络关系)的 CSV(逗号分隔值)文件。",
|
||||
"Maintenance_Tool_ImportPastedConfig": "",
|
||||
"Maintenance_Tool_ImportPastedConfig_noti_text": "",
|
||||
"Maintenance_Tool_ImportPastedConfig_text": "",
|
||||
"Maintenance_Tool_arpscansw": "切换 arp 扫描(开/关)",
|
||||
"Maintenance_Tool_arpscansw_noti": "打开或关闭 arp 扫描",
|
||||
"Maintenance_Tool_arpscansw_noti_text": "当扫描关闭时,它会保持关闭状态,直到再次激活为止。",
|
||||
|
||||
@@ -40,6 +40,7 @@ Device-detecting plugins insert values into the `CurrentScan` database table. T
|
||||
| `INTRSPD` | ♻ | Internet speed test | | | Script | [internet_speedtest](/front/plugins/internet_speedtest/) |
|
||||
| `IPNEIGH` | 🔍 | Scan ARP (IPv4) and NDP (IPv6) tables | | | Script | [ipneigh](/front/plugins/ipneigh/) |
|
||||
| `LUCIRPC` | 🔍 | Import connected devices from OpenWRT | | | Script | [luci_import](/front/plugins/luci_import/) |
|
||||
| `ASUSWRT` | 🔍 | Import connected devices from AsusWRT | | | Script | [asuswrt_import](/front/plugins/asuswrt_import/) |
|
||||
| `MAINT` | ⚙ | Maintenance of logs, etc. | | | Script | [maintenance](/front/plugins/maintenance/) |
|
||||
| `MQTT` | ▶️ | MQTT for synching to Home Assistant | | | Script | [_publisher_mqtt](/front/plugins/_publisher_mqtt/) |
|
||||
| `NBTSCAN` | 🆎 | Nbtscan (NetBIOS-based) name resolution | | | Script | [nbtscan_scan](/front/plugins/nbtscan_scan/) |
|
||||
|
||||
@@ -331,7 +331,7 @@
|
||||
{
|
||||
"column": "Object_PrimaryID",
|
||||
"mapped_to_column": "cur_MAC",
|
||||
"css_classes": "col-sm-2",
|
||||
"css_classes": "col-sm-3",
|
||||
"show": true,
|
||||
"type": "device_name_mac",
|
||||
"default_value": "",
|
||||
@@ -340,7 +340,7 @@
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "MAC"
|
||||
"string": "MAC (name)"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -27,9 +27,7 @@ Logger(get_setting_value('LOG_LEVEL'))
|
||||
pluginName = "PUSHOVER"
|
||||
|
||||
LOG_PATH = logPath + '/plugins'
|
||||
RESULT_FILE = os.path.join(LOG_PATH, "last_result.log")
|
||||
|
||||
|
||||
RESULT_FILE = os.path.join(LOG_PATH, f'last_result.{pluginName}.log')
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
@@ -385,7 +385,7 @@
|
||||
{
|
||||
"column": "Object_PrimaryID",
|
||||
"mapped_to_column": "cur_MAC",
|
||||
"css_classes": "col-sm-2",
|
||||
"css_classes": "col-sm-3",
|
||||
"show": true,
|
||||
"type": "device_name_mac",
|
||||
"default_value": "",
|
||||
@@ -394,15 +394,7 @@
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "MAC"
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "MAC"
|
||||
},
|
||||
{
|
||||
"language_code": "de_de",
|
||||
"string": "MAC"
|
||||
"string": "MAC (name)"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -419,14 +411,6 @@
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "IP"
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "IP"
|
||||
},
|
||||
{
|
||||
"language_code": "de_de",
|
||||
"string": "IP"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
20
front/plugins/asuswrt_import/README.md
Executable file
20
front/plugins/asuswrt_import/README.md
Executable file
@@ -0,0 +1,20 @@
|
||||
## Overview
|
||||
|
||||
Plugin that imports device IP, MAC, Name, Vendor and Online status from AsusWRT and AsusWRT-Merlin based routers.
|
||||
|
||||
This Plugin is using awesome [asusrouter](https://github.com/Vaskivskyi/asusrouter) library. Please check if your router is supported by it [here](https://github.com/Vaskivskyi/asusrouter?tab=readme-ov-file#supported-devices).
|
||||
|
||||
### Usage
|
||||
|
||||
- Enable the `ASUSWRT` plugin
|
||||
- Head to **Settings** > **AsusWRT device import** to adjust the default values.
|
||||
|
||||
### Notes
|
||||
|
||||
- In case an existing imported device is renamed in Asus Router it will not be renamed in NetAlertX. In this case it has to be done manually or the device should be removed and it will appear on the next scan.
|
||||
|
||||
## Other info
|
||||
|
||||
Version: 1.0.0
|
||||
Date: 16.1.2025
|
||||
Author: @labmonkey
|
||||
528
front/plugins/asuswrt_import/config.json
Executable file
528
front/plugins/asuswrt_import/config.json
Executable file
@@ -0,0 +1,528 @@
|
||||
{
|
||||
"code_name": "asuswrt_import",
|
||||
"show_ui": true,
|
||||
"unique_prefix": "ASUSWRT",
|
||||
"plugin_type": "device_scanner",
|
||||
"execution_order": "Layer_1",
|
||||
"enabled": true,
|
||||
"data_source": "script",
|
||||
"mapped_to_table": "CurrentScan",
|
||||
"data_filters": [
|
||||
{
|
||||
"compare_column": "Object_PrimaryID",
|
||||
"compare_operator": "==",
|
||||
"compare_field_id": "txtMacFilter",
|
||||
"compare_js_template": "'{value}'.toString()",
|
||||
"compare_use_quotes": true
|
||||
}
|
||||
],
|
||||
"localized": [
|
||||
"display_name",
|
||||
"description",
|
||||
"icon"
|
||||
],
|
||||
"display_name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "AsusWRT device import"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "The plugin is used to import connected devices from AsusWRT"
|
||||
}
|
||||
],
|
||||
"icon": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "<i class=\"fa fa-search\"></i>"
|
||||
}
|
||||
],
|
||||
"params": [],
|
||||
"settings": [
|
||||
{
|
||||
"function": "RUN",
|
||||
"events": [
|
||||
"run"
|
||||
],
|
||||
"type": {
|
||||
"dataType": "string",
|
||||
"elements": [
|
||||
{
|
||||
"elementType": "select",
|
||||
"elementOptions": [],
|
||||
"transformers": []
|
||||
}
|
||||
]
|
||||
},
|
||||
"default_value": "disabled",
|
||||
"options": [
|
||||
"disabled",
|
||||
"once",
|
||||
"schedule"
|
||||
],
|
||||
"localized": [
|
||||
"name",
|
||||
"description"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "When to run"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "When the plugin should run. Good options are <code>schedule</code>"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "RUN_SCHD",
|
||||
"type": {
|
||||
"dataType": "string",
|
||||
"elements": [
|
||||
{
|
||||
"elementType": "input",
|
||||
"elementOptions": [],
|
||||
"transformers": []
|
||||
}
|
||||
]
|
||||
},
|
||||
"default_value": "*/5 * * * *",
|
||||
"options": [],
|
||||
"localized": [
|
||||
"name",
|
||||
"description"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Schedule"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Only enabled if you select <code>schedule</code> in the <a href=\"#SYNC_RUN\"><code>SYNC_RUN</code> setting</a>. Make sure you enter the schedule in the correct cron-like format (e.g. validate at <a href=\"https://crontab.guru/\" target=\"_blank\">crontab.guru</a>). For example entering <code>0 4 * * *</code> will run the scan after 4 am in the <a onclick=\"toggleAllSettings()\" href=\"#TIMEZONE\"><code>TIMEZONE</code> you set above</a>. Will be run NEXT time the time passes."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "CMD",
|
||||
"type": {
|
||||
"dataType": "string",
|
||||
"elements": [
|
||||
{
|
||||
"elementType": "input",
|
||||
"elementOptions": [
|
||||
{
|
||||
"readonly": "true"
|
||||
}
|
||||
],
|
||||
"transformers": []
|
||||
}
|
||||
]
|
||||
},
|
||||
"default_value": "python3 /app/front/plugins/asuswrt_import/script.py",
|
||||
"options": [],
|
||||
"localized": [
|
||||
"name",
|
||||
"description"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Command"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Command to run. This can not be changed"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "RUN_TIMEOUT",
|
||||
"type": {
|
||||
"dataType": "integer",
|
||||
"elements": [
|
||||
{
|
||||
"elementType": "input",
|
||||
"elementOptions": [
|
||||
{
|
||||
"type": "number"
|
||||
}
|
||||
],
|
||||
"transformers": []
|
||||
}
|
||||
]
|
||||
},
|
||||
"default_value": 30,
|
||||
"options": [],
|
||||
"localized": [
|
||||
"name",
|
||||
"description"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Run timeout"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Maximum time in seconds to wait for the script to finish. If this time is exceeded the script is aborted."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "host",
|
||||
"type": {
|
||||
"dataType": "string",
|
||||
"elements": [
|
||||
{
|
||||
"elementType": "input",
|
||||
"elementOptions": [],
|
||||
"transformers": []
|
||||
}
|
||||
]
|
||||
},
|
||||
"default_value": "192.168.1.1",
|
||||
"options": [],
|
||||
"localized": [
|
||||
"name",
|
||||
"description"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Router ip"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Router ip(do not include <code>http://</code> or <code>https://</code>)."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "user",
|
||||
"type": {
|
||||
"dataType": "string",
|
||||
"elements": [
|
||||
{
|
||||
"elementType": "input",
|
||||
"elementOptions": [],
|
||||
"transformers": []
|
||||
}
|
||||
]
|
||||
},
|
||||
"default_value": "admin",
|
||||
"options": [],
|
||||
"localized": [
|
||||
"name",
|
||||
"description"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Router user"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "User name used to login into your router."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "password",
|
||||
"type": {
|
||||
"dataType": "string",
|
||||
"elements": [
|
||||
{
|
||||
"elementType": "input",
|
||||
"elementOptions": [
|
||||
{
|
||||
"type": "password"
|
||||
}
|
||||
],
|
||||
"transformers": []
|
||||
}
|
||||
]
|
||||
},
|
||||
"default_value": "",
|
||||
"options": [],
|
||||
"localized": [
|
||||
"name",
|
||||
"description"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Router password"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Password used to login into your router."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "ssl",
|
||||
"type": {
|
||||
"dataType": "boolean",
|
||||
"elements": [
|
||||
{
|
||||
"elementType": "input",
|
||||
"elementOptions": [
|
||||
{
|
||||
"type": "checkbox"
|
||||
}
|
||||
],
|
||||
"transformers": []
|
||||
}
|
||||
]
|
||||
},
|
||||
"default_value": false,
|
||||
"options": [],
|
||||
"localized": [
|
||||
"name",
|
||||
"description"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Router SSL"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "If your router enforces SSL connections."
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"database_column_definitions": [
|
||||
{
|
||||
"column": "Index",
|
||||
"css_classes": "col-sm-2",
|
||||
"show": true,
|
||||
"type": "none",
|
||||
"default_value": "",
|
||||
"options": [],
|
||||
"localized": [
|
||||
"name"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Index"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"column": "Object_PrimaryID",
|
||||
"css_classes": "col-sm-2",
|
||||
"default_value": "",
|
||||
"localized": [
|
||||
"name"
|
||||
],
|
||||
"mapped_to_column": "cur_MAC",
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "MAC address"
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "Dirección MAC"
|
||||
},
|
||||
{
|
||||
"language_code": "de_de",
|
||||
"string": "MAC Adresse"
|
||||
}
|
||||
],
|
||||
"options": [],
|
||||
"show": true,
|
||||
"type": "device_mac"
|
||||
},
|
||||
{
|
||||
"column": "Object_SecondaryID",
|
||||
"css_classes": "col-sm-2",
|
||||
"default_value": "",
|
||||
"localized": [
|
||||
"name"
|
||||
],
|
||||
"mapped_to_column": "cur_IP",
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "IP"
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "IP"
|
||||
},
|
||||
{
|
||||
"language_code": "de_de",
|
||||
"string": "IP"
|
||||
}
|
||||
],
|
||||
"options": [],
|
||||
"show": true,
|
||||
"type": "device_ip"
|
||||
},
|
||||
{
|
||||
"column": "Watched_Value1",
|
||||
"css_classes": "col-sm-2",
|
||||
"default_value": "",
|
||||
"localized": [
|
||||
"name"
|
||||
],
|
||||
"mapped_to_column": "cur_Name",
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Hostname"
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "Nombre de host"
|
||||
},
|
||||
{
|
||||
"language_code": "de_de",
|
||||
"string": "Name des Hosts"
|
||||
}
|
||||
],
|
||||
"options": [],
|
||||
"show": true,
|
||||
"type": "label"
|
||||
},
|
||||
{
|
||||
"column": "Watched_Value2",
|
||||
"mapped_to_column": "cur_Vendor",
|
||||
"css_classes": "col-sm-2",
|
||||
"default_value": "",
|
||||
"localized": [
|
||||
"name"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Vendor"
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "Proveedor"
|
||||
},
|
||||
{
|
||||
"language_code": "de_de",
|
||||
"string": "Hersteller"
|
||||
}
|
||||
],
|
||||
"options": [],
|
||||
"show": true,
|
||||
"type": "label"
|
||||
},
|
||||
{
|
||||
"column": "Dummy",
|
||||
"mapped_to_column": "cur_ScanMethod",
|
||||
"mapped_to_column_data": {
|
||||
"value": "ASUSWRT"
|
||||
},
|
||||
"css_classes": "col-sm-2",
|
||||
"show": true,
|
||||
"type": "label",
|
||||
"default_value": "",
|
||||
"options": [],
|
||||
"localized": [
|
||||
"name"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Scan method"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"column": "DateTimeCreated",
|
||||
"css_classes": "col-sm-2",
|
||||
"show": true,
|
||||
"type": "label",
|
||||
"default_value": "",
|
||||
"options": [],
|
||||
"localized": [
|
||||
"name"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Created"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"column": "DateTimeChanged",
|
||||
"css_classes": "col-sm-2",
|
||||
"show": true,
|
||||
"type": "label",
|
||||
"default_value": "",
|
||||
"options": [],
|
||||
"localized": [
|
||||
"name"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Changed"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"column": "Status",
|
||||
"css_classes": "col-sm-1",
|
||||
"show": true,
|
||||
"type": "replace",
|
||||
"default_value": "",
|
||||
"options": [
|
||||
{
|
||||
"equals": "watched-not-changed",
|
||||
"replacement": "<div style='text-align:center'><i class='fa-solid fa-square-check'></i><div></div>"
|
||||
},
|
||||
{
|
||||
"equals": "watched-changed",
|
||||
"replacement": "<div style='text-align:center'><i class='fa-solid fa-triangle-exclamation'></i></div>"
|
||||
},
|
||||
{
|
||||
"equals": "new",
|
||||
"replacement": "<div style='text-align:center'><i class='fa-solid fa-circle-plus'></i></div>"
|
||||
},
|
||||
{
|
||||
"equals": "missing-in-last-scan",
|
||||
"replacement": "<div style='text-align:center'><i class='fa-solid fa-question'></i></div>"
|
||||
}
|
||||
],
|
||||
"localized": [
|
||||
"name"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Status"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
108
front/plugins/asuswrt_import/script.py
Executable file
108
front/plugins/asuswrt_import/script.py
Executable file
@@ -0,0 +1,108 @@
|
||||
#!/usr/bin/env python
|
||||
import os
|
||||
import sys
|
||||
|
||||
INSTALL_PATH = "/app"
|
||||
sys.path.extend([f"{INSTALL_PATH}/front/plugins", f"{INSTALL_PATH}/server"])
|
||||
pluginName = "ASUSWRT"
|
||||
|
||||
import asyncio
|
||||
|
||||
import aiohttp
|
||||
import conf
|
||||
from asusrouter import AsusData, AsusRouter
|
||||
from asusrouter.modules.connection import ConnectionState
|
||||
from const import logPath
|
||||
from helper import get_setting_value
|
||||
from logger import Logger, mylog
|
||||
from plugin_helper import (Plugin_Object, Plugin_Objects, decodeBase64,
|
||||
handleEmpty)
|
||||
from pytz import timezone
|
||||
|
||||
conf.tz = timezone(get_setting_value("TIMEZONE"))
|
||||
|
||||
Logger(get_setting_value("LOG_LEVEL"))
|
||||
|
||||
LOG_PATH = logPath + "/plugins"
|
||||
LOG_FILE = os.path.join(LOG_PATH, f"script.{pluginName}.log")
|
||||
RESULT_FILE = os.path.join(LOG_PATH, f"last_result.{pluginName}.log")
|
||||
|
||||
plugin_objects = Plugin_Objects(RESULT_FILE)
|
||||
|
||||
|
||||
def main():
|
||||
mylog("verbose", [f"[{pluginName}] started."])
|
||||
|
||||
device_data = get_device_data()
|
||||
|
||||
mylog(
|
||||
"verbose",
|
||||
[f"[{pluginName}] Found '{len(device_data)}' devices"],
|
||||
)
|
||||
|
||||
filtered_devices = [
|
||||
(key, device)
|
||||
for key, device in device_data.items()
|
||||
if device.state == ConnectionState.CONNECTED
|
||||
]
|
||||
|
||||
mylog(
|
||||
"verbose",
|
||||
[f"[{pluginName}] Processing '{len(filtered_devices)}' connected devices"],
|
||||
)
|
||||
|
||||
for mac, device in filtered_devices:
|
||||
entry_mac = str(device.description.mac).lower()
|
||||
|
||||
plugin_objects.add_object(
|
||||
primaryId=entry_mac,
|
||||
secondaryId=handleEmpty(device.connection.ip_address),
|
||||
watched1=handleEmpty(device.description.name),
|
||||
watched2=handleEmpty(device.description.vendor),
|
||||
extra=pluginName,
|
||||
foreignKey=entry_mac,
|
||||
)
|
||||
|
||||
plugin_objects.write_result_file()
|
||||
|
||||
mylog("verbose", [f"[{pluginName}] finished"])
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
def get_device_data():
|
||||
# Create a new event loop
|
||||
loop = asyncio.new_event_loop()
|
||||
|
||||
# Create aiohttp session
|
||||
session = aiohttp.ClientSession(loop=loop)
|
||||
|
||||
router = AsusRouter( # required - both IP and URL supported
|
||||
hostname=get_setting_value("ASUSWRT_host"), # required
|
||||
username=get_setting_value("ASUSWRT_user"), # required
|
||||
password=get_setting_value("ASUSWRT_password"), # required
|
||||
use_ssl=get_setting_value("ASUSWRT_ssl"), # optional
|
||||
session=session, # optional
|
||||
)
|
||||
|
||||
# Connect to the router
|
||||
loop.run_until_complete(router.async_connect())
|
||||
|
||||
if router.connected:
|
||||
mylog("verbose", [f"[{pluginName}] logged in successfully."])
|
||||
else:
|
||||
mylog("error", [f"[{pluginName}] failed to login."])
|
||||
return []
|
||||
|
||||
# Now you can use the router object to call methods
|
||||
clients = loop.run_until_complete(router.async_get_data(AsusData.CLIENTS))
|
||||
|
||||
# Remember to disconnect and close the session when you're done
|
||||
loop.run_until_complete(router.async_disconnect())
|
||||
loop.run_until_complete(session.close())
|
||||
|
||||
return clients
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -108,12 +108,12 @@ def execute_name_lookup(ip, timeout):
|
||||
output = ""
|
||||
|
||||
try:
|
||||
mylog('verbose', [f'[{pluginName}] DEBUG CMD :', args])
|
||||
mylog('debug', [f'[{pluginName}] DEBUG CMD :', args])
|
||||
|
||||
# Run the subprocess with a forced timeout
|
||||
output = subprocess.check_output(args, universal_newlines=True, stderr=subprocess.STDOUT, timeout=timeout)
|
||||
|
||||
mylog('verbose', [f'[{pluginName}] DEBUG OUTPUT : {output}'])
|
||||
mylog('debug', [f'[{pluginName}] DEBUG OUTPUT : {output}'])
|
||||
|
||||
domain_name = ''
|
||||
|
||||
@@ -129,20 +129,20 @@ def execute_name_lookup(ip, timeout):
|
||||
else:
|
||||
mylog('verbose', [f'[{pluginName}] ⚠ ERROR - Unexpected output format: {line}'])
|
||||
|
||||
mylog('verbose', [f'[{pluginName}] Domain Name: {domain_name}'])
|
||||
mylog('debug', [f'[{pluginName}] Domain Name: {domain_name}'])
|
||||
|
||||
return domain_name
|
||||
|
||||
except subprocess.CalledProcessError as e:
|
||||
mylog('verbose', [f'[{pluginName}] ⚠ ERROR - {e.output}'])
|
||||
mylog('none', [f'[{pluginName}] ⚠ ERROR - {e.output}'])
|
||||
|
||||
except subprocess.TimeoutExpired:
|
||||
mylog('verbose', [f'[{pluginName}] TIMEOUT - the process forcefully terminated as timeout reached'])
|
||||
mylog('none', [f'[{pluginName}] TIMEOUT - the process forcefully terminated as timeout reached'])
|
||||
|
||||
if output == "":
|
||||
mylog('verbose', [f'[{pluginName}] Scan: FAIL - check logs'])
|
||||
mylog('none', [f'[{pluginName}] Scan: FAIL - check logs'])
|
||||
else:
|
||||
mylog('verbose', [f'[{pluginName}] Scan: SUCCESS'])
|
||||
mylog('debug', [f'[{pluginName}] Scan: SUCCESS'])
|
||||
|
||||
return ''
|
||||
|
||||
@@ -151,13 +151,13 @@ def ensure_avahi_running(attempt=1, max_retries=2):
|
||||
"""
|
||||
Ensure that D-Bus is running and the Avahi daemon is started, with recursive retry logic.
|
||||
"""
|
||||
mylog('verbose', [f'[{pluginName}] Attempt {attempt} - Ensuring D-Bus and Avahi daemon are running...'])
|
||||
mylog('debug', [f'[{pluginName}] Attempt {attempt} - Ensuring D-Bus and Avahi daemon are running...'])
|
||||
|
||||
# Check rc-status
|
||||
try:
|
||||
subprocess.run(['rc-status'], check=True)
|
||||
except subprocess.CalledProcessError as e:
|
||||
mylog('verbose', [f'[{pluginName}] ⚠ ERROR - Failed to check rc-status: {e.output}'])
|
||||
mylog('none', [f'[{pluginName}] ⚠ ERROR - Failed to check rc-status: {e.output}'])
|
||||
return
|
||||
|
||||
# Create OpenRC soft level
|
||||
@@ -167,42 +167,42 @@ def ensure_avahi_running(attempt=1, max_retries=2):
|
||||
try:
|
||||
subprocess.run(['rc-update', 'add', 'avahi-daemon'], check=True)
|
||||
except subprocess.CalledProcessError as e:
|
||||
mylog('verbose', [f'[{pluginName}] ⚠ ERROR - Failed to add Avahi to runlevel: {e.output}'])
|
||||
mylog('none', [f'[{pluginName}] ⚠ ERROR - Failed to add Avahi to runlevel: {e.output}'])
|
||||
return
|
||||
|
||||
# Start the D-Bus service
|
||||
try:
|
||||
subprocess.run(['rc-service', 'dbus', 'start'], check=True)
|
||||
except subprocess.CalledProcessError as e:
|
||||
mylog('verbose', [f'[{pluginName}] ⚠ ERROR - Failed to start D-Bus: {e.output}'])
|
||||
mylog('none', [f'[{pluginName}] ⚠ ERROR - Failed to start D-Bus: {e.output}'])
|
||||
return
|
||||
|
||||
# Check Avahi status
|
||||
status_output = subprocess.run(['rc-service', 'avahi-daemon', 'status'], capture_output=True, text=True)
|
||||
if 'started' in status_output.stdout:
|
||||
mylog('verbose', [f'[{pluginName}] Avahi Daemon is already running.'])
|
||||
mylog('debug', [f'[{pluginName}] Avahi Daemon is already running.'])
|
||||
return
|
||||
|
||||
mylog('verbose', [f'[{pluginName}] Avahi Daemon is not running, attempting to start... (Attempt {attempt})'])
|
||||
mylog('none', [f'[{pluginName}] Avahi Daemon is not running, attempting to start... (Attempt {attempt})'])
|
||||
|
||||
# Start the Avahi daemon
|
||||
try:
|
||||
subprocess.run(['rc-service', 'avahi-daemon', 'start'], check=True)
|
||||
except subprocess.CalledProcessError as e:
|
||||
mylog('verbose', [f'[{pluginName}] ⚠ ERROR - Failed to start Avahi daemon: {e.output}'])
|
||||
mylog('none', [f'[{pluginName}] ⚠ ERROR - Failed to start Avahi daemon: {e.output}'])
|
||||
|
||||
# Check status after starting
|
||||
status_output = subprocess.run(['rc-service', 'avahi-daemon', 'status'], capture_output=True, text=True)
|
||||
if 'started' in status_output.stdout:
|
||||
mylog('verbose', [f'[{pluginName}] Avahi Daemon successfully started.'])
|
||||
mylog('debug', [f'[{pluginName}] Avahi Daemon successfully started.'])
|
||||
return
|
||||
|
||||
# Retry if not started and attempts are left
|
||||
if attempt < max_retries:
|
||||
mylog('verbose', [f'[{pluginName}] Retrying... ({attempt + 1}/{max_retries})'])
|
||||
mylog('debug', [f'[{pluginName}] Retrying... ({attempt + 1}/{max_retries})'])
|
||||
ensure_avahi_running(attempt + 1, max_retries)
|
||||
else:
|
||||
mylog('verbose', [f'[{pluginName}] ⚠ ERROR - Avahi Daemon failed to start after {max_retries} attempts.'])
|
||||
mylog('none', [f'[{pluginName}] ⚠ ERROR - Avahi Daemon failed to start after {max_retries} attempts.'])
|
||||
|
||||
# rc-update add avahi-daemon
|
||||
# rc-service avahi-daemon status
|
||||
|
||||
@@ -231,7 +231,7 @@
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "MAC"
|
||||
"string": "MAC (name)"
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
|
||||
@@ -524,7 +524,7 @@
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "MAC"
|
||||
"string": "MAC (name)"
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
# Based on the work of https://github.com/leiweibau/Pi.Alert
|
||||
|
||||
import subprocess
|
||||
import os
|
||||
from datetime import datetime
|
||||
|
||||
import sys
|
||||
@@ -15,6 +16,8 @@ from logger import mylog, Logger
|
||||
from helper import timeNowTZ, get_setting_value
|
||||
import conf
|
||||
from pytz import timezone
|
||||
from const import logPath
|
||||
|
||||
|
||||
# Make sure the TIMEZONE for logging is correct
|
||||
conf.tz = timezone(get_setting_value('TIMEZONE'))
|
||||
@@ -22,10 +25,16 @@ conf.tz = timezone(get_setting_value('TIMEZONE'))
|
||||
# Make sure log level is initialized correctly
|
||||
Logger(get_setting_value('LOG_LEVEL'))
|
||||
|
||||
pluginName = 'DHCPSRVS'
|
||||
|
||||
LOG_PATH = logPath + '/plugins'
|
||||
LOG_FILE = os.path.join(LOG_PATH, f'script.{pluginName}.log')
|
||||
RESULT_FILE = os.path.join(LOG_PATH, f'last_result.{pluginName}.log')
|
||||
|
||||
def main():
|
||||
|
||||
mylog('verbose', ['[DHCPSRVS] In script'])
|
||||
RESULT_FILE = 'last_result.log'
|
||||
|
||||
last_run_logfile = open(RESULT_FILE, 'a')
|
||||
last_run_logfile.write("")
|
||||
|
||||
|
||||
@@ -307,7 +307,7 @@
|
||||
{
|
||||
"column": "Object_PrimaryID",
|
||||
"mapped_to_column": "cur_MAC",
|
||||
"css_classes": "col-sm-2",
|
||||
"css_classes": "col-sm-3",
|
||||
"show": true,
|
||||
"type": "device_name_mac",
|
||||
"default_value": "",
|
||||
@@ -318,7 +318,7 @@
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "MAC"
|
||||
"string": "MAC (name)"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -233,7 +233,7 @@
|
||||
{
|
||||
"column": "Object_PrimaryID",
|
||||
"mapped_to_column": "cur_MAC",
|
||||
"css_classes": "col-sm-2",
|
||||
"css_classes": "col-sm-3",
|
||||
"show": true,
|
||||
"type": "device_name_mac",
|
||||
"default_value": "",
|
||||
@@ -244,7 +244,7 @@
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "MAC"
|
||||
"string": "MAC (name)"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -408,7 +408,7 @@
|
||||
{
|
||||
"column": "Object_PrimaryID",
|
||||
"mapped_to_column": "cur_MAC",
|
||||
"css_classes": "col-sm-2",
|
||||
"css_classes": "col-sm-3",
|
||||
"show": true,
|
||||
"type": "device_name_mac",
|
||||
"default_value": "",
|
||||
@@ -417,7 +417,7 @@
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "MAC"
|
||||
"string": "MAC (name)"
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
|
||||
@@ -38,7 +38,6 @@ LOG_FILE = os.path.join(LOG_PATH, f'script.{pluginName}.log')
|
||||
RESULT_FILE = os.path.join(LOG_PATH, f'last_result.{pluginName}.log')
|
||||
|
||||
|
||||
|
||||
no_internet_ip = '0.0.0.0'
|
||||
|
||||
def main():
|
||||
@@ -55,10 +54,13 @@ def main():
|
||||
PREV_IP = values.prev_ip.split('=')[1]
|
||||
DIG_GET_IP_ARG = get_setting_value("INTRNT_DIG_GET_IP_ARG")
|
||||
|
||||
new_internet_IP = no_internet_ip
|
||||
|
||||
mylog('verbose', [f'[{pluginName}] INTRNT_DIG_GET_IP_ARG: ', DIG_GET_IP_ARG])
|
||||
|
||||
# METHOD 1: dig
|
||||
# perform the new IP lookup N times specified by the INTRNT_TRIES setting
|
||||
new_internet_IP = ""
|
||||
|
||||
INTRNT_RETRIES = get_setting_value("INTRNT_RETRIES")
|
||||
retries_needed = 0
|
||||
|
||||
@@ -66,12 +68,22 @@ def main():
|
||||
|
||||
new_internet_IP, cmd_output = check_internet_IP( PREV_IP, DIG_GET_IP_ARG)
|
||||
|
||||
#todo: use `curl ifconfig.me/ip` if above fails
|
||||
|
||||
if new_internet_IP == no_internet_ip:
|
||||
time.sleep(1*i) # Exponential backoff strategy
|
||||
else:
|
||||
retries_needed = i
|
||||
break
|
||||
|
||||
# METHOD 2: curl
|
||||
if new_internet_IP == no_internet_ip:
|
||||
new_internet_IP, cmd_output = fallback_check_ip()
|
||||
mylog('verbose', [f'[{pluginName}] Curl Fallback (new_internet_IP|cmd_output): {new_internet_IP} | {cmd_output}'])
|
||||
|
||||
# logging
|
||||
append_line_to_file (logPath + '/IP_changes.log', '['+str(timeNowTZ()) +']\t'+ new_internet_IP +'\n')
|
||||
|
||||
plugin_objects = Plugin_Objects(RESULT_FILE)
|
||||
|
||||
plugin_objects.add_object(
|
||||
@@ -110,9 +122,6 @@ def check_internet_IP ( PREV_IP, DIG_GET_IP_ARG ):
|
||||
|
||||
mylog('verbose', [f'[{pluginName}] previous_IP : {previous_IP}'])
|
||||
|
||||
# logging
|
||||
append_line_to_file (logPath + '/IP_changes.log', '['+str(timeNowTZ()) +']\t'+ internet_IP +'\n')
|
||||
|
||||
return internet_IP, cmd_output
|
||||
|
||||
|
||||
@@ -139,6 +148,21 @@ def get_internet_IP (DIG_GET_IP_ARG):
|
||||
|
||||
return IP, cmd_output
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
def fallback_check_ip():
|
||||
"""Fallback mechanism using `curl ifconfig.me/ip`."""
|
||||
try:
|
||||
cmd_output = subprocess.check_output(['curl', '-s', 'ifconfig.me/ip'], text=True).strip()
|
||||
if cmd_output and re.match(r"^\d{1,3}(\.\d{1,3}){3}$", cmd_output):
|
||||
mylog('verbose', [f'[{pluginName}] Fallback IP retrieved via curl: {cmd_output}'])
|
||||
return cmd_output, f'Fallback via curl: "{cmd_output}"'
|
||||
else:
|
||||
mylog('verbose', [f'[{pluginName}] Invalid IP received from fallback'])
|
||||
return no_internet_ip, f'Fallback via curl failed: "{cmd_output}"'
|
||||
except Exception as e:
|
||||
mylog('none', [f'[{pluginName}] Fallback curl exception: {e}'])
|
||||
return no_internet_ip, f'Fallback via curl exception: "{e}"'
|
||||
|
||||
#===============================================================================
|
||||
# BEGIN
|
||||
#===============================================================================
|
||||
|
||||
@@ -205,7 +205,7 @@
|
||||
{
|
||||
"column": "Object_PrimaryID",
|
||||
"mapped_to_column": "cur_MAC",
|
||||
"css_classes": "col-sm-2",
|
||||
"css_classes": "col-sm-3",
|
||||
"show": true,
|
||||
"type": "device_name_mac",
|
||||
"default_value": "",
|
||||
@@ -216,7 +216,7 @@
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "MAC"
|
||||
"string": "MAC (name)"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -380,7 +380,7 @@
|
||||
{
|
||||
"column": "Object_PrimaryID",
|
||||
"mapped_to_column": "cur_MAC",
|
||||
"css_classes": "col-sm-2",
|
||||
"css_classes": "col-sm-3",
|
||||
"show": true,
|
||||
"type": "device_name_mac",
|
||||
"default_value": "",
|
||||
@@ -389,7 +389,7 @@
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "MAC"
|
||||
"string": "MAC (name)"
|
||||
},
|
||||
{
|
||||
"language_code": "ru_ru",
|
||||
|
||||
@@ -1,7 +1,27 @@
|
||||
## Overview
|
||||
|
||||
Plugin for device name discovery via the Mikrotik dhcp-server leases
|
||||
The plugin uses the MikroTik API to discover devices by retrieving DHCP lease information.
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- API must be enabled in `API > Interfaces` on your MikroTik router.
|
||||
- A user must be created in `System > Users` on your MikroTik router. Read-only permissions are recommended for security.
|
||||
|
||||
### Usage
|
||||
|
||||
- Check the Settings page for details.
|
||||
It is recommended to use this plugin in scheduled mode for continuous device discovery and monitoring.
|
||||
|
||||
In the Settings section of NetAlertX, provide the following parameters:
|
||||
|
||||
- **MTSCAN_MT_HOST**: IP address of the MikroTik router (default: `192.168.88.1`).
|
||||
- **MTSCAN_MT_PORT**: Port for the MikroTik API (default: `8728`).
|
||||
- **MTSCAN_MT_USER**: Username for the MikroTik router.
|
||||
- **MTSCAN_MT_PASS**: Password for the MikroTik router.
|
||||
|
||||
### Device name resolution order
|
||||
|
||||
To assign a meaningful device name, the plugin resolves it in the following order:
|
||||
|
||||
- **Comment**: The `comment` field in the MikroTik router's DHCP lease configuration. This is useful for naming static leases of known devies.
|
||||
- **Hostname**: The hostname provided by the device during DHCP negotiation.
|
||||
- **"(unknown)"**: as the fallback name, allowing other plugins to resolve the device name later.
|
||||
|
||||
@@ -265,7 +265,7 @@
|
||||
{
|
||||
"column": "Object_PrimaryID",
|
||||
"mapped_to_column": "cur_MAC",
|
||||
"css_classes": "col-sm-2",
|
||||
"css_classes": "col-sm-3",
|
||||
"show": true,
|
||||
"type": "device_name_mac",
|
||||
"default_value": "",
|
||||
|
||||
@@ -239,7 +239,7 @@
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "MAC"
|
||||
"string": "MAC (name)"
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
|
||||
@@ -5,6 +5,9 @@ NMAP-scan is a command-line tool to discover and fingerprint IP hosts on the loc
|
||||
> [!NOTE]
|
||||
> The `NMAPDEV` plugin is great for detecting the availability of devices, however ARP scan might be better covering multiple VLANS and subnets as NMAP can't pickup the MAC address from other subnets (this is an NMAP limitation) which are necessary to identify a device. You can always combine different scan methods. You can find all available network scanning options (marked as `🔍 dev scanner`) in the [Plugins overview](https://github.com/jokob-sk/NetAlertX/blob/main/front/plugins/README.md) readme.
|
||||
|
||||
|
||||
This plugin is not the best for name resolution (Use e.g.: `NSLOOKUP`, `AVAHISCAN` instead), however if available a name will be displayed in the `Resolved Name` column.
|
||||
|
||||
### Usage
|
||||
|
||||
- Go to settings and set the `SCAN_SUBNETS` setting as per [subnets documentation](https://github.com/jokob-sk/NetAlertX/blob/main/docs/SUBNETS.md).
|
||||
|
||||
@@ -389,7 +389,7 @@
|
||||
{
|
||||
"column": "Object_PrimaryID",
|
||||
"mapped_to_column": "cur_MAC",
|
||||
"css_classes": "col-sm-2",
|
||||
"css_classes": "col-sm-3",
|
||||
"show": true,
|
||||
"type": "device_name_mac",
|
||||
"default_value": "",
|
||||
@@ -398,15 +398,7 @@
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "MAC"
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "MAC"
|
||||
},
|
||||
{
|
||||
"language_code": "de_de",
|
||||
"string": "MAC"
|
||||
"string": "MAC (name)"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -423,14 +415,6 @@
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "IP"
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "IP"
|
||||
},
|
||||
{
|
||||
"language_code": "de_de",
|
||||
"string": "IP"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -446,7 +430,7 @@
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Name"
|
||||
"string": "Resolved Name"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -75,7 +75,6 @@ def main():
|
||||
foreignKey = entry.mac
|
||||
)
|
||||
|
||||
# generate last_result.log file
|
||||
plugin_objects.write_result_file()
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
@@ -230,7 +230,7 @@
|
||||
},
|
||||
{
|
||||
"column": "Object_PrimaryID",
|
||||
"css_classes": "col-sm-2",
|
||||
"css_classes": "col-sm-3",
|
||||
"show": true,
|
||||
"type": "device_name_mac",
|
||||
"default_value": "",
|
||||
@@ -239,11 +239,7 @@
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "MAC"
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "MAC"
|
||||
"string": "MAC (name)"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -259,10 +255,6 @@
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "IP"
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
"string": "IP"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -465,7 +465,7 @@
|
||||
{
|
||||
"column": "Object_PrimaryID",
|
||||
"mapped_to_column": "cur_MAC",
|
||||
"css_classes": "col-sm-2",
|
||||
"css_classes": "col-sm-3",
|
||||
"show": true,
|
||||
"type": "device_name_mac",
|
||||
"default_value": "",
|
||||
@@ -474,7 +474,7 @@
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "MAC"
|
||||
"string": "MAC (name)"
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
|
||||
@@ -34,6 +34,12 @@ Confirm SNMP enabled
|
||||
show snmp
|
||||
````
|
||||
|
||||
### Setup for (old) procurve switches
|
||||
|
||||
```
|
||||
snmpwalk -v 2c -c XXXXXX -On -Ovq 192.168.45.58 .1.3.6.1.2.1.4.22.1.3.102
|
||||
```
|
||||
|
||||
### Notes
|
||||
|
||||
- Only IPv4 supported.
|
||||
|
||||
@@ -449,7 +449,7 @@
|
||||
{
|
||||
"column": "Object_PrimaryID",
|
||||
"mapped_to_column": "cur_MAC",
|
||||
"css_classes": "col-sm-2",
|
||||
"css_classes": "col-sm-3",
|
||||
"show": true,
|
||||
"type": "device_name_mac",
|
||||
"default_value": "",
|
||||
@@ -458,7 +458,7 @@
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "MAC"
|
||||
"string": "MAC (name)"
|
||||
},
|
||||
{
|
||||
"language_code": "es_es",
|
||||
|
||||
@@ -493,6 +493,34 @@
|
||||
"string": "UI theme to use. System will auto switch between Light and Dark."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "TOPOLOGY_ORDER",
|
||||
"type": {
|
||||
"dataType": "array",
|
||||
"elements": [
|
||||
{
|
||||
"elementType": "select",
|
||||
"elementOptions": [{ "multiple": "false", "orderable": "false" }],
|
||||
"transformers": []
|
||||
}
|
||||
]
|
||||
},
|
||||
"default_value": "Name",
|
||||
"options": ["Name","Port"],
|
||||
"localized": ["name", "description"],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Order by in Network"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Based on which value should the network topology view be ordered."
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -358,7 +358,7 @@
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "MAC"
|
||||
"string": "MAC (name)"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -135,7 +135,10 @@ function processColumnValue(dbColumnDef, value, index, type) {
|
||||
<span>`;
|
||||
break;
|
||||
case 'device_name_mac':
|
||||
value = createDeviceLink(value);
|
||||
value = `<div class="text-center"> ${value}
|
||||
<br/>
|
||||
(${createDeviceLink(value)})
|
||||
</div>`;
|
||||
break;
|
||||
case 'device_mac':
|
||||
value = `<span class="anonymizeMac"><a href="/deviceDetails.php?mac=${value}" target="_blank">${value}</a><span>`;
|
||||
@@ -150,7 +153,7 @@ function processColumnValue(dbColumnDef, value, index, type) {
|
||||
$.each(dbColumnDef.options, function(index, obj) {
|
||||
if(Number(value) < Number(obj.maximum) && valueTmp == '')
|
||||
{
|
||||
valueTmp = `<div style="background-color:${obj.hexColor}">${value}</div>`
|
||||
valueTmp = `<div class="thresholdFormControl" style="background-color:${obj.hexColor}">${value}</div>`
|
||||
// return;
|
||||
}
|
||||
});
|
||||
@@ -365,10 +368,16 @@ function getObjectData(prefix, colDefinitions, pluginObj) {
|
||||
}
|
||||
|
||||
function getHistoryData(prefix, colDefinitions, pluginObj) {
|
||||
// Extract history data for the plugin, limiting to the first 50 entries for performance
|
||||
|
||||
return pluginHistory
|
||||
.filter((history, index) => history.Plugin === prefix && index < 50) // Filter history for the specific plugin
|
||||
.map(history => colDefinitions.map(colDef => history[colDef.column] || '')); // Map to the defined columns
|
||||
.filter(history => history.Plugin === prefix) // First, filter based on the plugin prefix
|
||||
.sort((a, b) => b.Index - a.Index) // Then, sort by the Index field in descending order
|
||||
.slice(0, 50) // Limit the result to the first 50 entries
|
||||
.map(object =>
|
||||
colDefinitions.map(colDef =>
|
||||
getFormControl(colDef, object[colDef.column], object["Index"], colDefinitions, object)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
function generateTabNavigation(prefix, objectCount, eventCount, historyCount) {
|
||||
|
||||
@@ -1,185 +0,0 @@
|
||||
<!-- ---------------------------------------------------------------------------
|
||||
# NetAlertX
|
||||
# Open Source Network Guard / WIFI & LAN intrusion detector
|
||||
#
|
||||
# repot_template.html - Back module. Template to email reporting in HTML format
|
||||
#-------------------------------------------------------------------------------
|
||||
# Puche 2021 GNU GPLv3
|
||||
#--------------------------------------------------------------------------- -->
|
||||
<html>
|
||||
<head></head>
|
||||
<body>
|
||||
<font face=sans-serif>
|
||||
<table align=center width=100% cellpadding=0 cellspacing=0 style="border-radius: 5px;">
|
||||
<tr>
|
||||
<td bgcolor=#3c8dbc align=center style="padding: 20px 10px 10px 10px; font-size: 30px; font-weight: bold; color:#ffffff; border-top-right-radius: 5px; border-top-left-radius: 5px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2)">
|
||||
Net<b>Alert</b><sup>x</sup>
|
||||
<svg version="1.0" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid meet" height="24pt" viewBox="0 0 30 30" width="24pt">
|
||||
<g fill="#000000" stroke="none" transform="translate(0.000000,30) scale(0.02,-0.02)">
|
||||
<path d="M605 1473 c-16 -3 -34 -9 -39 -14 -6 -5 -20 -9 -33 -9 -13 0 -23 -5 -23 -10 0 -5 -3 -9 -7 -8 -14 4 -53 -13 -53 -22 0 -5 -6 -7 -14 -4 -7 3 -27 -6 -44 -20 -16 -15 -34 -26 -39 -26 -6 0 -18 -10 -29 -21 -10 -12 -29 -25 -42 -30 -13 -5 -21 -13 -18 -18 3 -5 -4 -11 -15 -14 -12 -3 -18 -10 -15 -15 3 -5 -6 -14 -19 -20 -14 -7 -25 -18 -25 -27 0 -8 -5 -15 -12 -15 -9 0 -9 -3 -1 -11 9 -9 29 4 80 51 37 34 87 75 110 90 44 30 167 90 184 90 18 0 89 40 89 50 0 6 -1 9 -2 9 -2 -1 -16 -4 -33 -6z"></path>
|
||||
<path d="M883 1454 c15 -8 55 -23 90 -34 82 -26 201 -97 257 -155 25 -25 58 -52 73 -59 l28 -12 -111 -98 -111 -97 -27 27 c-165 168 -463 163 -636 -10 l-36 -37 -58 49 c-175 149 -185 155 -200 135 -8 -10 -20 -32 -27 -49 -8 -17 -21 -36 -30 -44 -9 -7 -13 -21 -10 -31 4 -12 1 -21 -9 -25 -9 -4 -16 -11 -15 -18 1 -6 -3 -24 -9 -39 -7 -16 -10 -33 -6 -38 3 -5 0 -9 -6 -9 -7 0 -10 -7 -6 -15 3 -8 2 -15 -2 -15 -5 0 -8 -20 -7 -45 0 -25 -2 -45 -5 -45 -8 0 -5 -155 4 -207 4 -24 12 -45 17 -49 5 -3 9 -14 9 -25 0 -10 4 -27 10 -37 16 -29 43 -97 42 -104 -1 -5 3 -8 10 -8 6 0 9 -3 6 -6 -4 -3 1 -14 10 -23 31 -33 52 -61 52 -70 0 -5 8 -11 19 -14 14 -3 91 57 286 225 151 129 274 227 281 224 7 -3 130 -97 273 -210 160 -126 266 -203 275 -200 17 7 66 78 66 97 0 8 9 22 20 32 11 10 20 26 20 36 0 10 5 21 10 24 6 4 8 10 5 15 -6 10 14 50 30 62 6 5 5 8 -4 8 -11 0 -11 3 -1 15 7 8 9 15 4 15 -5 0 -2 5 6 10 11 7 12 10 2 10 -9 0 -11 7 -6 23 10 30 11 96 2 91 -5 -3 -8 -18 -8 -33 0 -15 -4 -31 -9 -36 -5 -6 -24 -53 -42 -105 -34 -102 -84 -199 -105 -207 -13 -5 -474 351 -474 367 0 5 31 37 70 71 38 35 72 69 75 77 10 26 -25 63 -81 88 -105 46 -254 24 -323 -50 -35 -37 -22 -67 54 -127 36 -28 65 -57 65 -64 0 -7 -10 -20 -22 -28 -13 -8 -117 -96 -233 -196 -116 -99 -215 -181 -221 -181 -10 0 -37 35 -76 100 -8 14 -29 65 -47 114 -27 76 -31 102 -32 190 -1 58 6 132 15 175 17 77 88 241 104 241 5 0 52 -34 103 -75 52 -42 104 -78 117 -81 21 -6 67 21 112 65 8 8 49 30 90 50 70 32 82 35 172 34 90 0 102 -3 170 -35 40 -20 90 -49 112 -67 21 -17 47 -31 57 -31 10 0 59 34 109 76 56 47 96 74 105 70 25 -9 124 -237 125 -287 0 -8 6 -23 13 -32 18 -26 10 129 -9 158 -8 13 -11 30 -8 40 5 13 4 16 -4 11 -8 -4 -12 0 -12 11 0 10 -7 27 -15 37 -8 10 -12 23 -9 27 3 5 0 9 -6 9 -6 0 -8 5 -5 10 3 6 2 10 -3 10 -5 0 -15 14 -22 30 -7 17 -16 30 -21 30 -5 0 -9 5 -9 11 0 7 -11 22 -25 35 -14 13 -25 25 -25 28 0 11 -50 55 -70 61 -11 3 -20 10 -20 15 0 13 -72 60 -81 54 -4 -2 -13 5 -19 16 -6 12 -21 20 -35 20 -14 0 -25 5 -25 10 0 6 -8 10 -19 10 -10 0 -35 7 -54 15 -20 8 -53 15 -74 15 l-38 -1 28 -15z m16 -545 c52 -26 60 -34 49 -44 -34 -33 -183 -155 -188 -155 -6 0 -161 119 -184 141 -12 11 14 33 79 64 75 37 162 35 244 -6z"></path>
|
||||
<path d="M673 437 l-82 -72 89 -3 c50 -1 131 -1 181 0 l92 3 -95 73 c-53 39 -97 72 -99 71 -2 0 -41 -33 -86 -72z m125 -3 c31 -21 19 -34 -34 -34 -47 0 -57 13 -26 36 22 18 33 17 60 -2z"></path>
|
||||
<path d="M369 175 c-23 -20 -48 -34 -56 -31 -7 3 -13 4 -13 2 0 -7 52 -38 67 -40 8 -1 24 -11 36 -21 12 -11 31 -21 41 -22 11 -2 25 -8 32 -14 7 -6 25 -12 41 -14 15 -2 29 -4 31 -6 1 -1 7 -3 12 -4 6 -1 11 -4 13 -5 20 -18 315 -13 351 6 16 8 36 14 45 14 9 0 21 4 27 8 5 5 35 19 66 31 31 13 71 36 87 52 17 16 36 29 43 29 7 0 0 12 -15 25 l-28 25 -369 0 -368 0 -43 -35z m741 -15 c0 -13 -99 -62 -193 -94 -101 -35 -201 -38 -317 -9 -147 37 -223 79 -183 102 24 14 693 15 693 1z"></path>
|
||||
</g>
|
||||
</svg>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor=#2656f1 width=100% align=center style="padding: 20px 10px 10px 10px; font-size: 20px; font-weight: bold; color:#ffffff; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2)">
|
||||
<a style="color:#ffffff;cursor:pointer;" href="https://github.com/jokob-sk/NetAlertX/releases">🆕 New version available 🆕</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table width=100% border=0 bgcolor=#00c0ef cellpadding=5px cellspacing=0 style="border-collapse: collapse; font-size: 15px; text-align:center; color:#404040">
|
||||
<tr>
|
||||
<td width=100%> Report Date: <b>2023-01-30 22:17</b> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor=#F5F5F5 height=200 valign=top style="padding: 10px">
|
||||
<table style="border-collapse: collapse; font-size: 12px; color:#70707" width="100%" cellspacing="0" cellpadding="3px" bordercolor="#C0C0C0" border="1">
|
||||
<tr>
|
||||
<th width='120px' style='color:blue; font-size: 12px;' bgcolor='#909090' >New devices</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table style="border-collapse: collapse; font-size: 12px; color:#70707" width="100%" cellspacing="0" cellpadding="3px" bordercolor="#C0C0C0" border="1">
|
||||
<tr>
|
||||
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >MAC</th>
|
||||
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >Datetime</th>
|
||||
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >IP</th>
|
||||
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >Event Type</th>
|
||||
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >Device name</th>
|
||||
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >Comments</th>
|
||||
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >Device Vendor</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://192.168.1.1:20211/deviceDetails.php?mac=00:00:00:ef:a5:6c">00:00:00:ef:a5:6c</a></td>
|
||||
<td>2023-01-30 22:15:09</td>
|
||||
<td>192.168.1.1</td>
|
||||
<td>New Device</td>
|
||||
<td>(name not found)</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://192.168.1.1:20211/deviceDetails.php?mac=00:00:00:ef:a5:6c">00:00:00:ef:a5:6c</a></td>
|
||||
<td>2023-01-30 22:17:59</td>
|
||||
<td>192.168.1.82</td>
|
||||
<td>New Device</td>
|
||||
<td>(name not found)</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table style="border-collapse: collapse; font-size: 12px; color:#70707" width="100%" cellspacing="0" cellpadding="3px" bordercolor="#C0C0C0" border="1">
|
||||
<tr>
|
||||
<th width='120px' style='color:blue; font-size: 12px;' bgcolor='#909090' >Events</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<ul>
|
||||
<li>
|
||||
<table style="border-collapse: collapse; font-size: 12px; color:#70707" width="100%" cellspacing="0" cellpadding="3px" bordercolor="#C0C0C0" border="1">
|
||||
<tr>
|
||||
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >MAC</th>
|
||||
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >Datetime</th>
|
||||
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >IP</th>
|
||||
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >Event Type</th>
|
||||
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >Device name</th>
|
||||
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >Comments</th>
|
||||
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >Device Vendor</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://192.168.1.1:20211/deviceDetails.php?mac=00:00:00:ef:a5:6c">00:00:00:ef:a5:6c</a></td>
|
||||
<td>2023-01-30 22:15:09</td>
|
||||
<td>192.168.1.92</td>
|
||||
<td>Disconnected</td>
|
||||
<td>(name not found)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table style="border-collapse: collapse; font-size: 12px; color:#70707" width="100%" cellspacing="0" cellpadding="3px" bordercolor="#C0C0C0" border="1">
|
||||
<tr>
|
||||
<th width='120px' style='color:blue; font-size: 12px;' bgcolor='#909090' >Changed or new ports</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table style="border-collapse: collapse; font-size: 12px; color:#70707" width="100%" cellspacing="0" cellpadding="3px" bordercolor="#C0C0C0" border="1">
|
||||
<tr>
|
||||
<th>new</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table style="border-collapse: collapse; font-size: 12px; color:#70707" width="100%" cellspacing="0" cellpadding="3px" bordercolor="#C0C0C0" border="1">
|
||||
<tr>
|
||||
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >Name</th>
|
||||
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >MAC</th>
|
||||
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >Port</th>
|
||||
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >State</th>
|
||||
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >Service</th>
|
||||
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >Extra</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>New device</td>
|
||||
<td><a href="http://192.168.1.1:20211/deviceDetails.php?mac=00:00:00:ef:a5:6c">00:00:00:ef:a5:6c</a></td>
|
||||
<td>3263/tcp</td>
|
||||
<td>open</td>
|
||||
<td>ecolor-imager</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table style="border-collapse: collapse; font-size: 12px; color:#70707" width="100%" cellspacing="0" cellpadding="3px" bordercolor="#C0C0C0" border="1">
|
||||
<tr>
|
||||
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >Name</th>
|
||||
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >MAC</th>
|
||||
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >Port</th>
|
||||
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >State</th>
|
||||
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >Service</th>
|
||||
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >Extra</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>New device</td>
|
||||
<td><a href="http://192.168.1.1:20211/deviceDetails.php?mac=00:00:00:ef:a5:6c">00:00:00:ef:a5:6c</a></td>
|
||||
<td>3264/tcp</td>
|
||||
<td>open</td>
|
||||
<td>ccmail</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<tr>
|
||||
<td>
|
||||
<table width=100% bgcolor=#46802e cellpadding=5px cellspacing=0 style="font-size: 13px; font-weight: bold; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px;">
|
||||
<tr>
|
||||
<td width=50% style="text-align:center"> NetAlertX - Synology-NAS</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</font>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,50 +1,46 @@
|
||||
Report Date: 2021-12-08 12:30
|
||||
Server: Synology-NAS
|
||||
|
||||
New Devices
|
||||
----------------------
|
||||
Name: (name not found)
|
||||
MAC: 2c:2c:2c:2c:2c:2c
|
||||
IP: 192.168.1.121
|
||||
Time: 2021-12-08 12:30
|
||||
More Info: Micro-Star INTL CO., LTD.
|
||||
MAC: 2c:2c:2c:2c:2c:2c
|
||||
IP: 192.168.1.121
|
||||
Time: 2021-12-08 12:30
|
||||
More Info: Micro-Star INTL CO., LTD.
|
||||
|
||||
Name: (name not found)
|
||||
MAC: 2c:2c:2c:2c:2c:2c
|
||||
IP: 192.168.1.151
|
||||
Time: 2021-12-08 12:30
|
||||
More Info: Espressif Inc.
|
||||
|
||||
|
||||
MAC: 2c:2c:2c:2c:2c:2c
|
||||
IP: 192.168.1.151
|
||||
Time: 2021-12-08 12:30
|
||||
More Info: Espressif Inc.
|
||||
|
||||
Events
|
||||
----------------------
|
||||
Name: Samsung
|
||||
MAC: 2c:2c:2c:2c:2c:2c
|
||||
IP: 192.168.1.27
|
||||
Time: 2021-12-08 12:30
|
||||
Event: Connected
|
||||
More Info:
|
||||
MAC: 2c:2c:2c:2c:2c:2c
|
||||
IP: 192.168.1.27
|
||||
Time: 2021-12-08 12:30
|
||||
Event: Connected
|
||||
More Info:
|
||||
|
||||
Name: (name not found)
|
||||
MAC: 2c:2c:2c:2c:2c:2c
|
||||
IP: 192.168.1.6
|
||||
Time: 2021-12-08 12:30
|
||||
Event: Disconnected
|
||||
More Info:
|
||||
MAC: 2c:2c:2c:2c:2c:2c
|
||||
IP: 192.168.1.6
|
||||
Time: 2021-12-08 12:30
|
||||
Event: Disconnected
|
||||
More Info:
|
||||
|
||||
Name: Google-Home-Mini
|
||||
MAC: 2c:2c:2c:2c:2c:2c
|
||||
IP: 192.168.1.16
|
||||
Time: 2021-12-08 12:30
|
||||
Event: Disconnected
|
||||
More Info:
|
||||
MAC: 2c:2c:2c:2c:2c:2c
|
||||
IP: 192.168.1.16
|
||||
Time: 2021-12-08 12:30
|
||||
Event: Disconnected
|
||||
More Info:
|
||||
|
||||
Name: (name not found)
|
||||
MAC: 2c:2c:2c:2c:2c:2c
|
||||
IP: 192.168.1.119
|
||||
Time: 2021-12-08 12:30
|
||||
Event: Disconnected
|
||||
More Info:
|
||||
|
||||
MAC: 2c:2c:2c:2c:2c:2c
|
||||
IP: 192.168.1.119
|
||||
Time: 2021-12-08 12:30
|
||||
Event: Disconnected
|
||||
More Info:
|
||||
|
||||
Report Date: 2021-12-08 12:30
|
||||
Server: Synology-NAS
|
||||
|
||||
@@ -5,48 +5,21 @@
|
||||
# #
|
||||
# report_template.html - Back module. Template to email reporting in HTML format #
|
||||
#---------------------------------------------------------------------------------#
|
||||
# Puche 2021 pi.alert.application@gmail.com GNU GPLv3 #
|
||||
# jokob-sk 2022 jokob.sk@gmail.com GNU GPLv3 #
|
||||
# leiweibau 2022 https://github.com/leiweibau GNU GPLv3 #
|
||||
# cvc90 2023 https://github.com/cvc90 GNU GPLv3 #
|
||||
#---------------------------------------------------------------------------------#
|
||||
-->
|
||||
|
||||
<html>
|
||||
|
||||
<head>
|
||||
</head>
|
||||
|
||||
<head></head>
|
||||
<body>
|
||||
<font face=sans-serif>
|
||||
<table align=center width=100% cellpadding=0 cellspacing=0 style="border-radius: 5px;">
|
||||
<tr>
|
||||
<td bgcolor=#3c8dbc align=center style="padding: 20px 10px 10px 10px; font-size: 30px; font-weight: bold; color:#ffffff; border-top-right-radius: 5px; border-top-left-radius: 5px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2)">
|
||||
<td bgcolor=#3c8dbc align=center style="padding: 20px 10px 10px 10px; font-size: 20px; color:#ffffff; border-top-right-radius: 5px; border-top-left-radius: 5px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2)">
|
||||
<img src="https://netalertx.com/NetAlertX_logo.png" alt="NetAlertX Logo" style="vertical-align: middle;" width="32" height="32" />
|
||||
Net<b>Alert</b><sup>x</sup>
|
||||
<svg version="1.0" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid meet" height="24pt" viewBox="0 0 30 30" width="24pt">
|
||||
<g fill="#000000" stroke="none" transform="translate(0.000000,30) scale(0.02,-0.02)">
|
||||
<path d="M605 1473 c-16 -3 -34 -9 -39 -14 -6 -5 -20 -9 -33 -9 -13 0 -23 -5 -23 -10 0 -5 -3 -9 -7 -8 -14 4 -53 -13 -53 -22 0 -5 -6 -7 -14 -4 -7 3 -27 -6 -44 -20 -16 -15 -34 -26 -39 -26 -6 0 -18 -10 -29 -21 -10 -12 -29 -25 -42 -30 -13 -5 -21 -13 -18 -18 3 -5 -4 -11 -15 -14 -12 -3 -18 -10 -15 -15 3 -5 -6 -14 -19 -20 -14 -7 -25 -18 -25 -27 0 -8 -5 -15 -12 -15 -9 0 -9 -3 -1 -11 9 -9 29 4 80 51 37 34 87 75 110 90 44 30 167 90 184 90 18 0 89 40 89 50 0 6 -1 9 -2 9 -2 -1 -16 -4 -33 -6z"></path>
|
||||
<path d="M883 1454 c15 -8 55 -23 90 -34 82 -26 201 -97 257 -155 25 -25 58 -52 73 -59 l28 -12 -111 -98 -111 -97 -27 27 c-165 168 -463 163 -636 -10 l-36 -37 -58 49 c-175 149 -185 155 -200 135 -8 -10 -20 -32 -27 -49 -8 -17 -21 -36 -30 -44 -9 -7 -13 -21 -10 -31 4 -12 1 -21 -9 -25 -9 -4 -16 -11 -15 -18 1 -6 -3 -24 -9 -39 -7 -16 -10 -33 -6 -38 3 -5 0 -9 -6 -9 -7 0 -10 -7 -6 -15 3 -8 2 -15 -2 -15 -5 0 -8 -20 -7 -45 0 -25 -2 -45 -5 -45 -8 0 -5 -155 4 -207 4 -24 12 -45 17 -49 5 -3 9 -14 9 -25 0 -10 4 -27 10 -37 16 -29 43 -97 42 -104 -1 -5 3 -8 10 -8 6 0 9 -3 6 -6 -4 -3 1 -14 10 -23 31 -33 52 -61 52 -70 0 -5 8 -11 19 -14 14 -3 91 57 286 225 151 129 274 227 281 224 7 -3 130 -97 273 -210 160 -126 266 -203 275 -200 17 7 66 78 66 97 0 8 9 22 20 32 11 10 20 26 20 36 0 10 5 21 10 24 6 4 8 10 5 15 -6 10 14 50 30 62 6 5 5 8 -4 8 -11 0 -11 3 -1 15 7 8 9 15 4 15 -5 0 -2 5 6 10 11 7 12 10 2 10 -9 0 -11 7 -6 23 10 30 11 96 2 91 -5 -3 -8 -18 -8 -33 0 -15 -4 -31 -9 -36 -5 -6 -24 -53 -42 -105 -34 -102 -84 -199 -105 -207 -13 -5 -474 351 -474 367 0 5 31 37 70 71 38 35 72 69 75 77 10 26 -25 63 -81 88 -105 46 -254 24 -323 -50 -35 -37 -22 -67 54 -127 36 -28 65 -57 65 -64 0 -7 -10 -20 -22 -28 -13 -8 -117 -96 -233 -196 -116 -99 -215 -181 -221 -181 -10 0 -37 35 -76 100 -8 14 -29 65 -47 114 -27 76 -31 102 -32 190 -1 58 6 132 15 175 17 77 88 241 104 241 5 0 52 -34 103 -75 52 -42 104 -78 117 -81 21 -6 67 21 112 65 8 8 49 30 90 50 70 32 82 35 172 34 90 0 102 -3 170 -35 40 -20 90 -49 112 -67 21 -17 47 -31 57 -31 10 0 59 34 109 76 56 47 96 74 105 70 25 -9 124 -237 125 -287 0 -8 6 -23 13 -32 18 -26 10 129 -9 158 -8 13 -11 30 -8 40 5 13 4 16 -4 11 -8 -4 -12 0 -12 11 0 10 -7 27 -15 37 -8 10 -12 23 -9 27 3 5 0 9 -6 9 -6 0 -8 5 -5 10 3 6 2 10 -3 10 -5 0 -15 14 -22 30 -7 17 -16 30 -21 30 -5 0 -9 5 -9 11 0 7 -11 22 -25 35 -14 13 -25 25 -25 28 0 11 -50 55 -70 61 -11 3 -20 10 -20 15 0 13 -72 60 -81 54 -4 -2 -13 5 -19 16 -6 12 -21 20 -35 20 -14 0 -25 5 -25 10 0 6 -8 10 -19 10 -10 0 -35 7 -54 15 -20 8 -53 15 -74 15 l-38 -1 28 -15z m16 -545 c52 -26 60 -34 49 -44 -34 -33 -183 -155 -188 -155 -6 0 -161 119 -184 141 -12 11 14 33 79 64 75 37 162 35 244 -6z"></path>
|
||||
<path d="M673 437 l-82 -72 89 -3 c50 -1 131 -1 181 0 l92 3 -95 73 c-53 39 -97 72 -99 71 -2 0 -41 -33 -86 -72z m125 -3 c31 -21 19 -34 -34 -34 -47 0 -57 13 -26 36 22 18 33 17 60 -2z"></path>
|
||||
<path d="M369 175 c-23 -20 -48 -34 -56 -31 -7 3 -13 4 -13 2 0 -7 52 -38 67 -40 8 -1 24 -11 36 -21 12 -11 31 -21 41 -22 11 -2 25 -8 32 -14 7 -6 25 -12 41 -14 15 -2 29 -4 31 -6 1 -1 7 -3 12 -4 6 -1 11 -4 13 -5 20 -18 315 -13 351 6 16 8 36 14 45 14 9 0 21 4 27 8 5 5 35 19 66 31 31 13 71 36 87 52 17 16 36 29 43 29 7 0 0 12 -15 25 l-28 25 -369 0 -368 0 -43 -35z m741 -15 c0 -13 -99 -62 -193 -94 -101 -35 -201 -38 -317 -9 -147 37 -223 79 -183 102 24 14 693 15 693 1z"></path>
|
||||
</g>
|
||||
</svg>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<table width=100% border=0 bgcolor=#4b99d3 cellpadding=5px cellspacing=0 style="border-collapse: collapse; font-size: 15px; text-align:center; color:#ffffff"> <tr>
|
||||
<td width=100% bgcolor="#3c8dbc"> Report Date: <b><REPORT_DATE></b> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td height=200 valign=top style="padding: 10px">
|
||||
|
||||
|
||||
<NEW_DEVICES_TABLE>
|
||||
<DOWN_DEVICES_TABLE>
|
||||
<DOWN_RECONNECTED_TABLE>
|
||||
@@ -58,16 +31,14 @@
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<table width=100% bgcolor=#3c8dbc cellpadding=5px cellspacing=0 style="font-size: 13px; font-weight: bold; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px;">
|
||||
<table width=100% bgcolor=#3c8dbc cellpadding=5px cellspacing=0 style="font-size: 10px; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px;">
|
||||
<tr>
|
||||
<td width=50% style="text-align:center;color: white;" bgcolor="#3c8dbc">
|
||||
<a href="https://github.com/jokob-sk/NetAlertX" target="_blank" style="color: white">NetAlertX</a>
|
||||
<a href=".." target="_blank" style="color: white"> (<SERVER_NAME>)</a>
|
||||
<br><span style="display:inline-block;color: white; transform: rotate(180deg)">©</span>2022
|
||||
<a style="color: white" href="mailto:jokob@duck.com?subject=NetAlertX">jokob-sk</a> | <b>Built on: <BUILD_DATE> </b> | <b> Version: <BUILD_VERSION> </b> |
|
||||
<a href="https://github.com/jokob-sk/NetAlertX/tree/main/docs" target="_blank" style="color: white">
|
||||
<span>Docs <i class="fa fa-circle-question"></i>
|
||||
</a><span>
|
||||
<NEW_VERSION>
|
||||
| Sent: <REPORT_DATE>
|
||||
| Server: <SERVER_NAME>
|
||||
| Built: <BUILD_DATE>
|
||||
| Version: <BUILD_VERSION>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
Report Date: <REPORT_DATE>
|
||||
Server: <SERVER_NAME>
|
||||
|
||||
<NEW_DEVICES_TABLE>
|
||||
<DOWN_DEVICES_TABLE>
|
||||
<DOWN_RECONNECTED_TABLE>
|
||||
<EVENTS_TABLE>
|
||||
<PLUGINS_TABLE>
|
||||
|
||||
Report Date: <REPORT_DATE>
|
||||
Server: <SERVER_NAME>
|
||||
<NEW_VERSION>
|
||||
@@ -1,83 +0,0 @@
|
||||
<!--
|
||||
#---------------------------------------------------------------------------------#
|
||||
# NetAlertX #
|
||||
# Open Source Network Guard / WIFI & LAN intrusion detector #
|
||||
# #
|
||||
# report_template_new_version - Back module. Template to email reporting in text #
|
||||
#---------------------------------------------------------------------------------#
|
||||
# Puche 2021 pi.alert.application@gmail.com GNU GPLv3 #
|
||||
# jokob-sk 2022 jokob.sk@gmail.com GNU GPLv3 #
|
||||
# leiweibau 2022 https://github.com/leiweibau GNU GPLv3 #
|
||||
# cvc90 2023 https://github.com/cvc90 GNU GPLv3 #
|
||||
#---------------------------------------------------------------------------------#
|
||||
-->
|
||||
|
||||
<html>
|
||||
|
||||
<head>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<font face=sans-serif>
|
||||
<table align=center width=100% cellpadding=0 cellspacing=0 style="border-radius: 5px;">
|
||||
<tr>
|
||||
<td bgcolor=#3c8dbc align=center style="padding: 20px 10px 10px 10px; font-size: 30px; font-weight: bold; color:#ffffff; border-top-right-radius: 5px; border-top-left-radius: 5px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2)">
|
||||
Net<b>Alert</b><sup>x</sup>
|
||||
<svg version="1.0" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid meet" height="24pt" viewBox="0 0 30 30" width="24pt">
|
||||
<g fill="#000000" stroke="none" transform="translate(0.000000,30) scale(0.02,-0.02)">
|
||||
<path d="M605 1473 c-16 -3 -34 -9 -39 -14 -6 -5 -20 -9 -33 -9 -13 0 -23 -5 -23 -10 0 -5 -3 -9 -7 -8 -14 4 -53 -13 -53 -22 0 -5 -6 -7 -14 -4 -7 3 -27 -6 -44 -20 -16 -15 -34 -26 -39 -26 -6 0 -18 -10 -29 -21 -10 -12 -29 -25 -42 -30 -13 -5 -21 -13 -18 -18 3 -5 -4 -11 -15 -14 -12 -3 -18 -10 -15 -15 3 -5 -6 -14 -19 -20 -14 -7 -25 -18 -25 -27 0 -8 -5 -15 -12 -15 -9 0 -9 -3 -1 -11 9 -9 29 4 80 51 37 34 87 75 110 90 44 30 167 90 184 90 18 0 89 40 89 50 0 6 -1 9 -2 9 -2 -1 -16 -4 -33 -6z"></path>
|
||||
<path d="M883 1454 c15 -8 55 -23 90 -34 82 -26 201 -97 257 -155 25 -25 58 -52 73 -59 l28 -12 -111 -98 -111 -97 -27 27 c-165 168 -463 163 -636 -10 l-36 -37 -58 49 c-175 149 -185 155 -200 135 -8 -10 -20 -32 -27 -49 -8 -17 -21 -36 -30 -44 -9 -7 -13 -21 -10 -31 4 -12 1 -21 -9 -25 -9 -4 -16 -11 -15 -18 1 -6 -3 -24 -9 -39 -7 -16 -10 -33 -6 -38 3 -5 0 -9 -6 -9 -7 0 -10 -7 -6 -15 3 -8 2 -15 -2 -15 -5 0 -8 -20 -7 -45 0 -25 -2 -45 -5 -45 -8 0 -5 -155 4 -207 4 -24 12 -45 17 -49 5 -3 9 -14 9 -25 0 -10 4 -27 10 -37 16 -29 43 -97 42 -104 -1 -5 3 -8 10 -8 6 0 9 -3 6 -6 -4 -3 1 -14 10 -23 31 -33 52 -61 52 -70 0 -5 8 -11 19 -14 14 -3 91 57 286 225 151 129 274 227 281 224 7 -3 130 -97 273 -210 160 -126 266 -203 275 -200 17 7 66 78 66 97 0 8 9 22 20 32 11 10 20 26 20 36 0 10 5 21 10 24 6 4 8 10 5 15 -6 10 14 50 30 62 6 5 5 8 -4 8 -11 0 -11 3 -1 15 7 8 9 15 4 15 -5 0 -2 5 6 10 11 7 12 10 2 10 -9 0 -11 7 -6 23 10 30 11 96 2 91 -5 -3 -8 -18 -8 -33 0 -15 -4 -31 -9 -36 -5 -6 -24 -53 -42 -105 -34 -102 -84 -199 -105 -207 -13 -5 -474 351 -474 367 0 5 31 37 70 71 38 35 72 69 75 77 10 26 -25 63 -81 88 -105 46 -254 24 -323 -50 -35 -37 -22 -67 54 -127 36 -28 65 -57 65 -64 0 -7 -10 -20 -22 -28 -13 -8 -117 -96 -233 -196 -116 -99 -215 -181 -221 -181 -10 0 -37 35 -76 100 -8 14 -29 65 -47 114 -27 76 -31 102 -32 190 -1 58 6 132 15 175 17 77 88 241 104 241 5 0 52 -34 103 -75 52 -42 104 -78 117 -81 21 -6 67 21 112 65 8 8 49 30 90 50 70 32 82 35 172 34 90 0 102 -3 170 -35 40 -20 90 -49 112 -67 21 -17 47 -31 57 -31 10 0 59 34 109 76 56 47 96 74 105 70 25 -9 124 -237 125 -287 0 -8 6 -23 13 -32 18 -26 10 129 -9 158 -8 13 -11 30 -8 40 5 13 4 16 -4 11 -8 -4 -12 0 -12 11 0 10 -7 27 -15 37 -8 10 -12 23 -9 27 3 5 0 9 -6 9 -6 0 -8 5 -5 10 3 6 2 10 -3 10 -5 0 -15 14 -22 30 -7 17 -16 30 -21 30 -5 0 -9 5 -9 11 0 7 -11 22 -25 35 -14 13 -25 25 -25 28 0 11 -50 55 -70 61 -11 3 -20 10 -20 15 0 13 -72 60 -81 54 -4 -2 -13 5 -19 16 -6 12 -21 20 -35 20 -14 0 -25 5 -25 10 0 6 -8 10 -19 10 -10 0 -35 7 -54 15 -20 8 -53 15 -74 15 l-38 -1 28 -15z m16 -545 c52 -26 60 -34 49 -44 -34 -33 -183 -155 -188 -155 -6 0 -161 119 -184 141 -12 11 14 33 79 64 75 37 162 35 244 -6z"></path>
|
||||
<path d="M673 437 l-82 -72 89 -3 c50 -1 131 -1 181 0 l92 3 -95 73 c-53 39 -97 72 -99 71 -2 0 -41 -33 -86 -72z m125 -3 c31 -21 19 -34 -34 -34 -47 0 -57 13 -26 36 22 18 33 17 60 -2z"></path>
|
||||
<path d="M369 175 c-23 -20 -48 -34 -56 -31 -7 3 -13 4 -13 2 0 -7 52 -38 67 -40 8 -1 24 -11 36 -21 12 -11 31 -21 41 -22 11 -2 25 -8 32 -14 7 -6 25 -12 41 -14 15 -2 29 -4 31 -6 1 -1 7 -3 12 -4 6 -1 11 -4 13 -5 20 -18 315 -13 351 6 16 8 36 14 45 14 9 0 21 4 27 8 5 5 35 19 66 31 31 13 71 36 87 52 17 16 36 29 43 29 7 0 0 12 -15 25 l-28 25 -369 0 -368 0 -43 -35z m741 -15 c0 -13 -99 -62 -193 -94 -101 -35 -201 -38 -317 -9 -147 37 -223 79 -183 102 24 14 693 15 693 1z"></path>
|
||||
</g>
|
||||
</svg>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor=#2656f1 width=100% align=center style="padding: 20px 10px 10px 10px; font-size: 20px; font-weight: bold; color:#ffffff; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2)">
|
||||
<a style="color:#ffffff;cursor:pointer;" href="https://github.com/jokob-sk/NetAlertX/releases">🆕 New version available 🆕</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<table width=100% border=0 bgcolor=#4b99d3 cellpadding=5px cellspacing=0 style="border-collapse: collapse; font-size: 15px; text-align:center; color:#ffffff"> <tr>
|
||||
<td width=100% bgcolor="#3c8dbc"> Report Date: <b><REPORT_DATE></b> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td height=200 valign=top style="padding: 10px">
|
||||
|
||||
<NEW_DEVICES_TABLE>
|
||||
<DOWN_DEVICES_TABLE>
|
||||
<DOWN_RECONNECTED_TABLE>
|
||||
<EVENTS_TABLE>
|
||||
<PLUGINS_TABLE>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<table width=100% bgcolor=#3c8dbc cellpadding=5px cellspacing=0 style="font-size: 13px; font-weight: bold; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px;">
|
||||
<tr>
|
||||
<td width=50% style="text-align:center;color: white;" bgcolor="#3c8dbc">
|
||||
<a href="https://github.com/jokob-sk/NetAlertX" target="_blank" style="color: white">NetAlertX</a>
|
||||
<a href=".." target="_blank" style="color: white"> (<SERVER_NAME>)</a>
|
||||
<br><span style="display:inline-block;color: white; transform: rotate(180deg)">©</span>2022
|
||||
<a style="color: white" href="mailto:jokob@duck.com?subject=NetAlertX">jokob-sk</a> | <b>Built on: <BUILD_DATE> </b> | <b> Version: <BUILD_VERSION> </b> |
|
||||
<a href="https://github.com/jokob-sk/NetAlertX/tree/main/docs" target="_blank" style="color: white">
|
||||
<span>Docs <i class="fa fa-circle-question"></i>
|
||||
</a><span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</font>
|
||||
</body>
|
||||
</html>
|
||||
@@ -18,7 +18,7 @@
|
||||
"title_link": "",
|
||||
"text": {
|
||||
"new_devices_meta": {
|
||||
"title": "🆕New devices",
|
||||
"title": "🆕 New devices",
|
||||
"columnNames": [
|
||||
"MAC",
|
||||
"Datetime",
|
||||
@@ -30,24 +30,23 @@
|
||||
},
|
||||
"new_devices": [
|
||||
{
|
||||
"MAC": "74:ac:74:ac:74:ac",
|
||||
"Datetime": "2023-01-30 22:15:09",
|
||||
"IP": "192.168.1.1",
|
||||
"MAC": "00:1a:76:e3:26:4a",
|
||||
"Datetime": "2025-01-06 11:05:00+11:00",
|
||||
"IP": "192.168.1.82",
|
||||
"Event Type": "New Device",
|
||||
"Device name": "(name not found)",
|
||||
"Comments": null,
|
||||
"Device Vendor": null
|
||||
"Device name": "(unknown) TEST",
|
||||
"Comments": ""
|
||||
}
|
||||
],
|
||||
"down_devices_meta": {
|
||||
"title": "Down devices",
|
||||
"title": "🔴 Down devices",
|
||||
"columnNames": [
|
||||
"MAC",
|
||||
"Datetime",
|
||||
"IP",
|
||||
"Event Type",
|
||||
"Device name",
|
||||
"Comments"
|
||||
"devName",
|
||||
"eve_MAC",
|
||||
"devVendor",
|
||||
"eve_IP",
|
||||
"eve_DateTime",
|
||||
"eve_EventType"
|
||||
]
|
||||
},
|
||||
"down_devices": [],
|
||||
@@ -64,12 +63,12 @@
|
||||
},
|
||||
"down_reconnected": [
|
||||
{
|
||||
"devName": "Phone - Pixel",
|
||||
"devName": "Phone - Moto 82",
|
||||
"eve_MAC": "74:ac:74:ac:74:ac",
|
||||
"devVendor": "Google",
|
||||
"devVendor": "Motorola Mobility LLC, a Lenovo Company",
|
||||
"eve_IP": "192.168.1.167",
|
||||
"DownTime": "2024-05-26 09:06:56+10:00",
|
||||
"ConnectedTime": "2024-05-26 09:13:24+10:00"
|
||||
"eve_DateTime": "2025-01-11 10:05:01+11:00",
|
||||
"eve_EventType": "Down Reconnected"
|
||||
}
|
||||
],
|
||||
"down_reconnected_meta": {
|
||||
@@ -79,8 +78,8 @@
|
||||
"eve_MAC",
|
||||
"devVendor",
|
||||
"eve_IP",
|
||||
"DownTime",
|
||||
"ConnectedTime"
|
||||
"eve_DateTime",
|
||||
"eve_EventType"
|
||||
]
|
||||
},
|
||||
"events": [
|
||||
@@ -90,8 +89,7 @@
|
||||
"IP": "192.168.1.92",
|
||||
"Event Type": "Disconnected",
|
||||
"Device name": "(name not found)",
|
||||
"Comments": null,
|
||||
"Device Vendor": null
|
||||
"Comments": null
|
||||
},
|
||||
{
|
||||
"MAC": "74:ac:74:ac:74:ac",
|
||||
@@ -99,12 +97,11 @@
|
||||
"IP": "192.168.1.150",
|
||||
"Event Type": "Disconnected",
|
||||
"Device name": "(name not found)",
|
||||
"Comments": null,
|
||||
"Device Vendor": null
|
||||
"Comments": null
|
||||
}
|
||||
],
|
||||
"plugins_meta": {
|
||||
"title": "Plugins",
|
||||
"title": "🔌 Plugins",
|
||||
"columnNames": [
|
||||
"Plugin",
|
||||
"Object_PrimaryID",
|
||||
@@ -114,30 +111,20 @@
|
||||
"Watched_Value2",
|
||||
"Watched_Value3",
|
||||
"Watched_Value4",
|
||||
"Status",
|
||||
"Extra",
|
||||
"UserData",
|
||||
"ForeignKey",
|
||||
"SyncHubNodeName"
|
||||
"Status"
|
||||
]
|
||||
},
|
||||
"plugins": [
|
||||
{
|
||||
"Index": 138,
|
||||
"Plugin": "INTRSPD",
|
||||
"Object_PrimaryID": "Speedtest",
|
||||
"Object_SecondaryID": "2023-10-08 02:01:16+02:00",
|
||||
"DateTimeCreated": "2023-10-08 02:01:16",
|
||||
"DateTimeChanged": "2023-10-08 02:32:15",
|
||||
"Watched_Value1": "-1",
|
||||
"Watched_Value2": "-1",
|
||||
"Watched_Value3": "null",
|
||||
"Watched_Value4": "null",
|
||||
"Status": "missing-in-last-scan",
|
||||
"Extra": "null",
|
||||
"UserData": "null",
|
||||
"ForeignKey": "null",
|
||||
"SyncHubNodeName": "null"
|
||||
"Plugin": "ARPSCAN",
|
||||
"Object_PrimaryID": "74:ac:74:ac:74:ac",
|
||||
"Object_SecondaryID": "192.168.1.114",
|
||||
"DateTimeChanged": "2025-01-11 12:21:00",
|
||||
"Watched_Value1": "192.168.1.114",
|
||||
"Watched_Value2": "Microsoft Corporation",
|
||||
"Watched_Value3": "192.168.1.0/24 --interface=eth1",
|
||||
"Watched_Value4": "",
|
||||
"Status": "new"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -30,5 +30,5 @@ source myenv/bin/activate
|
||||
update-alternatives --install /usr/bin/python python /usr/bin/python3 10
|
||||
|
||||
# install packages thru pip3
|
||||
pip3 install openwrt-luci-rpc graphene flask netifaces tplink-omada-client wakeonlan pycryptodome requests paho-mqtt scapy cron-converter pytz json2table dhcp-leases pyunifi speedtest-cli chardet python-nmap dnspython librouteros git+https://github.com/foreign-sub/aiofreepybox.git
|
||||
pip3 install openwrt-luci-rpc asusrouter asyncio aiohttp graphene flask netifaces tplink-omada-client wakeonlan pycryptodome requests paho-mqtt scapy cron-converter pytz json2table dhcp-leases pyunifi speedtest-cli chardet python-nmap dnspython librouteros git+https://github.com/foreign-sub/aiofreepybox.git
|
||||
|
||||
|
||||
24
scripts/checkmk/README.md
Executable file
24
scripts/checkmk/README.md
Executable file
@@ -0,0 +1,24 @@
|
||||
# NetAlertX-New-Devices-Checkmk-Script
|
||||
|
||||
This script retrieves the list of all devices from NetAlertX by reading the `/app/api/table_devices.json` file within the "NetAlertX" Docker container. It then checks if there are any new devices (`devIsNew == 1`).
|
||||
|
||||
- If new devices are found, a warning state is reported.
|
||||
- Otherwise, an OK state is returned.
|
||||
|
||||
## Checkmk Local Check Format
|
||||
|
||||
The script follows the Checkmk local check format:
|
||||
|
||||
```
|
||||
<status> <service_name> <perfdata> <message>
|
||||
```
|
||||
|
||||
For more details, see the [Checkmk Local Checks Documentation](https://docs.checkmk.com/latest/en/localchecks.html).
|
||||
|
||||
### Other info
|
||||
|
||||
- Date : 08-Jan-2025 - version 1.0
|
||||
- Author: N/A
|
||||
|
||||
> [!NOTE]
|
||||
> This is a community supplied script and not maintained.
|
||||
74
scripts/checkmk/script.py
Executable file
74
scripts/checkmk/script.py
Executable file
@@ -0,0 +1,74 @@
|
||||
|
||||
YABin
|
||||
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
NetAlertX-New-Devices-Checkmk-Script
|
||||
|
||||
Dieses Skript ruft die Liste aller Devices aus NetAlertX ab, indem es innerhalb
|
||||
des Docker-Containers "NetAlertX" die Datei /app/api/table_devices.json ausliest.
|
||||
Anschließend wird geprüft, ob neue Geräte vorhanden sind (devIsNew == 1).
|
||||
Falls ja, wird ein Warning-Zustand gemeldet, sonst OK.
|
||||
|
||||
Checkmk-Local-Check-Format:
|
||||
<status> <service_name> <perfdata> <message>
|
||||
Siehe: https://docs.checkmk.com/latest/de/localchecks.html
|
||||
"""
|
||||
|
||||
import subprocess
|
||||
import json
|
||||
|
||||
def check_new_devices():
|
||||
try:
|
||||
# Rufe die JSON-Datei aus dem Docker-Container ab
|
||||
result = subprocess.run(
|
||||
['docker', 'exec', 'NetAlertX', 'cat', '/app/api/table_devices.json'],
|
||||
capture_output=True,
|
||||
text=True,
|
||||
check=True
|
||||
)
|
||||
data_str = result.stdout
|
||||
except subprocess.CalledProcessError as e:
|
||||
# Wenn der Docker-Command fehlschlägt -> UNKNOWN (3)
|
||||
print(f"3 NetAlertX_New_Devices - UNKNOWN - Docker command failed: {e}")
|
||||
return
|
||||
except Exception as e:
|
||||
# Allgemeiner Fehler -> UNKNOWN
|
||||
print(f"3 NetAlertX_New_Devices - UNKNOWN - Error while running docker command: {e}")
|
||||
return
|
||||
|
||||
# JSON-Daten laden
|
||||
try:
|
||||
data = json.loads(data_str)
|
||||
except json.JSONDecodeError as e:
|
||||
# Wenn das JSON nicht gelesen werden kann -> UNKNOWN
|
||||
print(f"3 NetAlertX_New_Devices - UNKNOWN - JSON decode error: {e}")
|
||||
return
|
||||
|
||||
# Prüfen, ob das 'data'-Attribut vorhanden ist
|
||||
if "data" not in data:
|
||||
print("3 NetAlertX_New_Devices - UNKNOWN - Unexpected JSON format (no 'data' key).")
|
||||
return
|
||||
|
||||
new_devices = []
|
||||
for device in data["data"]:
|
||||
# Prüfen, ob das Attribut 'devIsNew' existiert und == 1 ist
|
||||
if "devIsNew" in device and device["devIsNew"] == 1:
|
||||
new_devices.append(device)
|
||||
|
||||
# Wenn keine neuen Geräte gefunden
|
||||
if len(new_devices) == 0:
|
||||
# Status 0 = OK
|
||||
print("0 NetAlertX_New_Devices - OK - No new devices found")
|
||||
else:
|
||||
# Status 1 = WARNING
|
||||
device_list_str = ", ".join(
|
||||
f"{dev.get('devName', 'UnknownName')}({dev.get('devMac', 'UnknownMAC')}) IP:{dev.get('devLastIP', 'UnknownIP')}"
|
||||
for dev in new_devices
|
||||
)
|
||||
print(f"1 NetAlertX_New_Devices - WARNING - Found {len(new_devices)} new device(s): {device_list_str}")
|
||||
|
||||
if __name__ == "__main__":
|
||||
check_new_devices()
|
||||
|
||||
@@ -36,3 +36,7 @@ For each MAC or IP address provided, the script:
|
||||
|
||||
- Date : 23-Dec-2024 - version 1.0
|
||||
- Author: [laxduke](https://github.com/laxduke)
|
||||
|
||||
|
||||
> [!NOTE]
|
||||
> This is a community supplied script and not maintained.
|
||||
@@ -151,9 +151,9 @@ class api_endpoint_class:
|
||||
execution_log.finalize_event("update_api")
|
||||
self.is_ad_hoc_user_event = False
|
||||
|
||||
else:
|
||||
# Debugging if write is skipped
|
||||
mylog('trace', [f'[API] api_endpoint_class: Skipping write for {self.fileName}, debounce time not passed.'])
|
||||
# else:
|
||||
# # Debugging if write is skipped
|
||||
# mylog('trace', [f'[API] api_endpoint_class: Skipping write for {self.fileName}, debounce time not passed.'])
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -376,7 +376,7 @@ def importConfigs (db, all_plugins):
|
||||
# ccd(key, default, config_dir, name, inputtype, options, group, events=None, desc="", setJsonMetadata=None, overrideTemplate=None, forceDefault=False)
|
||||
ccd('VERSION', buildTimestamp , c_d, '_KEEP_', '_KEEP_', '_KEEP_', '_KEEP_', None, "_KEEP_", None, None, True)
|
||||
|
||||
write_notification(f'[Upgrade] : App upgraded 🚀 Please clear the cache: <ol> <li>Click OK below</li> <li>Clear the browser cache (shift + browser refresh button)</li> <li> Clear app cache with the 🔄 (reload) button in the header</li><li>Go to Settings and click Save</li> </ol> Check out new features and what has changed in the <a href="https://github.com/jokob-sk/NetAlertX/releases" target="_blank">📓 release notes</a>.', 'interrupt', timeNowTZ())
|
||||
write_notification(f'[Upgrade] : App upgraded 🚀 Please clear the cache: <ol> <li>Click OK below</li> <li>Clear the browser cache (shift + browser refresh button)</li> <li> Clear app cache with the <i class="fa-solid fa-rotate"></i> (reload) button in the header</li><li>Go to Settings and click Save</li> </ol> Check out new features and what has changed in the <a href="https://github.com/jokob-sk/NetAlertX/releases" target="_blank">📓 release notes</a>.', 'interrupt', timeNowTZ())
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -79,6 +79,7 @@ class Notification_obj:
|
||||
|
||||
Text = ""
|
||||
HTML = ""
|
||||
template_file_path = reportTemplatesPath + 'report_template.html'
|
||||
|
||||
|
||||
# Open text Template
|
||||
@@ -90,17 +91,17 @@ class Notification_obj:
|
||||
# Open html Template
|
||||
mylog('verbose', ['[Notification] Open html Template'])
|
||||
|
||||
# select template type depoending if running latest version or an older one
|
||||
if conf.newVersionAvailable :
|
||||
template_file_path = reportTemplatesPath + 'report_template_new_version.html'
|
||||
else:
|
||||
template_file_path = reportTemplatesPath + 'report_template.html'
|
||||
|
||||
mylog('verbose', ['[Notification] Using template', template_file_path])
|
||||
template_file = open(template_file_path, 'r')
|
||||
mail_html = template_file.read()
|
||||
template_file.close()
|
||||
|
||||
# prepare new version text
|
||||
newVersionText = ''
|
||||
if conf.newVersionAvailable :
|
||||
newVersionText = '🚀A new version is available.'
|
||||
|
||||
mail_text = mail_text.replace ('<NEW_VERSION>', newVersionText)
|
||||
mail_html = mail_html.replace ('<NEW_VERSION>', newVersionText)
|
||||
|
||||
# Report "REPORT_DATE" in Header & footer
|
||||
timeFormated = timeNowTZ().strftime ('%Y-%m-%d %H:%M')
|
||||
|
||||
@@ -11,13 +11,15 @@ from collections import namedtuple
|
||||
# Register NetAlertX modules
|
||||
import conf
|
||||
from const import pluginsPath, logPath, applicationPath, reportTemplatesPath
|
||||
from logger import mylog
|
||||
from logger import mylog, Logger
|
||||
from helper import timeNowTZ, updateState, get_file_content, write_file, get_setting, get_setting_value
|
||||
from api import update_api
|
||||
from plugin_utils import logEventStatusCounts, get_plugin_string, get_plugin_setting_obj, print_plugin_info, list_to_csv, combine_plugin_objects, resolve_wildcards_arr, handle_empty, custom_plugin_decoder, decode_and_rename_files
|
||||
from notification import Notification_obj, write_notification
|
||||
from execution_log import ExecutionLog
|
||||
|
||||
# Make sure log level is initialized correctly
|
||||
Logger(get_setting_value('LOG_LEVEL'))
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
class plugin_param:
|
||||
@@ -316,7 +318,7 @@ def execute_plugin(db, all_plugins, plugin, pluginsState = plugins_state() ):
|
||||
|
||||
# keep current instance log file, delete all from other nodes
|
||||
if filename != 'last_result.log' and os.path.exists(full_path):
|
||||
os.remove(full_path)
|
||||
os.remove(full_path) # DEBUG:TODO uncomment 🐛
|
||||
mylog('verbose', [f'[Plugins] Processed and deleted file: {full_path} '])
|
||||
|
||||
|
||||
@@ -454,7 +456,6 @@ def execute_plugin(db, all_plugins, plugin, pluginsState = plugins_state() ):
|
||||
else:
|
||||
mylog('none', ['[Plugins] Skipped invalid sql result'])
|
||||
|
||||
|
||||
# check if the subprocess / SQL query failed / there was no valid output
|
||||
if len(sqlParams) == 0:
|
||||
mylog('none', [f'[Plugins] No output received from the plugin "{plugin["unique_prefix"]}"'])
|
||||
@@ -606,7 +607,6 @@ def process_plugin_events(db, plugin, pluginsState, plugEventsArr):
|
||||
# combine all DB insert and update events into one for history
|
||||
history_to_insert.append(values)
|
||||
|
||||
|
||||
mylog('debug', ['[Plugins] pluginEvents count: ', len(pluginEvents)])
|
||||
mylog('debug', ['[Plugins] pluginObjects count: ', len(pluginObjects)])
|
||||
|
||||
@@ -615,6 +615,10 @@ def process_plugin_events(db, plugin, pluginsState, plugEventsArr):
|
||||
mylog('debug', ['[Plugins] objects_to_insert count: ', len(objects_to_insert)])
|
||||
mylog('debug', ['[Plugins] objects_to_update count: ', len(objects_to_update)])
|
||||
|
||||
mylog('trace', ['[Plugins] objects_to_update: ', objects_to_update])
|
||||
mylog('trace', ['[Plugins] events_to_insert: ', events_to_insert])
|
||||
mylog('trace', ['[Plugins] history_to_insert: ', history_to_insert])
|
||||
|
||||
logEventStatusCounts('pluginEvents', pluginEvents)
|
||||
logEventStatusCounts('pluginObjects', pluginObjects)
|
||||
|
||||
@@ -913,8 +917,6 @@ def handle_test(runType, db, all_plugins, pluginsState):
|
||||
mylog('minimal', ['[', timeNowTZ(), '] [Test] START Test: ', runType])
|
||||
|
||||
# Prepare test samples
|
||||
sample_txt = get_file_content(reportTemplatesPath + 'report_sample.txt')
|
||||
sample_html = get_file_content(reportTemplatesPath + 'report_sample.html')
|
||||
sample_json = json.loads(get_file_content(reportTemplatesPath + 'webhook_json_sample.json'))[0]["body"]["attachments"][0]["text"]
|
||||
|
||||
# Create fake notification
|
||||
|
||||
@@ -203,8 +203,13 @@ def get_plugins_configs(loadAll):
|
||||
|
||||
plugJson = json.loads(get_file_content(config_path))
|
||||
|
||||
# only laod plugin if needed
|
||||
if loadAll or plugJson["unique_prefix"] in conf.LOADED_PLUGINS:
|
||||
# Only load plugin if needed
|
||||
# Fetch the list of enabled plugins from the config, default to an empty list if not set
|
||||
enabledPlugins = getattr(conf, "LOADED_PLUGINS", [])
|
||||
|
||||
# Load all plugins if `loadAll` is True, the plugin is in the enabled list,
|
||||
# or no specific plugins are enabled (enabledPlugins is empty)
|
||||
if loadAll or plugJson["unique_prefix"] in enabledPlugins or enabledPlugins == []:
|
||||
|
||||
# Load the contents of the config.json file as a JSON object and append it to pluginsList
|
||||
pluginsList.append(plugJson)
|
||||
|
||||
@@ -1,161 +0,0 @@
|
||||
import os
|
||||
import requests
|
||||
import base64
|
||||
from datetime import datetime
|
||||
|
||||
def fetch_sponsors():
|
||||
global headers
|
||||
|
||||
graphql_url = "https://api.github.com/graphql"
|
||||
headers = {
|
||||
"Authorization": f"Bearer {os.environ.get('GH_TOKEN')}",
|
||||
"Accept": "application/vnd.github.v4+json",
|
||||
}
|
||||
|
||||
# GraphQL query to fetch public sponsors
|
||||
graphql_query = """
|
||||
{
|
||||
user(login: "jokob-sk") {
|
||||
sponsorshipsAsMaintainer(first: 100, orderBy: {field: CREATED_AT, direction: ASC}, includePrivate: true) {
|
||||
totalCount
|
||||
pageInfo {
|
||||
endCursor
|
||||
}
|
||||
nodes {
|
||||
sponsorEntity {
|
||||
... on User {
|
||||
name
|
||||
login
|
||||
url
|
||||
}
|
||||
... on Organization {
|
||||
name
|
||||
url
|
||||
login
|
||||
}
|
||||
}
|
||||
createdAt
|
||||
privacyLevel
|
||||
tier {
|
||||
monthlyPriceInCents
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
"""
|
||||
|
||||
response = requests.post(graphql_url, json={"query": graphql_query}, headers=headers)
|
||||
data = response.json()
|
||||
|
||||
print(f"Debug GraphQL query result: {data}")
|
||||
|
||||
if "errors" in data:
|
||||
print(f"GraphQL query failed: {data['errors']}")
|
||||
return {"sponsors": []}
|
||||
|
||||
sponsorships = data["data"]["user"]["sponsorshipsAsMaintainer"]["nodes"]
|
||||
sponsors = []
|
||||
|
||||
for sponsorship in sponsorships:
|
||||
privacy_level = sponsorship["privacyLevel"]
|
||||
|
||||
# Only include sponsors with privacyLevel set to "PUBLIC"
|
||||
if privacy_level == "PUBLIC":
|
||||
sponsor_entity = sponsorship["sponsorEntity"]
|
||||
created_at = datetime.strptime(sponsorship["createdAt"], "%Y-%m-%dT%H:%M:%SZ")
|
||||
|
||||
# Check if tier is not None before accessing its properties
|
||||
tier = sponsorship.get("tier", {})
|
||||
monthly_price = tier.get("monthlyPriceInCents") if tier else None
|
||||
|
||||
sponsor = {
|
||||
"name": sponsor_entity.get("name"),
|
||||
"login": sponsor_entity["login"],
|
||||
"url": sponsor_entity["url"],
|
||||
"created_at": created_at,
|
||||
"privacy_level": privacy_level,
|
||||
"monthly_price": monthly_price,
|
||||
}
|
||||
|
||||
sponsors.append(sponsor)
|
||||
|
||||
print("Public Sponsors:")
|
||||
print(sponsors)
|
||||
|
||||
return {"sponsors": sponsors}
|
||||
|
||||
|
||||
def generate_sponsors_table(sponsors):
|
||||
sponsors_table = "| All Sponsors |\n|---|\n"
|
||||
for sponsor in sponsors:
|
||||
sponsors_table += f"| [{sponsor['name'] or sponsor['login']}]({sponsor['url']}) |\n"
|
||||
|
||||
return sponsors_table
|
||||
|
||||
|
||||
def update_readme(sponsors_table):
|
||||
global headers
|
||||
repo_owner = "jokob-sk"
|
||||
repo_name = "NetAlertX"
|
||||
|
||||
# Update the README.md file in the GitHub repository
|
||||
api_url = f"https://api.github.com/repos/{repo_owner}/{repo_name}/contents/README.md"
|
||||
|
||||
# Fetch the current content of the README.md file
|
||||
response = requests.get(api_url, headers=headers)
|
||||
readme_data = response.json()
|
||||
|
||||
# Extract content from the dictionary
|
||||
readme_content = base64.b64decode(readme_data['content']).decode()
|
||||
|
||||
# Find the start and end markers
|
||||
start_marker = "<!-- SPONSORS-LIST DO NOT MODIFY BELOW -->"
|
||||
end_marker = "<!-- SPONSORS-LIST DO NOT MODIFY ABOVE -->"
|
||||
|
||||
# Replace the content between markers with the generated sponsors table
|
||||
start_index = readme_content.find(start_marker)
|
||||
end_index = readme_content.find(end_marker, start_index + len(start_marker))
|
||||
if start_index != -1 and end_index != -1:
|
||||
updated_readme = (
|
||||
readme_content[:start_index + len(start_marker)]
|
||||
+ "\n"
|
||||
+ sponsors_table
|
||||
+ "\n"
|
||||
+ readme_content[end_index:]
|
||||
)
|
||||
else:
|
||||
print("Markers not found in README.md. Make sure they are correctly placed.")
|
||||
return
|
||||
|
||||
updated_content_base64 = base64.b64encode(updated_readme.encode()).decode()
|
||||
|
||||
# Create a commit to update the README.md file
|
||||
commit_message = "[🤖Automation] Update README with sponsors information"
|
||||
commit_data = {
|
||||
"message": commit_message,
|
||||
"content": updated_content_base64,
|
||||
"sha": readme_data["sha"],
|
||||
"branch": "main", # Update the branch name as needed
|
||||
}
|
||||
|
||||
commit_url = f"https://api.github.com/repos/{repo_owner}/{repo_name}/contents/README.md"
|
||||
commit_response = requests.put(commit_url, headers=headers, json=commit_data)
|
||||
|
||||
if commit_response.status_code == 200:
|
||||
print("README.md updated successfully in the GitHub repository.")
|
||||
else:
|
||||
print(f"Failed to update README.md. Status code: {commit_response.status_code}")
|
||||
print(commit_response.json())
|
||||
|
||||
print("README.md updated successfully with the sponsors table.")
|
||||
|
||||
def main():
|
||||
sponsors_data = fetch_sponsors()
|
||||
sponsors = sponsors_data.get("sponsors", [])
|
||||
|
||||
sponsors_table = generate_sponsors_table(sponsors)
|
||||
update_readme(sponsors_table)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -1 +0,0 @@
|
||||
requests>=2.0.0
|
||||
Reference in New Issue
Block a user