diff --git a/deploy-board/deploy_board/templates/clusters/base_images_events.html b/deploy-board/deploy_board/templates/clusters/base_images_events.html index 2a5a3afc89..0384b571b7 100644 --- a/deploy-board/deploy_board/templates/clusters/base_images_events.html +++ b/deploy-board/deploy_board/templates/clusters/base_images_events.html @@ -53,7 +53,7 @@

Base Images Events

globalNotificationBanner.info = "Request sent successfully"; }, error: function (data) { // if error occured - globalNotificationBanner.error = data; + globalNotificationBanner.error = data.responseJSON.error; }, }); }); @@ -72,7 +72,7 @@

Base Images Events

globalNotificationBanner.info = "Request sent successfully"; }, error: function (data) { // if error occured - globalNotificationBanner.error = data; + globalNotificationBanner.error = data.responseJSON.error; }, }); }); @@ -137,4 +137,4 @@ -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/deploy-board/deploy_board/templates/clusters/cluster_configuration.html b/deploy-board/deploy_board/templates/clusters/cluster_configuration.html index 9a30eb54dc..630ecd2fa5 100644 --- a/deploy-board/deploy_board/templates/clusters/cluster_configuration.html +++ b/deploy-board/deploy_board/templates/clusters/cluster_configuration.html @@ -669,7 +669,7 @@

Capacity

scope.imageNameChange(data[0]); }, error: function (data) { - globalNotificationBanner.error = data + globalNotificationBanner.error = data.responseJSON.error; } }); @@ -697,7 +697,7 @@

Capacity

capacitySetting.selectedSecurityZoneValue = data[0]?.abstract_name; }, error: function (data) { - globalNotificationBanner.error = data + globalNotificationBanner.error = data.responseJSON.error; } }); @@ -719,7 +719,7 @@

Capacity

placements ? placements.getFullList(false, cell == initialCell ? currentPlacements : null) : null; }, error: function (data) { - globalNotificationBanner.error = data + globalNotificationBanner.error = data.responseJSON.error; } }) }, @@ -747,7 +747,7 @@

Capacity

scope.imageNameChange(imageName); }, error: function (data) { - globalNotificationBanner.error = data + globalNotificationBanner.error = data.responseJSON.error; } }); // grab all the host types @@ -777,7 +777,7 @@

Capacity

}) }, error: function (data) { - globalNotificationBanner.error = data + globalNotificationBanner.error = data.responseJSON.error; } }); }, @@ -811,7 +811,7 @@

Capacity

capacitySetting.pinImageEnabled = isPinImageEnabled(goldenImage); }, error: function(data) { - globalNotificationBanner.error = data + globalNotificationBanner.error = data.responseJSON.error; } }); }, diff --git a/deploy-board/deploy_board/templates/configs/capacity.html b/deploy-board/deploy_board/templates/configs/capacity.html index 774533651d..0ecdf04525 100644 --- a/deploy-board/deploy_board/templates/configs/capacity.html +++ b/deploy-board/deploy_board/templates/configs/capacity.html @@ -107,7 +107,7 @@

Capacity

window.location.href=window.location.href }, error: function(data) { - globalNotificationBanner.error = data + globalNotificationBanner.error = data.responseJSON.error; } }); }, @@ -138,7 +138,7 @@

Capacity

