💻 Plugin Boilerplate update
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"code_name": "folder_name",
|
"code_name": "__template",
|
||||||
"unique_prefix": "",
|
"unique_prefix": "TMP",
|
||||||
"plugin_type": "scanner",
|
"plugin_type": "device_scanner",
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"data_source": "script",
|
"data_source": "script",
|
||||||
"mapped_to_table": "CurrentScan",
|
"mapped_to_table": "CurrentScan",
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ def main():
|
|||||||
extra = '',
|
extra = '',
|
||||||
foreignKey = device['mac_address'])
|
foreignKey = device['mac_address'])
|
||||||
|
|
||||||
mylog('verbose', [f'[{pluginName}] New entries: "{len(new_devices)}"'])
|
mylog('verbose', [f'[{pluginName}] New entries: "{len(device_data)}"'])
|
||||||
|
|
||||||
# log result
|
# log result
|
||||||
plugin_objects.write_result_file()
|
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
|
// is this isn't a metadata entry, get corresponding metadata object from the dummy setting
|
||||||
const setObj = isMetadata ? {} : JSON.parse(getSetting(`${codeName}__metadata`));
|
const setObj = isMetadata ? {} : JSON.parse(getSetting(`${codeName}__metadata`));
|
||||||
|
|
||||||
|
// not initialized properly, reload
|
||||||
|
if(isMetadata && val == "" )
|
||||||
|
{
|
||||||
|
clearCache();
|
||||||
|
}
|
||||||
|
|
||||||
// constructing final HTML for the setting
|
// constructing final HTML for the setting
|
||||||
setHtml = ""
|
setHtml = ""
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user