mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
Docs + string fixes
This commit is contained in:
@@ -2,22 +2,23 @@
|
||||
|
||||
### Script based plugins
|
||||
|
||||
- [website_monitor (WEBMON)](https://github.com/jokob-sk/Pi.Alert/blob/main/front/plugins/website_monitor/)
|
||||
- [dhcp_servers (DHCPSRVS)](https://github.com/jokob-sk/Pi.Alert/blob/main/front/plugins/dhcp_servers/)
|
||||
- [dhcp_leases (DHCPLSS)](https://github.com/jokob-sk/Pi.Alert/blob/main/front/plugins/dhcp_leases/)
|
||||
- [unifi_import (UNFIMP)](https://github.com/jokob-sk/Pi.Alert/blob/main/front/plugins/unifi_import/)
|
||||
- [snmp_discovery (SNMPDSC)](https://github.com/jokob-sk/Pi.Alert/blob/main/front/plugins/snmp_discovery/)
|
||||
- [undiscoverables (UNDIS)](https://github.com/jokob-sk/Pi.Alert/blob/main/front/plugins/undiscoverables/)
|
||||
- [arp_scan (ARPSCAN)](https://github.com/jokob-sk/Pi.Alert/blob/main/front/plugins/arp_scan/)
|
||||
- [website_monitor (WEBMON)](/front/plugins/website_monitor/)
|
||||
- [dhcp_servers (DHCPSRVS)](/front/plugins/dhcp_servers/)
|
||||
- [dhcp_leases (DHCPLSS)](/front/plugins/dhcp_leases/)
|
||||
- [unifi_import (UNFIMP)](/front/plugins/unifi_import/)
|
||||
- [snmp_discovery (SNMPDSC)](/front/plugins/snmp_discovery/)
|
||||
- [undiscoverables (UNDIS)](/front/plugins/undiscoverables/)
|
||||
- [arp_scan (ARPSCAN)](/front/plugins/arp_scan/)
|
||||
- [set_password (SETPWD)](/front/plugins/set_password/)
|
||||
|
||||
### SQL query based plugins
|
||||
- [nmap_services (NMAPSERV)](https://github.com/jokob-sk/Pi.Alert/blob/main/front/plugins/nmap_services/)
|
||||
- [nmap_services (NMAPSERV)](/front/plugins/nmap_services/)
|
||||
|
||||
### template based plugins
|
||||
- [newdev_template (NEWDEV)](https://github.com/jokob-sk/Pi.Alert/blob/main/front/plugins/newdev_template/)
|
||||
- [newdev_template (NEWDEV)](/front/plugins/newdev_template/)
|
||||
|
||||
### External SQLite based plugins
|
||||
- [pihole_scan (PIHOLE)](https://github.com/jokob-sk/Pi.Alert/blob/main/front/plugins/newdev_template/)
|
||||
- [pihole_scan (PIHOLE)](/front/plugins/newdev_template/)
|
||||
|
||||
## 🌟 Create a custom plugin: Overview
|
||||
|
||||
@@ -127,7 +128,7 @@ Any of the above data sources have to return a "table" of the exact structure as
|
||||
|
||||
### 👍 Python script.py tips
|
||||
|
||||
The [Undicoverables plugins `script.py` file](https://github.com/jokob-sk/Pi.Alert/blob/main/front/plugins/undiscoverables/script.py) is a good and simple example to start with if you are considering creating a custom plugin. It uses the [`plugin_helper.py` library](https://github.com/jokob-sk/Pi.Alert/blob/main/front/plugins/plugin_helper.py) that significantly simplifies the creation of your custom script.
|
||||
The [Undicoverables plugins `script.py` file](/front/plugins/undiscoverables/script.py) is a good and simple example to start with if you are considering creating a custom plugin. It uses the [`plugin_helper.py` library](/front/plugins/plugin_helper.py) that significantly simplifies the creation of your custom script.
|
||||
|
||||
#### 🔎 last_result.log examples
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## Overview
|
||||
|
||||
A simple template-based plugin for setting the password.
|
||||
A simple script-based plugin for setting the password.
|
||||
|
||||
### Usage
|
||||
|
||||
@@ -8,4 +8,41 @@ A simple template-based plugin for setting the password.
|
||||
|
||||
### Notes
|
||||
|
||||
- N/A
|
||||
- The plugin is executed on the `RUN` type `before_config_save` so it's possible to update the `pialert.conf` file before the data is loaded into the app.
|
||||
- The executed command is stored in the `CMD` setting: `/home/pi/pialert/back/pialert-cli set_password {password}`
|
||||
- The `{password}` parameter is replaced via the parameter and setting below:
|
||||
|
||||
```json
|
||||
...
|
||||
"params" : [
|
||||
{
|
||||
"name" : "password",
|
||||
"type" : "setting",
|
||||
"value" : "SETPWD_password"
|
||||
}
|
||||
],
|
||||
|
||||
...
|
||||
{
|
||||
"function": "password",
|
||||
"type": "password",
|
||||
"maxLength": 50,
|
||||
"default_value": "123456",
|
||||
"options": [],
|
||||
"localized": ["name", "description"],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Password"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "The default password is <code>123456</code>. To change the password run <code>/home/pi/pialert/back/pialert-cli set_password {password}</code> in the container"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
```
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
}],
|
||||
"description": [{
|
||||
"language_code":"en_us",
|
||||
"string" : "Set to <code>before_config_save</code> and specify password to reset your pasword in <code>SETPWD_password</code>."
|
||||
"string" : "Set to <code>before_config_save</code> and specify password to reset your pasword in <code>SETPWD_password</code>. You can set to <code>disabled</code> once the password is changed."
|
||||
}]
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user