mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
Docs
This commit is contained in:
@@ -27,7 +27,7 @@ $lang['en_us'] = array(
|
|||||||
'Gen_AreYouSure' => 'Are you sure?',
|
'Gen_AreYouSure' => 'Are you sure?',
|
||||||
'Gen_Upd' => 'Updated successfully',
|
'Gen_Upd' => 'Updated successfully',
|
||||||
'Gen_Upd_Fail' => 'Update failed',
|
'Gen_Upd_Fail' => 'Update failed',
|
||||||
'Gen_Help' => 'Need help?',
|
'Gen_ReadDocs' => 'Read more in the docs.',
|
||||||
'Gen_DataUpdatedUITakesTime' => 'OK - It may take a while for the UI to update if a scan is runnig.',
|
'Gen_DataUpdatedUITakesTime' => 'OK - It may take a while for the UI to update if a scan is runnig.',
|
||||||
'Gen_LockedDB' => 'ERROR - DB might be locked - Check F12 Dev tools -> Console or try later.',
|
'Gen_LockedDB' => 'ERROR - DB might be locked - Check F12 Dev tools -> Console or try later.',
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ $lang['es_es'] = array(
|
|||||||
'Gen_AreYouSure' => '¿Estás seguro de',
|
'Gen_AreYouSure' => '¿Estás seguro de',
|
||||||
'Gen_Upd' => 'Actualizado correctamente',
|
'Gen_Upd' => 'Actualizado correctamente',
|
||||||
'Gen_Upd_Fail' => 'Fallo al actualizar',
|
'Gen_Upd_Fail' => 'Fallo al actualizar',
|
||||||
'Gen_Help' => 'Ayuda',
|
'Gen_ReadDocs' => 'Ayuda',
|
||||||
'Gen_DataUpdatedUITakesTime' => 'Correcto - La interfaz puede tardar en actualizarse si se está ejecutando un escaneo.',
|
'Gen_DataUpdatedUITakesTime' => 'Correcto - La interfaz puede tardar en actualizarse si se está ejecutando un escaneo.',
|
||||||
'Gen_LockedDB' => 'Fallo - La base de datos puede estar bloqueada - Pulsa F1 -> Ajustes de desarrolladores -> Consola o prueba más tarde.',
|
'Gen_LockedDB' => 'Fallo - La base de datos puede estar bloqueada - Pulsa F1 -> Ajustes de desarrolladores -> Consola o prueba más tarde.',
|
||||||
|
|
||||||
|
|||||||
@@ -364,7 +364,7 @@ function generateTabs()
|
|||||||
${localize(obj, 'description')}
|
${localize(obj, 'description')}
|
||||||
|
|
||||||
<span>
|
<span>
|
||||||
<a href="https://github.com/jokob-sk/Pi.Alert/tree/main/front/plugins/${obj.code_name}" target="_blank"><?= lang('Gen_Help');?></a>
|
<a href="https://github.com/jokob-sk/Pi.Alert/tree/main/front/plugins/${obj.code_name}" target="_blank"><?= lang('Gen_ReadDocs');?></a>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,18 @@
|
|||||||
## Overview
|
## 📚 Docs for individual plugins
|
||||||
|
|
||||||
|
### 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/)
|
||||||
|
|
||||||
|
### SQL query based plugins
|
||||||
|
- [nmap_services (NMAPSERV)](https://github.com/jokob-sk/Pi.Alert/blob/main/front/plugins/nmap_services/)
|
||||||
|
|
||||||
|
## 🌟 Create a custom plugin: Overview
|
||||||
|
|
||||||
| ![Screen 1][screen1] | ![Screen 2][screen2] |
|
| ![Screen 1][screen1] | ![Screen 2][screen2] |
|
||||||
|----------------------|----------------------|
|
|----------------------|----------------------|
|
||||||
@@ -440,20 +454,6 @@ The UI will adjust how columns are displayed in the UI based on the definition o
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
## Full Examples
|
|
||||||
|
|
||||||
### Script based plugins
|
|
||||||
|
|
||||||
- [website_monitor (WEBMON) config.json](https://github.com/jokob-sk/Pi.Alert/blob/main/front/plugins/website_monitor/config.json)
|
|
||||||
- [dhcp_servers (DHCPSRVS) config.json](https://github.com/jokob-sk/Pi.Alert/blob/main/front/plugins/dhcp_servers/config.json)
|
|
||||||
- [dhcp_leases (DHCPLSS) config.json](https://github.com/jokob-sk/Pi.Alert/blob/main/front/plugins/dhcp_leases/config.json)
|
|
||||||
- [unifi_import (UNFIMP) config.json](https://github.com/jokob-sk/Pi.Alert/blob/main/front/plugins/unifi_import/config.json)
|
|
||||||
- [snmp_discovery (SNMPDSC) config.json](https://github.com/jokob-sk/Pi.Alert/blob/main/front/plugins/snmp_discovery/config.json)
|
|
||||||
- [undiscoverables (UNDIS) config.json](https://github.com/jokob-sk/Pi.Alert/blob/main/front/plugins/undiscoverables/config.json)
|
|
||||||
|
|
||||||
### SQL query based plugins
|
|
||||||
- [nmap_services (NMAPSERV) config.json](https://github.com/jokob-sk/Pi.Alert/blob/main/front/plugins/nmap_services/config.json)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[screen1]: https://raw.githubusercontent.com/jokob-sk/Pi.Alert/main/docs/img/plugins.png "Screen 1"
|
[screen1]: https://raw.githubusercontent.com/jokob-sk/Pi.Alert/main/docs/img/plugins.png "Screen 1"
|
||||||
|
|||||||
@@ -82,13 +82,16 @@ while ($row = $result -> fetchArray (SQLITE3_ASSOC)) {
|
|||||||
// create settings groups
|
// create settings groups
|
||||||
$isIn = ' in ';
|
$isIn = ' in ';
|
||||||
foreach ($groups as $group)
|
foreach ($groups as $group)
|
||||||
{
|
{
|
||||||
|
$isPlugin = FALSE;
|
||||||
|
|
||||||
if (in_array($group, $settingCoreGroups))
|
if (in_array($group, $settingCoreGroups))
|
||||||
{
|
{
|
||||||
$settingGroupTypeHtml = "";
|
$settingGroupTypeHtml = "";
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
$settingGroupTypeHtml = ' (<i class="fa-regular fa-plug fa-sm"></i>) ';
|
$settingGroupTypeHtml = ' (<i class="fa-regular fa-plug fa-sm"></i>) ';
|
||||||
|
$isPlugin = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
$html = $html.'<div class=" box panel panel-default">
|
$html = $html.'<div class=" box panel panel-default">
|
||||||
@@ -101,6 +104,15 @@ while ($row = $result -> fetchArray (SQLITE3_ASSOC)) {
|
|||||||
<div class="panel-body">';
|
<div class="panel-body">';
|
||||||
$isIn = ' '; // open the first panel only by default on page load
|
$isIn = ' '; // open the first panel only by default on page load
|
||||||
|
|
||||||
|
if($isPlugin)
|
||||||
|
{
|
||||||
|
$html = $html.
|
||||||
|
'<div class=" row table_row" >
|
||||||
|
<div class="table_cell bold">
|
||||||
|
<i class="fa-regular fa-book fa-sm"></i> <a href="https://github.com/jokob-sk/Pi.Alert/tree/main/front/plugins" target="_blank">' . lang('Gen_ReadDocs').'</a></div>
|
||||||
|
</div>';
|
||||||
|
}
|
||||||
|
|
||||||
// populate settings for each group
|
// populate settings for each group
|
||||||
foreach ($settings as $set)
|
foreach ($settings as $set)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user