Ensure we update the error message on dashboard grids when it changes.

This commit is contained in:
Dave Page 2016-05-06 08:49:28 +01:00
parent 0628ee0425
commit c3762c9059

View File

@ -328,15 +328,16 @@ function(r, $, pgAdmin, _, Backbone) {
cls = 'danger';
}
// Stash the old content, and replace with the error, if not already present
// Replace the content with the error, if not already present. Always update the message
if (!$(container).hasClass('grid-error')) {
$(filter.el).hide();
$(container).addClass('grid-error');
$(container).html(
'<div class="alert alert-' + cls + ' pg-panel-message" role="alert">' + msg + '</div>'
);
}
$(container).html(
'<div class="alert alert-' + cls + ' pg-panel-message" role="alert">' + msg + '</div>'
);
// Try again
setTimeout(function() {
pgAdmin.Dashboard.render_grid_data(container, data);