0
0
Fork 0
mirror of https://github.com/alerta/alerta.git synced 2025-05-18 15:11:23 +00:00

Hide fields with large data from default alerts response

eg. rawData and alert history
This commit is contained in:
Nick Satterly 2020-10-26 17:30:47 +01:00
parent c049162566
commit d9c5185653
4 changed files with 41 additions and 7 deletions
alerta/database/backends/postgres

View file

@ -105,9 +105,9 @@ class QueryBuilderImpl(QueryBuilder):
query.append('AND (id ~* (%(regex_id)s) OR last_receive_id ~* (%(regex_id)s))')
qvars['regex_id'] = '|'.join(['^' + i for i in ids])
EXCLUDE_QUERY = ['_', 'callback', 'token', 'api-key', 'q', 'q.df', 'id',
'from-date', 'to-date', 'duplicateCount', 'repeat', 'sort-by',
'reverse', 'group-by', 'page', 'page-size', 'limit']
EXCLUDE_QUERY = ['_', 'callback', 'token', 'api-key', 'q', 'q.df', 'id', 'from-date', 'to-date',
'duplicateCount', 'repeat', 'sort-by', 'reverse', 'group-by', 'page', 'page-size', 'limit',
'show-raw-data', 'show-history']
# fields
for field in params: