diff --git a/web/static/js/index.js b/web/static/js/index.js index a831f02..3e54b2e 100644 --- a/web/static/js/index.js +++ b/web/static/js/index.js @@ -4,6 +4,13 @@ function init() { $('body').tooltip({ selector: '[data-bs-toggle="tooltip"]' }); + + const params = new URLSearchParams(window.location.search); + const buildId = params.get("build_id"); + if (buildId) { + launchLogModal(buildId); + autoDownloadIntervalId = setInterval(tryAutoDownload, 5000, buildId); + } } function refresh_builds() { diff --git a/web/templates/add_build.html b/web/templates/add_build.html index ba792b0..6c97488 100644 --- a/web/templates/add_build.html +++ b/web/templates/add_build.html @@ -123,12 +123,6 @@ - {% if rebuild_from != None %} - - {% endif %} - diff --git a/web/templates/index.html b/web/templates/index.html index 5e3eec3..2a6bc17 100644 --- a/web/templates/index.html +++ b/web/templates/index.html @@ -128,15 +128,6 @@ - {% if build_id != None %} - - {% endif %} - diff --git a/web/ui/router.py b/web/ui/router.py index 5689236..c082c80 100644 --- a/web/ui/router.py +++ b/web/ui/router.py @@ -14,37 +14,34 @@ @router.get("/", response_class=HTMLResponse) -async def index(request: Request, build_id: str = None): +async def index(request: Request): """ Render the main index page showing all builds. Args: request: FastAPI Request object - 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, "build_id": build_id} + {"request": request} ) @router.get("/add_build", response_class=HTMLResponse) -async def add_build(request: Request, rebuild_from: str = None): +async def add_build(request: Request): """ Render the add build page for creating new firmware builds. Args: request: FastAPI Request object - rebuild_from: Optional build ID to copy configuration from Returns: Rendered HTML template """ return templates.TemplateResponse( "add_build.html", - {"request": request, "rebuild_from": rebuild_from} + {"request": request} )