Settinsg work ⚒

This commit is contained in:
Jokob-sk
2023-11-09 07:04:30 +11:00
parent b86f1d75b5
commit 93420b1f86
9 changed files with 45 additions and 39 deletions

View File

@@ -42,6 +42,8 @@ RUN apt-get install -y python3-venv
RUN python3 -m venv myenv RUN python3 -m venv myenv
RUN /bin/bash -c "source myenv/bin/activate && update-alternatives --install /usr/bin/python python /usr/bin/python3 10 && pip3 install requests paho-mqtt scapy cron-converter pytz json2table dhcp-leases pyunifi speedtest-cli chardet" RUN /bin/bash -c "source myenv/bin/activate && update-alternatives --install /usr/bin/python python /usr/bin/python3 10 && pip3 install requests paho-mqtt scapy cron-converter pytz json2table dhcp-leases pyunifi speedtest-cli chardet"
# Create a buildtimestamp.txt to later check if a new version was released
RUN date +%s > /home/pi/pialert/front/buildtimestamp.txt
CMD ["/home/pi/pialert/dockerfiles/start.sh"] CMD ["/home/pi/pialert/dockerfiles/start.sh"]

View File

@@ -11,9 +11,9 @@ Scans for devices, port changes on your WIFI/LAN and alerts you if unknown devic
| 🐳 [Docker hub](https://registry.hub.docker.com/r/jokobsk/pi.alert) | 📑 [Docker guide](https://github.com/jokob-sk/Pi.Alert/blob/main/dockerfiles/README.md) |🆕 [Release notes](https://github.com/jokob-sk/Pi.Alert/releases) | 📚 [All Docs](https://github.com/jokob-sk/Pi.Alert/tree/main/docs) | | 🐳 [Docker hub](https://registry.hub.docker.com/r/jokobsk/pi.alert) | 📑 [Docker guide](https://github.com/jokob-sk/Pi.Alert/blob/main/dockerfiles/README.md) |🆕 [Release notes](https://github.com/jokob-sk/Pi.Alert/releases) | 📚 [All Docs](https://github.com/jokob-sk/Pi.Alert/tree/main/docs) |
|----------------------|----------------------| ----------------------| ----------------------| |----------------------|----------------------| ----------------------| ----------------------|
## Why PiAlert❓ Isn't this scary 👻... ## Why PiAlert❓
...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 😖. 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 😖.
PiAlert 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 🔐_. PiAlert 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 🔐_.

View File

@@ -94,8 +94,11 @@ chmod -R a+rwx $INSTALL_DIR # second time after we copied the files
chmod -R a+rw $INSTALL_DIR/pialert/config chmod -R a+rw $INSTALL_DIR/pialert/config
sudo chgrp -R www-data $INSTALL_DIR/pialert sudo chgrp -R www-data $INSTALL_DIR/pialert
# Create buildtimestamp.txt # Check if buildtimestamp.txt doesn't exist
date +%s > "$INSTALL_DIR/pialert/front/buildtimestamp.txt" if [ ! -f "$INSTALL_DIR/pialert/front/buildtimestamp.txt" ]; then
# Create buildtimestamp.txt
date +%s > "$INSTALL_DIR/pialert/front/buildtimestamp.txt"
fi
# start PHP # start PHP

View File

@@ -528,7 +528,7 @@
"run_event_tooltip": "Enable the setting and save your changes at first before you run it.", "run_event_tooltip": "Enable the setting and save your changes at first before you run it.",
"run_event_icon": "fa-play", "run_event_icon": "fa-play",
"general_event_title": "Executing an ad-hoc event", "general_event_title": "Executing an ad-hoc event",
"general_event_description": " The event you nove triggered might take a while until background processes finish. The execution ended once you see <code>finished</code> below. Check the <a href='/maintenance.php#tab_Logging'>error log</a> if you didn not get the expected result. <br/> <br/> Status: ", "general_event_description": " The event you have triggered might take a while until background processes finish. The execution ended once you see <code>finished</code> below. Check the <a href='/maintenance.php#tab_Logging'>error log</a> if you didn not get the expected result. <br/> <br/> Status: ",
"Plugins_Unprocessed_Events": "Unprocessed Events", "Plugins_Unprocessed_Events": "Unprocessed Events",
"Plugins_Objects": "Plugin Objects", "Plugins_Objects": "Plugin Objects",
"Plugins_DeleteAll": "Delete all (filters are ignored)", "Plugins_DeleteAll": "Delete all (filters are ignored)",

View File

@@ -452,7 +452,7 @@
"run_event_tooltip" : "Enable the setting and save your changes at first before you run it.", "run_event_tooltip" : "Enable the setting and save your changes at first before you run it.",
"run_event_icon" : "fa-play", "run_event_icon" : "fa-play",
"general_event_title" : "Executing an ad-hoc event", "general_event_title" : "Executing an ad-hoc event",
"general_event_description" : "The event you nove triggered might take a while until background processes finish. The execution ended once the below execution queue empties (Check the <a href='/maintenance.php#tab_Logging'>error log</a> if you encounter issues). <br/> <br/> Execution queue:", "general_event_description" : "The event you have triggered might take a while until background processes finish. The execution ended once the below execution queue empties (Check the <a href='/maintenance.php#tab_Logging'>error log</a> if you encounter issues). <br/> <br/> Execution queue:",
"Plugins_Unprocessed_Events" : "Unprocessed Events", "Plugins_Unprocessed_Events" : "Unprocessed Events",
"Plugins_Objects" : "Plugin Objects", "Plugins_Objects" : "Plugin Objects",
"Plugins_DeleteAll" : "Delete all (filters are ignored)", "Plugins_DeleteAll" : "Delete all (filters are ignored)",
@@ -466,7 +466,7 @@
"settings_device_scanners_icon" : "fa-solid fa-magnifying-glass-plus", "settings_device_scanners_icon" : "fa-solid fa-magnifying-glass-plus",
"settings_other_scanners_icon" : "fa-solid fa-recycle", "settings_other_scanners_icon" : "fa-solid fa-recycle",
"settings_system_icon" : "fa-solid fa-gear", "settings_system_icon" : "fa-solid fa-gear",
"settings_publisher_icon" : "fa-solid fa-comment-dots", "settings_publishers_icon" : "fa-solid fa-comment-dots",
"Settings_Metadata_Toggle" : "Show/hide metadata for the given setting.", "Settings_Metadata_Toggle" : "Show/hide metadata for the given setting.",
"settings_missing" : "Not all settings loaded, refresh the page! This is probably caused by a high load on the database or app startup sequence.", "settings_missing" : "Not all settings loaded, refresh the page! This is probably caused by a high load on the database or app startup sequence.",
"settings_missing_block" : "You can not save your settings without specifying all setting keys. Refresh the page. This is probably caused by a high load on the database.", "settings_missing_block" : "You can not save your settings without specifying all setting keys. Refresh the page. This is probably caused by a high load on the database.",
@@ -480,7 +480,7 @@
"settings_other_scanners" : "Other, non-device scanner plugins that are currently enabled.", "settings_other_scanners" : "Other, non-device scanner plugins that are currently enabled.",
"settings_device_scanners_label" : "Device scanners", "settings_device_scanners_label" : "Device scanners",
"settings_device_scanners" : "Device scanners used to discover devices that write into the CurrentScan database table.", "settings_device_scanners" : "Device scanners used to discover devices that write into the CurrentScan database table.",
"settings_publisher_label" : "Publishers", "settings_publishers_label" : "Publishers",
"settings_publishers" : "Enabled notification gateways - publishers, that will send a notification depending on your settings.", "settings_publishers" : "Enabled notification gateways - publishers, that will send a notification depending on your settings.",
"settings_expand_all" : "Expand all", "settings_expand_all" : "Expand all",
"Settings_device_Scanners_desync": "⚠ Device scanner schedules are out-of-sync.", "Settings_device_Scanners_desync": "⚠ Device scanner schedules are out-of-sync.",

View File

@@ -14,36 +14,37 @@
### 🔌 Plugins & 📚 Docs ### 🔌 Plugins & 📚 Docs
| Required | CurrentScan | Unique Prefix | Data source | Type | Link + Docs | | Required | CurrentScan | Unique Prefix | Data source | Type | Link + Docs |
|----------|-------------|---------------|--------------------|--------------|------------------------------------------------------------------| |----------|-------------|---------------|--------------------|----------------|------------------------------------------------------------------|
| | | APPRISE | Script | 💬 publisher | 📚[_publisher_apprise](/front/plugins/_publisher_apprise/) | | | | APPRISE | Script | 💬 publisher | 📚[_publisher_apprise](/front/plugins/_publisher_apprise/) |
| | Yes | ARPSCAN | Script | 🔍dev scanner| 📚[arp_scan](/front/plugins/arp_scan/) | | | Yes | ARPSCAN | Script | 🔍dev scanner | 📚[arp_scan](/front/plugins/arp_scan/) |
| | | CSVBCKP | Script | ⚙ system | 📚[csv_backup](/front/plugins/csv_backup/) | | | | CSVBCKP | Script | ⚙ system | 📚[csv_backup](/front/plugins/csv_backup/) |
| Yes* | | DBCLNP | Script | ⚙ system | 📚[db_cleanup](/front/plugins/db_cleanup/) | | Yes* | | DBCLNP | Script | ⚙ system | 📚[db_cleanup](/front/plugins/db_cleanup/) |
| | | DDNS | Script | ⚙ system | 📚[ddns_update](/front/plugins/ddns_update/) | | | | DDNS | Script | ⚙ system | 📚[ddns_update](/front/plugins/ddns_update/) |
| | Yes | DHCPLSS | Script | 🔍dev scanner| 📚[dhcp_leases](/front/plugins/dhcp_leases/) | | | Yes | DHCPLSS | Script | 🔍dev scanner | 📚[dhcp_leases](/front/plugins/dhcp_leases/) |
| | | DHCPSRVS | Script | ♻ other | 📚[dhcp_servers](/front/plugins/dhcp_servers/) | | | | DHCPSRVS | Script | ♻ other | 📚[dhcp_servers](/front/plugins/dhcp_servers/) |
| | Yes | INTRNT | Script | 🔍dev scanner| 📚[internet_ip](/front/plugins/internet_ip/) | | | Yes | INTRNT | Script | 🔍dev scanner | 📚[internet_ip](/front/plugins/internet_ip/) |
| | | INTRSPD | Script | ♻ other | 📚[internet_speedtest](/front/plugins/internet_speedtest/) | | | | INTRSPD | Script | ♻ other | 📚[internet_speedtest](/front/plugins/internet_speedtest/) |
| Yes | | NEWDEV | Template | ⚙ system | 📚[newdev_template](/front/plugins/newdev_template/) | | Yes | | NEWDEV | Template | ⚙ system | 📚[newdev_template](/front/plugins/newdev_template/) |
| | | PHOLUS | Script | ♻ other | 📚[pholus_scan](/front/plugins/pholus_scan/) | | | | PHOLUS | Script | ♻ other | 📚[pholus_scan](/front/plugins/pholus_scan/) |
| | | MQTT | Script | 💬 publisher | 📚[_publisher_mqtt](/front/plugins/_publisher_mqtt/) | | | | MQTT | Script | 💬 publisher | 📚[_publisher_mqtt](/front/plugins/_publisher_mqtt/) |
| | | NMAP | Script | ♻ other | 📚[nmap_scan](/front/plugins/nmap_scan/) | | | | NMAP | Script | ♻ other | 📚[nmap_scan](/front/plugins/nmap_scan/) |
| | | NTFY | Script | 💬 publisher | 📚[_publisher_ntfy](/front/plugins/_publisher_ntfy/) | | | | NTFY | Script | 💬 publisher | 📚[_publisher_ntfy](/front/plugins/_publisher_ntfy/) |
| | Yes | PIHOLE | External SQLite DB | 🔍dev scanner| 📚[pihole_scan](/front/plugins/pihole_scan/) | | | Yes | PIHOLE | External SQLite DB | 🔍dev scanner | 📚[pihole_scan](/front/plugins/pihole_scan/) |
| | | PUSHSAFER | Script | 💬 publisher | 📚[_publisher_pushsafer](/front/plugins/_publisher_pushsafer/) | | | | PUSHSAFER | Script | 💬 publisher | 📚[_publisher_pushsafer](/front/plugins/_publisher_pushsafer/) |
| | | SETPWD | Script | ⚙ system | 📚[set_password](/front/plugins/set_password/) | | | | SETPWD | Script | ⚙ system | 📚[set_password](/front/plugins/set_password/) |
| | | SMTP | Script | 💬 publisher | 📚[_publisher_email](/front/plugins/_publisher_email/) | | | | SMTP | Script | 💬 publisher | 📚[_publisher_email](/front/plugins/_publisher_email/) |
| | | SNMPDSC | Script | 🔍dev scanner| 📚[snmp_discovery](/front/plugins/snmp_discovery/) | | | Yes | SNMPDSC | Script | 🔍dev scanner | 📚[snmp_discovery](/front/plugins/snmp_discovery/) |
| | Yes** | UNDIS | Script | ♻ other | 📚[undiscoverables](/front/plugins/undiscoverables/) | | | Yes** | UNDIS | Script | ♻ other | 📚[undiscoverables](/front/plugins/undiscoverables/) |
| | Yes | UNFIMP | Script | 🔍dev scanner| 📚[unifi_import](/front/plugins/unifi_import/) | | | Yes | UNFIMP | Script | 🔍dev scanner | 📚[unifi_import](/front/plugins/unifi_import/) |
| | | VNDRPDT | Script | ⚙ system | 📚[vendor_update](/front/plugins/vendor_update/) | | | | VNDRPDT | Script | ⚙ system | 📚[vendor_update](/front/plugins/vendor_update/) |
| | | WEBHOOK | Script | 💬 publisher | 📚[_publisher_webhook](/front/plugins/_publisher_webhook/) | | | | WEBHOOK | Script | 💬 publisher | 📚[_publisher_webhook](/front/plugins/_publisher_webhook/) |
| | | WEBMON | Script | ♻ other | 📚[website_monitor](/front/plugins/website_monitor/) | | | | WEBMON | Script | ♻ other | 📚[website_monitor](/front/plugins/website_monitor/) |
| N/A | | N/A | SQL query | | N/A, but the External SQLite DB plugins work similar | | N/A | | N/A | SQL query | | N/A, but the External SQLite DB plugins work similar |
> \* The database cleanup plugin (`DBCLNP`) is not _required_ but the app will become unusable after a while if not executed. > \* The database cleanup plugin (`DBCLNP`) is not _required_ but the app will become unusable after a while if not executed.
>
> \** The Undiscoverables plugin (`UNDIS`) inserts only user-specified dummy devices. > \** The Undiscoverables plugin (`UNDIS`) inserts only user-specified dummy devices.
> [!NOTE] > [!NOTE]

View File

@@ -105,7 +105,7 @@
}, },
{ {
"function": "DB_PATH", "function": "DB_PATH",
"type": "readonly", "type": "text",
"default_value":"/etc/pihole/pihole-FTL.db", "default_value":"/etc/pihole/pihole-FTL.db",
"options": [], "options": [],
"localized": ["name", "description"], "localized": ["name", "description"],

View File

@@ -128,7 +128,7 @@ while ($row = $result -> fetchArray (SQLITE3_ASSOC)) {
<div class ="bg-grey-dark color-palette box panel panel-default col-sm-12 box-default box-info" > <div class ="bg-grey-dark color-palette box panel panel-default col-sm-12 box-default box-info" >
<div class ="settings-group col-sm-12"> <div class ="settings-group col-sm-12">
<i class="<?= lang("settings_publisher_icon");?>"></i> <?= lang("settings_publisher_label");?> <i class="<?= lang("settings_publishers_icon");?>"></i> <?= lang("settings_publishers_label");?>
</div> </div>
<div class =" col-sm-12" id="publisher_content"></div> <div class =" col-sm-12" id="publisher_content"></div>
</div> </div>
@@ -202,7 +202,7 @@ while ($row = $result -> fetchArray (SQLITE3_ASSOC)) {
overviewSections = [ overviewSections = [
'device_scanners', 'device_scanners',
'other_scanners', 'other_scanners',
'publishers_enabled' 'publishers'
] ]
overviewSectionsHtml = [ overviewSectionsHtml = [
pluginCards(enabledDeviceScanners,['RUN', 'RUN_SCHD']), pluginCards(enabledDeviceScanners,['RUN', 'RUN_SCHD']),

View File

@@ -218,7 +218,7 @@ def getPluginObject(keyValues):
if all_match: if all_match:
return item return item
mylog('verbose', [f'[{module_name}] ⚠ ERROR - Object not found {json.dumps(keyValues)} ']) mylog('verbose', [f'[{module_name}] 💬 INFO - Object not found {json.dumps(keyValues)} '])
return {} return {}