Commit 01693b22 authored by Felix Freiberger's avatar Felix Freiberger
Browse files

Show estimated progress.

parent 101b07f2
Pipeline #23450 passed with stages
in 1 minute and 57 seconds
type TestDictionary = {
[testKey: string]: {
name: string;
tests: number;
skipped: number;
failures: number;
errors: number;
timestamp: string;
hostname: string;
time: number;
cases: {
[caseKey: string]: {
name: string;
classname: string;
time: number;
failure: null | {
message: string;
type: string;
stacktrace: string;
}
}
},
stdout: string | null,
stderr: string | null
export type TestCase = {
name: string;
classname: string;
time: number;
failure: null | {
message: string;
type: string;
stacktrace: string;
}
};
export type TestSuite = {
name: string;
tests: number;
skipped: number;
failures: number;
errors: number;
timestamp: string;
hostname: string;
time: number;
cases: {
[caseKey: string]: TestCase
},
stdout: string | null,
stderr: string | null
};
export type TestDictionary = {
[testKey: string]: TestSuite
};
export type TestTasks = {
copyRocket: {
status: "ok"
......@@ -54,6 +58,7 @@ type TestResult = {
commit: string;
image: string;
timestamp: string;
time: number;
error: boolean;
} & ({
error: true;
......@@ -132,7 +137,7 @@ export type PublicData = {
private: boolean;
generated: Date;
locked: boolean;
currentJob: Job | null;
currentJob: ( Job & { estimatedCompletion: number } ) | null;
queue: Job[];
leaderboard: PublicProjectResults[]
testResults?: TestResults;
......
......@@ -336,7 +336,11 @@ const LeaderboardPage: React.FC<{}> = () => {
</tbody>
</Table>
<h2>Launch Status</h2>
{ data.currentJob ? <div>Currently testing { data.currentJob.teamName } (<code>{ data.currentJob.commit }</code>)… 🚀</div> : <div>No job is currently running.</div> }
{ data.currentJob ? <div>
Currently testing { data.currentJob.teamName } (<code>{ data.currentJob.commit }</code>)… 🚀
<br />
Estimated progess: { Math.round(Math.min(0.9, data.currentJob.estimatedCompletion ?? 0) * 10) * 10 }%
</div> : <div>No job is currently running.</div> }
<h3>Launch Queue{ data.queue.length > 0 ? <Fragment> ({ data.queue.length })</Fragment> : null }</h3>
{ data.queue.length > 0 ? <Fragment>
<ol>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment