diff --git a/src/ui_ng/lib/src/log/recent-log.template.ts b/src/ui_ng/lib/src/log/recent-log.template.ts
index 1f787d41e..e1f2aa7ed 100644
--- a/src/ui_ng/lib/src/log/recent-log.template.ts
+++ b/src/ui_ng/lib/src/log/recent-log.template.ts
@@ -32,7 +32,7 @@ export const LOG_TEMPLATE: string = `
{{pagination.firstItem + 1}} - {{pagination.lastItem + 1}}
- of {{pagination.totalItems}} {{'AUDIT_LOG.ITEMS' | translate}}
+ {{'AUDIT_LOG.OF' | translate}} {{pagination.totalItems}} {{'AUDIT_LOG.ITEMS' | translate}}
diff --git a/src/ui_ng/src/app/log/audit-log.component.html b/src/ui_ng/src/app/log/audit-log.component.html
index c2d79ec6b..b51bd9dc6 100644
--- a/src/ui_ng/src/app/log/audit-log.component.html
+++ b/src/ui_ng/src/app/log/audit-log.component.html
@@ -58,7 +58,7 @@
{{pagination.firstItem + 1}} - {{pagination.lastItem +1 }} {{'AUDIT_LOG.OF' | translate}}
{{pagination.totalItems }} {{'AUDIT_LOG.ITEMS' | translate}}
-
+
diff --git a/src/ui_ng/src/app/log/audit-log.component.ts b/src/ui_ng/src/app/log/audit-log.component.ts
index b7b8a27e5..32159858c 100644
--- a/src/ui_ng/src/app/log/audit-log.component.ts
+++ b/src/ui_ng/src/app/log/audit-log.component.ts
@@ -69,6 +69,7 @@ export class AuditLogComponent implements OnInit {
pageOffset: number = 1;
pageSize: number = 15;
totalRecordCount: number;
+ currentPage: number;
totalPage: number;
@ViewChild('fromTime') fromTimeInput: NgModel;
@@ -96,14 +97,14 @@ export class AuditLogComponent implements OnInit {
retrieve(state?: State): void {
if(state) {
- this.queryParam.page = state.page.to + 1;
+ this.queryParam.page = Math.ceil((state.page.to + 1) / this.pageSize);
+ this.currentPage = this.queryParam.page;
}
this.auditLogService
.listAuditLogs(this.queryParam)
.subscribe(
response=>{
- this.totalRecordCount = response.headers.get('x-total-count');
- this.totalPage = Math.ceil(this.totalRecordCount / this.pageSize);
+ this.totalRecordCount =parseInt(response.headers.get('x-total-count'));
this.auditLogs = response.json();
},
error=>{