Fix undefined in success toast for update calls

We don't receive the name of the zone in the
response data returned to the browser and
the toast message becomes:

  Zone undefined was successfully updated

Because we dont get the name in the response
nor have the name available (because we use
zone ID).

Change-Id: Ifed3d45b00e1fd5a813f53cc9567c1d48bf9db14
Signed-off-by: Tobias Urdin <tobias.urdin@binero.com>
This commit is contained in:
Tobias Urdin
2025-08-19 17:01:37 +02:00
parent 7ef1bf9a07
commit 003eeaea4e
3 changed files with 6 additions and 6 deletions

View File

@@ -94,7 +94,7 @@
};
var message = {
success: gettext('Domain name PTR %s was successfully set.')
success: gettext('Domain name PTR was successfully set.')
};
var service = {
@@ -151,7 +151,7 @@
function onSuccess(response) {
waitSpinner.hideModalSpinner();
var floatingIp = response.data;
toast.add('success', interpolate(message.success, [floatingIp.ptrdname]));
toast.add('success', message.success);
// To make the result of this action generically useful, reformat the return
// from the deleteModal into a standard form

View File

@@ -59,7 +59,7 @@
var updateRecordSetPolicy;
var title = gettext("Update Record Set");
var message = {
success: gettext('Record Set %s was successfully updated.')
success: gettext('Record Set was successfully updated.')
};
var service = {
@@ -140,7 +140,7 @@
function onSuccess(response) {
waitSpinner.hideModalSpinner();
var recordset = response.data;
toast.add('success', interpolate(message.success, [recordset.name]));
toast.add('success', message.success);
// To make the result of this action generically useful, reformat the return
// from the deleteModal into a standard form

View File

@@ -55,7 +55,7 @@
var updateZonePolicy;
var title = gettext("Update Zone");
var message = {
success: gettext('Zone %s was successfully updated.')
success: gettext('Zone was successfully updated.')
};
var service = {
@@ -127,7 +127,7 @@
function onSuccess(response) {
waitSpinner.hideModalSpinner();
var zone = response.data;
toast.add('success', interpolate(message.success, [zone.name]));
toast.add('success', message.success);
// To make the result of this action generically useful, reformat the return
// from the deleteModal into a standard form