Skip to content

Commit

Permalink
Fix history page blank bug if google api key not present
Browse files Browse the repository at this point in the history
  • Loading branch information
mclmax committed May 21, 2018
1 parent a6fa089 commit e82bcb9
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion templates/history.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@ <h4 style="text-align: center;">Incident Map</h4>
<div class="row">
<div class="col-md-12"><div class="map" id="map"></div></div>
</div>
{%endif%}
{% else %}
<div class="row">
<div class="col-md-12"><p id="map-no-key">The Incident Map could not be displayed because a valid Google Maps API key could not be found. This can be added to the <code>frontend.env</code> file.</p></div>
</div>
{%endif%}
</div>
<div class="col-sm-6 incident-size">
{% if (canarydrop['triggered_list']|length) > 0 %}
Expand Down Expand Up @@ -422,6 +426,11 @@ <h4 style="text-align: center;">Incident List is Currently Empty</h4>
</script>
{% if API_KEY %}
<script src="https://maps.googleapis.com/maps/api/js?key={{API_KEY}}&callback=initMap" async defer></script>
{% else %}
<script>
$('#incidents').parent().parent().show();
$('#map-no-key').parent().parent().parent().show();
</script>
{%endif%}
</body>
</html>

0 comments on commit e82bcb9

Please sign in to comment.