Merge "Enable passing additional parameter to metering query"

This commit is contained in:
Jenkins 2014-04-29 23:29:20 +00:00 committed by Gerrit Code Review
commit 62c766754d
1 changed files with 4 additions and 2 deletions

View File

@ -240,13 +240,15 @@ def query_data(request,
date_options, date_options,
group_by, group_by,
meter, meter,
period=None): period=None,
additional_query=None):
date_from, date_to = _calc_date_args(date_from, date_from, date_to = _calc_date_args(date_from,
date_to, date_to,
date_options) date_options)
if not period: if not period:
period = _calc_period(date_from, date_to) period = _calc_period(date_from, date_to)
additional_query = [] if additional_query is None:
additional_query = []
if date_from: if date_from:
additional_query += [{'field': 'timestamp', additional_query += [{'field': 'timestamp',
'op': 'ge', 'op': 'ge',