From 2e0fcab6ee57f60a2e9803d5f253f54253133bf0 Mon Sep 17 00:00:00 2001 From: FangyuanCheng Date: Tue, 4 Dec 2018 16:44:31 +0800 Subject: [PATCH] Don't get the next available time while scan now Signed-off-by: FangyuanCheng --- .../vulnerability/vulnerability-config.component.html | 1 - .../vulnerability/vulnerability-config.component.ts | 11 +---------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/src/portal/lib/src/config/vulnerability/vulnerability-config.component.html b/src/portal/lib/src/config/vulnerability/vulnerability-config.component.html index e52900a41..a98712f1c 100644 --- a/src/portal/lib/src/config/vulnerability/vulnerability-config.component.html +++ b/src/portal/lib/src/config/vulnerability/vulnerability-config.component.html @@ -49,7 +49,6 @@

- {{ 'CONFIG.SCANNING.NEXT_SCAN' | translate }} {{ nextScanTimestamp | date:'y/MM/dd HH:mm' }}
\ No newline at end of file diff --git a/src/portal/lib/src/config/vulnerability/vulnerability-config.component.ts b/src/portal/lib/src/config/vulnerability/vulnerability-config.component.ts index 423eb1c4d..1b40d839b 100644 --- a/src/portal/lib/src/config/vulnerability/vulnerability-config.component.ts +++ b/src/portal/lib/src/config/vulnerability/vulnerability-config.component.ts @@ -65,16 +65,7 @@ export class VulnerabilityConfigComponent implements OnInit { ) { } get scanAvailable(): boolean { - let dt: Date = new Date(); - return !this.onSubmitting && (this.nextScanTime <= 0 || dt.getTime() > ((this.nextScanTime + 300) * 1000)); - } - - get nextScanTimestamp(): Date { - return this.nextScanTime > 0 ? this.convertToLocalTime(this.nextScanTime) : null; - } - - get nextScanTime(): number { - return this.systemInfo && this.systemInfo.next_scan_all ? this.systemInfo.next_scan_all : 0; + return !this.onSubmitting; } get updatedTimestamp(): Date {