Deprecated error method

$http's deprecated custom callback method: .error() has been
removed in AngularJS 1.6. Use the standard .catch() promise
method instead.

Change-Id: I3fb233daddd1af6161a8e134b5902bb0264d2a95
This commit is contained in:
chao liu 2018-01-29 03:16:03 -08:00
parent 546014e7e4
commit a9a8a25df4

View File

@ -38,7 +38,7 @@
}
console.info('CONFIG in core - ', config)
return apiService.get('/api/vitrage/topology/', config)
.error(function () {
.catch(function () {
toastService.add('error', gettext('Unable to fetch the Vitrage Topology service.'));
});
}
@ -54,7 +54,7 @@
url += '/false';
}
return apiService.get(url)
.error(function() {
.catch(function() {
toastService.add('error', gettext('Unable to fetch the Vitrage Alarms service.'));
});
@ -62,14 +62,14 @@
function getRca(alarm_id,adminState) {
return apiService.get('/api/vitrage/rca/'+alarm_id+"/"+adminState)
.error(function () {
.catch(function () {
toastService.add('error', gettext('Unable to fetch the Vitrage RCA service.'));
});
}
function getTemplates(template_id) {
return apiService.get('/api/vitrage/template/'+template_id)
.error(function () {
.catch(function () {
toastService.add('error', gettext('Unable to fetch the Vitrage Templates service.'));
});
}