mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
webmon fixes + breakup plugins.py
This commit is contained in:
@@ -160,4 +160,29 @@ def get_plugins_configs():
|
||||
# Load the contents of the config.json file as a JSON object and append it to pluginsList
|
||||
pluginsList.append(json.loads(get_file_content(config_path)))
|
||||
|
||||
return pluginsList # Return the list of plugin configurations
|
||||
return pluginsList # Return the list of plugin configurations
|
||||
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Gets the setting value
|
||||
def get_plugin_setting_value(plugin, function_key):
|
||||
|
||||
resultObj = get_plugin_setting(plugin, function_key)
|
||||
|
||||
if resultObj != None:
|
||||
return resultObj["value"]
|
||||
|
||||
return None
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
def custom_plugin_decoder(pluginDict):
|
||||
return namedtuple('X', pluginDict.keys())(*pluginDict.values())
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Handle empty value
|
||||
def handle_empty(value):
|
||||
if value == '' or value is None:
|
||||
value = 'null'
|
||||
|
||||
return value
|
||||
Reference in New Issue
Block a user