|
| 1 | +@if (audits.totalElements === 0) { |
| 2 | + <div>{{ 'audit.data.not-found' | translate }}</div> |
| 3 | +} @else { |
| 4 | + <ds-pagination |
| 5 | + [paginationOptions]="pageConfig" |
| 6 | + [collectionSize]="audits?.totalElements" |
| 7 | + [hideGear]="true" |
| 8 | + [hidePagerWhenSinglePage]="true"> |
| 9 | + <div class="table-responsive"> |
| 10 | + <table class="table table-striped table-hover"> |
| 11 | + <thead> |
| 12 | + <tr> |
| 13 | + <th>{{ 'audit.overview.table.entityType' | translate }}</th> |
| 14 | + <th>{{ 'audit.overview.table.eperson' | translate }}</th> |
| 15 | + <th>{{ 'audit.overview.table.timestamp' | translate }}</th> |
| 16 | + @if (isOverviewPage) { |
| 17 | + <th>{{ 'audit.overview.table.objectUUID' | translate }}</th> |
| 18 | + <th>{{ 'audit.overview.table.objectType' | translate }}</th> |
| 19 | + <th>{{ 'audit.overview.table.subjectUUID' | translate }}</th> |
| 20 | + <th>{{ 'audit.overview.table.subjectType' | translate }}</th> |
| 21 | + } @else { |
| 22 | + <th>{{ 'audit.overview.table.other' | translate }}</th> |
| 23 | + } |
| 24 | + </tr> |
| 25 | + </thead> |
| 26 | + <tbody> |
| 27 | + @for (audit of audits?.page; track audit) { |
| 28 | + <tr> |
| 29 | + <td> |
| 30 | + @if (audit.hasDetails) { |
| 31 | + <div role="button" class="d-flex align-items-center" (click)="toggleCollapse(audit)"> |
| 32 | + <div class="btn btn-link p-1 mr-1"> |
| 33 | + @if (audit.isCollapsed) { |
| 34 | + <i class="fas fa-caret-right"></i> |
| 35 | + } @else { |
| 36 | + <i class="fas fa-caret-down"></i> |
| 37 | + } |
| 38 | + </div> |
| 39 | + <div> |
| 40 | + {{ audit.eventType }} |
| 41 | + </div> |
| 42 | + </div> |
| 43 | + } @else { |
| 44 | + <div class="ml-4"> |
| 45 | + {{ audit.eventType }} |
| 46 | + </div> |
| 47 | + } |
| 48 | + </td> |
| 49 | + <td>{{ audit.epersonName }}</td> |
| 50 | + <td>{{ audit.timeStamp | date:dateFormat}}</td> |
| 51 | + @if (isOverviewPage) { |
| 52 | + <td> |
| 53 | + @if (audit.objectUUID) { |
| 54 | + <a [routerLink]="['/auditlogs/object/', audit.objectUUID]">{{audit.objectUUID}}</a> |
| 55 | + } |
| 56 | + </td> |
| 57 | + <td>{{ audit.objectType }}</td> |
| 58 | + <td>{{ audit.subjectUUID }}</td> |
| 59 | + <td>{{ audit.subjectType }}</td> |
| 60 | + } @else { |
| 61 | + <td> |
| 62 | + @if (object && object.id === audit.objectUUID) { |
| 63 | + <span> |
| 64 | + @if (audit.otherAuditObject; as dso) { |
| 65 | + {{ dsoNameService.getName(dso) }} <em>({{ dso.type }})</em> |
| 66 | + } @else { |
| 67 | + {{ dataNotAvailable }} |
| 68 | + } |
| 69 | + </span> |
| 70 | + } @else { |
| 71 | + {{ dataNotAvailable }} |
| 72 | + } |
| 73 | + </td> |
| 74 | + } |
| 75 | + </tr> |
| 76 | + @if (audit.hasDetails) { |
| 77 | + <tr [(ngbCollapse)]="audit.isCollapsed" [id]="audit.id" [ngClass]="{'border-top-0': !audit.isCollapsed}" class="w-100 nested-row"> |
| 78 | + <td colspan="4" class="border-top-0"> |
| 79 | + <div class="w-100"> |
| 80 | + <div class="d-flex flex-column mw-100 w-100"> |
| 81 | + @if (audit.metadataField) { |
| 82 | + <div class="d-flex mb-1"> |
| 83 | + <small class="font-weight-bold me-2" >{{"audit.detail.metadata.field" | translate}}</small> |
| 84 | + <small>{{ audit.metadataField | dsStringReplace: "_":"." }}</small> |
| 85 | + </div> |
| 86 | + } |
| 87 | + @if (audit.value) { |
| 88 | + <div class="d-flex mb-1"> |
| 89 | + <small class="font-weight-bold me-2">{{"audit.detail.metadata.value" | translate}}</small> |
| 90 | + <small class="content dont-break-out preserve-line-breaks"> |
| 91 | + {{ audit.value }} |
| 92 | + </small> |
| 93 | + </div> |
| 94 | + } |
| 95 | + @if (audit.authority) { |
| 96 | + <div class="d-flex mb-1"> |
| 97 | + <small class="font-weight-bold me-2">{{"audit.detail.metadata.authority" | translate}}</small> |
| 98 | + <small>{{ audit.authority }}</small> |
| 99 | + </div> |
| 100 | + } |
| 101 | + @if (audit.confidence !== null) { |
| 102 | + <div class="d-flex mb-1"> |
| 103 | + <small class="font-weight-bold me-2">{{"audit.detail.metadata.confidence" | translate}}</small> |
| 104 | + <small>{{ audit.confidence }}</small> |
| 105 | + </div> |
| 106 | + } |
| 107 | + @if (audit.place !== null) { |
| 108 | + <div class="d-flex mb-1"> |
| 109 | + <small class="font-weight-bold me-2">{{"audit.detail.metadata.place" | translate}}</small> |
| 110 | + <small>{{ audit.place }}</small> |
| 111 | + </div> |
| 112 | + } |
| 113 | + @if (audit.action) { |
| 114 | + <div class="d-flex mb-1"> |
| 115 | + <small class="font-weight-bold me-2">{{"audit.detail.metadata.action" | translate}}</small> |
| 116 | + <small>{{ audit.action }}</small> |
| 117 | + </div> |
| 118 | + } |
| 119 | + @if (audit.checksum) { |
| 120 | + <div class="d-flex"> |
| 121 | + <small class="font-weight-bold me-2">{{"audit.detail.metadata.checksum" | translate}}</small> |
| 122 | + <small>{{ audit.checksum }}</small> |
| 123 | + </div> |
| 124 | + } |
| 125 | + </div> |
| 126 | + </div> |
| 127 | + </td> |
| 128 | + </tr> |
| 129 | + } |
| 130 | + } |
| 131 | + </tbody> |
| 132 | + </table> |
| 133 | + </div> |
| 134 | + </ds-pagination> |
| 135 | +} |
| 136 | + |
0 commit comments