window.location.href=window.location.href }, error: function(data) { - globalNotificationBanner.error = data + globalNotificationBanner.error = data.responseJSON.error; } }); }, diff --git a/deploy-board/deploy_board/templates/configs/capacity.tmpl b/deploy-board/deploy_board/templates/configs/capacity.tmpl index bf36668277..6c829e188c 100644 --- a/deploy-board/deploy_board/templates/configs/capacity.tmpl +++ b/deploy-board/deploy_board/templates/configs/capacity.tmpl @@ -107,15 +107,11 @@ xhr.setRequestHeader("X-CSRFToken", csrftoken); }, success: function (data) { - if(data != null && data.success == false) { - globalNotificationBanner.error = data; - } else { - globalNotificationBanner.info = "Saved Successfully"; - window.location.href='/env/{{ env.envName }}/{{ env.stageName }}/config/capacity/' - } + globalNotificationBanner.info = "Saved Successfully"; + window.location.href='/env/{{ env.envName }}/{{ env.stageName }}/config/capacity/' }, error: function (data) { - globalNotificationBanner.error = data; + globalNotificationBanner.error = data.responseJSON.error; } }); }, @@ -123,4 +119,3 @@ } ) - diff --git a/deploy-board/deploy_board/templates/configs/env_config.tmpl b/deploy-board/deploy_board/templates/configs/env_config.tmpl index 2a1a69a50b..8161ae4146 100644 --- a/deploy-board/deploy_board/templates/configs/env_config.tmpl +++ b/deploy-board/deploy_board/templates/configs/env_config.tmpl @@ -365,20 +365,15 @@ btn.button('loading'); }, success: function (data) { - if (data != null && data.success == false) { - $('#errorBannerId').append(data.error); - if ($('#stageTypeValueId').val() == 'DEFAULT') { - $('#errorBannerId').append("pinch/teletraan-stagetypes"); - } - $('#errorBannerId').show(); - } else { - $("#envConfigId").parent().html(data.html); - $('#errorBannerId').empty().hide(); - } + $("#envConfigId").parent().html(data.html); + $('#errorBannerId').empty().hide(); btn.button('reset'); }, error: function (data) { - $('#errorBannerId').append(data.responseText); + $('#errorBannerId').append(data.responseJSON.error); + if ($('#stageTypeValueId').val() == 'DEFAULT') { + $('#errorBannerId').append("pinch/teletraan-stagetypes"); + } $('#errorBannerId').show(); } }); diff --git a/deploy-board/deploy_board/templates/configs/new_capacity_adv.html b/deploy-board/deploy_board/templates/configs/new_capacity_adv.html index 930f7bc570..df4226d1ce 100644 --- a/deploy-board/deploy_board/templates/configs/new_capacity_adv.html +++ b/deploy-board/deploy_board/templates/configs/new_capacity_adv.html @@ -281,7 +281,7 @@

Capacity

onSuccess(data) }, error: function(data) { - globalNotificationBanner.error = data + globalNotificationBanner.error = data.responseJSON.error; } }); }, @@ -322,7 +322,7 @@

Capacity

scope.imageNameChange(data && data.length > 0 ? data[0] : null); }, error: function (data) { - globalNotificationBanner.error = data + globalNotificationBanner.error = data.responseJSON.error; } }); @@ -351,7 +351,7 @@

Capacity

capacitySetting.selectedSecurityZoneValue = data && data.length > 0 ? data[0].abstract_name : null; }, error: function (data) { - globalNotificationBanner.error = data + globalNotificationBanner.error = data.responseJSON.error; } }); @@ -373,7 +373,7 @@

Capacity

capacitySetting.placements = placements ? placements.getFullList(false, null) : null; }, error: function (data) { - globalNotificationBanner.error = data + globalNotificationBanner.error = data.responseJSON.error; } }); }, @@ -400,7 +400,7 @@

Capacity

scope.imageNameChange(imageName); }, error: function (data) { - globalNotificationBanner.error = data + globalNotificationBanner.error = data.responseJSON.error; } }); // grab all the host types @@ -424,7 +424,7 @@

Capacity

}) }, error: function (data) { - globalNotificationBanner.error = data + globalNotificationBanner.error = data.responseJSON.error; } }); }, @@ -458,7 +458,7 @@

Capacity

capacitySetting.pinImageEnabled = isPinImageEnabled(goldenImage); }, error: function (data) { - globalNotificationBanner.error = data + globalNotificationBanner.error = data.responseJSON.error; } }); }, diff --git a/deploy-board/deploy_board/templates/error.tmpl b/deploy-board/deploy_board/templates/error.tmpl index c3097ba1c5..0427d3fde9 100644 --- a/deploy-board/deploy_board/templates/error.tmpl +++ b/deploy-board/deploy_board/templates/error.tmpl @@ -1,7 +1,8 @@
- +