diff options
Diffstat (limited to 'public')
| -rw-r--r-- | public/App.js | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/public/App.js b/public/App.js index a401102..c98b708 100644 --- a/public/App.js +++ b/public/App.js @@ -841,6 +841,20 @@ export function selectedRun() { return new RunSelection(inputValue("project-id-input"), inputValue("run-id-input"), inputValue("base-id-input"), inputValue("target-id-input"), element("run-render-input").checked); } +export function freshLiveRunId(base_) { + const arg_1 = ~~(Date.now() % 1000000) | 0; + return toText(printf("%s-live-%d"))(base_)(arg_1); +} + +export function selectionForLiveStart(selection) { + if (selection.RunId === "run-probe-real-2") { + return new RunSelection(selection.ProjectId, freshLiveRunId(selection.RunId), selection.BaseId, selection.TargetId, selection.Render); + } + else { + return selection; + } +} + export function startRun(selection) { const requestBody = { projectId: selection.ProjectId, @@ -960,7 +974,7 @@ export function boot() { }); element("run-controls").addEventListener("submit", (event) => { event.preventDefault(); - startRun(selectedRun()); + startRun(selectionForLiveStart(selectedRun())); }); loadBootHistory(); renderTimeline(); |
