From bdf6c5b8d9d8e2d3abe620838b0b868492ea99d7 Mon Sep 17 00:00:00 2001 From: AllForNothing Date: Wed, 6 May 2020 16:41:35 +0800 Subject: [PATCH] Fix some UI bugs Signed-off-by: AllForNothing --- .../harbor-shell/harbor-shell.component.html | 18 ++++------ .../harbor-shell/harbor-shell.component.scss | 36 ------------------- .../artifact-vulnerabilities.component.html | 9 +++-- .../artifact-vulnerabilities.component.ts | 7 ++++ src/portal/src/i18n/lang/en-us-lang.json | 2 +- src/portal/src/i18n/lang/es-es-lang.json | 2 +- src/portal/src/i18n/lang/fr-fr-lang.json | 2 +- src/portal/src/i18n/lang/pt-br-lang.json | 2 +- src/portal/src/i18n/lang/tr-tr-lang.json | 2 +- src/portal/src/i18n/lang/zh-cn-lang.json | 2 +- .../create-edit-rule.component.scss | 6 +--- 11 files changed, 28 insertions(+), 60 deletions(-) diff --git a/src/portal/src/app/base/harbor-shell/harbor-shell.component.html b/src/portal/src/app/base/harbor-shell/harbor-shell.component.html index bae141004..36ac6b828 100644 --- a/src/portal/src/app/base/harbor-shell/harbor-shell.component.html +++ b/src/portal/src/app/base/harbor-shell/harbor-shell.component.html @@ -81,19 +81,15 @@
- - + + {{'SIDE_NAV.API_EXPLORER' | translate}} diff --git a/src/portal/src/app/base/harbor-shell/harbor-shell.component.scss b/src/portal/src/app/base/harbor-shell/harbor-shell.component.scss index 6dc7efd89..20dd46f4f 100644 --- a/src/portal/src/app/base/harbor-shell/harbor-shell.component.scss +++ b/src/portal/src/app/base/harbor-shell/harbor-shell.component.scss @@ -32,22 +32,6 @@ clr-vertical-nav { justify-content: space-between; } } - .vertical-nav-footer { - margin: 5px 23px; - a { - display: inline-block; - line-height: 0; - padding: 0; - height: 24px; - &:hover { - background: transparent; - cursor: default; - } - .api-button { - margin: 0; - } - } - } } .font-size-13 { font-size: 13px; @@ -82,23 +66,3 @@ clr-vertical-nav { .right { text-align: right; } - -.theme-select { - width: 5.4rem; - display: flex; - align-items: center; - justify-content: flex-start; - height: 100%; - font-size: 14px; - letter-spacing: 1px; - cursor: pointer; - &:hover { - opacity: 1; - } - clr-icon { - position: static; - transform: none; - margin-right: .2rem; - min-width: 20px; - } -} \ No newline at end of file diff --git a/src/portal/src/app/project/repository/artifact/artifact-additions/artifact-vulnerabilities/artifact-vulnerabilities.component.html b/src/portal/src/app/project/repository/artifact/artifact-additions/artifact-vulnerabilities/artifact-vulnerabilities.component.html index eb4bde8ba..c49e9422a 100644 --- a/src/portal/src/app/project/repository/artifact/artifact-additions/artifact-vulnerabilities/artifact-vulnerabilities.component.html +++ b/src/portal/src/app/project/repository/artifact/artifact-additions/artifact-vulnerabilities/artifact-vulnerabilities.component.html @@ -29,7 +29,12 @@ {{'VULNERABILITY.GRID.COLUMN_VERSION' | translate}} {{'VULNERABILITY.GRID.COLUMN_FIXED' | translate}} - {{'VULNERABILITY.CHART.TOOLTIPS_TITLE_ZERO' | translate}} + + {{'VULNERABILITY.STATE.OTHER_STATUS' | translate}} + + {{'VULNERABILITY.CHART.TOOLTIPS_TITLE_ZERO' | translate}} + + {{res.id}} @@ -73,4 +78,4 @@
- \ No newline at end of file + diff --git a/src/portal/src/app/project/repository/artifact/artifact-additions/artifact-vulnerabilities/artifact-vulnerabilities.component.ts b/src/portal/src/app/project/repository/artifact/artifact-additions/artifact-vulnerabilities/artifact-vulnerabilities.component.ts index 5fa6ba1a1..80f1c8113 100644 --- a/src/portal/src/app/project/repository/artifact/artifact-additions/artifact-vulnerabilities/artifact-vulnerabilities.component.ts +++ b/src/portal/src/app/project/repository/artifact/artifact-additions/artifact-vulnerabilities/artifact-vulnerabilities.component.ts @@ -181,6 +181,13 @@ export class ArtifactVulnerabilitiesComponent implements OnInit, OnDestroy { return this.hasViewInitWithDelay && this.resultBarChartComponent && (this.resultBarChartComponent.queued || this.resultBarChartComponent.scanning || this.resultBarChartComponent.error); } + hasScanned(): boolean { + return this.hasViewInitWithDelay && this.resultBarChartComponent + && !(this.resultBarChartComponent.completed + || this.resultBarChartComponent.error + || this.resultBarChartComponent.queued + || this.resultBarChartComponent.scanning); + } handleScanOverview(scanOverview: any): any { if (scanOverview) { return scanOverview[DEFAULT_SUPPORTED_MIME_TYPE]; diff --git a/src/portal/src/i18n/lang/en-us-lang.json b/src/portal/src/i18n/lang/en-us-lang.json index be03beb9b..3a1201b6e 100644 --- a/src/portal/src/i18n/lang/en-us-lang.json +++ b/src/portal/src/i18n/lang/en-us-lang.json @@ -997,7 +997,7 @@ "SCANNING_PERCENT_EXPLAIN": "Scan completed percentage is calculated as # of successfully scanned images / total number of images referenced within the image index.", "TOOLTIPS_TITLE": "{{totalVulnerability}} of {{totalPackages}} {{package}} have known {{vulnerability}}.", "TOOLTIPS_TITLE_SINGULAR": "{{totalVulnerability}} of {{totalPackages}} {{package}} has known {{vulnerability}}.", - "TOOLTIPS_TITLE_ZERO": "No recognizable vulnerability found" + "TOOLTIPS_TITLE_ZERO": "No recognizable vulnerability detected" }, "SEVERITY": { "CRITICAL": "Critical", diff --git a/src/portal/src/i18n/lang/es-es-lang.json b/src/portal/src/i18n/lang/es-es-lang.json index 6e0d939ba..ffd6b573d 100644 --- a/src/portal/src/i18n/lang/es-es-lang.json +++ b/src/portal/src/i18n/lang/es-es-lang.json @@ -997,7 +997,7 @@ "SCANNING_PERCENT_EXPLAIN": "Scan completed percentage is calculated as # of successfully scanned images / total number of images referenced within the image index.", "TOOLTIPS_TITLE": "{{totalVulnerability}} of {{totalPackages}} {{package}} have known {{vulnerability}}.", "TOOLTIPS_TITLE_SINGULAR": "{{totalVulnerability}} of {{totalPackages}} {{package}} has known {{vulnerability}}.", - "TOOLTIPS_TITLE_ZERO": "No recognizable vulnerability found" + "TOOLTIPS_TITLE_ZERO": "No recognizable vulnerability detected" }, "SEVERITY": { "CRITICAL": "Critical", diff --git a/src/portal/src/i18n/lang/fr-fr-lang.json b/src/portal/src/i18n/lang/fr-fr-lang.json index c2077b3c7..2dfe7a3ae 100644 --- a/src/portal/src/i18n/lang/fr-fr-lang.json +++ b/src/portal/src/i18n/lang/fr-fr-lang.json @@ -970,7 +970,7 @@ "SCANNING_PERCENT_EXPLAIN": "Scan completed percentage is calculated as # of successfully scanned images / total number of images referenced within the image index.", "TOOLTIPS_TITLE": "{{totalVulnerability}} de {{totalPackages}} {{package}} ont des {{vulnerability}} connues.", "TOOLTIPS_TITLE_SINGULAR": "{{totalVulnerability}} de {{totalPackages}} {{package}} a des {{vulnerability}} connues.", - "TOOLTIPS_TITLE_ZERO": "No recognizable vulnerability found" + "TOOLTIPS_TITLE_ZERO": "No recognizable vulnerability detected" }, "SEVERITY": { "CRITICAL": "Critique", diff --git a/src/portal/src/i18n/lang/pt-br-lang.json b/src/portal/src/i18n/lang/pt-br-lang.json index f6dc04fa2..f76597fd3 100644 --- a/src/portal/src/i18n/lang/pt-br-lang.json +++ b/src/portal/src/i18n/lang/pt-br-lang.json @@ -993,7 +993,7 @@ "SCANNING_PERCENT_EXPLAIN": "Scan completed percentage is calculated as # of successfully scanned images / total number of images referenced within the image index.", "TOOLTIPS_TITLE": "{{totalVulnerability}} de {{totalPackages}} {{package}} possuem {{vulnerability}}.", "TOOLTIPS_TITLE_SINGULAR": "{{totalVulnerability}} de {{totalPackages}} {{package}} possuem {{vulnerability}}.", - "TOOLTIPS_TITLE_ZERO": "No recognizable vulnerability found" + "TOOLTIPS_TITLE_ZERO": "No recognizable vulnerability detected" }, "SEVERITY": { "CRITICAL": "Crítico", diff --git a/src/portal/src/i18n/lang/tr-tr-lang.json b/src/portal/src/i18n/lang/tr-tr-lang.json index 22400a2ea..0c6f193da 100644 --- a/src/portal/src/i18n/lang/tr-tr-lang.json +++ b/src/portal/src/i18n/lang/tr-tr-lang.json @@ -997,7 +997,7 @@ "SCANNING_PERCENT_EXPLAIN": "Scan completed percentage is calculated as # of successfully scanned images / total number of images referenced within the image index.", "TOOLTIPS_TITLE": "{{totalVulnerability}} 'nın {{totalPackages}} {{package}} bilinen {{vulnerability}}.", "TOOLTIPS_TITLE_SINGULAR": "{{totalVulnerability}} 'nın {{totalPackages}} {{package}} bilinen {{vulnerability}}.", - "TOOLTIPS_TITLE_ZERO": "No recognizable vulnerability found" + "TOOLTIPS_TITLE_ZERO": "No recognizable vulnerability detected" }, "SEVERITY": { "CRITICAL": "Kritik", diff --git a/src/portal/src/i18n/lang/zh-cn-lang.json b/src/portal/src/i18n/lang/zh-cn-lang.json index 19f06b2c5..d51798f13 100644 --- a/src/portal/src/i18n/lang/zh-cn-lang.json +++ b/src/portal/src/i18n/lang/zh-cn-lang.json @@ -997,7 +997,7 @@ "SCANNING_PERCENT_EXPLAIN": "扫描完成度是扫描成功的镜像数与总共需要扫描的镜像数的比值,总共需要的扫描的镜像不包含 Index 。", "TOOLTIPS_TITLE": "{{totalPackages}}个{{package}}中的{{totalVulnerability}}个含有{{vulnerability}}。", "TOOLTIPS_TITLE_SINGULAR": "{{totalPackages}}个{{package}}中的{{totalVulnerability}}个含有{{vulnerability}}。", - "TOOLTIPS_TITLE_ZERO": "没有发现可识别的漏洞" + "TOOLTIPS_TITLE_ZERO": "没有检测到可识别的漏洞" }, "SEVERITY": { "CRITICAL": "危急", diff --git a/src/portal/src/lib/components/create-edit-rule/create-edit-rule.component.scss b/src/portal/src/lib/components/create-edit-rule/create-edit-rule.component.scss index 0a7c2066b..02606b8bc 100644 --- a/src/portal/src/lib/components/create-edit-rule/create-edit-rule.component.scss +++ b/src/portal/src/lib/components/create-edit-rule/create-edit-rule.component.scss @@ -102,10 +102,6 @@ h4 { top: 8px; } -.is-solid { - cursor: pointer; -} - .selectBox { position: absolute; width: 100%; @@ -296,4 +292,4 @@ clr-modal { padding: 0; } } - } \ No newline at end of file + }