mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-20 07:37:38 +01:00
Merge pull request #7546 from pureshine/fix-vulnerability
Fix vulnerability doesn't call systeminfo api by default
This commit is contained in:
commit
6cc00a1178
@ -1,4 +1,7 @@
|
|||||||
<h5 class="history-header" id="history-header">{{'GC.JOB_HISTORY' | translate}}</h5>
|
<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 [clrDgLoading]="loading">
|
<clr-datagrid [clrDgLoading]="loading">
|
||||||
<clr-dg-column>{{'GC.JOB_ID' | translate}}</clr-dg-column>
|
<clr-dg-column>{{'GC.JOB_ID' | translate}}</clr-dg-column>
|
||||||
<clr-dg-column>{{'GC.TRIGGER_TYPE' | translate}}</clr-dg-column>
|
<clr-dg-column>{{'GC.TRIGGER_TYPE' | translate}}</clr-dg-column>
|
||||||
|
@ -1,4 +1,15 @@
|
|||||||
|
@import '../../../mixin';
|
||||||
.history-header {
|
.history-header {
|
||||||
color: #000;
|
color: #000;
|
||||||
margin:20px 0 6px 0;
|
margin:20px 0 6px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.refresh-btn {
|
||||||
|
@include grid-right-top-pos;
|
||||||
|
margin-top: -30px;
|
||||||
|
cursor: pointer;
|
||||||
|
&:hover {
|
||||||
|
color: #007CBB;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -117,9 +117,15 @@ export class VulnerabilityConfigComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.getSystemInfo();
|
this.getSystemInfo();
|
||||||
this.getScanText();
|
this.getScanText();
|
||||||
this.getSchedule();
|
this.getSchedule();
|
||||||
|
}
|
||||||
|
|
||||||
|
getSystemInfo(): void {
|
||||||
|
this.systemInfoService.getSystemInfo()
|
||||||
|
.subscribe((info: SystemInfo) => (this.systemInfo = info)
|
||||||
|
, error => this.errorHandler.error(error));
|
||||||
}
|
}
|
||||||
|
|
||||||
convertToLocalTime(utcTime: number): Date {
|
convertToLocalTime(utcTime: number): Date {
|
||||||
@ -146,10 +152,11 @@ export class VulnerabilityConfigComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Update system info
|
// Update system info
|
||||||
this.getSystemInfo().subscribe(() => {
|
this.systemInfoService.getSystemInfo()
|
||||||
this.onSubmitting = false;
|
.subscribe(() => {
|
||||||
|
this.onSubmitting = false;
|
||||||
}, error => {
|
}, error => {
|
||||||
this.onSubmitting = false;
|
this.onSubmitting = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
, error => {
|
, error => {
|
||||||
@ -164,15 +171,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 {
|
reset(cron): void {
|
||||||
this.schedule = {
|
this.schedule = {
|
||||||
schedule: {
|
schedule: {
|
||||||
|
Loading…
Reference in New Issue
Block a user