Remove CVE ID check

Signed-off-by: sshijun <sshijun@vmware.com>
This commit is contained in:
sshijun 2019-10-17 09:23:45 +08:00
parent 285d3e1e5c
commit 645e9331b0
2 changed files with 4 additions and 26 deletions

View File

@ -339,19 +339,8 @@ export class SystemSettingsComponent implements OnChanges, OnInit {
} }
isDisabled(): boolean { isDisabled(): boolean {
if (this.cveIds) { let str = this.cveIds;
let arr = this.cveIds.split(/[\n,]+/); return !(str && str.trim());
let flag = false;
for (let i = 0; i < arr.length; i++) {
let id = arr[i].trim();
if (!/^CVE-[\d]+-[\d]+$/.test(id)) {
flag = true;
break;
}
}
return flag;
}
return true;
} }
get expiresDate() { get expiresDate() {

View File

@ -303,19 +303,8 @@ export class ProjectPolicyConfigComponent implements OnInit {
} }
isDisabled(): boolean { isDisabled(): boolean {
if (this.cveIds) { let str = this.cveIds;
let arr = this.cveIds.split(/[\n,]+/); return !(str && str.trim());
let flag = false;
for (let i = 0; i < arr.length; i++) {
let id = arr[i].trim();
if (!/^CVE-[\d]+-[\d]+$/.test(id)) {
flag = true;
break;
}
}
return flag;
}
return true;
} }
get expiresDate() { get expiresDate() {