Skip to content

Commit

Permalink
Remove duplicate error message on chart connection failure (apache#8476)
Browse files Browse the repository at this point in the history
This caused the error message to be shown twice - once in the chart body
(which is faded out) and again at the "top-level" error
  • Loading branch information
ashb authored and Chris Fei committed Mar 5, 2021
1 parent 9946b53 commit 1befbe8
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions airflow/www/templates/airflow/nvd3.html
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ <h4 class="panel-title">
<script src="{{ url_for('static', filename='nv.d3.js') }}"></script>
<script>
function error(msg){
$('#error_msg').html(msg);
$('#error_msg').text(msg);
$('#error').show();
$('#loading').hide();
$('#chart_section').hide(1000);
Expand All @@ -160,9 +160,6 @@ <h4 class="panel-title">
url = "{{ url_for('airflow.chart_data') }}" + location.search;
$.getJSON(url, function(payload) {
$('#loading').hide();
if (payload.error !== undefined) {
$('#chart_body').html('<div class="alert alert-danger">' + payload.error + '</div>');
}
$("#sql_panel_body").html(payload.sql_html);
$("#label").text(payload.label);
if (payload.state == "SUCCESS") {
Expand Down

0 comments on commit 1befbe8

Please sign in to comment.