mirror of
https://github.com/goharbor/harbor.git
synced 2025-01-01 21:47:57 +01:00
Merge pull request #4756 from ninjadq/fix_multiple_scan_after_add_label
Fix bug sent multiple scan request
This commit is contained in:
commit
fcf4807583
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "harbor-ui",
|
||||
"version": "0.7.2",
|
||||
"version": "0.7.5",
|
||||
"description": "Harbor shared UI components based on Clarity and Angular4",
|
||||
"scripts": {
|
||||
"start": "ng serve --host 0.0.0.0 --port 4500 --proxy-config proxy.config.json",
|
||||
@ -29,9 +29,9 @@
|
||||
"@ngx-translate/core": "^6.0.0",
|
||||
"@ngx-translate/http-loader": "0.0.3",
|
||||
"@webcomponents/custom-elements": "^1.0.0",
|
||||
"clarity-angular": "^0.10.17",
|
||||
"clarity-icons": "^0.10.17",
|
||||
"clarity-ui": "^0.10.17",
|
||||
"clarity-angular": "^0.10.27",
|
||||
"clarity-icons": "^0.10.27",
|
||||
"clarity-ui": "^0.10.27",
|
||||
"core-js": "^2.4.1",
|
||||
"intl": "^1.2.5",
|
||||
"mutationobserver-shim": "^0.3.2",
|
||||
@ -70,4 +70,4 @@
|
||||
"uglify-js": "^2.8.22",
|
||||
"webdriver-manager": "10.2.5"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "harbor-ui",
|
||||
"version": "0.7.2",
|
||||
"version": "0.7.5",
|
||||
"description": "Harbor shared UI components based on Clarity and Angular4",
|
||||
"author": "VMware",
|
||||
"module": "index.js",
|
||||
|
@ -39,7 +39,7 @@ export const TAG_TEMPLATE = `
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
|
||||
<clr-datagrid [clrDgLoading]="loading" [class.embeded-datagrid]="isEmbedded" [(clrDgSelected)]="selectedRow" (clrDgSelectedChange)="selectedChange()">
|
||||
<clr-datagrid [clrDgLoading]="loading" [class.embeded-datagrid]="isEmbedded" [(clrDgSelected)]="selectedRow">
|
||||
<clr-dg-action-bar>
|
||||
<button type="button" class="btn btn-sm btn-secondary" [disabled]="!(canScanNow(selectedRow) && selectedRow.length==1)" (click)="scanNow(selectedRow)"><clr-icon shape="shield-check" size="16"></clr-icon> {{'VULNERABILITY.SCAN_NOW' | translate}}</button>
|
||||
<button type="button" class="btn btn-sm btn-secondary" [disabled]="!(selectedRow.length==1)" (click)="showDigestId(selectedRow)" ><clr-icon shape="copy" size="16"></clr-icon> {{'REPOSITORY.COPY_DIGEST_ID' | translate}}</button>
|
||||
|
@ -292,7 +292,7 @@ export class TagComponent implements OnInit, AfterViewInit {
|
||||
});
|
||||
}
|
||||
|
||||
selectedChange(tag?: Tag[]): void {
|
||||
labelSelectedChange(tag?: Tag[]): void {
|
||||
if (tag && tag[0].labels && tag[0].labels.length) {
|
||||
this.imageStickLabels.forEach(data => {
|
||||
data.iconsShow = false;
|
||||
@ -307,7 +307,7 @@ export class TagComponent implements OnInit, AfterViewInit {
|
||||
this.labelListOpen = true;
|
||||
this.selectedTag = tag;
|
||||
|
||||
this.selectedChange(tag);
|
||||
this.labelSelectedChange(tag);
|
||||
}
|
||||
|
||||
stickLabel(labelInfo: {[key: string]: any | string[]}): void {
|
||||
|
@ -39,6 +39,7 @@ export class ResultBarChartComponent implements OnInit, OnDestroy {
|
||||
onSubmitting: boolean = false;
|
||||
retryCounter: number = 0;
|
||||
stateCheckTimer: Subscription;
|
||||
scanSubscription: Subscription;
|
||||
timerHandler: any;
|
||||
|
||||
@ViewChild("scanningLogViewer")
|
||||
@ -53,7 +54,7 @@ export class ResultBarChartComponent implements OnInit, OnDestroy {
|
||||
) { }
|
||||
|
||||
ngOnInit(): void {
|
||||
this.channel.scanCommand$.subscribe((tagId: string) => {
|
||||
this.scanSubscription = this.channel.scanCommand$.subscribe((tagId: string) => {
|
||||
let myFullTag: string = this.repoName + "/" + this.tagId;
|
||||
if (myFullTag === tagId) {
|
||||
this.scanNow();
|
||||
@ -66,6 +67,9 @@ export class ResultBarChartComponent implements OnInit, OnDestroy {
|
||||
this.stateCheckTimer.unsubscribe();
|
||||
this.stateCheckTimer = null;
|
||||
}
|
||||
if (this.scanSubscription) {
|
||||
this.scanSubscription.unsubscribe()
|
||||
};
|
||||
}
|
||||
|
||||
//Get vulnerability scanning status
|
||||
|
@ -26,11 +26,11 @@
|
||||
"@ngx-translate/http-loader": "0.0.3",
|
||||
"@types/jquery": "^2.0.41",
|
||||
"@webcomponents/custom-elements": "^1.0.0",
|
||||
"clarity-angular": "0.10.24",
|
||||
"clarity-icons": "0.10.24",
|
||||
"clarity-ui": "0.10.24",
|
||||
"clarity-angular": "^0.10.27",
|
||||
"clarity-icons": "^0.10.27",
|
||||
"clarity-ui": "^0.10.27",
|
||||
"core-js": "^2.4.1",
|
||||
"harbor-ui": "0.7.4",
|
||||
"harbor-ui": "0.7.5",
|
||||
"intl": "^1.2.5",
|
||||
"mutationobserver-shim": "^0.3.2",
|
||||
"ngx-cookie": "^1.0.0",
|
||||
|
Loading…
Reference in New Issue
Block a user