diff --git a/web/static/js/add_build.js b/web/static/js/add_build.js
index b3caba8..4b298d8 100644
--- a/web/static/js/add_build.js
+++ b/web/static/js/add_build.js
@@ -719,7 +719,7 @@ async function handleFormSubmit(event) {
const result = await response.json();
// Redirect to viewlog page
- window.location.href = `/viewlog/${result.build_id}`;
+ window.location.href = `/?build_id=${result.build_id}`;
} catch (error) {
console.error('Error submitting build:', error);
diff --git a/web/templates/index.html b/web/templates/index.html
index d9436b7..4789d51 100644
--- a/web/templates/index.html
+++ b/web/templates/index.html
@@ -127,12 +127,12 @@
Included features
- {% if token != None %}
+ {% if build_id != None %}
{% endif %}
diff --git a/web/ui/router.py b/web/ui/router.py
index c8a87f6..fe00662 100644
--- a/web/ui/router.py
+++ b/web/ui/router.py
@@ -14,38 +14,21 @@
@router.get("/", response_class=HTMLResponse)
-async def index(request: Request, token: str = None):
+async def index(request: Request, build_id: str = None):
"""
Render the main index page showing all builds.
Args:
request: FastAPI Request object
- token: Optional build token to automatically show log modal
+ build_id: Optional build ID to automatically show log modal and
+ trigger artifact download on build completion
Returns:
Rendered HTML template
"""
return templates.TemplateResponse(
"index.html",
- {"request": request, "token": token}
- )
-
-
-@router.get("/viewlog/{token}", response_class=HTMLResponse)
-async def viewlog(request: Request, token: str):
- """
- Render the index page with a specific build log open.
-
- Args:
- request: FastAPI Request object
- token: Build ID to show log for
-
- Returns:
- Rendered HTML template with token
- """
- return templates.TemplateResponse(
- "index.html",
- {"request": request, "token": token}
+ {"request": request, "build_id": build_id}
)