Signed-off-by: FangyuanCheng <fangyuanc@vmware.com>
This commit is contained in:
FangyuanCheng 2019-04-26 15:41:45 +08:00
parent 6511417ba6
commit 1513f468ae
3 changed files with 28 additions and 16 deletions

View File

@ -1,4 +1,7 @@
<h5 class="history-header" id="history-header">{{'GC.JOB_HISTORY' | translate}}</h5>
<span class="refresh-btn" (click)="getJobs()">
<clr-icon shape="refresh"></clr-icon>
</span>
<clr-datagrid>
<clr-dg-column>{{'GC.JOB_ID' | translate}}</clr-dg-column>
<clr-dg-column>{{'GC.TRIGGER_TYPE' | translate}}</clr-dg-column>

View File

@ -1,4 +1,15 @@
@import '../../../mixin';
.history-header {
color: #000;
margin:20px 0 6px 0;
}
}
.refresh-btn {
@include grid-right-top-pos;
margin-top: -30px;
cursor: pointer;
&:hover {
color: #007CBB;
}
}

View File

@ -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<void | SystemInfo> {
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: {