diff --git a/static/js/launch_progress.js b/static/js/launch_progress.js
index c2536a6..49ea4c8 100644
--- a/static/js/launch_progress.js
+++ b/static/js/launch_progress.js
@@ -111,6 +111,18 @@ function initializeSteps() {
`;
stepsContainer.appendChild(saveDataStep);
+
+ // Add Health Check step
+ const healthStep = document.createElement('div');
+ healthStep.className = 'step-item';
+ healthStep.innerHTML = `
+
+
Health Check
+
Verifying instance health...
+
+ `;
+ stepsContainer.appendChild(healthStep);
}
async function startLaunch(data) {
@@ -368,9 +380,39 @@ async function startLaunch(data) {
`;
saveDataStep.querySelector('.step-content').appendChild(instanceDetails);
+ // After saving instance data, add the health check step
+ await updateStep(9, 'Health Check', 'Verifying instance health...');
+ const healthResult = await checkInstanceHealth(`https://${data.webAddresses[0]}`);
+
+ if (!healthResult.success) {
+ throw new Error(`Health check failed: ${healthResult.error}`);
+ }
+
+ // Add a retry button if health check fails
+ const healthStep = document.querySelectorAll('.step-item')[8];
+ if (!healthResult.success) {
+ const retryButton = document.createElement('button');
+ retryButton.className = 'btn btn-sm btn-warning mt-2';
+ retryButton.innerHTML = '