mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Fixed issue where a metric request error would set panel error flag, which would cause unsaved changes service to detect change, and prompt the unsaved changes warning. The panel error state is now moved to the panelMeta object that is not part of the dashboard / panel model, Closes #745
This commit is contained in:
parent
455e80513b
commit
dd4f27e3fa
@ -18,8 +18,8 @@ function (angular, $) {
|
||||
'<div class="row-fluid panel-extra">' +
|
||||
'<div class="panel-extra-container">' +
|
||||
'<span class="alert-error panel-error small pointer"' +
|
||||
'config-modal="app/partials/inspector.html" ng-if="panel.error">' +
|
||||
'<span data-placement="right" bs-tooltip="panel.error">' +
|
||||
'config-modal="app/partials/inspector.html" ng-if="panelMeta.error">' +
|
||||
'<span data-placement="right" bs-tooltip="panelMeta.error">' +
|
||||
'<i class="icon-exclamation-sign"></i><span class="panel-error-arrow"></span>' +
|
||||
'</span>' +
|
||||
'</span>' +
|
||||
|
@ -209,7 +209,7 @@ function (angular, app, $, _, kbn, moment, TimeSeries) {
|
||||
.then($scope.dataHandler)
|
||||
.then(null, function(err) {
|
||||
$scope.panelMeta.loading = false;
|
||||
$scope.panel.error = err.message || "Timeseries data request error";
|
||||
$scope.panelMeta.error = err.message || "Timeseries data request error";
|
||||
$scope.inspector.error = err;
|
||||
$scope.render([]);
|
||||
});
|
||||
|
@ -95,7 +95,7 @@ function (angular, _) {
|
||||
$scope.datasource = datasourceSrv.get(datasource);
|
||||
|
||||
if (!$scope.datasource) {
|
||||
$scope.panel.error = "Cannot find datasource " + datasource;
|
||||
$scope.panelMeta.error = "Cannot find datasource " + datasource;
|
||||
return;
|
||||
}
|
||||
};
|
||||
@ -129,7 +129,7 @@ function (angular, _) {
|
||||
$scope.get_data = function() {
|
||||
if ($scope.otherPanelInFullscreenMode()) { return; }
|
||||
|
||||
delete $scope.panel.error;
|
||||
delete $scope.panelMeta.error;
|
||||
$scope.panelMeta.loading = true;
|
||||
|
||||
panel_get_data();
|
||||
|
@ -81,7 +81,6 @@ function(angular, _, config) {
|
||||
|
||||
// ignore timespan changes
|
||||
current.time = original.time = {};
|
||||
|
||||
current.refresh = original.refresh;
|
||||
|
||||
var currentTimepicker = _.findWhere(current.nav, { type: 'timepicker' });
|
||||
|
Loading…
Reference in New Issue
Block a user