mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
small fix to error handling
This commit is contained in:
@@ -29,14 +29,14 @@
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<!-- <input type="text"
|
||||
<input type="text"
|
||||
class="grafana-target-text-input"
|
||||
ng-model="target.target"
|
||||
focus-me="showTextEditor"
|
||||
ng-blur="showTextEditor = false"
|
||||
ng-model-onblur ng-change="targetChanged()"
|
||||
ng-show="showTextEditor" />
|
||||
-->
|
||||
|
||||
<ul class="grafana-segment-list" role="menu" ng-hide="showTextEditor">
|
||||
<li class="dropdown" ng-repeat="segment in segments" role="menuitem">
|
||||
<a tabindex="1"
|
||||
|
||||
@@ -322,12 +322,14 @@ function (angular, app, $, _, kbn, moment, timeSeries, graphiteSrv, RQ) {
|
||||
]);
|
||||
|
||||
result(function (data, failure) {
|
||||
if (failure) {
|
||||
$scope.panelMeta.loading = false;
|
||||
|
||||
if (failure || !data) {
|
||||
$scope.panel.error = 'Failed to do fetch graphite data: ' + failure;
|
||||
$scope.$apply();
|
||||
return;
|
||||
}
|
||||
|
||||
$scope.panelMeta.loading = false;
|
||||
$scope.$apply();
|
||||
|
||||
// Tell the histogram directive to render.
|
||||
|
||||
Reference in New Issue
Block a user