Skip to content
Snippets Groups Projects
Verified Commit bdfd17b6 authored by Owen Graham's avatar Owen Graham
Browse files

Rename default plot "time series"

parent b2127d83
No related branches found
No related tags found
No related merge requests found
......@@ -11,14 +11,14 @@ app.jinja_env.lstrip_blocks = True
app.jinja_env.keep_trailing_newline = True
@app.route('/', defaults={'name': 'index'})
@app.route('/', defaults={'name': 'time-series'})
@app.route('/<name>')
def plot_page(name):
"""Render a full plot page."""
return render_plotter(name, embedded=False)
@app.route('/embed/', defaults={'name': 'index'})
@app.route('/embed/', defaults={'name': 'time-series'})
@app.route('/embed/<name>')
def plot_embed(name):
"""Render a plot embed page."""
......@@ -55,7 +55,7 @@ def record_link():
return jsonify(get_link(station, year))
@app.route('/plot', defaults={'name': 'index'})
@app.route('/plot', defaults={'name': 'time-series'})
@app.route('/plot/<name>')
def plot(name):
"""Create a data plot image."""
......
......
......@@ -31,8 +31,8 @@ def add_plotter(name, nav_title):
return decorator
@add_plotter('index', 'Time Series')
def plot_index():
@add_plotter('time-series', 'Time Series')
def plot_time_series():
"""Plot one station/year/measurement."""
station_id = get_param('station')
year = get_param('year', to=year_type)
......
......
......@@ -57,7 +57,7 @@ function appendYears(years, n) {
yearSelect.disabled = false;
}
function indexVisualize() {
function timeSeriesVisualize() {
const params = getControlsParams();
setSources(sourceLink(params.get('station'), params.get('year')));
visualize(`${SCRIPT_ROOT}/plot?${params}`);
......
......
......@@ -4,8 +4,8 @@
{% block content -%}
<form id="controls" onsubmit="indexVisualize(); return false;"
method="get" action="{{ url_for('plot', name='index') }}">
<form id="controls" onsubmit="timeSeriesVisualize(); return false;"
method="get" action="{{ url_for('plot', name='time-series') }}">
<div id="selections">
<div>
<label for="station">Station</label>
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment