mirror of
https://github.com/goharbor/harbor.git
synced 2025-02-16 20:01:35 +01: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 class="ml-1">
|
||||
<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"
|
||||
[artifactDigest]="digest">
|
||||
</hbr-vulnerability-bar>
|
||||
|
@ -52,3 +52,6 @@
|
||||
.report {
|
||||
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.newTagformShow = false;
|
||||
this.newTagName = new InitTag();
|
||||
this.currentPage = 1;
|
||||
let st: ClrDatagridStateInterface = { page: {from: 0, to: this.pageSize - 1, size: this.pageSize} };
|
||||
this.getCurrentArtifactTags(st);
|
||||
this.refresh();
|
||||
}, error => {
|
||||
this.loading = false;
|
||||
this.errorHandlerService.error(error);
|
||||
@ -238,9 +236,7 @@ export class ArtifactTagComponent implements OnInit, OnDestroy {
|
||||
this.selectedRow = [];
|
||||
if (deleteSuccessList.length === deleteResult.length) {
|
||||
// all is success
|
||||
this.currentPage = 1;
|
||||
let st: ClrDatagridStateInterface = { page: {from: 0, to: this.pageSize - 1, size: this.pageSize} };
|
||||
this.getCurrentArtifactTags(st);
|
||||
this.refresh();
|
||||
} else if (deleteErrorList.length === deleteResult.length) {
|
||||
// all is error
|
||||
this.loading = false;
|
||||
@ -322,6 +318,7 @@ export class ArtifactTagComponent implements OnInit, OnDestroy {
|
||||
refresh() {
|
||||
this.loading = true;
|
||||
this.currentPage = 1;
|
||||
this.selectedRow = [];
|
||||
let st: ClrDatagridStateInterface = { page: {from: 0, to: this.pageSize - 1, size: this.pageSize} };
|
||||
this.getCurrentArtifactTags(st);
|
||||
}
|
||||
|
@ -13,7 +13,7 @@
|
||||
<div class="progress loop loop-height"><progress></progress></div>
|
||||
</div>
|
||||
<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 *ngIf="otherStatus" class="bar-state">
|
||||
<span class="label not-scan">{{'VULNERABILITY.STATE.OTHER_STATUS' | translate}}</span>
|
||||
|
@ -30,7 +30,7 @@ const RETRY_TIMES: number = 3;
|
||||
styleUrls: ['./scanning.scss']
|
||||
})
|
||||
export class ResultBarChartComponent implements OnInit, OnDestroy {
|
||||
@Input() scanner: ScannerVo;
|
||||
@Input() inputScanner: ScannerVo;
|
||||
@Input() repoName: string = "";
|
||||
@Input() projectName: string = "";
|
||||
@Input() artifactDigest: string = "";
|
||||
@ -191,4 +191,10 @@ export class ResultBarChartComponent implements OnInit, OnDestroy {
|
||||
return `${ CURRENT_BASE_HREF }/projects/${this.projectName
|
||||
}/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