Commit 91751451f8cfed223f355e6703dcd066e8f7f01b
1 parent
4c862b54
Exists in
master
Shift the API to unify the plots.
Showing
3 changed files
with
17 additions
and
4 deletions
Show diff stats
VERSION
flaskr/controllers/main_controller.py
... | ... | @@ -91,7 +91,7 @@ def estimate(): |
91 | 91 | return redirect(url_for( |
92 | 92 | endpoint=".consult_estimation", |
93 | 93 | public_id=estimation.public_id, |
94 | - format='html' | |
94 | + extension='html' | |
95 | 95 | )) |
96 | 96 | # return render_template("estimate-debrief.html", form=form) |
97 | 97 | |
... | ... | @@ -320,9 +320,10 @@ def compute(): # process the queue of estimation requests |
320 | 320 | cities_mean = [cities_mean_dict[k] for k in cities_mean_dict.keys()] |
321 | 321 | cities_mean = sorted(cities_mean, key=lambda c: c['footprint']) |
322 | 322 | |
323 | - _results['mean_footprint'] = { | |
323 | + _results['mean_footprint'] = { # DEPRECATED? | |
324 | 324 | 'cities': cities_mean |
325 | 325 | } |
326 | + _results['cities'] = cities_mean | |
326 | 327 | |
327 | 328 | _results['total'] = total # DEPRECATED |
328 | 329 | _results['footprint'] = total |
... | ... | @@ -422,7 +423,8 @@ def consult_estimation(public_id, extension): |
422 | 423 | else: |
423 | 424 | return render_template( |
424 | 425 | "estimation.html", |
425 | - estimation=estimation | |
426 | + estimation=estimation, | |
427 | + estimation_output=estimation.get_output_dict(), | |
426 | 428 | ) |
427 | 429 | |
428 | 430 | elif extension in ['yaml', 'yml']: | ... | ... |