Fix broken reload on clicking the restart button on UI

This commit is contained in:
Kailash Nadh 2021-02-13 13:14:52 +05:30
parent b1696c0fb9
commit bc5cc53f28
1 changed files with 4 additions and 3 deletions

View File

@ -163,9 +163,10 @@ export default Vue.extend({
// Poll until there's a 200 response, waiting for the app
// to restart and come back up.
const pollId = setInterval(() => {
clearInterval(pollId);
this.$utils.toast('Reload complete');
document.location.reload();
this.$api.getHealth().then(() => {
clearInterval(pollId);
document.location.reload();
});
}, 500);
});
},