mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
💻 Plugin Boilerplate update
This commit is contained in:
@@ -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