Compare commits

...

9 Commits

Author SHA1 Message Date
jokob-sk
cd8124a912 MKDocs
Some checks are pending
docker / docker_dev (push) Waiting to run
Deploy MkDocs / deploy (push) Waiting to run
2025-02-09 08:31:54 +11:00
jokob-sk
7867700856 MKDocs 2025-02-09 07:59:26 +11:00
jokob-sk
3be39f6508 MKDocs 2025-02-09 07:50:34 +11:00
jokob-sk
b69b76aa9f Merge branch 'main' of https://github.com/jokob-sk/NetAlertX 2025-02-09 07:46:16 +11:00
jokob-sk
8b7431eae9 MKDocs 2025-02-09 07:46:11 +11:00
Максим Горпиніч
079a1b3954 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (754 of 754 strings)

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

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

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/fr/
2025-02-08 19:23:07 +01:00
jokob-sk
57ccdf0b0c Fix social workflow 2025-02-08 11:58:02 +11:00
12 changed files with 222 additions and 22 deletions

24
.github/workflows/mkdocs.yml vendored Executable file
View File

@@ -0,0 +1,24 @@
name: Deploy MkDocs
on:
push:
branches:
- main # Change if your default branch is different
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install MkDocs
run: pip install mkdocs mkdocs-material
- name: Deploy MkDocs
run: mkdocs gh-deploy --force

View File

@@ -4,14 +4,36 @@ on:
types: [published]
jobs:
post-release:
post-discord:
runs-on: ubuntu-latest
steps:
- name: Wait for 15 minutes
run: sleep 900 # 15 minutes delay
# Post to Twitter
- name: Post to Twitter
- 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 }}
post-twitter:
runs-on: ubuntu-latest
steps:
- name: Wait for 15 minutes
run: sleep 900 # 15 minutes delay
- name: Checkout repository
uses: actions/checkout@v3
- name: Create tweet file
run: |
echo "🎉 New release: **${{ github.event.release.name }}** is live! 🚀" > .github/tweet.md
echo "Check it out here: ${{ github.event.release.html_url }}" >> .github/tweet.md
git add .github/tweet.md
git commit -m "Add release tweet for ${{ github.event.release.name }}"
git push
- name: Tweet
uses: twitter-together/action@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -19,14 +41,3 @@ jobs:
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
TWITTER_API_KEY: ${{ secrets.TWITTER_API_KEY }}
TWITTER_API_SECRET_KEY: ${{ secrets.TWITTER_API_SECRET_KEY }}
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 }}

View File

@@ -3,6 +3,24 @@
>[!NOTE]
> Replace `/development` with the path where your code files will be stored. The default container name is `netalertx` so there might be a conflict with your running containers.
### Development Guidelines
**Priority Order (Highest to Lowest):**
1. 🔼 Fixing core bugs that lack workarounds.
2. 🔵 Adding core functionality that unlocks other features (e.g., plugins).
3. 🔵 Refactoring to enable faster development.
4. 🔽 UI improvements (PRs welcome).
💡 **Design Philosophy:**
Focus on core functionality and integrate with existing tools rather than reinventing the wheel.
Examples:
- Using **Apprise** for notifications instead of implementing multiple separate gateways.
- Implementing **regex-based validation** instead of one-off validation for each setting.
📌 **Note on UI requests:**
UI changes have lower priority due to framework limitations and mobile support constraints.
PRs are welcome, but **keep them small & focused**.
## 1. Download the code:
- `mkdir /development`
@@ -67,4 +85,24 @@ Most code changes can be tetsed without rebuilding the container. When working o
3. If none of the above work, restart the docker image. This is usually the last resort as sometimes the Docker engine becomes unresponsive and the whole engine needs to be restarted.
## Contributing & Pull Requests
**Before submitting a PR, please ensure:**
✔ Changes are **backward-compatible** with existing installs.
✔ No unnecessary changes are made.
✔ New features are **reusable**, not narrowly scoped.
✔ Features are implemented via **plugins** if possible.
### ✅ Suggested Test Cases
- Fresh install (no DB/config).
- Existing DB/config compatibility.
- Notification testing:
- Email
- Apprise (e.g., Telegram)
- Webhook (e.g., Discord)
- MQTT (e.g., Home Assistant)
- Settings persistence.
- Updating a Device
- Plugin functionality.
- Error log inspection.

40
docs/INITIAL_SETUP.md Executable file
View File

