Update ui for gc history and banner message (#19094)

1. Fixes #19031
2. Fixes #19049

Signed-off-by: AllForNothing <sshijun@vmware.com>
This commit is contained in:
Shijun Sun 2023-08-03 14:36:20 +08:00 committed by GitHub
parent cdd3f267b5
commit 1d81b3d8ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 7 deletions

View File

@ -20,5 +20,5 @@
} }
.detail { .detail {
width: 12rem !important; min-width: 12rem !important;
} }

View File

@ -465,7 +465,7 @@
clrDate clrDate
type="date" type="date"
id="to" id="to"
min="{{ minDateForEndDay | date : 'yyyy-MM-dd' }}" min="{{ minDateForEndDay() | date : 'yyyy-MM-dd' }}"
autocomplete="off" autocomplete="off"
[(ngModel)]="messageToDate" [(ngModel)]="messageToDate"
[disabled]=" [disabled]="

View File

@ -51,8 +51,6 @@ export class SystemSettingsComponent implements OnInit, OnDestroy {
messageToDateCopy: Date; messageToDateCopy: Date;
bannerRefreshSub: Subscription; bannerRefreshSub: Subscription;
currentDate: Date = new Date(); currentDate: Date = new Date();
minDateForEndDay: Date;
@ViewChild('systemConfigFrom') systemSettingsForm: NgForm; @ViewChild('systemConfigFrom') systemSettingsForm: NgForm;
constructor( constructor(
@ -62,9 +60,6 @@ export class SystemSettingsComponent implements OnInit, OnDestroy {
private event: EventService private event: EventService
) { ) {
this.downloadLink = CURRENT_BASE_HREF + '/systeminfo/getcert'; this.downloadLink = CURRENT_BASE_HREF + '/systeminfo/getcert';
this.minDateForEndDay = this.messageFromDate
? this.messageFromDate
: this.currentDate;
} }
ngOnInit() { ngOnInit() {
@ -300,4 +295,8 @@ export class SystemSettingsComponent implements OnInit, OnDestroy {
translateMessageType(type: string): string { translateMessageType(type: string): string {
return BannerMessageI18nMap[type] || type; return BannerMessageI18nMap[type] || type;
} }
minDateForEndDay(): Date {
return this.messageFromDate ? this.messageFromDate : this.currentDate;
}
} }