Skip to content
Snippets Groups Projects
Commit cb7a55f8 authored by paf's avatar paf
Browse files

show addiotnal meta info in report-popup

parent 7344d5d4
No related branches found
No related tags found
No related merge requests found
......@@ -69,6 +69,9 @@
padding: 4px;
border-radius: 5px;
box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12);
z-index: 1000;
max-height: 30em;
overflow-y: auto
}
.vertical-align-middle {
......
......@@ -19,14 +19,8 @@
<ng-container matColumnDef="filename">
<mat-header-cell *matHeaderCellDef mat-sort-header class="namecell"> Name </mat-header-cell>
<mat-cell *matCellDef="let element" class="namecell">
<button mat-button (click)="download(element)">{{element.filename}}</button>
</mat-cell>
</ng-container>
<ng-container matColumnDef="status">
<mat-header-cell *matHeaderCellDef mat-sort-header class="namecell"></mat-header-cell>
<mat-cell *matCellDef="let element" class="namecell">
<div class="file-report" >
<div class="file-report">
<button mat-button (click)="download(element)">{{element.filename}}</button>
<div *ngFor="let level of ['error', 'warning', 'info']" class="vertical-align-middle">
<ng-container *ngIf="element.report[level] && element.report[level].length">
<div>{{element.report[level].length}}</div>
......@@ -34,6 +28,11 @@
</ng-container>
</div>
<div class="full-file-report">
<table>
<ng-container *ngFor="let info of element.info | keyvalue">
<tr *ngIf="info.value"><td>{{info.key}}</td><td>{{info.value}}</td></tr>
</ng-container>
</table>
<ng-container *ngFor="let level of ['error', 'warning', 'info']">
<div *ngFor="let message of element.report[level]">
<div class="vertical-align-middle">
......@@ -135,4 +134,3 @@
</div>
</div>
<
......@@ -34,7 +34,7 @@ interface FileStats {
})
export class FilesComponent implements OnInit {
public serverfiles: MatTableDataSource<GetFileResponseData>;
public displayedColumns = ['checked', 'filename', 'status', 'typelabel', 'filesize', 'filedatetime'];
public displayedColumns = ['checked', 'filename', 'typelabel', 'filesize', 'filedatetime'];
// for fileupload
public uploadUrl = '';
......@@ -180,7 +180,7 @@ export class FilesComponent implements OnInit {
if (file.report.error && file.report.error.length) {
stats.valid += 1;
stats.types[file.type].valid += 1;
stats.testtakers += (typeof file.info.testtakers !== "undefined") ? file.info.testtakers : 0;
stats.testtakers += (typeof file.info.testtakers === "number") ? file.info.testtakers : 0;
}
});
return stats;
......
......@@ -16,7 +16,7 @@ export interface GetFileResponseData {
info: string[];
},
info: {
[key: string]: number;
[key: string]: string|number;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment