From a9a8a25df410f5e4d595df0b3af9ac7343d61d43 Mon Sep 17 00:00:00 2001 From: chao liu Date: Mon, 29 Jan 2018 03:16:03 -0800 Subject: [PATCH] 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 --- .../app/core/openstack-service-api/vitrage.service.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vitrage_dashboard/dashboard/static/app/core/openstack-service-api/vitrage.service.js b/vitrage_dashboard/dashboard/static/app/core/openstack-service-api/vitrage.service.js index 5c93501..654b5c0 100644 --- a/vitrage_dashboard/dashboard/static/app/core/openstack-service-api/vitrage.service.js +++ b/vitrage_dashboard/dashboard/static/app/core/openstack-service-api/vitrage.service.js @@ -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.')); }); }