show cube warnings (#36578)

This commit is contained in:
Benjamin Dauvergne 2019-10-01 13:33:33 +02:00
parent 3b5dd98ad6
commit 5d1524702a
2 changed files with 11 additions and 0 deletions

View File

@ -46,6 +46,15 @@
<input type="submit" name="visualize" value="{% trans "Visualiser" %}">
{% endblock %}
</form>
{% if cube.warnings %}
{% block warnings %}
<ul class="messages cube-warnings">
{% for message in cube.warnings %}
<li class="warning">{{ message }}</li>
{% endfor %}
</ul>
{% endblock %}
{% endif %}
<div id="data" {% if visualization %}class="visualization-{{visualization.representation}}"{% endif %}>
{% if visualization %}
{% if visualization.representation == 'table' %}

View File

@ -14,6 +14,8 @@ def test_simple(schema1, app, admin):
response = app.get('/').follow()
response = response.click('Facts 1')
assert 'big-msg-info' in response
assert u'le champ « pouët »' in response
assert 'warning2' in response
form = response.form
form.set('representation', 'table')
form.set('measure', 'simple_count')