@ -1,205 +1,157 @@
< div id = "layout-wrapper" >
< div class = "inner-pg-sp" >
< div class = "container-fluid" >
< div class = "row" >
< div class = "col-12" >
< div class = "d-sm-flex align-items-center justify-content-between navbar-header p-0" >
< / div >
< / div >
< / div >
< div class = "container-fluid" >
<!-- SEARCH FORM -->
< div class = "col-xl-12 mt-4" >
< div class = "card border" >
< div class = "card-body" >
< div class = "table-section" >
< div class = "row" >
< div class = "col-lg-12" >
< div class = "card-body mt-2 p-0" >
< div class = "card mb-0 mt-2" >
< div
class="card-header font-edit-13-child d-flex justify-content-between align-items-center">
{{'loggerManager' | translate}}
< div class = "card-header font-edit-13-child" >
{{ "loggerManager" | translate }}
< / div >
< div class = "card-body" >
< form [ formGroup ] = " logsSearchForm " >
< div class = "row g-3 mb-3" >
< div class = "col-md-6" >
< div class = "d-flex align-items-center gap-2" >
< label for = "fromDate" class = "text-nowrap" >
{{ 'fromDate' | translate }}< span
class="mandatory">*< / span >
< label >
{{ "fromDate" | translate }}
< span class = "mandatory" > *< / span >
< / label >
< div
class="password-wrapper position-relative w-100">
< div
class="d-flex flex-row align-items-stretch">
< input formControlName = "fromDate"
type="date" id="fromDate"
class="form-control" appNoWhitespaces />
< / div >
< div class = "text-danger"
*ngIf="logsSearchForm.get('fromDate')?.touched & & logsSearchForm.get('fromDate')?.invalid">
{{ 'fieldRequired' | translate }}
< / div >
< / div >
< / div >
< input
type="date"
formControlName="fromDate"
class="form-control"
/>
< / div >
< div class = "col-md-6" >
< div class = "d-flex align-items-start gap-2" >
< label for = "toDate" class = "text-nowrap mt-2" >
{{ 'toDate' | translate }}< span
class="mandatory">*< / span >
< label >
{{ "toDate" | translate }} < span class = "mandatory" > *< / span >
< / label >
< div
class="password-wrapper position-relative w-100">
< input formControlName = "toDate" id = "toDate"
type="date" class="form-control"
maxlength="500" appNoWhitespaces rows="3" />
< div class = "text-danger" * ngIf = "
logsSearchForm.get('toDate')?.touched & &
(logsSearchForm.get('toDate')?.invalid || logsSearchForm.errors?.['toDateInvalid'] || logsSearchForm.errors?.['toDateGreaterThanToday'])
">
< div
*ngIf="logsSearchForm.get('toDate')?.hasError('required')">
{{ 'fieldRequired' | translate }}
< input
type="date"
formControlName="toDate"
class="form-control"
/>
< / div >
< div
*ngIf="logsSearchForm.errors?.['toDateInvalid']">
{{ 'toDateInvalidError' | translate }}
< / div >
< div
*ngIf="logsSearchForm.errors?.['toDateGreaterThanToday']">
{{ 'toDateGreaterThanToday' | translate }}
< / div >
< / div >
< / div >
< / div >
< / div >
< / div >
< div class = "row g-3 mb-3" >
< div class = "col-md-6 ms-auto text-end" >
< button [ disabled ] = " logsSearchForm . invalid "
< div class = "text-end" >
< button
class="btn btn-primary"
[disabled]="logsSearchForm.invalid"
(click)="getlogsData()"
class="btn btn-primary waves-effect waves-light">{{'findLogs'
| translate}}< / button >
< / div >
>
{{ "findLogs" | translate }}
< / button >
< / div >
< / form >
< / div >
< / div >
< / div >
< / div >
< / div >
< / div >
< / div >
< / div >
< / div >
< / div >
< div class = "container-fluid" >
<!-- TABLE -->
< div class = "col-xl-12 mt-4" >
< div class = "card border" >
< div class = "card-body" >
< div class = "table-section" >
< div class = "row" >
< div class = "col-lg-12" >
< div class = "card-body mt-2 p-0" >
< div class = "card mb-0 mt-2" >
< div
class="card-header font-edit-13-child d-flex justify-content-between align-items-center">
{{'loggerManagerDetails' | translate}}
< div class = "d-flex align-items-center gap-2" * ngIf = "allItems.length" >
< div class = "search-box" >
< input type = "text" class = "form-control form-control-sm" [ ( ngModel ) ] = " searchText "
placeholder="{{ 'search' | translate }}">
< i class = "fas fa-search search-icon" > < / i >
< / div >
< i ( click ) = " exportDataInExcel ( ) " id = "downloadReport" class = "fa fa-download" > < / i >
< i class = "materialdesignicons" ( click ) = " toggleTableCard ( ) " >
< ng-container * ngIf = "logsDataExpanded; else collapsedIcon" >
< i class = "dripicons-chevron-up float-end" > < / i >
< / ng-container >
< ng-template # collapsedIcon >
< i class = "dripicons-chevron-down float-end" > < / i >
class="card-header d-flex justify-content-between align-items-center"
>
{{ "loggerManagerDetails" | translate }}
< div class = "d-flex gap-2" * ngIf = "allItems.length" >
< input
type="text"
class="form-control form-control-sm"
placeholder="{{ 'search' | translate }}"
[(ngModel)]="searchText"
(ngModelChange)="applySearch()"
/>
< i
class="fa fa-download cursor-pointer"
(click)="exportDataInExcel()"
>< / i >
< i class = "cursor-pointer" ( click ) = " toggleTableCard ( ) " >
< i
*ngIf="logsDataExpanded; else down"
class="dripicons-chevron-up"
>< / i >
< ng-template # down >
< i class = "dripicons-chevron-down" > < / i >
< / ng-template >
< / i >
< / div >
< / div >
< div class = "card-body" * ngIf = "logsDataExpanded && allItems.length; else noRecordsFound" >
< div class = "table-responsive" >
< table class = "table mb-0 border" >
< div class = "card-body" * ngIf = "logsDataExpanded" >
<!-- NO RECORDS -->
< div * ngIf = "!filteredItems.length" class = "text-center text-muted" >
{{ "noLoggingDetailsFound" | translate }}
< / div >
<!-- TABLE -->
< div * ngIf = "filteredItems.length" class = "table-responsive" >
< table class = "table table-bordered mb-0" >
< thead class = "table-light" >
< tr >
< th > {{'loggingID' | translate}}< / th >
< th > {{'loggingRequestUri' | translate}}< / th >
< th > {{'loggingResponseCode' | translate}}< / th >
< th > {{'loggingRemoteIP' | translate}}< / th >
< th > {{'loggingDateTime' | translate}}< / th >
< th > {{'loggingMethod' | translate }}< / th >
< th > {{ "loggingID" | translate }}< / th >
< th > {{ "loggingRequestUri" | translate }}< / th >
< th > {{ "loggingResponseCode" | translate }}< / th >
< th > {{ "loggingRemoteIP" | translate }}< / th >
< th > {{ "loggingDateTime" | translate }}< / th >
< th > {{ "loggingMethod" | translate }}< / th >
< / tr >
< / thead >
< tbody >
< tr
*ngFor="let logs of (allItems | tableFilter: searchText: ['id','method','remoteIp','requestBody','requestUri','responseCode','userId','dateTime']).slice((currentPage-1)*itemsPerPage, currentPage*itemsPerPage)">
< td > {{logs?.id}}< / td >
< td > {{logs?.requestUri}}< / td >
< td > {{logs?.responseCode}}< / td >
< td > {{logs?.remoteIp}}< / td >
< td > {{logs?.dateTime | date:'dd-MM-yyyy, hh:mm a'}}< / td >
< td > {{logs?.method}}< / td >
< tr * ngFor = "let logs of pagedItems" >
< td > {{ logs.id }}< / td >
< td > {{ logs.requestUri }}< / td >
< td > {{ logs.responseCode }}< / td >
< td > {{ logs.remoteIp }}< / td >
< td > {{ logs.dateTime | date: "dd-MM-yyyy, hh:mm a" }}< / td >
< td > {{ logs.method }}< / td >
< / tr >
< / tbody >
< / table >
<!-- FOOTER -->
< div
class="d-flex justify-content-between align-items-center mt-3">
< div class = "form-group mb-0" >
< ng-select class = "form-select-sm"
[items]="pageSizeOptions" bindLabel="label"
bindValue="value" [(ngModel)]="itemsPerPage"
class="d-flex justify-content-between align-items-center mt-3"
>
< ng-select
[items]="pageSizeOptions"
bindLabel="label"
bindValue="value"
[(ngModel)]="itemsPerPage"
(change)="itemsPerPageChanged()"
[searchable]="false"
(change)="itemsPerPageChanged()" [clearable]="false"
[dropdownPosition]="'top'">
[clearable]="false">
< / ng-select >
< / div >
< div class = "text-muted" * ngIf = "allItems.length > 1" >
{{'page' | translate}} {{currentPage}} {{'of' |
translate}} {{totalPages()}} ({{allItems.length}}
{{'totalItems' | translate}})
< / div >
< div class = "text-muted" * ngIf = "allItems.length === 0" >
{{'no_record' | translate}}
< / div >
< div class = "text-muted" * ngIf = "allItems.length === 1" >
{{'page' | translate}} {{currentPage}} {{'of' |
translate}} {{totalPages()}} ({{allItems.length}}
{{'record' | translate}})
< div class = "text-muted" >
{{ "page" | translate }} {{ currentPage }}
{{ "of" | translate }} {{ totalPages() }} ({{
filteredItems.length
}}
{{ "totalItems" | translate }})
< / div >
< div class = "btn-group" >
< button class = "btn btn-primary waves-effect waves-light"
< button
class="btn btn-primary"
(click)="previousPage()"
[disabled]="currentPage === 1">
{{ 'previous' | translate }}
[disabled]="currentPage === 1"
>
{{ "previous" | translate }}
< / button >
< button class = "btn btn-primary waves-effect waves-light"
< button
class="btn btn-primary"
(click)="nextPage()"
[disabled]="currentPage >= totalPages()">
{{ 'next' | translate }}
[disabled]="currentPage >= totalPages()"
>
{{ "next" | translate }}
< / button >
< / div >
< / div >
@ -209,16 +161,4 @@
< / div >
< / div >
< / div >
< / div >
< / div >
< / div >
< / div >
< / div >
< / div >
< / div >
< / div >
< ng-template # noRecordsFound >
< div * ngIf = "!isLoading && logsList.length === 0" class = "text-center text-muted mt-3" >
< p > {{'noLoggingDetailsFound' | translate}}< / p >
< / div >
< / ng-template >