mirror of
https://github.com/goharbor/harbor.git
synced 2024-09-30 06:18:02 +02:00
Fix UI bugs found in round 2 testing (#14098)
Signed-off-by: AllForNothing <sshijun@vmware.com>
This commit is contained in:
parent
50a1e85095
commit
fbfc943e8f
@ -18,7 +18,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="ml-1">
|
<div class="ml-1">
|
||||||
<div [hidden]="!shouldShowBar()">
|
<div [hidden]="!shouldShowBar()">
|
||||||
<hbr-vulnerability-bar [summary]="handleScanOverview(artifact?.scan_overview)" [scanner]="scanner"
|
<hbr-vulnerability-bar [summary]="handleScanOverview(artifact?.scan_overview)" [inputScanner]="scanner"
|
||||||
(submitFinish)="submitFinish($event)" [projectName]="projectName" [repoName]="repoName"
|
(submitFinish)="submitFinish($event)" [projectName]="projectName" [repoName]="repoName"
|
||||||
[artifactDigest]="digest">
|
[artifactDigest]="digest">
|
||||||
</hbr-vulnerability-bar>
|
</hbr-vulnerability-bar>
|
||||||
|
@ -52,3 +52,6 @@
|
|||||||
.report {
|
.report {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
.mt-5px {
|
||||||
|
margin-top: 5px;
|
||||||
|
}
|
@ -182,9 +182,7 @@ export class ArtifactTagComponent implements OnInit, OnDestroy {
|
|||||||
this.artifactService.createTag(createTagParams).subscribe(res => {
|
this.artifactService.createTag(createTagParams).subscribe(res => {
|
||||||
this.newTagformShow = false;
|
this.newTagformShow = false;
|
||||||
this.newTagName = new InitTag();
|
this.newTagName = new InitTag();
|
||||||
this.currentPage = 1;
|
this.refresh();
|
||||||
let st: ClrDatagridStateInterface = { page: {from: 0, to: this.pageSize - 1, size: this.pageSize} };
|
|
||||||
this.getCurrentArtifactTags(st);
|
|
||||||
}, error => {
|
}, error => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.errorHandlerService.error(error);
|
this.errorHandlerService.error(error);
|
||||||
@ -238,9 +236,7 @@ export class ArtifactTagComponent implements OnInit, OnDestroy {
|
|||||||
this.selectedRow = [];
|
this.selectedRow = [];
|
||||||
if (deleteSuccessList.length === deleteResult.length) {
|
if (deleteSuccessList.length === deleteResult.length) {
|
||||||
// all is success
|
// all is success
|
||||||
this.currentPage = 1;
|
this.refresh();
|
||||||
let st: ClrDatagridStateInterface = { page: {from: 0, to: this.pageSize - 1, size: this.pageSize} };
|
|
||||||
this.getCurrentArtifactTags(st);
|
|
||||||
} else if (deleteErrorList.length === deleteResult.length) {
|
} else if (deleteErrorList.length === deleteResult.length) {
|
||||||
// all is error
|
// all is error
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
@ -322,6 +318,7 @@ export class ArtifactTagComponent implements OnInit, OnDestroy {
|
|||||||
refresh() {
|
refresh() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.currentPage = 1;
|
this.currentPage = 1;
|
||||||
|
this.selectedRow = [];
|
||||||
let st: ClrDatagridStateInterface = { page: {from: 0, to: this.pageSize - 1, size: this.pageSize} };
|
let st: ClrDatagridStateInterface = { page: {from: 0, to: this.pageSize - 1, size: this.pageSize} };
|
||||||
this.getCurrentArtifactTags(st);
|
this.getCurrentArtifactTags(st);
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
<div class="progress loop loop-height"><progress></progress></div>
|
<div class="progress loop loop-height"><progress></progress></div>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="completed" class="bar-state bar-state-chart">
|
<div *ngIf="completed" class="bar-state bar-state-chart">
|
||||||
<hbr-result-tip-histogram [scanner]="scanner" [vulnerabilitySummary]="summary"></hbr-result-tip-histogram>
|
<hbr-result-tip-histogram [scanner]="getScanner()" [vulnerabilitySummary]="summary"></hbr-result-tip-histogram>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="otherStatus" class="bar-state">
|
<div *ngIf="otherStatus" class="bar-state">
|
||||||
<span class="label not-scan">{{'VULNERABILITY.STATE.OTHER_STATUS' | translate}}</span>
|
<span class="label not-scan">{{'VULNERABILITY.STATE.OTHER_STATUS' | translate}}</span>
|
||||||
|
@ -30,7 +30,7 @@ const RETRY_TIMES: number = 3;
|
|||||||
styleUrls: ['./scanning.scss']
|
styleUrls: ['./scanning.scss']
|
||||||
})
|
})
|
||||||
export class ResultBarChartComponent implements OnInit, OnDestroy {
|
export class ResultBarChartComponent implements OnInit, OnDestroy {
|
||||||
@Input() scanner: ScannerVo;
|
@Input() inputScanner: ScannerVo;
|
||||||
@Input() repoName: string = "";
|
@Input() repoName: string = "";
|
||||||
@Input() projectName: string = "";
|
@Input() projectName: string = "";
|
||||||
@Input() artifactDigest: string = "";
|
@Input() artifactDigest: string = "";
|
||||||
@ -191,4 +191,10 @@ export class ResultBarChartComponent implements OnInit, OnDestroy {
|
|||||||
return `${ CURRENT_BASE_HREF }/projects/${this.projectName
|
return `${ CURRENT_BASE_HREF }/projects/${this.projectName
|
||||||
}/repositories/${dbEncodeURIComponent(this.repoName)}/artifacts/${this.artifactDigest}/scan/${this.summary.report_id}/log`;
|
}/repositories/${dbEncodeURIComponent(this.repoName)}/artifacts/${this.artifactDigest}/scan/${this.summary.report_id}/log`;
|
||||||
}
|
}
|
||||||
|
getScanner(): ScannerVo {
|
||||||
|
if (this.summary && this.summary.scanner) {
|
||||||
|
return this.summary.scanner;
|
||||||
|
}
|
||||||
|
return this.inputScanner;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user