mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2026-04-05 01:31:49 -07:00
Compare commits
5 Commits
d3228b2d55
...
2fb6e8fb12
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2fb6e8fb12 | ||
|
|
15d16dcd81 | ||
|
|
28a5b6af2a | ||
|
|
651b346a27 | ||
|
|
df90060adf |
@@ -1,9 +1,5 @@
|
||||
## 🌟 Create a custom plugin: Overview
|
||||
|
||||
| ![Screen 1][screen1] | ![Screen 2][screen2] | ![Screen 3][screen3] |
|
||||
|----------------------|----------------------| ----------------------|
|
||||
| ![Screen 4][screen4] | ![Screen 5][screen5] |
|
||||
|
||||
NetAlertX comes with a plugin system to feed events from third-party scripts into the UI and then send notifications, if desired. The highlighted core functionality this plugin system supports, is:
|
||||
|
||||
* dynamic creation of a simple UI to interact with the discovered objects,
|
||||
@@ -12,7 +8,19 @@ NetAlertX comes with a plugin system to feed events from third-party scripts int
|
||||
* different column types for reported values to e.g. link back to a device
|
||||
* import objects into existing NetAlertX database tables
|
||||
|
||||
> (Currently, update/overwriting of existing objects is not supported.)
|
||||
> (Currently, update/overwriting of existing objects is only supported for devices via the `CurrentScan` table.)
|
||||
|
||||
### 🎥 Watch the video:
|
||||
|
||||
[](https://youtu.be/bjA7wIK_jXY)
|
||||
|
||||
### 📸 Screenshots
|
||||
|
||||
| ![Screen 1][screen1] | ![Screen 2][screen2] | ![Screen 3][screen3] |
|
||||
|----------------------|----------------------| ----------------------|
|
||||
| ![Screen 4][screen4] | ![Screen 5][screen5] |
|
||||
|
||||
## Use cases
|
||||
|
||||
Example use cases for plugins could be:
|
||||
|
||||
|
||||
BIN
docs/img/YouTube_thumbnail.png
Executable file
BIN
docs/img/YouTube_thumbnail.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 183 KiB |
0
front/php/templates/language/it_it.json
Normal file → Executable file
0
front/php/templates/language/it_it.json
Normal file → Executable file
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"code_name": "folder_name",
|
||||
"unique_prefix": "",
|
||||
"plugin_type": "scanner",
|
||||
"code_name": "__template",
|
||||
"unique_prefix": "TMP",
|
||||
"plugin_type": "device_scanner",
|
||||
"enabled": true,
|
||||
"data_source": "script",
|
||||
"mapped_to_table": "CurrentScan",
|
||||
|
||||
@@ -59,7 +59,7 @@ def main():
|
||||
extra = '',
|
||||
foreignKey = device['mac_address'])
|
||||
|
||||
mylog('verbose', [f'[{pluginName}] New entries: "{len(new_devices)}"'])
|
||||
mylog('verbose', [f'[{pluginName}] New entries: "{len(device_data)}"'])
|
||||
|
||||
# log result
|
||||
plugin_objects.write_result_file()
|
||||
|
||||
@@ -386,6 +386,12 @@ $settingsJSON_DB = json_encode($settings, JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX
|
||||
// is this isn't a metadata entry, get corresponding metadata object from the dummy setting
|
||||
const setObj = isMetadata ? {} : JSON.parse(getSetting(`${codeName}__metadata`));
|
||||
|
||||
// not initialized properly, reload
|
||||
if(isMetadata && val == "" )
|
||||
{
|
||||
clearCache();
|
||||
}
|
||||
|
||||
// constructing final HTML for the setting
|
||||
setHtml = ""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user