From 85db83fc4544ec60ab76d7910025dfe2b3809db9 Mon Sep 17 00:00:00 2001 From: Baptiste Toulemonde <toulemonde@cines.fr> Date: Tue, 8 Feb 2022 09:50:58 +0100 Subject: [PATCH] change interface for fuji results --- src/app/fuji/fuji/fuji.component.html | 3 ++- src/app/fuji/template/result/result.component.html | 2 +- src/app/fuji/template/result/result.component.ts | 10 ++++++++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/app/fuji/fuji/fuji.component.html b/src/app/fuji/fuji/fuji.component.html index 052eec96e..abfeaeb31 100644 --- a/src/app/fuji/fuji/fuji.component.html +++ b/src/app/fuji/fuji/fuji.component.html @@ -21,7 +21,8 @@ <td>Findable</td> <td> {{result.summary.score_earned.F}}/{{result.summary.score_total.F}}</td> <td rowspan="4" style="vertical-align: middle;"> - {{result.summary.score_earned.FAIR}}/{{result.summary.score_total.FAIR}}</td> + <h4 class="bold">{{result.summary.score_percent.FAIR}}%</h4><br> + ({{result.summary.score_earned.FAIR}}/{{result.summary.score_total.FAIR}})</td> </tr> <tr> <td>Accessible</td> diff --git a/src/app/fuji/template/result/result.component.html b/src/app/fuji/template/result/result.component.html index 38a0c8d06..87c635e99 100644 --- a/src/app/fuji/template/result/result.component.html +++ b/src/app/fuji/template/result/result.component.html @@ -50,7 +50,7 @@ </tr> </thead> <tbody *ngFor="let item of splitDebug(result.test_debug)"> - <tr > + <tr [style.background-color]="getBackGroundColor(item[0])"> <td class="bold" >{{ item[0] }}</td> <td>{{ item[1] }}</td> </tr> diff --git a/src/app/fuji/template/result/result.component.ts b/src/app/fuji/template/result/result.component.ts index b4087381f..5865deaeb 100644 --- a/src/app/fuji/template/result/result.component.ts +++ b/src/app/fuji/template/result/result.component.ts @@ -33,4 +33,14 @@ export class ResultComponent implements OnInit { public onCompare(_left: KeyValue<any, any>, _right: KeyValue<any, any>): number { return 1; } + + getBackGroundColor(str: string): string { + if (str === 'SUCCESS') { + return '#7cdf86'; + } else if (str === 'WARNING') { + return '#e8c456'; + } else { + return; + } + } } -- GitLab