@@ -0,0 +1,40 @@
# ⚙ Initial Setup
## 📁 Configuration Files
- On first run, the app generates a default `app.conf` and `app.db` if unavailable.
- Preferred method: Use the **Settings UI**.
- If the UI is inaccessible, manually edit [`app.conf`](https://github.com/jokob-sk/NetAlertX/tree/main/back) in `/app/config/`.
---
## 🖥️ Setting Up Scanners
- Define networks to scan by entering accessible subnets.
- Default plugin: **ARPSCAN** → Requires at least one valid subnet + interface in `SCAN_SUBNETS`.
- 📖 [Subnet & VLAN setup guide](https://github.com/jokob-sk/NetAlertX/blob/main/docs/SUBNETS.md) (for troubleshooting and advanced scenarios).
### 🔄 PiHole Sync
- If using **PiHole**, devices can be synced automatically.
- 📖 [PiHole configuration guide](https://github.com/jokob-sk/NetAlertX/blob/main/docs/PIHOLE_GUIDE.md).
### 📦 Bulk Import
> [!NOTE]
> You can bulk-import devices via the [CSV import method](https://github.com/jokob-sk/NetAlertX/blob/main/docs/DEVICES_BULK_EDITING.md).
---
## 🌍 Community Guides
- Various community-written configuration guides in **Chinese, Korean, German, French**.
- 📖 [Community Guides](https://github.com/jokob-sk/NetAlertX/blob/main/docs/COMMUNITY_GUIDES.md)
> ⚠️ **Note:** These guides may be outdated. Always refer to the official documentation first.
---
## 🛠️ Common Issues
Before creating a new issue:
- Check if a similar issue was [already resolved](https://github.com/jokob-sk/NetAlertX/issues?q=is%3Aissue+is%3Aclosed).
- Review [common debugging tips](https://github.com/jokob-sk/NetAlertX/blob/main/docs/DEBUG_TIPS.md).

40
docs/index.md Executable file
View File

@@ -0,0 +1,40 @@
# NetAlertX documentation
## In-App Help
- Hover over settings, fields, or labels.
- Click the blue ❔ (question-mark) icons.
- Access the in-app **Help / FAQ** section for frequently asked questions.
---
## 📚 Table of Contents
{% include "_toc.md" %}
---
## 📥 Installation
### 🐳 Docker (Fully Supported)
The recommended installation method is via Docker.
👉 [Follow the official installation guide](https://github.com/jokob-sk/NetAlertX/blob/main/dockerfiles/README.md).
### 💻 Bare-Metal / On-Server (Experimental - looking ofr maintainers)
- 🧪 [(Experimental) On-hardware installation](https://github.com/jokob-sk/NetAlertX/blob/main/docs/HW_INSTALL.md)
- Alternative bare-metal forks:
- ✅ [leiweibau's fork](https://github.com/leiweibau/Pi.Alert/) (maintained)
- ❌ [pucherot's original code](https://github.com/pucherot/Pi.Alert/) (unmaintained)
---
## Help and Support
Before opening an issue:
- 🔍 [Check common issues](https://github.com/jokob-sk/NetAlertX/blob/main/docs/DEBUG_TIPS.md#common-issues).
- 📌 [Look at closed issues](https://github.com/jokob-sk/NetAlertX/issues?q=is%3Aissue+is%3Aclosed).
-**Enable debugging** before reporting: [Debug Guide](https://github.com/jokob-sk/NetAlertX/blob/main/docs/DEBUG_TIPS.md).
**Follow the issue template** for faster resolution.

View File

@@ -180,8 +180,7 @@ function validateRegex(elem) {
const iconSpan = $(elem).parent().find(".validityCheck");
const inputElem = $(elem);
const regexTmp = atob($(inputElem).attr("my-base64Regex")); // Decode base64 regex
console.log(regexTmp);
const regex = new RegExp(regexTmp); // Convert to a valid RegExp object
let attempts = 0;

View File

@@ -328,7 +328,7 @@
"Gen_Upd_Fail": "Échec de la mise à jour",
"Gen_Update": "Mise à jour",
"Gen_Update_Value": "Valeur à mettre à jour",
"Gen_ValidIcon": "",
"Gen_ValidIcon": "<i class=\"fa-solid fa-chevron-right \"></i>",
"Gen_Warning": "Avertissement",
"Gen_Work_In_Progress": "Travaux en cours, c'est le bon moment pour faire un retour via la liste d'anomalies sur Github https://github.com/jokob-sk/NetAlertX/issues",
"Gen_create_new_device": "Nouvel appareil",
@@ -753,4 +753,4 @@
"settings_update_item_warning": "Mettre à jour la valeur ci-dessous. Veillez à bien suivre le même format qu'auparavant. <b>Il n'y a pas de pas de contrôle.</b>",
"test_event_icon": "fa-vial-circle-check",
"test_event_tooltip": "Enregistrer d'abord vos modifications avant de tester vôtre paramétrage."
}
}

View File

@@ -328,7 +328,7 @@
"Gen_Upd_Fail": "Aggiornamento fallito",
"Gen_Update": "Aggiorna",
"Gen_Update_Value": "Aggiorna valore",
"Gen_ValidIcon": "",
"Gen_ValidIcon": "<i class=\"fa-solid fa-chevron-right \"></i>",
"Gen_Warning": "Avviso",
"Gen_Work_In_Progress": "Lavori in corso, è quindi un buon momento per un feedback su https://github.com/jokob-sk/NetAlertX/issues",
"Gen_create_new_device": "Nuovo dispositivo",
@@ -753,4 +753,4 @@
"settings_update_item_warning": "Aggiorna il valore qui sotto. Fai attenzione a seguire il formato precedente. <b>La convalida non viene eseguita.</b>",
"test_event_icon": "fa-vial-circle-check",
"test_event_tooltip": "Salva le modifiche prima di provare le nuove impostazioni."
}
}

0
front/php/templates/language/pl_pl.json Normal file → Executable file
View File

0
front/php/templates/language/pt_br.json Normal file → Executable file
View File

View File

@@ -328,7 +328,7 @@
"Gen_Upd_Fail": "Не вдалося оновити",
"Gen_Update": "оновлення",
"Gen_Update_Value": "Оновити значення",
"Gen_ValidIcon": "",
"Gen_ValidIcon": "<i class=\"fa-solid fa-chevron-right \"></i>",
"Gen_Warning": "УВАГА",
"Gen_Work_In_Progress": "Робота триває, час залишити відгук на https://github.com/jokob-sk/NetAlertX/issues",
"Gen_create_new_device": "новий пристрій",
@@ -753,4 +753,4 @@
"settings_update_item_warning": "Оновіть значення нижче. Слідкуйте за попереднім форматом. <b>Перевірка не виконана.</b>",
"test_event_icon": "fa-vial-circle- check",
"test_event_tooltip": "Перш ніж перевіряти налаштування, збережіть зміни."
}
}

48
mkdocs.yml Executable file
View File

@@ -0,0 +1,48 @@
site_name: NetAlertX Docs
site_url: https://jokob-sk.github.io/NetAlertX/
nav:
- Home: index.md
- Installation:
- Installation: HW_INSTALL.md
- Migration Guide: MIGRATION.md
- Docker Compose: DOCKER_COMPOSE.md
- Docker File Permissions: FILE_PERMISSIONS.md
- Synology Guide: SYNOLOGY_GUIDE.md
- Community Guides: COMMUNITY_GUIDES.md
- Setup:
- Subnets: SUBNETS.md
- Remote Networks: REMOTE_NETWORKS.md
- Notifications Guide: NOTIFICATIONS.md
- Emails: SMTP.md
- Authelia: AUTHELIA.md
- Backups: BACKUPS.md
- Performance: PERFORMANCE.md
- Home Assistant: HOME_ASSISTANT.md
- Reverse DNS: REVERSE_DNS.md
- Pi-hole Guide: PIHOLE_GUIDE.md
- Reverse Proxy: REVERSE_PROXY.md
- Webhooks (n8n): WEBHOOK_N8N.md
- Device guides:
- Management: DEVICE_MANAGEMENT.md
- Bulk Editing: DEVICES_BULK_EDITING.md
- Random MAC: RANDOM_MAC.md
- Custom Properties: CUSTOM_PROPERTIES.md
- Device Display Settings: DEVICE_DISPLAY_SETTINGS.md
- Session Info: SESSION_INFO.md
- Icons: ICONS.md
- Network Topology: NETWORK_TREE.md
- Troubleshooting:
- Debugging Tips: DEBUG_TIPS.md
- Debugging Invalid JSON: DEBUG_INVALID_JSON.md
- Debugging Plugins: DEBUG_PLUGINS.md
- Debugging Web UI Port: WEB_UI_PORT_DEBUG.md
- Development:
- Environment Setup: DEV_ENV_SETUP.md
- Frontend Development: FRONTEND_DEVELOPMENT.md
- Development: PLUGINS_DEV.md
- Webhook Secret: WEBHOOK_SECRET.md
- API: API.md
- Database: DATABASE.md
- Settings: SETTINGS_SYSTEM.md
- Updates: UPDATES.md
- Versions: VERSIONS.md