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: I19bb41e3a5efd332a72bd269f0b214c7fa1f558f
This commit is contained in:
parent
f0f2d021cb
commit
10a7dad061
|
@ -58,7 +58,7 @@
|
|||
|
||||
function getCertificates(quiet) {
|
||||
var promise = apiService.get('/api/barbican/certificates/');
|
||||
return quiet ? promise : promise.error(function handleError() {
|
||||
return quiet ? promise : promise.catch(function handleError() {
|
||||
toastService.add('error', gettext('Unable to retrieve SSL certificates.'));
|
||||
});
|
||||
}
|
||||
|
@ -77,7 +77,7 @@
|
|||
|
||||
function getSecrets(quiet) {
|
||||
var promise = apiService.get('/api/barbican/secrets/');
|
||||
return quiet ? promise : promise.error(function handleError() {
|
||||
return quiet ? promise : promise.catch(function handleError() {
|
||||
toastService.add('error', gettext('Unable to retrieve secrets.'));
|
||||
});
|
||||
}
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
function getLoadBalancers(full) {
|
||||
var params = { full: full };
|
||||
return apiService.get('/api/lbaas/loadbalancers/', { params: params })
|
||||
.error(function () {
|
||||
.catch(function () {
|
||||
toastService.add('error', gettext('Unable to retrieve load balancers.'));
|
||||
});
|
||||
}
|
||||
|
@ -98,7 +98,7 @@
|
|||
function getLoadBalancer(id, full) {
|
||||
var params = { full: full };
|
||||
return apiService.get('/api/lbaas/loadbalancers/' + id + '/', { params: params })
|
||||
.error(function () {
|
||||
.catch(function () {
|
||||
toastService.add('error', gettext('Unable to retrieve load balancer.'));
|
||||
});
|
||||
}
|
||||
|
@ -114,7 +114,7 @@
|
|||
|
||||
function deleteLoadBalancer(id, quiet) {
|
||||
var promise = apiService.delete('/api/lbaas/loadbalancers/' + id + '/');
|
||||
return quiet ? promise : promise.error(function () {
|
||||
return quiet ? promise : promise.catch(function () {
|
||||
toastService.add('error', gettext('Unable to delete load balancer.'));
|
||||
});
|
||||
}
|
||||
|
@ -129,7 +129,7 @@
|
|||
|
||||
function createLoadBalancer(spec) {
|
||||
return apiService.post('/api/lbaas/loadbalancers/', spec)
|
||||
.error(function () {
|
||||
.catch(function () {
|
||||
toastService.add('error', gettext('Unable to create load balancer.'));
|
||||
});
|
||||
}
|
||||
|
@ -145,7 +145,7 @@
|
|||
|
||||
function editLoadBalancer(id, spec) {
|
||||
return apiService.put('/api/lbaas/loadbalancers/' + id + '/', spec)
|
||||
.error(function () {
|
||||
.catch(function () {
|
||||
toastService.add('error', gettext('Unable to update load balancer.'));
|
||||
});
|
||||
}
|
||||
|
@ -169,7 +169,7 @@
|
|||
function getListeners(id) {
|
||||
var params = id ? {params: {loadbalancerId: id}} : {};
|
||||
return apiService.get('/api/lbaas/listeners/', params)
|
||||
.error(function () {
|
||||
.catch(function () {
|
||||
toastService.add('error', gettext('Unable to retrieve listeners.'));
|
||||
});
|
||||
}
|
||||
|
@ -189,7 +189,7 @@
|
|||
? {params: {includeChildResources: includeChildResources}}
|
||||
: {};
|
||||
return apiService.get('/api/lbaas/listeners/' + id + '/', params)
|
||||
.error(function () {
|
||||
.catch(function () {
|
||||
toastService.add('error', gettext('Unable to retrieve listener.'));
|
||||
});
|
||||
}
|
||||
|
@ -204,7 +204,7 @@
|
|||
|
||||
function createListener(spec) {
|
||||
return apiService.post('/api/lbaas/listeners/', spec)
|
||||
.error(function () {
|
||||
.catch(function () {
|
||||
toastService.add('error', gettext('Unable to create listener.'));
|
||||
});
|
||||
}
|
||||
|
@ -221,7 +221,7 @@
|
|||
|
||||
function editListener(id, spec) {
|
||||
return apiService.put('/api/lbaas/listeners/' + id + '/', spec)
|
||||
.error(function () {
|
||||
.catch(function () {
|
||||
toastService.add('error', gettext('Unable to update listener.'));
|
||||
});
|
||||
}
|
||||
|
@ -237,7 +237,7 @@
|
|||
|
||||
function deleteListener(id, quiet) {
|
||||
var promise = apiService.delete('/api/lbaas/listeners/' + id + '/');
|
||||
return quiet ? promise : promise.error(function () {
|
||||
return quiet ? promise : promise.catch(function () {
|
||||
toastService.add('error', gettext('Unable to delete listener.'));
|
||||
});
|
||||
}
|
||||
|
@ -271,7 +271,7 @@
|
|||
params = { params: params };
|
||||
}
|
||||
return apiService.get('/api/lbaas/pools/', params)
|
||||
.error(function () {
|
||||
.catch(function () {
|
||||
toastService.add('error', gettext('Unable to retrieve pools.'));
|
||||
});
|
||||
}
|
||||
|
@ -291,7 +291,7 @@
|
|||
? {params: {includeChildResources: includeChildResources}}
|
||||
: {};
|
||||
return apiService.get('/api/lbaas/pools/' + id + '/', params)
|
||||
.error(function () {
|
||||
.catch(function () {
|
||||
toastService.add('error', gettext('Unable to retrieve pool.'));
|
||||
});
|
||||
}
|
||||
|
@ -306,7 +306,7 @@
|
|||
|
||||
function createPool(spec) {
|
||||
return apiService.post('/api/lbaas/pools/', spec)
|
||||
.error(function () {
|
||||
.catch(function () {
|
||||
toastService.add('error', gettext('Unable to create pool.'));
|
||||
});
|
||||
}
|
||||
|
@ -323,7 +323,7 @@
|
|||
|
||||
function editPool(id, spec) {
|
||||
return apiService.put('/api/lbaas/pools/' + id + '/', spec)
|
||||
.error(function () {
|
||||
.catch(function () {
|
||||
toastService.add('error', gettext('Unable to update pool.'));
|
||||
});
|
||||
}
|
||||
|
@ -339,7 +339,7 @@
|
|||
|
||||
function deletePool(id, quiet) {
|
||||
var promise = apiService.delete('/api/lbaas/pools/' + id + '/');
|
||||
return quiet ? promise : promise.error(function () {
|
||||
return quiet ? promise : promise.catch(function () {
|
||||
toastService.add('error', gettext('Unable to delete pool.'));
|
||||
});
|
||||
}
|
||||
|
@ -359,7 +359,7 @@
|
|||
|
||||
function getMembers(poolId) {
|
||||
return apiService.get('/api/lbaas/pools/' + poolId + '/members/')
|
||||
.error(function () {
|
||||
.catch(function () {
|
||||
toastService.add('error', gettext('Unable to retrieve members.'));
|
||||
});
|
||||
}
|
||||
|
@ -376,7 +376,7 @@
|
|||
|
||||
function getMember(poolId, memberId) {
|
||||
return apiService.get('/api/lbaas/pools/' + poolId + '/members/' + memberId + '/')
|
||||
.error(function () {
|
||||
.catch(function () {
|
||||
toastService.add('error', gettext('Unable to retrieve member.'));
|
||||
});
|
||||
}
|
||||
|
@ -393,7 +393,7 @@
|
|||
|
||||
function deleteMember(poolId, memberId) {
|
||||
return apiService.delete('/api/lbaas/pools/' + poolId + '/members/' + memberId + '/')
|
||||
.error(function () {
|
||||
.catch(function () {
|
||||
toastService.add('error', gettext('Unable to delete member.'));
|
||||
});
|
||||
}
|
||||
|
@ -410,7 +410,7 @@
|
|||
|
||||
function editMember(poolId, memberId, spec) {
|
||||
return apiService.put('/api/lbaas/pools/' + poolId + '/members/' + memberId + '/', spec)
|
||||
.error(function () {
|
||||
.catch(function () {
|
||||
toastService.add('error', gettext('Unable to update member.'));
|
||||
});
|
||||
}
|
||||
|
@ -427,7 +427,7 @@
|
|||
|
||||
function updateMemberList(poolId, spec) {
|
||||
return apiService.put('/api/lbaas/pools/' + poolId + '/members/', spec)
|
||||
.error(function () {
|
||||
.catch(function () {
|
||||
toastService.add('error', gettext('Unable to update member list.'));
|
||||
});
|
||||
}
|
||||
|
@ -459,14 +459,14 @@
|
|||
function getHealthMonitors(id) {
|
||||
var params = id ? {params: {poolId: id}} : {};
|
||||
return apiService.get('/api/lbaas/healthmonitors/', params)
|
||||
.error(function () {
|
||||
.catch(function () {
|
||||
toastService.add('error', gettext('Unable to retrieve health monitors.'));
|
||||
});
|
||||
}
|
||||
|
||||
function getHealthMonitor(monitorId) {
|
||||
return apiService.get('/api/lbaas/healthmonitors/' + monitorId + '/')
|
||||
.error(function () {
|
||||
.catch(function () {
|
||||
toastService.add('error', gettext('Unable to retrieve health monitor.'));
|
||||
});
|
||||
}
|
||||
|
@ -483,7 +483,7 @@
|
|||
|
||||
function editHealthMonitor(id, spec) {
|
||||
return apiService.put('/api/lbaas/healthmonitors/' + id + '/', spec)
|
||||
.error(function () {
|
||||
.catch(function () {
|
||||
toastService.add('error', gettext('Unable to update health monitor.'));
|
||||
});
|
||||
}
|
||||
|
@ -499,7 +499,7 @@
|
|||
|
||||
function deleteHealthMonitor(id, quiet) {
|
||||
var promise = apiService.delete('/api/lbaas/healthmonitors/' + id + '/');
|
||||
return quiet ? promise : promise.error(function () {
|
||||
return quiet ? promise : promise.catch(function () {
|
||||
toastService.add('error', gettext('Unable to delete health monitor.'));
|
||||
});
|
||||
}
|
||||
|
@ -514,7 +514,7 @@
|
|||
|
||||
function createHealthMonitor(spec) {
|
||||
return apiService.post('/api/lbaas/healthmonitors/', spec)
|
||||
.error(function () {
|
||||
.catch(function () {
|
||||
toastService.add('error', gettext('Unable to create health monitor.'));
|
||||
});
|
||||
}
|
||||
|
|
|
@ -8,10 +8,12 @@
|
|||
"OpenStack",
|
||||
"octavia",
|
||||
"octavia-dashboard",
|
||||
"load-balancer"],
|
||||
"load-balancer"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://git.openstack.org/openstack/octavia-dashboard"},
|
||||
"url": "https://git.openstack.org/openstack/octavia-dashboard"
|
||||
},
|
||||
"bugs": "https://storyboard.openstack.org/#!/project/909",
|
||||
"license": "Apache 2.0",
|
||||
"devDependencies": {
|
||||
|
|
Loading…
Reference in New Issue