Skip to content

Commit ce8ee30

Browse files
committed
Render requests that have an error with a red cross
1 parent 70c1903 commit ce8ee30

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

site/frontend/src/pages/status/page.vue

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import {formatISODate, formatSecondsAsDuration} from "../../utils/formatting";
88
import {useExpandedStore} from "../../utils/expansion";
99
import {
1010
BenchmarkRequest,
11-
BenchmarkRequestStatus,
1211
CollectorConfig,
1312
isJobComplete,
1413
StatusResponse,
@@ -83,7 +82,8 @@ function getDuration(request: BenchmarkRequest): string {
8382
return "";
8483
}
8584
86-
function formatStatus(status: BenchmarkRequestStatus): string {
85+
function formatStatus(request: BenchmarkRequest): string {
86+
const status = request.status;
8787
if (status === "Completed") {
8888
return "Finished";
8989
} else if (status === "InProgress") {
@@ -95,8 +95,8 @@ function formatStatus(status: BenchmarkRequestStatus): string {
9595
}
9696
}
9797
98-
function hasErrors(errors: Dict<string>) {
99-
return Object.keys(errors).length !== 0;
98+
function hasErrors(request: BenchmarkRequest) {
99+
return Object.keys(request.errors).length !== 0;
100100
}
101101
102102
function getErrorsLength(errors: Dict<string>) {
@@ -133,7 +133,11 @@ function RequestProgress({
133133
}, 0);
134134
135135
if (request.status === "Completed") {
136-
return "";
136+
if (hasErrors(request)) {
137+
return "";
138+
} else {
139+
return "";
140+
}
137141
} else if (request.status === "Queued") {
138142
return "";
139143
} else {
@@ -186,7 +190,7 @@ loadStatusData(loading);
186190
<td>{{ req.requestType }}</td>
187191
<td><CommitSha :tag="req.tag"></CommitSha></td>
188192
<td>
189-
{{ formatStatus(req.status)
193+
{{ formatStatus(req)
190194
}}{{
191195
req.status === "Completed" && req.hasPendingJobs ? "*" : ""
192196
}}
@@ -206,7 +210,7 @@ loadStatusData(loading);
206210
</td>
207211

208212
<td>
209-
<template v-if="hasErrors(req.errors)">
213+
<template v-if="hasErrors(req)">
210214
<button @click="toggleExpandedErrors(req.tag)">
211215
{{ getErrorsLength(req.errors) }}
212216
{{ hasExpandedErrors(req.tag) ? "(hide)" : "(show)" }}

0 commit comments

Comments
 (0)