📚Docs, QoL improvements

This commit is contained in:
jokob-sk
2024-06-21 16:44:03 +10:00
parent 3b7cbba32b
commit a52e315732
28 changed files with 207 additions and 216 deletions

View File

@@ -1,6 +1,6 @@
## Overview
PLugin functionality overview and links to external resources if relevant. Include use cases if available.
Plugin functionality overview and links to external resources if relevant. Include use cases if available.
> [!TIP]
> Some tip.

View File

@@ -1,9 +1,9 @@
{
"code_name": "sync",
"unique_prefix": "SYNC",
"plugin_type": "system",
"code_name": "folder_name",
"unique_prefix": "",
"plugin_type": "core|general|system|scanner|other|publisher",
"enabled": true,
"data_source": "script",
"data_source": "script|app-db-query|template|sqlite-db-query",
"mapped_to_table": "CurrentScan",
"data_filters": [
{
@@ -19,13 +19,13 @@
"display_name": [
{
"language_code": "en_us",
"string": "Sync Hub"
"string": "Display Name"
}
],
"description": [
{
"language_code": "en_us",
"string": "Plugin to synchronize multiple NetAlertX instances."
"string": "Plugin to ..."
}
],
"icon": [
@@ -55,27 +55,18 @@
{
"language_code": "en_us",
"string": "When to run"
},
{
"language_code": "es_es",
"string": "Cuándo ejecutar"
},
{
"language_code": "de_de",
"string": "Wann laufen"
}
],
"description": [
{
"language_code": "en_us",
"string": "When the sync should run. Data might be lost if you run the sync less frequently. Good options are <code>always_after_scan</code>, <code>on_new_device</code>, <code>on_notification</code>"
"string": "When the plugin should run. Good options are <code>always_after_scan</code>, <code>on_new_device</code>, <code>on_notification</code>"
}
]
},
{
"function": "RUN_SCHD",
"type": "text",
"default_value": "*/5 * * * *",
"options": [],
"localized": ["name", "description"],
@@ -89,19 +80,11 @@
{
"language_code": "en_us",
"string": "Only enabled if you select <code>schedule</code> in the <a href=\"#SYNC_RUN\"><code>SYNC_RUN</code> setting</a>. Make sure you enter the schedule in the correct cron-like format (e.g. validate at <a href=\"https://crontab.guru/\" target=\"_blank\">crontab.guru</a>). For example entering <code>0 4 * * *</code> will run the scan after 4 am in the <a onclick=\"toggleAllSettings()\" href=\"#TIMEZONE\"><code>TIMEZONE</code> you set above</a>. Will be run NEXT time the time passes."
},
{
"language_code": "es_es",
"string": "Solo está habilitado si selecciona <code>schedule</code> en la configuración <a href=\"#SYNC_RUN\"><code>SYNC_RUN</code></a>. Asegúrese de ingresar la programación en el formato similar a cron correcto (por ejemplo, valide en <a href=\"https://crontab.guru/\" target=\"_blank\">crontab.guru</a>). Por ejemplo, ingresar <code>0 4 * * *</code> ejecutará el escaneo después de las 4 a.m. en el <a onclick=\"toggleAllSettings()\" href=\"#TIMEZONE\"><code>TIMEZONE</ código> que configuró arriba</a>. Se ejecutará la PRÓXIMA vez que pase el tiempo."
},
{
"language_code": "de_de",
"string": "Nur aktiviert, wenn Sie <code>schedule</code> in der <a href=\"#SYNC_RUN\"><code>SYNC_RUN</code>-Einstellung</a> auswählen. Stellen Sie sicher, dass Sie den Zeitplan im richtigen Cron-ähnlichen Format eingeben (z. B. validieren unter <a href=\"https://crontab.guru/\" target=\"_blank\">crontab.guru</a>). Wenn Sie beispielsweise <code>0 4 * * *</code> eingeben, wird der Scan nach 4 Uhr morgens in der <a onclick=\"toggleAllSettings()\" href=\"#TIMEZONE\"><code>TIMEZONE</ ausgeführt. Code> den Sie oben festgelegt haben</a>. Wird das NÄCHSTE Mal ausgeführt, wenn die Zeit vergeht."
}
]
},
{
"function": "api_token",
"function": "text_example",
"type": "text",
"maxLength": 50,
"default_value": "",
@@ -110,79 +93,18 @@
"name": [
{
"language_code": "en_us",
"string": "API token"
"string": "Setting name"
}
],
"description": [
{
"language_code": "en_us",
"string": "API token to secure communication. It's sent in the request header. The API token needs to be the same on the hub and on the nodes."
"string": "Description / simple setup instructions"
}
]
},
{
"function": "encryption_key",
"type": "text",
"maxLength": 50,
"default_value": "",
"options": [],
"localized": ["name", "description"],
"name": [
{
"language_code": "en_us",
"string": "Encryption Key"
}
],
"description": [
{
"language_code": "en_us",
"string": "Encryption key used to encrypt the data before sending and for decryption on th ehub. The key needs to be the same on the hub and on the nodes."
}
]
},
{
"function": "hub_url",
"type": "text",
"maxLength": 50,
"default_value": "",
"options": [],
"localized": ["name", "description"],
"name": [
{
"language_code": "en_us",
"string": "Hub URL"
}
],
"description": [
{
"language_code": "en_us",
"string": "The URL of the hub (target instance). Set on the Node. Without a trailig slash, for example <code>http://192.168.1.82:20211</code>"
}
]
},
{
"function": "node_name",
"type": "text",
"maxLength": 50,
"default_value": "",
"options": [],
"localized": ["name", "description"],
"name": [
{
"language_code": "en_us",
"string": "Node name"
}
],
"description": [
{
"language_code": "en_us",
"string": "Use a unique node name, without spaces or special characters, such as <code>Node_Vlan01</code>"
}
]
},
{
"function": "devices",
"function": "boolean_example",
"type": "boolean",
"default_value": false,
"options": [],
@@ -190,18 +112,18 @@
"name": [
{
"language_code": "en_us",
"string": "Sync Devices"
"string": "Setting name"
}
],
"description": [
{
"language_code": "en_us",
"string": "When enabled the whole Devices table is sent over. Only new devices with new MACs are inserted in the target hub."
"string": "Description / simple setup instructions"
}
]
},
{
"function": "plugins",
"function": "multiselect_example_from_setting",
"type": "text.multiselect",
"maxLength": 50,
"default_value": [],
@@ -217,13 +139,13 @@
"name": [
{
"language_code": "en_us",
"string": "Sync Plugins"
"string": "Setting name"
}
],
"description": [
{
"language_code": "en_us",
"string": "Plugins to synchronize. Only plugins that produce some kind of output in <code>last_result.log</code> can be synchronized."
"string": "Description / simple setup instructions"
}
]
},
@@ -237,28 +159,12 @@
{
"language_code": "en_us",
"string": "Command"
},
{
"language_code": "es_es",
"string": "Comando"
},
{
"language_code": "de_de",
"string": "Befehl"
}
],
"description": [
{
"language_code": "en_us",
"string": "Command to run. This can not be changed"
},
{
"language_code": "es_es",
"string": "Comando a ejecutar. Esto no se puede cambiar"
},
{
"language_code": "de_de",
"string": "Befehl zum Ausführen. Dies kann nicht geändert werden"
}
]
},
@@ -272,28 +178,12 @@
{
"language_code": "en_us",
"string": "Run timeout"
},
{
"language_code": "es_es",
"string": "Tiempo límite de ejecución"
},
{
"language_code": "de_de",
"string": "Zeitüberschreitung"
}
],
"description": [
{
"language_code": "en_us",
"string": "Maximum time in seconds to wait for the script to finish. If this time is exceeded the script is aborted."
},
{
"language_code": "es_es",
"string": "Tiempo máximo en segundos para esperar a que finalice el script. Si se supera este tiempo, el script se cancela."
},
{
"language_code": "de_de",
"string": "Maximale Zeit in Sekunden, die auf den Abschluss des Skripts gewartet werden soll. Bei Überschreitung dieser Zeit wird das Skript abgebrochen."
}
]
}
@@ -312,14 +202,6 @@
{
"language_code": "en_us",
"string": "MAC"
},
{
"language_code": "es_es",
"string": "MAC"
},
{
"language_code": "de_de",
"string": "MAC"
}
]
},
@@ -336,14 +218,6 @@
{
"language_code": "en_us",
"string": "IP"
},
{
"language_code": "es_es",
"string": "IP"
},
{
"language_code": "de_de",
"string": "IP"
}
]
},
@@ -376,14 +250,6 @@
{
"language_code": "en_us",
"string": "Vendor"
},
{
"language_code": "es_es",
"string": "Proveedor"
},
{
"language_code": "de_de",
"string": "Hersteller"
}
]
},
@@ -434,14 +300,6 @@
{
"language_code": "en_us",
"string": "Scan method"
},
{
"language_code": "es_es",
"string": "Método de escaneo"
},
{
"language_code": "de_de",
"string": "Scanmethode"
}
]
},
@@ -457,14 +315,6 @@
{
"language_code": "en_us",
"string": "Created"
},
{
"language_code": "es_es",
"string": "Creado"
},
{
"language_code": "de_de",
"string": "Erstellt"
}
]
},
@@ -480,14 +330,6 @@
{
"language_code": "en_us",
"string": "Changed"
},
{
"language_code": "es_es",
"string": "Cambiado"
},
{
"language_code": "de_de",
"string": "Geändert"
}
]
},
@@ -520,14 +362,6 @@
{
"language_code": "en_us",
"string": "Status"
},
{
"language_code": "es_es",
"string": "Estado"
},
{
"language_code": "de_de",
"string": "Status"
}
]
}

