mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2026-04-01 07:42:19 -07:00
name resolution config clean up, authoritative fields fixes for none values, css fixes
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
This commit is contained in:
@@ -208,27 +208,6 @@ class DB:
|
||||
# Init the AppEvent database table
|
||||
AppEvent_obj(self)
|
||||
|
||||
# # -------------------------------------------------------------------------------
|
||||
# def get_table_as_json(self, sqlQuery):
|
||||
|
||||
# # mylog('debug',[ '[Database] - get_table_as_json - Query: ', sqlQuery])
|
||||
# try:
|
||||
# self.sql.execute(sqlQuery)
|
||||
# columnNames = list(map(lambda x: x[0], self.sql.description))
|
||||
# rows = self.sql.fetchall()
|
||||
# except sqlite3.Error as e:
|
||||
# mylog('verbose',[ '[Database] - SQL ERROR: ', e])
|
||||
# return json_obj({}, []) # return empty object
|
||||
|
||||
# result = {"data":[]}
|
||||
# for row in rows:
|
||||
# tmp = row_to_json(columnNames, row)
|
||||
# result["data"].append(tmp)
|
||||
|
||||
# # mylog('debug',[ '[Database] - get_table_as_json - returning ', len(rows), " rows with columns: ", columnNames])
|
||||
# # mylog('debug',[ '[Database] - get_table_as_json - returning json ', json.dumps(result) ])
|
||||
# return json_obj(result, columnNames)
|
||||
|
||||
def get_table_as_json(self, sqlQuery, parameters=None):
|
||||
"""
|
||||
Wrapper to use the central get_table_as_json helper.
|
||||
|
||||
Reference in New Issue
Block a user