Commit 3c51e377 authored by AllForNothing's avatar AllForNothing
Browse files

Modify UI for scanning result


Signed-off-by: default avatarAllForNothing <sshijun@vmware.com>
parent 033d6dac
<div class="tip-wrapper width-210">
<div class="tip-wrapper width-215">
<clr-tooltip *ngIf="!isNone">
<div clrTooltipTrigger class="level-border">
<div [className]="getClass()">
......@@ -75,10 +75,20 @@
<span class="bar-scanning-time">{{'VULNERABILITY.CHART.SCANNING_TIME' | translate}} </span>
<span>{{completeTimestamp | date:'short'}}</span>
</div>
<div>
</clr-tooltip-content>
</clr-tooltip>
<clr-tooltip class="margin-left-5" *ngIf="isLimitedSuccess()">
<div clrTooltipTrigger>
<clr-icon shape="exclamation-triangle" size="20" class="is-warning"></clr-icon>
</div>
<clr-tooltip-content [clrSize]="'lg'" *clrIfOpen>
<div class="font-weight-600">
<span class="bar-scanning-time">{{'VULNERABILITY.CHART.SCANNING_PERCENT' | translate}} </span>
<span>{{completePercent}}</span>
</div>
<div>
<span>{{'VULNERABILITY.CHART.SCANNING_PERCENT_EXPLAIN' | translate}}</span>
</div>
</clr-tooltip-content>
</clr-tooltip>
</div>
......@@ -212,8 +212,8 @@ hr {
width: $thirty-pixel;
}
.width-210 {
width: 210px;
.width-215 {
width: 215px;
}
.width-150 {
......
......@@ -6,6 +6,7 @@ import { VULNERABILITY_SCAN_STATUS, VULNERABILITY_SEVERITY } from "../../../../.
const MIN = 60;
const MIN_STR = "min ";
const SEC_STR = "sec";
const SUCCESS_PCT: number = 100;
const CLASS_MAP = {
"CRITICAL": "level-critical",
"HIGH": "level-high",
......@@ -150,7 +151,10 @@ export class ResultTipHistogramComponent implements OnInit {
return 0;
}
public get completePercent(): string {
return this.vulnerabilitySummary ? `${this.vulnerabilitySummary.complete_percent}%` : '0%'
return this.vulnerabilitySummary ? `${this.vulnerabilitySummary.complete_percent}%` : '0%';
}
isLimitedSuccess(): boolean {
return this.vulnerabilitySummary && this.vulnerabilitySummary.complete_percent < SUCCESS_PCT;
}
get completeTimestamp(): Date {
return this.vulnerabilitySummary && this.vulnerabilitySummary.end_time ? this.vulnerabilitySummary.end_time : new Date();
......
......@@ -992,6 +992,7 @@
"CHART": {
"SCANNING_TIME": "Scan completed time:",
"SCANNING_PERCENT": "Scan completed percent:",
"SCANNING_PERCENT_EXPLAIN": "(Scan completed percentage is calculated as # of successfully scanned images / total number of images referenced within the image index not including the index file itself and the images that do not support being scanned.)",
"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"
......
......@@ -991,6 +991,7 @@
"CHART": {
"SCANNING_TIME": "Scan completed time:",
"SCANNING_PERCENT": "Scan completed percent:",
"SCANNING_PERCENT_EXPLAIN": "(Scan completed percentage is calculated as # of successfully scanned images / total number of images referenced within the image index not including the index file itself and the images that do not support being scanned.)",
"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"
......
......@@ -964,6 +964,7 @@
"CHART": {
"SCANNING_TIME": "Temps d'analyse complète :",
"SCANNING_PERCENT": "Scan completed percent:",
"SCANNING_PERCENT_EXPLAIN": "(Scan completed percentage is calculated as # of successfully scanned images / total number of images referenced within the image index not including the index file itself and the images that do not support being scanned.)",
"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"
......
......@@ -987,6 +987,7 @@
"CHART": {
"SCANNING_TIME": "Tempo de conclusão da análise:",
"SCANNING_PERCENT": "Scan completed percent:",
"SCANNING_PERCENT_EXPLAIN": "(Scan completed percentage is calculated as # of successfully scanned images / total number of images referenced within the image index not including the index file itself and the images that do not support being scanned.)",
"TOOLTIPS_TITLE": "{{totalVulnerability}} de {{totalPackages}} {{package}} possuem {{vulnerability}}.",
"TOOLTIPS_TITLE_SINGULAR": "{{totalVulnerability}} de {{totalPackages}} {{package}} possuem {{vulnerability}}.",
"TOOLTIPS_TITLE_ZERO": "No recognizable vulnerability found"
......
......@@ -992,6 +992,7 @@
"CHART": {
"SCANNING_TIME": "Tarama tamamlanma zamanı:",
"SCANNING_PERCENT": "Scan completed percent:",
"SCANNING_PERCENT_EXPLAIN": "(Scan completed percentage is calculated as # of successfully scanned images / total number of images referenced within the image index not including the index file itself and the images that do not support being scanned.)",
"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"
......
......@@ -991,6 +991,7 @@
"CHART": {
"SCANNING_TIME": "扫描完成时间:",
"SCANNING_PERCENT": "扫描完成度:",
"SCANNING_PERCENT_EXPLAIN": "(扫描完成度是扫描成功的镜像数与总共需要扫描的镜像数的比值。总共需要的扫描的镜像不包含 Index 本身和不支持扫描的镜像。)",
"TOOLTIPS_TITLE": "{{totalPackages}}个{{package}}中的{{totalVulnerability}}个含有{{vulnerability}}。",
"TOOLTIPS_TITLE_SINGULAR": "{{totalPackages}}个{{package}}中的{{totalVulnerability}}个含有{{vulnerability}}。",
"TOOLTIPS_TITLE_ZERO": "没有发现可识别的漏洞"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment