From 5857391e6af7a5777018c39f04270155c1a64f8c Mon Sep 17 00:00:00 2001 From: David Hoese <david.hoese@ssec.wisc.edu> Date: Mon, 29 Mar 2021 09:46:07 -0500 Subject: [PATCH] Change default time range to be 5 minutes --- metobsapi/templates/data_index.html | 4 ++-- metobsapi/util/query_influx.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/metobsapi/templates/data_index.html b/metobsapi/templates/data_index.html index eb8ee98..38e1ff4 100644 --- a/metobsapi/templates/data_index.html +++ b/metobsapi/templates/data_index.html @@ -773,7 +773,7 @@ </h2> <ul> <li style='font-size: 15px'> - Last 2 minutes of temperature, dewpoint, pressure for AOSS Tower: + Last 5 minutes (default) of temperature, dewpoint, pressure for AOSS Tower: <ul> <a href="{{ url_for('get_data', fmt='csv', symbols='aoss.tower.air_temp:aoss.tower.dewpoint:aoss.tower.pressure') }}" }}> {{ url_for('get_data', fmt='csv', symbols='aoss.tower.air_temp:aoss.tower.dewpoint:aoss.tower.pressure') | replace('%3A', ':') }} @@ -781,7 +781,7 @@ </ul> </li> <li style='font-size: 15px'> - Last 2 minutes of temperature, dewpoint, pressure for AOSS Tower with Unix epoch millisecond timestamps: + Last 5 minutes (default) of temperature, dewpoint, pressure for AOSS Tower with Unix epoch millisecond timestamps: <ul> <a href="{{ url_for('get_data', fmt='csv', symbols='aoss.tower.air_temp:aoss.tower.dewpoint:aoss.tower.pressure', epoch='ms') }}"> {{ url_for('get_data', fmt='csv', symbols='aoss.tower.air_temp:aoss.tower.dewpoint:aoss.tower.pressure', epoch='ms') | replace('%3A', ':') }} diff --git a/metobsapi/util/query_influx.py b/metobsapi/util/query_influx.py index 48b68e9..25153cc 100644 --- a/metobsapi/util/query_influx.py +++ b/metobsapi/util/query_influx.py @@ -17,7 +17,7 @@ def parse_dt(d): def build_queries(symbols, begin, end, value): if begin is None: # TODO: This should use the "FIRST(symbol_name)" function - begin = timedelta(minutes=2) + begin = timedelta(minutes=5) begin = parse_dt(begin) end = parse_dt(end) -- GitLab