Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions site/frontend/src/pages/status_new/page.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,13 @@ function formatStatus(status: BenchmarkRequestStatus): string {
}
}

function formatErrors(errors: Dict<string>) {
return Object.entries(errors).reduce(
(acc, e) => (acc += `${e[0]}: ${e[1]}\n`),
""
);
}

function PullRequestLink({request}: {request: BenchmarkRequest}) {
if (request.requestType === "Release") {
return "";
Expand Down Expand Up @@ -145,10 +152,10 @@ loadStatusData(loading);
req.status === "Completed" && req.hasPendingJobs ? "*" : ""
}}
</td>
<td v-html="req.createdAt"></td>
<td v-html="req.completedAt"></td>
<td v-html="getDuration(req)"></td>
<td>
<pre>{{ req.errors }}</pre>
<pre>{{ formatErrors(req.errors) }}</pre>
</td>
</tr>
</template>
Expand Down
3 changes: 1 addition & 2 deletions site/src/request_handlers/status_page_new.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,12 @@ pub async fn handle_status_page_new(ctxt: Arc<SiteCtxt>) -> anyhow::Result<statu
let index = conn.load_benchmark_request_index().await?;

// The queue contains any in-progress request(s) and then the following requests in queue order
// We reverse so that it starts with the request that will be benchmarked the latest
let mut queue: Vec<status_new::BenchmarkRequest> = build_queue(&*conn, &index)
.await?
.into_iter()
.map(|req| request_to_ui(&req, HashMap::new()))
.collect();
queue.reverse();

// And then we add N most recently completed requests to it
let completed = conn.get_last_n_completed_benchmark_requests(10).await?;
queue.extend(
Expand Down
Loading