Skip to content
Snippets Groups Projects
Commit e562e7c8 authored by Duchateau Fabien's avatar Duchateau Fabien
Browse files

minor corrections (zoom level locked by default, check for Mongo connection + flash message)

parent ae562943
No related branches found
No related tags found
No related merge requests found
...@@ -15,8 +15,9 @@ url = 'http://127.0.0.1:8081' ...@@ -15,8 +15,9 @@ url = 'http://127.0.0.1:8081'
@app.route('/', defaults={'page': None}) @app.route('/', defaults={'page': None})
#@app.route('/<page>', methods=["GET", "POST"])
def index(page): def index(page):
if not model.db.connection_status: # if no connection, display a flashing message
flash("Could not connect to the MongoDB database ! Check the connection.", "danger")
return render_template('index.html') return render_template('index.html')
......
...@@ -11,7 +11,6 @@ import json ...@@ -11,7 +11,6 @@ import json
# connection to the IRIS collection in MongoDB # connection to the IRIS collection in MongoDB
db = Mongiris() db = Mongiris()
iris_collection = db.collection_iris iris_collection = db.collection_iris
db.init_connection()
json_iris_indicator_code_to_label = 'static/data/dictionnaire-indicateurs.json' json_iris_indicator_code_to_label = 'static/data/dictionnaire-indicateurs.json'
......
...@@ -5,9 +5,9 @@ ...@@ -5,9 +5,9 @@
<div class="input-group mb-4"> <div class="input-group mb-4">
<div class="input-group-prepend"> <div class="input-group-prepend">
<button class="btn" type="button" id="boutonEnableDisableZoom"> <button class="btn" type="button" id="boutonEnableDisableZoom">
<img src="{{url_for('static', filename='css/open-iconic-master/svg/lock-unlocked.svg')}}" width="16" height="16" alt="Enable/Disable" /> <img src="{{url_for('static', filename='css/open-iconic-master/svg/lock-locked.svg')}}" width="16" height="16" alt="Enable/Disable" />
</button> </button>
<input type="number" min="12" max="18" value="16" maxlength="1" id="inputZoomLevel" style="width: 3em;" /> <input type="number" min="12" max="18" value="16" disabled maxlength="1" id="inputZoomLevel" style="width: 3em;" />
<span valign="bottom" class="ml-2 pt-1"> <span valign="bottom" class="ml-2 pt-1">
(niveau de zoom actuel =&nbsp;<span id="spanZoomLevel" style="font-weight: bold;">6</span>) (niveau de zoom actuel =&nbsp;<span id="spanZoomLevel" style="font-weight: bold;">6</span>)
</span> </span>
......
[metadata] [metadata]
name = mapiris name = mapiris
version = 0.12 version = 0.13
description = This package aims at searching and printing IRIS on a map. description = This package aims at searching and printing IRIS on a map.
author = Fabien Duchateau author = Fabien Duchateau
author_email = fabien.duchateau@univ-lyon1.fr author_email = fabien.duchateau@univ-lyon1.fr
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment