diff --git a/src/ui_ng/lib/src/tag/tag.component.html.ts b/src/ui_ng/lib/src/tag/tag.component.html.ts
index 6b8e07eb6f..eb77c920c6 100644
--- a/src/ui_ng/lib/src/tag/tag.component.html.ts
+++ b/src/ui_ng/lib/src/tag/tag.component.html.ts
@@ -30,7 +30,7 @@ export const TAG_TEMPLATE = `
-
+
{{t.name}}
{{t.name}}
@@ -56,4 +56,4 @@ export const TAG_TEMPLATE = `
{{pagination.totalItems}} {{'REPOSITORY.ITEMS' | translate}}
-`;
\ No newline at end of file
+`;
diff --git a/src/ui_ng/lib/src/tag/tag.component.ts b/src/ui_ng/lib/src/tag/tag.component.ts
index 663c31e2a4..f934cf1200 100644
--- a/src/ui_ng/lib/src/tag/tag.component.ts
+++ b/src/ui_ng/lib/src/tag/tag.component.ts
@@ -253,7 +253,7 @@ export class TagComponent implements OnInit {
}
}
- //Get vulnerability scanning status
+ //Get vulnerability scanning status
scanStatus(t: Tag): string {
if (t && t.scan_overview && t.scan_overview.scan_status) {
return t.scan_overview.scan_status;
@@ -262,6 +262,13 @@ export class TagComponent implements OnInit {
return VULNERABILITY_SCAN_STATUS.unknown;
}
+ existObservablePackage(t: Tag): boolean {
+ return t.scan_overview &&
+ t.scan_overview.components &&
+ t.scan_overview.components.total &&
+ t.scan_overview.components.total > 0 ? true : false;
+ }
+
//Whether show the 'scan now' menu
canScanNow(t: Tag): boolean {
if (!this.withClair) { return false; }
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 0ada90c09f..f729bc1c34 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
@@ -45,7 +45,9 @@ export class ResultTipComponent implements OnInit {
level = VulnerabilitySeverity.LOW;
}else if (this._unknownCount && this._unknownCount >= 1) {
level = VulnerabilitySeverity.UNKNOWN;
- }else {
+ }else if (this.totalPackages == 0) {
+ level = VulnerabilitySeverity.UNKNOWN;
+ } else {
level = VulnerabilitySeverity.NONE;
}
return level;
@@ -105,8 +107,8 @@ export class ResultTipComponent implements OnInit {
let m: number = this.totalPackages;
if (m === 0) {
- //If no packages recognized, then show green bar
- if (severity === VulnerabilitySeverity.NONE) {
+ //If no packages recognized, then show grey
+ if (severity === VulnerabilitySeverity.UNKNOWN) {
return MAX_TIP_WIDTH + 'px';
} else {
return 0 + 'px';
diff --git a/src/ui_ng/package.json b/src/ui_ng/package.json
index 7a921074c7..9432f633b1 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.4.71",
+ "harbor-ui": "0.4.72",
"intl": "^1.2.5",
"mutationobserver-shim": "^0.3.2",
"ngx-cookie": "^1.0.0",