|
| 1 | +<div class="container-fluid p-3" xmlns="http://www.w3.org/1999/html"> |
| 2 | + <div class="w-100"> |
| 3 | + <div class="card w-100 h-100"> |
| 4 | + <div class="card-body p-0 position-relative"> |
| 5 | + <div class="card bg-light border-0 m-0"> |
| 6 | + <div class="d-flex p-2 m-1 justify-content-between align-items-center"> |
| 7 | + <h5 class="card-title mb-0 text-uppercase label-header d-flex align-items-center"> |
| 8 | + Compliance assessment |
| 9 | + </h5> |
| 10 | + <app-utm-search-input (searchFor)="onSearch($event)" |
| 11 | + [searching]="loading" |
| 12 | + placeholder="Search ..."> |
| 13 | + </app-utm-search-input> |
| 14 | + |
| 15 | + </div> |
| 16 | + </div> |
| 17 | + |
| 18 | + <!-- Spinner --> |
| 19 | + <div *ngIf="loading" |
| 20 | + class="position-absolute top-0 start-0 w-100 h-100 d-flex justify-content-center align-items-center" |
| 21 | + style="background-color: rgba(255, 255, 255, 0.8); z-index: 10;"> |
| 22 | + <app-utm-spinner [height]="'35px'" |
| 23 | + [label]="'Loading ...'" |
| 24 | + [loading]="loading" |
| 25 | + [width]="'35px'"> |
| 26 | + </app-utm-spinner> |
| 27 | + </div> |
| 28 | + |
| 29 | + <div [ngStyle]="{'min-height': getTableHeight(), 'height': getTableHeight()}" class="table-responsive"> |
| 30 | + <table class="table mb-0"> |
| 31 | + <thead> |
| 32 | + <tr> |
| 33 | + <th> |
| 34 | + Status |
| 35 | + </th> |
| 36 | + <th (sort)="onSortBy($event)" |
| 37 | + [isSortable]="true" |
| 38 | + [sortEvent]="sortEvent" |
| 39 | + [sortable]="'controlName'" |
| 40 | + appColumnSortable |
| 41 | + class="cursor-pointer"> |
| 42 | + Security Control Name |
| 43 | + </th> |
| 44 | + <th> |
| 45 | + Last Evaluation |
| 46 | + </th> |
| 47 | + <th> |
| 48 | + Description |
| 49 | + </th> |
| 50 | + </tr> |
| 51 | + </thead> |
| 52 | + <tbody *ngIf="controls$ | async as controls;"> |
| 53 | + <tr class="cursor-pointer" (click)="controlDetail = control" |
| 54 | + *ngFor="let control of controls; let index = index" style="position: relative; z-index: 1;"> |
| 55 | + <td style="width: 12%; position: relative; z-index: 0;" |
| 56 | + [ngClass]="{ |
| 57 | + 'border-left-success': control.lastEvaluationStatus === ComplianceStatusExtendedEnum.COMPLIANT, |
| 58 | + 'border-left-danger': control.lastEvaluationStatus === ComplianceStatusExtendedEnum.NON_COMPLIANT, |
| 59 | + 'border-left-neutral': control.lastEvaluationStatus !== ComplianceStatusExtendedEnum.COMPLIANT |
| 60 | + && control.lastEvaluationStatus !== ComplianceStatusExtendedEnum.NON_COMPLIANT |
| 61 | + }" |
| 62 | + > |
| 63 | + {{ control.lastEvaluationStatus | complianceStatusLabel }} |
| 64 | + </td> |
| 65 | + <td style="width: 35%; position: relative; z-index: 0;"> |
| 66 | + <div style="display: flex; align-items: center; gap: 8px;"> |
| 67 | + <img src="assets/icons/compliance/shield.png" alt="shield" style="flex-shrink: 0;"/> |
| 68 | + <span> |
| 69 | + {{ control.controlName }} |
| 70 | + </span> |
| 71 | + </div> |
| 72 | + </td> |
| 73 | + <td style="width: 18%; position: relative; z-index: 0;"> |
| 74 | + <span *ngIf="dateFormat$ | async as dateFormat"> |
| 75 | + {{ control.lastEvaluationTimestamp | date:dateFormat.dateFormat:dateFormat.timezone }} |
| 76 | + </span> |
| 77 | + </td> |
| 78 | + <td style="width: 35%; position: relative; z-index: 0;"> |
| 79 | + <div style="max-width: 350px" class="text-truncate"> |
| 80 | + {{ control.controlSolution }} |
| 81 | + </div> |
| 82 | + </td> |
| 83 | + </tr> |
| 84 | + <tr *ngIf="noData && !loading"> |
| 85 | + <td colspan="5"> |
| 86 | + <app-no-data-found></app-no-data-found> |
| 87 | + </td> |
| 88 | + </tr> |
| 89 | + </tbody> |
| 90 | + </table> |
| 91 | + </div> |
| 92 | + <div [hidden]="noData" class="my-4"> |
| 93 | + <div class="row justify-content-center"> |
| 94 | + <ngb-pagination |
| 95 | + [(page)]="page" |
| 96 | + (pageChange)="loadPage($event)" |
| 97 | + [boundaryLinks]="true" |
| 98 | + [collectionSize]="totalItems" |
| 99 | + [maxSize]="5" |
| 100 | + [pageSize]="itemsPerPage" |
| 101 | + [rotate]="true" |
| 102 | + [size]="'sm'"> |
| 103 | + </ngb-pagination> |
| 104 | + </div> |
| 105 | + </div> |
| 106 | + </div> |
| 107 | + </div> |
| 108 | + </div> |
| 109 | +</div> |
| 110 | + |
| 111 | + |
| 112 | +<div *ngIf="controlDetail" class="utm-right-container"> |
| 113 | + <div (click)="controlDetail= undefined" class="overlay overlay-lg col-md-7"></div> |
| 114 | + <div class="card utm-right-action utm-right-action-lg ml-0"> |
| 115 | + <div [ngClass]="{ |
| 116 | + 'border-left-success': controlDetail.lastEvaluationStatus === ComplianceStatusExtendedEnum.COMPLIANT, |
| 117 | + 'border-left-danger': controlDetail.lastEvaluationStatus === ComplianceStatusExtendedEnum.NON_COMPLIANT, |
| 118 | + 'border-left-neutral': controlDetail.lastEvaluationStatus !== ComplianceStatusExtendedEnum.COMPLIANT |
| 119 | + && controlDetail.lastEvaluationStatus !== ComplianceStatusExtendedEnum.NON_COMPLIANT |
| 120 | + }" class="title d-flex justify-content-between align-items-center border-bottom-1 |
| 121 | + border-bottom-grey-100 pl-3 pt-3 pr-3 pb-0"> |
| 122 | + <h6 class="card-title text-blue-800 font-weight-light"> |
| 123 | + <img src="assets/icons/compliance/shield.png" alt="shield"/> |
| 124 | + <label class="font-size-base text-wrap"> |
| 125 | + {{ controlDetail.controlName }} |
| 126 | + </label> |
| 127 | + </h6> |
| 128 | + <button (click)="controlDetail = undefined" aria-label="Close" |
| 129 | + class="close button-close" type="button"> |
| 130 | + <div class="close-icon"></div> |
| 131 | + </button> |
| 132 | + </div> |
| 133 | + <app-compliance-evaluation-view-detail [control]="controlDetail"></app-compliance-evaluation-view-detail> |
| 134 | + </div> |
| 135 | +</div> |
0 commit comments