Skip to content

Commit

Permalink
Show error message when retry failed (#1) (#1618)
Browse files Browse the repository at this point in the history
When success, the page reloads. Before it was not a very good experience when the page is redirected to the agent environment. If it is a sidecar, the page will take a while to load.
When failure, the error message is shown.
  • Loading branch information
tylerwowen authored May 16, 2024
1 parent c842028 commit 266965b
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions deploy-board/deploy_board/templates/hosts/host_details.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,11 @@
data: {'csrfmiddlewaretoken': '{{csrf_token}}'},
datatype: 'json',
success: function (data) {
window.location = '/env/{{env.envName }}/{{env.stageName}}/';
location.reload();
},
error: function (data) {
$('#errorBannerId').append(data.responseText);
$('#errorBannerId').show();
}
});
});
Expand All @@ -117,7 +121,11 @@
data: {'csrfmiddlewaretoken': '{{csrf_token}}'},
datatype: 'json',
success: function (data) {
window.location = '/env/{{env.envName }}/{{env.stageName}}/';
location.reload();
},
error: function (data) {
$('#errorBannerId').append(data.responseText);
$('#errorBannerId').show();
}
});
});
Expand All @@ -128,7 +136,11 @@
data: {'csrfmiddlewaretoken': '{{csrf_token}}'},
datatype: 'json',
success: function (data) {
window.location = '/env/{{env.envName }}/{{env.stageName}}/';
location.reload();
},
error: function (data) {
$('#errorBannerId').append(data.responseText);
$('#errorBannerId').show();
}
});
});
Expand Down

0 comments on commit 266965b

Please sign in to comment.