💻 Plugin Boilerplate update

This commit is contained in:
jokob-sk
2024-06-30 21:17:52 +10:00
parent 40c5be3758
commit df90060adf
3 changed files with 10 additions and 4 deletions

View 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",

View File

@@ -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()

View 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 = ""