+
+
diff --git a/src/portal/lib/src/replication/replication.component.scss b/src/portal/lib/src/replication/replication.component.scss
index 409a7f529..b1bce6948 100644
--- a/src/portal/lib/src/replication/replication.component.scss
+++ b/src/portal/lib/src/replication/replication.component.scss
@@ -28,3 +28,13 @@
z-index: 100;
height: 32px;
}
+
+.select-status {
+ float: left;
+ margin-top: 6px;
+ margin-right: 5px;
+}
+
+.row-right {
+ padding-right: 50px;
+}
\ No newline at end of file
diff --git a/src/portal/src/app/log/audit-log.component.html b/src/portal/src/app/log/audit-log.component.html
index c61792cd1..051a0a2e1 100644
--- a/src/portal/src/app/log/audit-log.component.html
+++ b/src/portal/src/app/log/audit-log.component.html
@@ -9,7 +9,7 @@
-
diff --git a/src/portal/src/app/log/audit-log.component.scss b/src/portal/src/app/log/audit-log.component.scss
index 7b8ead9d6..87d8ff53f 100644
--- a/src/portal/src/app/log/audit-log.component.scss
+++ b/src/portal/src/app/log/audit-log.component.scss
@@ -8,4 +8,8 @@
.refresh-btn:hover {
color: #007CBB;
+}
+
+.row-right {
+ padding-right: 60px;
}
\ No newline at end of file
diff --git a/src/portal/src/app/log/audit-log.component.ts b/src/portal/src/app/log/audit-log.component.ts
index 6a9bae8a3..518e7e175 100644
--- a/src/portal/src/app/log/audit-log.component.ts
+++ b/src/portal/src/app/log/audit-log.component.ts
@@ -41,13 +41,18 @@ class FilterOption {
}
}
+export class SearchOption {
+ startTime: string = "";
+ endTime: string = "";
+}
+
@Component({
selector: 'audit-log',
templateUrl: './audit-log.component.html',
styleUrls: ['./audit-log.component.scss']
})
export class AuditLogComponent implements OnInit {
-
+ search: SearchOption = new SearchOption();
currentUser: SessionUser;
projectId: number;
queryParam: AuditLog = new AuditLog();
@@ -70,17 +75,6 @@ export class AuditLogComponent implements OnInit {
currentPage = 1;
totalPage = 0;
- @ViewChild('fromTime') fromTimeInput: NgModel;
- @ViewChild('toTime') toTimeInput: NgModel;
-
- get fromTimeInvalid(): boolean {
- return this.fromTimeInput.errors && this.fromTimeInput.errors.dateValidator && (this.fromTimeInput.dirty || this.fromTimeInput.touched);
- }
-
- get toTimeInvalid(): boolean {
- return this.toTimeInput.errors && this.toTimeInput.errors.dateValidator && (this.toTimeInput.dirty || this.toTimeInput.touched);
- }
-
get showPaginationIndex(): boolean {
return this.totalRecordCount > 0;
}
@@ -125,30 +119,13 @@ export class AuditLogComponent implements OnInit {
this.retrieve();
}
- convertDate(strDate: string): string {
- if (/^(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](19|20)\d\d$/.test(strDate)) {
- let parts = strDate.split(/[-\/]/);
- strDate = parts[2] /*Year*/ + '-' + parts[1] /*Month*/ + '-' + parts[0] /*Date*/;
- }
- return strDate;
- }
-
- doSearchByStartTime(strDate: string): void {
- this.queryParam.begin_timestamp = 0;
- if (this.fromTimeInput.valid && strDate) {
- strDate = this.convertDate(strDate);
- this.queryParam.begin_timestamp = new Date(strDate).getTime() / 1000;
- }
+doSearchByStartTime(fromTimestamp: string): void {
+ this.queryParam.begin_timestamp = fromTimestamp;
this.retrieve();
}
- doSearchByEndTime(strDate: string): void {
- this.queryParam.end_timestamp = 0;
- if (this.toTimeInput.valid && strDate) {
- strDate = this.convertDate(strDate);
- let oneDayOffset = 3600 * 24;
- this.queryParam.end_timestamp = new Date(strDate).getTime() / 1000 + oneDayOffset;
- }
+ doSearchByEndTime(toTimestamp: string): void {
+ this.queryParam.end_timestamp = toTimestamp;
this.retrieve();
}