mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
emty columns fixes
This commit is contained in:
@@ -3939,7 +3939,7 @@ def execute_plugin(plugin):
|
|||||||
for row in arr:
|
for row in arr:
|
||||||
# There has to be always 9 columns
|
# There has to be always 9 columns
|
||||||
if len(row) == 9 and (row[0] in ['','null']) == False :
|
if len(row) == 9 and (row[0] in ['','null']) == False :
|
||||||
sqlParams.append((plugin["unique_prefix"], row[0], row[1], 'null', row[2], row[3], row[4], row[5], row[6], 0, row[7], 'null', row[8]))
|
sqlParams.append((plugin["unique_prefix"], row[0], handle_empty(row[1]), 'null', row[2], row[3], row[4], handle_empty(row[5]), handle_empty(row[6]), 0, row[7], 'null', row[8]))
|
||||||
else:
|
else:
|
||||||
mylog('none', [' [Plugins]: Skipped invalid sql result'])
|
mylog('none', [' [Plugins]: Skipped invalid sql result'])
|
||||||
|
|
||||||
@@ -3964,6 +3964,14 @@ def execute_plugin(plugin):
|
|||||||
update_api(False, ["plugins_events","plugins_objects"])
|
update_api(False, ["plugins_events","plugins_objects"])
|
||||||
|
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------------------
|
||||||
|
# Handle empty value
|
||||||
|
def handle_empty(value):
|
||||||
|
if value == '' or value is None:
|
||||||
|
value = 'null'
|
||||||
|
|
||||||
|
return value
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
# Check if watched values changed for the given plugin
|
# Check if watched values changed for the given plugin
|
||||||
def process_plugin_events(plugin):
|
def process_plugin_events(plugin):
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
"column": "Object_PrimaryID",
|
"column": "Object_PrimaryID",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "devicemac",
|
||||||
"default_value":"",
|
"default_value":"",
|
||||||
"options": [],
|
"options": [],
|
||||||
"localized": ["name"],
|
"localized": ["name"],
|
||||||
|
|||||||
Reference in New Issue
Block a user