diff --git a/.github/workflows/docker_dev.yml b/.github/workflows/docker_dev.yml index 40e74449..a9944e50 100755 --- a/.github/workflows/docker_dev.yml +++ b/.github/workflows/docker_dev.yml @@ -1,4 +1,3 @@ ---- name: docker on: @@ -37,7 +36,7 @@ jobs: - name: Get release version id: get_version - run: echo "::set-output name=version::${{ 'Dev' }}" + run: echo "version=Dev" >> $GITHUB_OUTPUT - name: Create .VERSION file run: echo "${{ steps.get_version.outputs.version }}" >> .VERSION @@ -46,13 +45,13 @@ jobs: id: meta uses: docker/metadata-action@v4 with: - # list of Docker images to use as base name for tags images: | + ghcr.io/jokob-sk/netalertx-dev + ghcr.io/jokob-sk/pi.alert-dev jokobsk/netalertx-dev - # generate Docker tags based on the following events/attributes + jokobsk/pi.alert-dev tags: | type=raw,value=latest - type=schedule type=ref,event=branch type=ref,event=pr type=semver,pattern={{version}} @@ -60,24 +59,20 @@ jobs: type=semver,pattern={{major}} type=sha - - name: Log in to Github Container registry + - name: Log in to Github Container Registry (GHCR) uses: docker/login-action@v3 with: registry: ghcr.io username: jokob-sk password: ${{ secrets.GITHUB_TOKEN }} - - name: Login to DockerHub + - name: Log in to DockerHub if: github.event_name != 'pull_request' uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - # # Disable this after use - # - name: Prune Docker Builder - # run: docker builder prune --force - - name: Build and push uses: docker/build-push-action@v3 with: @@ -86,6 +81,3 @@ jobs: push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - # # ⚠ disable cache if build is failing to download debian packages - # cache-from: type=registry,ref=ghcr.io/jokob-sk/netalertx:buildcache - # cache-to: type=registry,ref=ghcr.io/jokob-sk/netalertx:buildcache,mode=max diff --git a/.github/workflows/docker_prod.yml b/.github/workflows/docker_prod.yml index 3a45c9c4..5d133fd5 100755 --- a/.github/workflows/docker_prod.yml +++ b/.github/workflows/docker_prod.yml @@ -48,8 +48,10 @@ jobs: with: # list of Docker images to use as base name for tags images: | - jokobsk/pi.alert + ghcr.io/jokob-sk/netalertx + ghcr.io/jokob-sk/pi.alert jokobsk/netalertx + jokobsk/pi.alert # generate Docker tags based on the following events/attributes tags: | type=semver,pattern={{version}},value=${{ inputs.version }} diff --git a/docs/HELPER_SCRIPTS.md b/docs/HELPER_SCRIPTS.md index 035e8c87..628ea19b 100755 --- a/docs/HELPER_SCRIPTS.md +++ b/docs/HELPER_SCRIPTS.md @@ -1,6 +1,6 @@ # NetAlertX Community Helper Scripts Overview -This page provides an overview of community-contributed scripts for NetAlertX. These scripts are not maintained by the NetAlertX team and are provided as-is. +This page provides an overview of community-contributed scripts for NetAlertX. These scripts are not actively maintained and are provided as-is. ## Community Scripts @@ -8,14 +8,14 @@ You can find all scripts in this [scripts GitHub folder](https://github.com/joko | Script Name | Description | Author | Version | Release Date | |------------|-------------|--------|---------|--------------| -| **NetAlertX-New-Devices-Checkmk-Script** | Checks for new devices in NetAlertX and reports status to Checkmk. | N/A | 1.0 | 08-Jan-2025 | +| **New Devices Checkmk Script** | Checks for new devices in NetAlertX and reports status to Checkmk. | N/A | 1.0 | 08-Jan-2025 | | **DB Cleanup Script** | Queries and removes old device-related entries from the database. | [laxduke](https://github.com/laxduke) | 1.0 | 23-Dec-2024 | -| **NetAlertX OPNsense DHCP Lease Converter** | Retrieves DHCP lease data from OPNsense and converts it to `dnsmasq` format. | [im-redactd](https://github.com/im-redactd) | 1.0 | 24-Feb-2025 | +| **OPNsense DHCP Lease Converter** | Retrieves DHCP lease data from OPNsense and converts it to `dnsmasq` format. | [im-redactd](https://github.com/im-redactd) | 1.0 | 24-Feb-2025 | ## Important Notes > [!NOTE] > These scripts are community-supplied and not actively maintained. Use at your own discretion. -For detailed usage instructions, refer to each script's documentation. +For detailed usage instructions, refer to each script's documentation in each [scripts GitHub folder](https://github.com/jokob-sk/NetAlertX/tree/main/scripts). diff --git a/docs/ICONS.md b/docs/ICONS.md index 3ac355bb..8db9a9f7 100755 --- a/docs/ICONS.md +++ b/docs/ICONS.md @@ -40,7 +40,7 @@ Copying the HTML code from [Font Awesome](https://fontawesome.com/search?o=r&m=f - 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 +## Font Awesome Pro icons If you own the premium package of Font Awesome icons you can mount it in your Docker container the following way: diff --git a/docs/REVERSE_DNS.md b/docs/REVERSE_DNS.md index 78b02f80..5cd05db8 100755 --- a/docs/REVERSE_DNS.md +++ b/docs/REVERSE_DNS.md @@ -8,7 +8,6 @@ If you are running a DNS server, such as **AdGuard**, set up **Private reverse D > ``` > jokob@Synology-NAS:/$ nslookup 192.168.1.58 > ** server can't find 58.1.168.192.in-addr.arpa: NXDOMAIN -> > ``` > Example 2: Reverse DNS `enabled` diff --git a/docs/img/netalertx_docs.png b/docs/img/netalertx_docs.png index c731346c..516e5210 100755 Binary files a/docs/img/netalertx_docs.png and b/docs/img/netalertx_docs.png differ diff --git a/front/img/netalertx_docs.png b/front/img/netalertx_docs.png index c731346c..516e5210 100755 Binary files a/front/img/netalertx_docs.png and b/front/img/netalertx_docs.png differ diff --git a/front/plugins/_publisher_mqtt/config.json b/front/plugins/_publisher_mqtt/config.json index 63e3fa64..77443db6 100755 --- a/front/plugins/_publisher_mqtt/config.json +++ b/front/plugins/_publisher_mqtt/config.json @@ -332,7 +332,7 @@ } ] }, - "default_value": "python3 /app/front/plugins/_publisher_mqtt/mqtt.py devices={devices}", + "default_value": "python3 /app/front/plugins/_publisher_mqtt/mqtt.py", "options": [], "localized": ["name", "description"], "name": [ diff --git a/front/plugins/_publisher_mqtt/mqtt.py b/front/plugins/_publisher_mqtt/mqtt.py index 217adcd6..4a84153a 100755 --- a/front/plugins/_publisher_mqtt/mqtt.py +++ b/front/plugins/_publisher_mqtt/mqtt.py @@ -464,6 +464,7 @@ def mqtt_start(db): sensorConfig = create_sensor(mqtt_client, deviceId, devDisplayName, 'sensor', 'first_connection', 'calendar-start', device["devMac"]) sensorConfig = create_sensor(mqtt_client, deviceId, devDisplayName, 'sensor', 'last_connection', 'calendar-end', device["devMac"]) + # handle device_tracker # device_tracker attributes devJson = { "last_ip": device["devLastIP"], @@ -480,9 +481,6 @@ def mqtt_start(db): "network_parent_name": next((dev["devName"] for dev in devices if dev["devMAC"] == device["devParentMAC"]), "") } - # bulk update device sensors in home assistant - publish_mqtt(mqtt_client, sensorConfig.state_topic, devJson) - # create and update is_present sensor sensorConfig = create_sensor(mqtt_client, deviceId, devDisplayName, 'binary_sensor', 'is_present', 'wifi', device["devMac"]) publish_mqtt(mqtt_client, sensorConfig.state_topic,