fix: rename job status page to /session/job/{id} to avoid collision with JSON polling endpoint /session/status/{id}
This commit is contained in:
parent
0f60e22612
commit
6fce3e0c97
2 changed files with 2 additions and 2 deletions
|
|
@ -391,7 +391,7 @@ async def configure_submit(request: Request):
|
|||
return JSONResponse({"error": exc.detail}, status_code=502)
|
||||
|
||||
|
||||
@app.get("/session/status/{job_id}", response_class=HTMLResponse)
|
||||
@app.get("/session/job/{job_id}", response_class=HTMLResponse)
|
||||
async def session_status_page(request: Request, job_id: str):
|
||||
"""Full page showing job progress with polling."""
|
||||
return render("job_polling.html", request=request, job_id=job_id,
|
||||
|
|
|
|||
|
|
@ -211,7 +211,7 @@ async function submitConfig() {
|
|||
var resp = await fetch('/session/configure/submit', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(payload) });
|
||||
var data = await resp.json();
|
||||
if (data.error) { throw new Error(data.error); }
|
||||
window.location.href = '/session/status/' + data.job_id;
|
||||
window.location.href = '/session/job/' + data.job_id;
|
||||
} catch (err) {
|
||||
status.innerHTML = '<div class="pve-alert pve-alert-error">Failed: ' + err.message + '</div>';
|
||||
btn.disabled = false;
|
||||
|
|
|
|||
Loading…
Reference in a new issue