diff --git a/src/ui_ng/lib/src/vulnerability-scanning/result-tip.component.ts b/src/ui_ng/lib/src/vulnerability-scanning/result-tip.component.ts index b01fdbd9a..570fe9b12 100644 --- a/src/ui_ng/lib/src/vulnerability-scanning/result-tip.component.ts +++ b/src/ui_ng/lib/src/vulnerability-scanning/result-tip.component.ts @@ -66,9 +66,21 @@ export class ResultTipComponent implements OnInit { } }); } - this.translate.get('VULNERABILITY.CHART.TOOLTIPS_TITLE', - { totalVulnerability: this.packagesWithVul, totalPackages: this.totalPackages }) - .subscribe((res: string) => this._tipTitle = res); + this.translate.get(this.packageText(this.totalPackages)).subscribe((p1: string) => { + this.translate.get(this.packageText(this.packagesWithVul)).subscribe((p2: string) => { + this.translate.get(this.unitText(this.packagesWithVul)).subscribe((vul: string) => { + this.translate.get('VULNERABILITY.CHART.TOOLTIPS_TITLE', + { + totalVulnerability: this.packagesWithVul, + totalPackages: this.totalPackages, + package: p1, + packageExt: p2, + vulnerability: vul + }) + .subscribe((res: string) => this._tipTitle = res); + }); + }); + }); } tipWidth(severity: VulnerabilitySeverity): string { diff --git a/src/ui_ng/lib/src/vulnerability-scanning/scanning.css.ts b/src/ui_ng/lib/src/vulnerability-scanning/scanning.css.ts index 5b4f9422a..2d0a87492 100644 --- a/src/ui_ng/lib/src/vulnerability-scanning/scanning.css.ts +++ b/src/ui_ng/lib/src/vulnerability-scanning/scanning.css.ts @@ -46,10 +46,10 @@ export const SCANNING_STYLES: string = ` background-color: red; } .bar-block-medium { - background-color: orange; + background-color: yellow; } .bar-block-low { - background-color: yellow; + background-color: orange; } .bar-block-none { background-color: green; @@ -84,4 +84,7 @@ export const SCANNING_STYLES: string = ` .refresh-btn:hover { color: #007CBB; } +.tip-icon-low { + color: orange; +} `; \ No newline at end of file diff --git a/src/ui_ng/lib/src/vulnerability-scanning/scanning.html.ts b/src/ui_ng/lib/src/vulnerability-scanning/scanning.html.ts index aace726df..d1cb9c9c4 100644 --- a/src/ui_ng/lib/src/vulnerability-scanning/scanning.html.ts +++ b/src/ui_ng/lib/src/vulnerability-scanning/scanning.html.ts @@ -13,23 +13,23 @@ export const TIP_COMPONENT_HTML: string = `
- {{highCount}} {{packageText(highCount) | translate }} {{'VULNERABILITY.SEVERITY.HIGH' | translate }} + {{highCount}} {{'VULNERABILITY.SEVERITY.HIGH' | translate }}
- {{mediumCount}} {{packageText(mediumCount) | translate }} {{'VULNERABILITY.SEVERITY.MEDIUM' | translate }} + {{mediumCount}} {{'VULNERABILITY.SEVERITY.MEDIUM' | translate }}
- - {{lowCount}} {{packageText(lowCount) | translate }} {{'VULNERABILITY.SEVERITY.LOW' | translate }} + + {{lowCount}} {{'VULNERABILITY.SEVERITY.LOW' | translate }}
- {{unknownCount}} {{packageText(unknownCount) | translate }} {{'VULNERABILITY.SEVERITY.UNKNOWN' | translate }} + {{unknownCount}} {{'VULNERABILITY.SEVERITY.UNKNOWN' | translate }}
- {{noneCount}} {{packageText(noneCount) | translate }} {{'VULNERABILITY.SEVERITY.NONE' | translate }} + {{noneCount}} {{'VULNERABILITY.SEVERITY.NONE' | translate }}
diff --git a/src/ui_ng/package.json b/src/ui_ng/package.json index 7792f6e8c..99107159a 100644 --- a/src/ui_ng/package.json +++ b/src/ui_ng/package.json @@ -31,7 +31,7 @@ "clarity-icons": "^0.9.8", "clarity-ui": "^0.9.8", "core-js": "^2.4.1", - "harbor-ui": "0.3.47", + "harbor-ui": "0.3.49", "intl": "^1.2.5", "mutationobserver-shim": "^0.3.2", "ngx-cookie": "^1.0.0", diff --git a/src/ui_ng/src/i18n/lang/en-us-lang.json b/src/ui_ng/src/i18n/lang/en-us-lang.json index 4d9bfb203..dfc1e9bec 100644 --- a/src/ui_ng/src/i18n/lang/en-us-lang.json +++ b/src/ui_ng/src/i18n/lang/en-us-lang.json @@ -485,8 +485,8 @@ "FOOT_OF": "of" }, "CHART": { - "SCANNING_TIME": "Scan completed", - "TOOLTIPS_TITLE": "This tag has {{totalVulnerability}} package(s) with vulnerabilities across all {{totalPackages}} package(s)." + "SCANNING_TIME": "Scan completed datetime", + "TOOLTIPS_TITLE": "This image includes {{totalPackages}} {{package}} with {{vulnerability}} in {{totalVulnerability}} of the {{packageExt}}." }, "SEVERITY": { "HIGH": "high", @@ -499,8 +499,8 @@ "SINGULAR": "Vulnerability", "PLURAL": "Vulnerabilities", "PLACEHOLDER": "Filter Vulnerabilities", - "PACKAGE": "Package with", - "PACKAGES": "Packages with", + "PACKAGE": "package", + "PACKAGES": "packages", "SCAN_NOW": "Scan", "JOB_LOG_VIEWER": "View Scanning Job Log" }, diff --git a/src/ui_ng/src/i18n/lang/es-es-lang.json b/src/ui_ng/src/i18n/lang/es-es-lang.json index 6b79c19bb..6d5a328d5 100644 --- a/src/ui_ng/src/i18n/lang/es-es-lang.json +++ b/src/ui_ng/src/i18n/lang/es-es-lang.json @@ -484,8 +484,8 @@ "FOOT_OF": "of" }, "CHART": { - "SCANNING_TIME": "Scan completed", - "TOOLTIPS_TITLE": "This tag has {{totalVulnerability}} package(s) with vulnerabilities across all {{totalPackages}} package(s)." + "SCANNING_TIME": "Scan completed datetime", + "TOOLTIPS_TITLE": "This image includes {{totalPackages}} {{package}} with {{vulnerability}} in {{totalVulnerability}} of the {{packageExt}}." }, "SEVERITY": { "HIGH": "high", @@ -498,8 +498,8 @@ "SINGULAR": "Vulnerability", "PLURAL": "Vulnerabilities", "PLACEHOLDER": "Filter Vulnerabilities", - "PACKAGE": "Package with", - "PACKAGES": "Packages with", + "PACKAGE": "package", + "PACKAGES": "packages", "SCAN_NOW": "Scan", "JOB_LOG_VIEWER": "View Scanning Job Log" }, diff --git a/src/ui_ng/src/i18n/lang/zh-cn-lang.json b/src/ui_ng/src/i18n/lang/zh-cn-lang.json index e979c19b6..60e7a03bf 100644 --- a/src/ui_ng/src/i18n/lang/zh-cn-lang.json +++ b/src/ui_ng/src/i18n/lang/zh-cn-lang.json @@ -477,7 +477,7 @@ "PLACEHOLDER": "没有扫描结果!", "COLUMN_ID": "缺陷码", "COLUMN_SEVERITY": "严重度", - "COLUMN_PACKAGE": "组", + "COLUMN_PACKAGE": "组件", "COLUMN_VERSION": "当前版本", "COLUMN_FIXED": "修复版本", "COLUMN_DESCRIPTION": "简介", @@ -486,7 +486,7 @@ }, "CHART": { "SCANNING_TIME": "扫描完成", - "TOOLTIPS_TITLE": "在此镜像的{{totalPackages}}包中扫描出{{totalVulnerability}}个有缺陷的包。" + "TOOLTIPS_TITLE": "在此镜像总共包含{{totalPackages}}{{package}},其中{{totalVulnerability}}个{{packageExt}}含有{{vulnerability}}。" }, "SEVERITY": { "HIGH": "严重", @@ -496,11 +496,11 @@ "UNKNOWN": "未知", "NONE": "无" }, - "SINGULAR": "缺陷", - "PLURAL": "缺陷", - "PLACEHOLDER": "过滤缺陷", - "PACKAGE": "个组件有", - "PACKAGES": "个组件有", + "SINGULAR": "漏洞", + "PLURAL": "漏洞", + "PLACEHOLDER": "过滤漏洞", + "PACKAGE": "组件", + "PACKAGES": "组件", "SCAN_NOW": "扫描", "JOB_LOG_VIEWER": "查看扫描日志" },