mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-24 09:38:09 +01:00
The item in CVE whiltelist should be a click-able link
Signed-off-by: AllForNothing <sshijun@vmware.com>
This commit is contained in:
parent
04d63f887d
commit
4979c4a49c
@ -115,7 +115,8 @@
|
||||
<ul class="whitelist-window">
|
||||
<li *ngIf="systemWhitelist?.items?.length<1"
|
||||
class="none">{{'CVE_WHITELIST.NONE'|translate}}</li>
|
||||
<li *ngFor="let item of systemWhitelist?.items;let i = index;">{{item.cve_id}}
|
||||
<li *ngFor="let item of systemWhitelist?.items;let i = index;">
|
||||
<span class="hand" (click)="goToDetail(item.cve_id)">{{item.cve_id}}</span>
|
||||
<clr-icon (click)="deleteItem(i)" class="float-lg-right margin-top-4"
|
||||
shape="times-circle"></clr-icon>
|
||||
</li>
|
||||
|
@ -31,6 +31,7 @@
|
||||
|
||||
li {
|
||||
height: 24px;
|
||||
line-height: 24px;
|
||||
list-style-type: none;
|
||||
}
|
||||
}
|
||||
@ -72,4 +73,8 @@
|
||||
button {
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
.hand{
|
||||
cursor: pointer;
|
||||
margin: 0;
|
||||
}
|
@ -28,6 +28,8 @@ const fakePass = 'aWpLOSYkIzJTTU4wMDkx';
|
||||
const ONE_HOUR_MINUTES: number = 60;
|
||||
const ONE_DAY_MINUTES: number = 24 * ONE_HOUR_MINUTES;
|
||||
const ONE_THOUSAND: number = 1000;
|
||||
const CVE_DETAIL_PRE_URL = `https://nvd.nist.gov/vuln/detail/`;
|
||||
const TARGET_BLANK = "_blank";
|
||||
|
||||
@Component({
|
||||
selector: 'system-settings',
|
||||
@ -380,4 +382,8 @@ export class SystemSettingsComponent implements OnChanges, OnInit {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
goToDetail(cveId) {
|
||||
window.open(CVE_DETAIL_PRE_URL + `${cveId}`, TARGET_BLANK);
|
||||
}
|
||||
}
|
||||
|
@ -124,12 +124,15 @@
|
||||
<ul class="whitelist-window" *ngIf="isUseSystemWhitelist()">
|
||||
<li *ngIf="systemWhitelist?.items?.length<1"
|
||||
class="none">{{'CVE_WHITELIST.NONE'|translate}}</li>
|
||||
<li *ngFor="let item of systemWhitelist?.items">{{item.cve_id}}</li>
|
||||
<li *ngFor="let item of systemWhitelist?.items">
|
||||
<span class="hand" (click)="goToDetail(item.cve_id)">{{item.cve_id}}</span>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="whitelist-window" *ngIf="!isUseSystemWhitelist()">
|
||||
<li class="none"
|
||||
*ngIf="projectWhitelist?.items?.length<1">{{'CVE_WHITELIST.NONE'|translate}}</li>
|
||||
<li *ngFor="let item of projectWhitelist?.items;let i = index;">{{item.cve_id}}
|
||||
<li *ngFor="let item of projectWhitelist?.items;let i = index;">
|
||||
<span class="hand" (click)="goToDetail(item.cve_id)">{{item.cve_id}}</span>
|
||||
<clr-icon (click)="deleteItem(i)" class="float-lg-right margin-top-4"
|
||||
shape="times-circle"></clr-icon>
|
||||
</li>
|
||||
|
@ -5,6 +5,9 @@
|
||||
.select {
|
||||
width: 120px;
|
||||
}
|
||||
.margin-top-4 {
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
.whitelist-window {
|
||||
border: 1px solid #ccc;
|
||||
@ -18,6 +21,7 @@
|
||||
|
||||
li {
|
||||
height: 24px;
|
||||
line-height: 24px;
|
||||
list-style-type: none;
|
||||
}
|
||||
}
|
||||
@ -61,3 +65,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
.hand{
|
||||
cursor: pointer;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
|
@ -19,6 +19,8 @@ import {USERSTATICPERMISSION} from '../service/permission-static';
|
||||
|
||||
const ONE_THOUSAND: number = 1000;
|
||||
const LOW: string = 'low';
|
||||
const CVE_DETAIL_PRE_URL = `https://nvd.nist.gov/vuln/detail/`;
|
||||
const TARGET_BLANK = "_blank";
|
||||
|
||||
export class ProjectPolicy {
|
||||
Public: boolean;
|
||||
@ -367,4 +369,7 @@ export class ProjectPolicyConfigComponent implements OnInit {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
goToDetail(cveId) {
|
||||
window.open(CVE_DETAIL_PRE_URL + `${cveId}`, TARGET_BLANK);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user