mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-25 10:07:43 +01:00
Merge pull request #8328 from AllForNothing/cve-link
The item in CVE whiltelist should be a click-able link
This commit is contained in:
commit
6f62a44a17
@ -115,7 +115,8 @@
|
|||||||
<ul class="whitelist-window">
|
<ul class="whitelist-window">
|
||||||
<li *ngIf="systemWhitelist?.items?.length<1"
|
<li *ngIf="systemWhitelist?.items?.length<1"
|
||||||
class="none">{{'CVE_WHITELIST.NONE'|translate}}</li>
|
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"
|
<clr-icon (click)="deleteItem(i)" class="float-lg-right margin-top-4"
|
||||||
shape="times-circle"></clr-icon>
|
shape="times-circle"></clr-icon>
|
||||||
</li>
|
</li>
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
|
|
||||||
li {
|
li {
|
||||||
height: 24px;
|
height: 24px;
|
||||||
|
line-height: 24px;
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -73,3 +74,7 @@
|
|||||||
float: right;
|
float: right;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.hand{
|
||||||
|
cursor: pointer;
|
||||||
|
margin: 0;
|
||||||
|
}
|
@ -28,6 +28,8 @@ const fakePass = 'aWpLOSYkIzJTTU4wMDkx';
|
|||||||
const ONE_HOUR_MINUTES: number = 60;
|
const ONE_HOUR_MINUTES: number = 60;
|
||||||
const ONE_DAY_MINUTES: number = 24 * ONE_HOUR_MINUTES;
|
const ONE_DAY_MINUTES: number = 24 * ONE_HOUR_MINUTES;
|
||||||
const ONE_THOUSAND: number = 1000;
|
const ONE_THOUSAND: number = 1000;
|
||||||
|
const CVE_DETAIL_PRE_URL = `https://nvd.nist.gov/vuln/detail/`;
|
||||||
|
const TARGET_BLANK = "_blank";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'system-settings',
|
selector: 'system-settings',
|
||||||
@ -380,4 +382,8 @@ export class SystemSettingsComponent implements OnChanges, OnInit {
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
goToDetail(cveId) {
|
||||||
|
window.open(CVE_DETAIL_PRE_URL + `${cveId}`, TARGET_BLANK);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -124,12 +124,15 @@
|
|||||||
<ul class="whitelist-window" *ngIf="isUseSystemWhitelist()">
|
<ul class="whitelist-window" *ngIf="isUseSystemWhitelist()">
|
||||||
<li *ngIf="systemWhitelist?.items?.length<1"
|
<li *ngIf="systemWhitelist?.items?.length<1"
|
||||||
class="none">{{'CVE_WHITELIST.NONE'|translate}}</li>
|
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>
|
||||||
<ul class="whitelist-window" *ngIf="!isUseSystemWhitelist()">
|
<ul class="whitelist-window" *ngIf="!isUseSystemWhitelist()">
|
||||||
<li class="none"
|
<li class="none"
|
||||||
*ngIf="projectWhitelist?.items?.length<1">{{'CVE_WHITELIST.NONE'|translate}}</li>
|
*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"
|
<clr-icon (click)="deleteItem(i)" class="float-lg-right margin-top-4"
|
||||||
shape="times-circle"></clr-icon>
|
shape="times-circle"></clr-icon>
|
||||||
</li>
|
</li>
|
||||||
|
@ -5,6 +5,9 @@
|
|||||||
.select {
|
.select {
|
||||||
width: 120px;
|
width: 120px;
|
||||||
}
|
}
|
||||||
|
.margin-top-4 {
|
||||||
|
margin-top: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
.whitelist-window {
|
.whitelist-window {
|
||||||
border: 1px solid #ccc;
|
border: 1px solid #ccc;
|
||||||
@ -18,6 +21,7 @@
|
|||||||
|
|
||||||
li {
|
li {
|
||||||
height: 24px;
|
height: 24px;
|
||||||
|
line-height: 24px;
|
||||||
list-style-type: none;
|
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 ONE_THOUSAND: number = 1000;
|
||||||
const LOW: string = 'low';
|
const LOW: string = 'low';
|
||||||
|
const CVE_DETAIL_PRE_URL = `https://nvd.nist.gov/vuln/detail/`;
|
||||||
|
const TARGET_BLANK = "_blank";
|
||||||
|
|
||||||
export class ProjectPolicy {
|
export class ProjectPolicy {
|
||||||
Public: boolean;
|
Public: boolean;
|
||||||
@ -367,4 +369,7 @@ export class ProjectPolicyConfigComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
goToDetail(cveId) {
|
||||||
|
window.open(CVE_DETAIL_PRE_URL + `${cveId}`, TARGET_BLANK);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user