Update Designate dashboard for Angular 1.8.2.2

This patch updates Designate dashboard for breaking changes in the
update to Angular 1.8.2.2 in horizon[1].

[1] https://review.opendev.org/c/openstack/requirements/+/844099

Change-Id: Ic8245f5da712d044b66ab19610885a112b75a4a5
This commit is contained in:
Michael Johnson 2022-06-21 21:16:19 +00:00
parent bfe7af3a80
commit 7ee73c9e1c
5 changed files with 17 additions and 17 deletions

View File

@ -62,7 +62,7 @@
function list(params) {
var config = params ? {'params': params} : {};
return httpService.get(apiPassthroughUrl + 'v2/reverse/floatingips', config)
.error(function () {
.catch(function () {
toastService.add('error', gettext('Unable to retrieve the floating ip PTRs.'));
});
}
@ -70,7 +70,7 @@
function get(id, params) {
var config = params ? {'params': params} : {};
return httpService.get(apiPassthroughUrl + 'v2/reverse/floatingips/' + id, config)
.error(function () {
.catch(function () {
toastService.add('error', gettext('Unable to get the floating ip PTR ' + id));
});
}
@ -95,7 +95,7 @@
ttl: data.ttl
};
return httpService.patch(apiPassthroughUrl + 'v2/reverse/floatingips/' + floatingIpID, apiData)
.error(function () {
.catch(function () {
toastService.add('error', gettext('Unable to set the floating IP PTR record.'));
})
}

View File

@ -102,10 +102,10 @@
}
function afterCheck(scope, result) {
var outcome = $q.reject(); // Reject the promise by default
var outcome = $q.reject().catch(angular.noop); // Reject the promise by default
if (result.fail.length > 0) {
toast.add('error', getMessage(notAllowedMessage, result.fail));
outcome = $q.reject(result.fail);
outcome = $q.reject(result.fail).catch(angular.noop);
}
if (result.pass.length > 0) {
// Remember the record sets we are allowed to delete so that on delete modal submit

View File

@ -63,7 +63,7 @@
*/
function list(zoneId, params) {
return httpService.get(apiPassthroughUrl + 'v2/zones/' + zoneId + '/recordsets/', params)
.error(function () {
.catch(function () {
toastService.add('error', gettext('Unable to retrieve the record sets.'));
});
}
@ -107,14 +107,14 @@
*/
function deleteRecordSet(zoneId, recordSetId) {
return httpService.delete(apiPassthroughUrl + 'v2/zones/' + zoneId + '/recordsets/' + recordSetId + '/')
.error(function () {
.catch(function () {
toastService.add('error', gettext('Unable to delete the record set.'));
});
}
function create(zoneId, data) {
return httpService.post(apiPassthroughUrl + 'v2/zones/' + zoneId + '/recordsets/', data)
.error(function () {
.catch(function () {
toastService.add('error', gettext('Unable to create the record set.'));
});
}
@ -128,7 +128,7 @@
records: data.records
};
return httpService.put(apiPassthroughUrl + 'v2/zones/' + zoneId + '/recordsets/' + recordSetId, apiData)
.error(function () {
.catch(function () {
toastService.add('error', gettext('Unable to update the record set.'));
});
}

View File

@ -104,10 +104,10 @@
}
function afterCheck(scope, result) {
var outcome = $q.reject(); // Reject the promise by default
var outcome = $q.reject().catch(angular.noop); // Reject the promise by default
if (result.fail.length > 0) {
toast.add('error', getMessage(notAllowedMessage, result.fail));
outcome = $q.reject(result.fail);
outcome = $q.reject(result.fail).catch(angular.noop);
}
if (result.pass.length > 0) {
outcome = deleteModal.open(scope, result.pass.map(getEntity), context).then(createResult);

View File

@ -64,14 +64,14 @@
function list(params) {
var config = params ? {'params': params} : {};
return httpService.get('/api/designate/zones/', config)
.error(function () {
.catch(function () {
toastService.add('error', gettext('Unable to retrieve the zone.'));
});
}*/
function list(params) {
var config = params ? {'params': params} : {};
return httpService.get(apiPassthroughUrl + 'v2/zones/', config)
.error(function () {
.catch(function () {
toastService.add('error', gettext('Unable to retrieve the zone.'));
});
}
@ -88,7 +88,7 @@
*/
function get(id) {
return httpService.get(apiPassthroughUrl + 'v2/zones/' + id + '/')
.error(function () {
.catch(function () {
toastService.add('error', gettext('Unable to retrieve the zone.'));
});
}
@ -102,7 +102,7 @@
*/
function deleteZone(id) {
return httpService.delete(apiPassthroughUrl + 'v2/zones/' + id + '/')
.error(function () {
.catch(function () {
toastService.add('error', gettext('Unable to delete the zone.'));
});
}
@ -119,7 +119,7 @@
*/
function create(data) {
return httpService.post(apiPassthroughUrl + 'v2/zones/', data)
.error(function() {
.catch(function() {
toastService.add('error', gettext('Unable to create the zone.'));
})
}
@ -144,7 +144,7 @@
description: data.description
};
return httpService.patch(apiPassthroughUrl + 'v2/zones/' + id + '/', apiData )
.error(function() {
.catch(function() {
toastService.add('error', gettext('Unable to update the zone.'));
})
}