diff --git a/server/src/routes/ui.rs b/server/src/routes/ui.rs index a6164f5..aa2d66d 100644 --- a/server/src/routes/ui.rs +++ b/server/src/routes/ui.rs @@ -213,6 +213,8 @@ pub async fn app_detail( .await .unwrap_or_default(); + let latest_deploy_id = deploys.first().map(|d| d.id.as_str()).unwrap_or(""); + let mut deploy_rows = String::new(); for d in &deploys { let sha_short = d.sha.as_deref() @@ -268,7 +270,7 @@ pub async fn app_detail( {deploy_rows} @@ -299,20 +301,64 @@ pub async fn app_detail( "#, - name = app.name, - repo = app.repo_url, - branch = app.branch, - port = app.port, - host = host, - app_id = app.id, - secret = app.webhook_secret, - deploy_rows = deploy_rows, - env_rows = env_rows, + name = app.name, + repo = app.repo_url, + branch = app.branch, + port = app.port, + host = host, + app_id = app.id, + secret = app.webhook_secret, + deploy_rows = deploy_rows, + env_rows = env_rows, + latest_deploy_id = latest_deploy_id, ); Ok(Html(page(&app.name, &body)))