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

show that workspace ist valid if so

parent 6bd7daa4
No related branches found
No related tags found
No related merge requests found
...@@ -2,84 +2,86 @@ ...@@ -2,84 +2,86 @@
<div class="filelist"> <div class="filelist">
<mat-accordion class="example-headers-align" multi="true"> <mat-accordion class="example-headers-align" multi="true">
<mat-expansion-panel [expanded]="true" *ngFor="let type of fileTypes"> <ng-container *ngFor="let type of fileTypes">
<mat-expansion-panel-header> <mat-expansion-panel [expanded]="true" *ngIf="files && files[type]">
<mat-panel-title>{{typeLabels[type]}}</mat-panel-title> <mat-expansion-panel-header>
<mat-panel-description *ngIf="files[type]"> <mat-panel-title>{{typeLabels[type]}}</mat-panel-title>
<span>{{files[type].data.length}} Datei{{files[type].data.length === 1 ? '' : 'en'}}</span> <mat-panel-description>
<span *ngIf="fileStats.invalid[type]">, davon {{fileStats.invalid[type]}} Fehlerhaft</span> <span>{{files[type].data.length}} Datei{{files[type].data.length === 1 ? '' : 'en'}}</span>
<span *ngIf="type=='Testtakers'">, {{fileStats.testtakers}} Teilnehmer</span> <span *ngIf="fileStats.invalid[type]">, davon {{fileStats.invalid[type]}} Fehlerhaft</span>
</mat-panel-description> <span *ngIf="type=='Testtakers'">, {{fileStats.testtakers}} Teilnehmer</span>
</mat-expansion-panel-header> </mat-panel-description>
</mat-expansion-panel-header>
<mat-table *ngIf="files && files[type]" [dataSource]="files[type]" matSort (matSortChange)="setTableSorting($event)"> <mat-table [dataSource]="files[type]" matSort (matSortChange)="setTableSorting($event)">
<ng-container matColumnDef="checked"> <ng-container matColumnDef="checked">
<mat-header-cell *matHeaderCellDef class="checkboxcell"> <mat-header-cell *matHeaderCellDef class="checkboxcell">
<mat-checkbox (change)="checkAll($event.checked, type)"></mat-checkbox> <mat-checkbox (change)="checkAll($event.checked, type)"></mat-checkbox>
</mat-header-cell> </mat-header-cell>
<mat-cell *matCellDef="let element" class="checkboxcell"> <mat-cell *matCellDef="let element" class="checkboxcell">
<mat-checkbox [checked]="element.isChecked" (change)="element.isChecked=$event.checked"></mat-checkbox> <mat-checkbox [checked]="element.isChecked" (change)="element.isChecked=$event.checked"></mat-checkbox>
</mat-cell> </mat-cell>
</ng-container> </ng-container>
<ng-container matColumnDef="name"> <ng-container matColumnDef="name">
<mat-header-cell *matHeaderCellDef mat-sort-header class="namecell">Dateiname</mat-header-cell> <mat-header-cell *matHeaderCellDef mat-sort-header class="namecell">Dateiname</mat-header-cell>
<mat-cell *matCellDef="let element" class="namecell"> <mat-cell *matCellDef="let element" class="namecell">
<div class="file-report"> <div class="file-report">
<button mat-button (click)="download(element)">{{element.name}}</button> <button mat-button (click)="download(element)">{{element.name}}</button>
<span class="vertical-align-middle"> <span class="vertical-align-middle">
<ng-container *ngIf="element.report.error && element.report.error?.length; else: noError"> <ng-container *ngIf="element.report.error && element.report.error?.length; else: noError">
<mat-icon class="report-error">error</mat-icon> <mat-icon class="report-error">error</mat-icon>
</ng-container>
<ng-template #noError>
<ng-container *ngIf="element.report.warning && element.report.warning?.length">
<mat-icon class="report-warning">warning</mat-icon>
</ng-container> </ng-container>
</ng-template> <ng-template #noError>
</span> <ng-container *ngIf="element.report.warning && element.report.warning?.length">
<mat-card class="full-file-report"> <mat-icon class="report-warning">warning</mat-icon>
<mat-card-header *ngIf="element.info.label || element.id"> </ng-container>
<mat-card-title> </ng-template>
{{element.info.label}} </span>
<span <mat-card class="full-file-report">
*ngIf="element.id !== element.name.toUpperCase()" <mat-card-header *ngIf="element.info.label || element.id">
style="{{element.info.label ? 'color:silver' : ''}}"> <mat-card-title>
#{{element.id}} {{element.info.label}}
</span> <span
</mat-card-title> *ngIf="element.id !== element.name.toUpperCase()"
<mat-card-subtitle>{{element.info.description}}</mat-card-subtitle> style="{{element.info.label ? 'color:silver' : ''}}">
</mat-card-header> #{{element.id}}
<mat-card-content> </span>
<ng-container *ngFor="let level of ['error', 'warning', 'info']"> </mat-card-title>
<div *ngFor="let message of element.report[level]"> <mat-card-subtitle>{{element.info.description}}</mat-card-subtitle>
<alert [level]="level" [text]="message"></alert> </mat-card-header>
</div> <mat-card-content>
</ng-container> <ng-container *ngFor="let level of ['error', 'warning', 'info']">
</mat-card-content> <div *ngFor="let message of element.report[level]">
</mat-card> <alert [level]="level" [text]="message"></alert>
</div> </div>
</mat-cell> </ng-container>
</ng-container> </mat-card-content>
</mat-card>
</div>
</mat-cell>
</ng-container>
<ng-container matColumnDef="modificationTime"> <ng-container matColumnDef="modificationTime">
<mat-header-cell *matHeaderCellDef mat-sort-header class="datecell"> Letzte Änderung </mat-header-cell> <mat-header-cell *matHeaderCellDef mat-sort-header class="datecell"> Letzte Änderung </mat-header-cell>
<mat-cell *matCellDef="let element" class="datecell"> <mat-cell *matCellDef="let element" class="datecell">
{{(element.modificationTime * 1000) | date: 'dd.MM.yy hh:mm'}} {{(element.modificationTime * 1000) | date: 'dd.MM.yy hh:mm'}}
</mat-cell> </mat-cell>
</ng-container> </ng-container>
<ng-container matColumnDef="size"> <ng-container matColumnDef="size">
<mat-header-cell *matHeaderCellDef mat-sort-header> Volle Größe </mat-header-cell> <mat-header-cell *matHeaderCellDef mat-sort-header> Volle Größe </mat-header-cell>
<mat-cell *matCellDef="let element" style="white-space: nowrap;"> <mat-cell *matCellDef="let element" style="white-space: nowrap;">
{{(element.info.totalSize || element.size) | bytes}} {{(element.info.totalSize || element.size) | bytes}}
</mat-cell> </mat-cell>
</ng-container> </ng-container>
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row> <mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
<mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row> <mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row>
</mat-table> </mat-table>
</mat-expansion-panel> </mat-expansion-panel>
</ng-container>
</mat-accordion> </mat-accordion>
</div> </div>
...@@ -105,12 +107,15 @@ ...@@ -105,12 +107,15 @@
</iqb-files-upload-queue> </iqb-files-upload-queue>
<div *ngIf="!uploadQueue.files?.length" class="workspace-report"> <div *ngIf="!uploadQueue.files?.length" class="workspace-report">
<alert *ngIf="fileStats.total.invalid" level="error" text="{{fileStats.total.invalid}} <alert *ngIf="fileStats.total.invalid; else: workspaceValid" level="error" text="{{fileStats.total.invalid}}
Datei{{fileStats.total.invalid == 1 ? '' : 'en'}} von {{fileStats.total.count}} Datei{{fileStats.total.invalid == 1 ? '' : 'en'}} von {{fileStats.total.count}}
{{fileStats.total.invalid == 1 ? 'ist' : 'sind'}} nicht valide oder {{fileStats.total.invalid == 1 ? 'ist' : 'sind'}} nicht valide oder
{{fileStats.total.invalid == 1 ? 'hat' : 'haben'}} fehlende Abhängigkeiten {{fileStats.total.invalid == 1 ? 'hat' : 'haben'}} fehlende Abhängigkeiten
und {{fileStats.total.invalid == 1 ? 'wird' : 'werden'}} ignoriert!"> und {{fileStats.total.invalid == 1 ? 'wird' : 'werden'}} ignoriert!">
</alert> </alert>
<ng-container #workspaceValid>
<alert level="success" text="Workspace ist Valide"></alert>
</ng-container>
</div> </div>
</div> </div>
......
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