From 1513f468ae72a7c5f75fa5d3dca5fa39dfb331b5 Mon Sep 17 00:00:00 2001 From: FangyuanCheng Date: Fri, 26 Apr 2019 15:41:45 +0800 Subject: [PATCH] Fix bug Signed-off-by: FangyuanCheng --- .../gc/gc-history/gc-history.component.html | 3 ++ .../gc/gc-history/gc-history.component.scss | 13 ++++++++- .../vulnerability-config.component.ts | 28 +++++++++---------- 3 files changed, 28 insertions(+), 16 deletions(-) diff --git a/src/portal/lib/src/config/gc/gc-history/gc-history.component.html b/src/portal/lib/src/config/gc/gc-history/gc-history.component.html index 999619af0..a0987ebc3 100644 --- a/src/portal/lib/src/config/gc/gc-history/gc-history.component.html +++ b/src/portal/lib/src/config/gc/gc-history/gc-history.component.html @@ -1,4 +1,7 @@
{{'GC.JOB_HISTORY' | translate}}
+ + + {{'GC.JOB_ID' | translate}} {{'GC.TRIGGER_TYPE' | translate}} diff --git a/src/portal/lib/src/config/gc/gc-history/gc-history.component.scss b/src/portal/lib/src/config/gc/gc-history/gc-history.component.scss index 1499c64dd..cd56f22d2 100644 --- a/src/portal/lib/src/config/gc/gc-history/gc-history.component.scss +++ b/src/portal/lib/src/config/gc/gc-history/gc-history.component.scss @@ -1,4 +1,15 @@ +@import '../../../mixin'; .history-header { color: #000; margin:20px 0 6px 0; -} \ No newline at end of file +} + +.refresh-btn { + @include grid-right-top-pos; + margin-top: -30px; + cursor: pointer; + &:hover { + color: #007CBB; + } +} + \ 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 8bb26ac98..e7545ea06 100644 --- a/src/portal/lib/src/config/vulnerability/vulnerability-config.component.ts +++ b/src/portal/lib/src/config/vulnerability/vulnerability-config.component.ts @@ -112,9 +112,15 @@ export class VulnerabilityConfigComponent implements OnInit { } ngOnInit(): void { - this.getSystemInfo(); - this.getScanText(); - this.getSchedule(); + this.getSystemInfo(); + this.getScanText(); + this.getSchedule(); + } + + getSystemInfo(): void { + this.systemInfoService.getSystemInfo() + .subscribe((info: SystemInfo) => (this.systemInfo = info) + , error => this.errorHandler.error(error)); } convertToLocalTime(utcTime: number): Date { @@ -141,10 +147,11 @@ export class VulnerabilityConfigComponent implements OnInit { }); // Update system info - this.getSystemInfo().subscribe(() => { - this.onSubmitting = false; + this.systemInfoService.getSystemInfo() + .subscribe(() => { + this.onSubmitting = false; }, error => { - this.onSubmitting = false; + this.onSubmitting = false; }); } , error => { @@ -159,15 +166,6 @@ export class VulnerabilityConfigComponent implements OnInit { }); } - getSystemInfo(): Observable { - return this.systemInfoService.getSystemInfo() - .pipe(map((info: SystemInfo) => this.systemInfo = info) - , catchError(error => { - this.errorHandler.error(error); - return of(); - })); - } - reset(cron): void { this.schedule = { schedule: {