Quit calling ajax when there is an error

Change-Id: Iceb0ab2ff2e4d8a70df50ade9e81e0662d93fb16
This commit is contained in:
Rob Raymond 2014-07-31 16:59:03 -06:00
parent ca621ed8a3
commit 7137862d03
2 changed files with 5 additions and 5 deletions

View File

@ -128,7 +128,10 @@ def get_status(alarms):
def generate_status(request):
alarms = api.monitor.alarm_list(request)
try:
alarms = api.monitor.alarm_list(request)
except Exception:
alarms = []
alarms_by_service = {}
for a in alarms:
service = alarm_tables.show_service(a)

View File

@ -17,10 +17,7 @@ angular.module('monitoring.controllers', [])
$scope._serviceModel = data.series
}).
error(function(data, status, headers, config) {
// called asynchronously if an error occurs
// or server returns response with an error status.
// reload page if there was an error, login may be required
window.top.location.reload(true)
$scope.stop();
});
}
$scope.onTimeout = function(){