Commit bb6068ac by Torkel Ödegaard

small fix to error handling

parent 03783785
...@@ -29,14 +29,14 @@ ...@@ -29,14 +29,14 @@
</li> </li>
</ul> </ul>
<!-- <input type="text" <input type="text"
class="grafana-target-text-input" class="grafana-target-text-input"
ng-model="target.target" ng-model="target.target"
focus-me="showTextEditor" focus-me="showTextEditor"
ng-blur="showTextEditor = false" ng-blur="showTextEditor = false"
ng-model-onblur ng-change="targetChanged()" ng-model-onblur ng-change="targetChanged()"
ng-show="showTextEditor" /> ng-show="showTextEditor" />
-->
<ul class="grafana-segment-list" role="menu" ng-hide="showTextEditor"> <ul class="grafana-segment-list" role="menu" ng-hide="showTextEditor">
<li class="dropdown" ng-repeat="segment in segments" role="menuitem"> <li class="dropdown" ng-repeat="segment in segments" role="menuitem">
<a tabindex="1" <a tabindex="1"
......
...@@ -322,12 +322,14 @@ function (angular, app, $, _, kbn, moment, timeSeries, graphiteSrv, RQ) { ...@@ -322,12 +322,14 @@ function (angular, app, $, _, kbn, moment, timeSeries, graphiteSrv, RQ) {
]); ]);
result(function (data, failure) { result(function (data, failure) {
if (failure) { $scope.panelMeta.loading = false;
if (failure || !data) {
$scope.panel.error = 'Failed to do fetch graphite data: ' + failure; $scope.panel.error = 'Failed to do fetch graphite data: ' + failure;
$scope.$apply();
return; return;
} }
$scope.panelMeta.loading = false;
$scope.$apply(); $scope.$apply();
// Tell the histogram directive to render. // Tell the histogram directive to render.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment