mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-25 19:56:09 +01:00
Add two columns to display capability type for scanner (#20111)
Signed-off-by: xuelichao <xuel@vmware.com> Signed-off-by: Lichao Xue <68891670+xuelichao@users.noreply.github.com> Co-authored-by: Wang Yan <wangyan@vmware.com>
This commit is contained in:
parent
fd81e7c43e
commit
aa4a142bc1
@ -139,9 +139,21 @@
|
|||||||
<clr-dg-column class="width-240" [clrDgField]="'url'">{{
|
<clr-dg-column class="width-240" [clrDgField]="'url'">{{
|
||||||
'SCANNER.ENDPOINT' | translate
|
'SCANNER.ENDPOINT' | translate
|
||||||
}}</clr-dg-column>
|
}}</clr-dg-column>
|
||||||
<clr-dg-column>{{ 'SCANNER.HEALTH' | translate }}</clr-dg-column>
|
<clr-dg-column class="width-120">{{
|
||||||
<clr-dg-column>{{ 'SCANNER.ENABLED' | translate }}</clr-dg-column>
|
'SCANNER.HEALTH' | translate
|
||||||
<clr-dg-column>{{ 'SCANNER.AUTH' | translate }}</clr-dg-column>
|
}}</clr-dg-column>
|
||||||
|
<clr-dg-column class="width-120">{{
|
||||||
|
'SCANNER.ENABLED' | translate
|
||||||
|
}}</clr-dg-column>
|
||||||
|
<clr-dg-column class="width-120">{{
|
||||||
|
'SCANNER.AUTH' | translate
|
||||||
|
}}</clr-dg-column>
|
||||||
|
<clr-dg-column class="width-120">{{
|
||||||
|
'SCANNER.VULNERABILITY' | translate
|
||||||
|
}}</clr-dg-column>
|
||||||
|
<clr-dg-column class="width-120">{{
|
||||||
|
'SCANNER.SBOM' | translate
|
||||||
|
}}</clr-dg-column>
|
||||||
<clr-dg-column>{{
|
<clr-dg-column>{{
|
||||||
'SCANNER.DESCRIPTION' | translate
|
'SCANNER.DESCRIPTION' | translate
|
||||||
}}</clr-dg-column>
|
}}</clr-dg-column>
|
||||||
@ -198,6 +210,18 @@
|
|||||||
<clr-dg-cell>{{
|
<clr-dg-cell>{{
|
||||||
scanner.auth ? scanner.auth : 'None'
|
scanner.auth ? scanner.auth : 'None'
|
||||||
}}</clr-dg-cell>
|
}}</clr-dg-cell>
|
||||||
|
<clr-dg-cell>{{
|
||||||
|
(supportCapability(scanner, 'vulnerability')
|
||||||
|
? 'SCANNER.SUPPORTED'
|
||||||
|
: 'SCANNER.NOT_SUPPORTED'
|
||||||
|
) | translate
|
||||||
|
}}</clr-dg-cell>
|
||||||
|
<clr-dg-cell>{{
|
||||||
|
(supportCapability(scanner, 'sbom')
|
||||||
|
? 'SCANNER.SUPPORTED'
|
||||||
|
: 'SCANNER.NOT_SUPPORTED'
|
||||||
|
) | translate
|
||||||
|
}}</clr-dg-cell>
|
||||||
<clr-dg-cell>{{ scanner.description }}</clr-dg-cell>
|
<clr-dg-cell>{{ scanner.description }}</clr-dg-cell>
|
||||||
<scanner-metadata
|
<scanner-metadata
|
||||||
*clrIfExpanded
|
*clrIfExpanded
|
||||||
|
@ -18,6 +18,10 @@
|
|||||||
min-width: 240px !important;
|
min-width: 240px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.width-120 {
|
||||||
|
min-width: 120px !important;
|
||||||
|
}
|
||||||
|
|
||||||
.margin-top-0 {
|
.margin-top-0 {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
|
@ -178,6 +178,17 @@ export class ConfigurationScannerComponent implements OnInit, OnDestroy {
|
|||||||
addSuccess() {
|
addSuccess() {
|
||||||
this.getScanners();
|
this.getScanners();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
supportCapability(scanner: Scanner, capabilityType: string): boolean {
|
||||||
|
return scanner && scanner.metadata && capabilityType
|
||||||
|
? (
|
||||||
|
scanner?.metadata?.capabilities?.filter(
|
||||||
|
({ type }) => type === capabilityType
|
||||||
|
) ?? []
|
||||||
|
).length >= 1
|
||||||
|
: false;
|
||||||
|
}
|
||||||
|
|
||||||
changeStat() {
|
changeStat() {
|
||||||
if (this.selectedRow) {
|
if (this.selectedRow) {
|
||||||
let scanner: ScannerRegistrationReq = clone(this.selectedRow);
|
let scanner: ScannerRegistrationReq = clone(this.selectedRow);
|
||||||
|
@ -1433,6 +1433,10 @@
|
|||||||
"NAME_REQUIRED": "Name ist erforderlich",
|
"NAME_REQUIRED": "Name ist erforderlich",
|
||||||
"NAME_REX": "Der Name muss mindestens 2 Zeichen lang sein. Mit Kleinbuchstaben, Ziffern und ._-. Er muss mit Buchstaben oder Ziffern beginnen.",
|
"NAME_REX": "Der Name muss mindestens 2 Zeichen lang sein. Mit Kleinbuchstaben, Ziffern und ._-. Er muss mit Buchstaben oder Ziffern beginnen.",
|
||||||
"DESCRIPTION": "Beschreibung",
|
"DESCRIPTION": "Beschreibung",
|
||||||
|
"SBOM": "SBOM",
|
||||||
|
"VULNERABILITY": "Vulnerability",
|
||||||
|
"SUPPORTED": "Supported",
|
||||||
|
"NOT_SUPPORTED": "Not Supported",
|
||||||
"ENDPOINT": "Endpunkt",
|
"ENDPOINT": "Endpunkt",
|
||||||
"ENDPOINT_EXISTS": "URL existiert bereits",
|
"ENDPOINT_EXISTS": "URL existiert bereits",
|
||||||
"ENDPOINT_REQUIRED": "URL ist erforderlich",
|
"ENDPOINT_REQUIRED": "URL ist erforderlich",
|
||||||
|
@ -1434,6 +1434,10 @@
|
|||||||
"NAME_REQUIRED": "Name is required",
|
"NAME_REQUIRED": "Name is required",
|
||||||
"NAME_REX": "Name should be at least 2 characters long with lower case characters, numbers and ._- and must be start with characters or numbers.",
|
"NAME_REX": "Name should be at least 2 characters long with lower case characters, numbers and ._- and must be start with characters or numbers.",
|
||||||
"DESCRIPTION": "Description",
|
"DESCRIPTION": "Description",
|
||||||
|
"SBOM": "SBOM",
|
||||||
|
"VULNERABILITY": "Vulnerability",
|
||||||
|
"SUPPORTED": "Supported",
|
||||||
|
"NOT_SUPPORTED": "Not Supported",
|
||||||
"ENDPOINT": "Endpoint",
|
"ENDPOINT": "Endpoint",
|
||||||
"ENDPOINT_EXISTS": "EndpointUrl already exists",
|
"ENDPOINT_EXISTS": "EndpointUrl already exists",
|
||||||
"ENDPOINT_REQUIRED": "EndpointUrl is required",
|
"ENDPOINT_REQUIRED": "EndpointUrl is required",
|
||||||
|
@ -1430,6 +1430,10 @@
|
|||||||
"NAME_REQUIRED": "Name is required",
|
"NAME_REQUIRED": "Name is required",
|
||||||
"NAME_REX": "Name should be at least 2 characters long with lower case characters, numbers and ._- and must be start with characters or numbers.",
|
"NAME_REX": "Name should be at least 2 characters long with lower case characters, numbers and ._- and must be start with characters or numbers.",
|
||||||
"DESCRIPTION": "Description",
|
"DESCRIPTION": "Description",
|
||||||
|
"SBOM": "SBOM",
|
||||||
|
"VULNERABILITY": "Vulnerability",
|
||||||
|
"SUPPORTED": "Supported",
|
||||||
|
"NOT_SUPPORTED": "Not Supported",
|
||||||
"ENDPOINT": "Endpoint",
|
"ENDPOINT": "Endpoint",
|
||||||
"ENDPOINT_EXISTS": "EndpointUrl already exists",
|
"ENDPOINT_EXISTS": "EndpointUrl already exists",
|
||||||
"ENDPOINT_REQUIRED": "EndpointUrl is required",
|
"ENDPOINT_REQUIRED": "EndpointUrl is required",
|
||||||
|
@ -1431,6 +1431,10 @@
|
|||||||
"NAME_REQUIRED": "Le nom est requis",
|
"NAME_REQUIRED": "Le nom est requis",
|
||||||
"NAME_REX": "Le nom doit comporter au moins 2 caractères avec des minuscules, des chiffres et. _- et doit commencer par des caractères ou des chiffres.",
|
"NAME_REX": "Le nom doit comporter au moins 2 caractères avec des minuscules, des chiffres et. _- et doit commencer par des caractères ou des chiffres.",
|
||||||
"DESCRIPTION": "Description",
|
"DESCRIPTION": "Description",
|
||||||
|
"SBOM": "SBOM",
|
||||||
|
"VULNERABILITY": "Vulnerability",
|
||||||
|
"SUPPORTED": "Supported",
|
||||||
|
"NOT_SUPPORTED": "Not Supported",
|
||||||
"ENDPOINT": "Endpoint",
|
"ENDPOINT": "Endpoint",
|
||||||
"ENDPOINT_EXISTS": "L'URL de l'endpoint existe déjà",
|
"ENDPOINT_EXISTS": "L'URL de l'endpoint existe déjà",
|
||||||
"ENDPOINT_REQUIRED": "L'URL de l'endpoint est requise",
|
"ENDPOINT_REQUIRED": "L'URL de l'endpoint est requise",
|
||||||
|
@ -1430,6 +1430,10 @@
|
|||||||
"NAME_REQUIRED": "Nome é obrigatório",
|
"NAME_REQUIRED": "Nome é obrigatório",
|
||||||
"NAME_REX": "O nome precisa ter no mínimo 2 caracteres. Pode conter apenas letras minúsculas, numeros, ou símbolos ._- e deve começar por uma letra ou número.",
|
"NAME_REX": "O nome precisa ter no mínimo 2 caracteres. Pode conter apenas letras minúsculas, numeros, ou símbolos ._- e deve começar por uma letra ou número.",
|
||||||
"DESCRIPTION": "Descrição",
|
"DESCRIPTION": "Descrição",
|
||||||
|
"SBOM": "SBOM",
|
||||||
|
"VULNERABILITY": "Vulnerability",
|
||||||
|
"SUPPORTED": "Supported",
|
||||||
|
"NOT_SUPPORTED": "Not Supported",
|
||||||
"ENDPOINT": "Endereço",
|
"ENDPOINT": "Endereço",
|
||||||
"ENDPOINT_EXISTS": "Endereço já usado por outro examinador",
|
"ENDPOINT_EXISTS": "Endereço já usado por outro examinador",
|
||||||
"ENDPOINT_REQUIRED": "Endereço é obrigatório",
|
"ENDPOINT_REQUIRED": "Endereço é obrigatório",
|
||||||
|
@ -1433,6 +1433,10 @@
|
|||||||
"NAME_REQUIRED": "Name is required",
|
"NAME_REQUIRED": "Name is required",
|
||||||
"NAME_REX": "Name should be at least 2 characters long with lower case characters, numbers and ._- and must be start with characters or numbers.",
|
"NAME_REX": "Name should be at least 2 characters long with lower case characters, numbers and ._- and must be start with characters or numbers.",
|
||||||
"DESCRIPTION": "Description",
|
"DESCRIPTION": "Description",
|
||||||
|
"SBOM": "SBOM",
|
||||||
|
"VULNERABILITY": "Vulnerability",
|
||||||
|
"SUPPORTED": "Supported",
|
||||||
|
"NOT_SUPPORTED": "Not Supported",
|
||||||
"ENDPOINT": "Endpoint",
|
"ENDPOINT": "Endpoint",
|
||||||
"ENDPOINT_EXISTS": "EndpointUrl already exists",
|
"ENDPOINT_EXISTS": "EndpointUrl already exists",
|
||||||
"ENDPOINT_REQUIRED": "EndpointUrl is required",
|
"ENDPOINT_REQUIRED": "EndpointUrl is required",
|
||||||
|
@ -1429,6 +1429,10 @@
|
|||||||
"NAME_REQUIRED": "名称为必填项",
|
"NAME_REQUIRED": "名称为必填项",
|
||||||
"NAME_REX": "名称由小写字符、数字和._-组成且至少2个字符并以字符或者数字开头。",
|
"NAME_REX": "名称由小写字符、数字和._-组成且至少2个字符并以字符或者数字开头。",
|
||||||
"DESCRIPTION": "描述",
|
"DESCRIPTION": "描述",
|
||||||
|
"SBOM": "SBOM",
|
||||||
|
"VULNERABILITY": "Vulnerability",
|
||||||
|
"SUPPORTED": "Supported",
|
||||||
|
"NOT_SUPPORTED": "Not Supported",
|
||||||
"ENDPOINT": "地址",
|
"ENDPOINT": "地址",
|
||||||
"ENDPOINT_EXISTS": "地址已存在",
|
"ENDPOINT_EXISTS": "地址已存在",
|
||||||
"ENDPOINT_REQUIRED": "地址为必填项",
|
"ENDPOINT_REQUIRED": "地址为必填项",
|
||||||
|
@ -1428,6 +1428,10 @@
|
|||||||
"NAME_REQUIRED": "名稱必填",
|
"NAME_REQUIRED": "名稱必填",
|
||||||
"NAME_REX": "名稱必須由小寫字母、數字和 ._- 組成,至少2個字元,並且必須以字母或數字開頭。",
|
"NAME_REX": "名稱必須由小寫字母、數字和 ._- 組成,至少2個字元,並且必須以字母或數字開頭。",
|
||||||
"DESCRIPTION": "描述",
|
"DESCRIPTION": "描述",
|
||||||
|
"SBOM": "SBOM",
|
||||||
|
"VULNERABILITY": "Vulnerability",
|
||||||
|
"SUPPORTED": "Supported",
|
||||||
|
"NOT_SUPPORTED": "Not Supported",
|
||||||
"ENDPOINT": "端點",
|
"ENDPOINT": "端點",
|
||||||
"ENDPOINT_EXISTS": "端點 URL 已存在",
|
"ENDPOINT_EXISTS": "端點 URL 已存在",
|
||||||
"ENDPOINT_REQUIRED": "端點 URL 必填",
|
"ENDPOINT_REQUIRED": "端點 URL 必填",
|
||||||
|
Loading…
Reference in New Issue
Block a user