View File

@@ -136,7 +136,7 @@
"description": [
{
"language_code": "en_us",
"string": "Encryption key used to encrypt the data before sending and for decryption on th ehub. The key needs to be the same on the hub and on the nodes."
"string": "Encryption key used to encrypt the data before sending and for decryption on the hub. The key needs to be the same on the hub and on the nodes."
}
]
},

View File

@@ -1,23 +1,8 @@
## Overview
PLugin functionality overview and links to external resources if relevant. Include use cases if available.
> [!TIP]
> Some tip.
### Quick setup guide
To set up the plugin correctly, make sure...
#### Required Settings
- When to run `PREF_RUN`
-
UI-related settings.
### Usage
- Head to **Settings** > **Plugin name** to adjust the default values.
- Head to **Settings** > **UI Settings** to adjust the default values.
### Notes
- Additional notes, limitations, Author info.

View File

@@ -6,14 +6,16 @@ A plugin allowing for importing devices from a UniFi controller.
Specify the following settings in the Settings section of NetAlertX:
- `UNFIMP_username` - Username used to login into the UNIFI controller.
- `UNFIMP_password` - Password used to login into the UNIFI controller.
- `UNFIMP_host` - Host url or IP address where the UNIFI controller is hosted (excluding http://)
- `UNFIMP_username` - Username used to log in the UNIFI controller.
- `UNFIMP_password` - Password used to log in the UNIFI controller.
- `UNFIMP_host` - Host URL or IP address where the UNIFI controller is hosted (excluding `http://`)
- `UNFIMP_sites` - Name of the sites (usually 'default', check the URL in your UniFi controller UI if unsure. The site id is in the following part of the URL: `https://192.168.1.1:8443/manage/site/this-is-the-site-id/settings/`).
- `UNFIMP_protocol` - https:// or http://
- `UNFIMP_port` - Usually 8443
- `UNFIMP_port` - Usually `8443` or `8843`
- `UNFIMP_version` - e.g. `UDMP-unifiOS` is used for the "Cloud Gateway Ultra"
### Notes
- Currently only used to import devices, not their status, type or network map.
- It is recommend to create a read-only user in your UniFi controller
- It is recommended to create a read-only user in your UniFi controller