diff --git a/src/portal/src/app/base/project/repository/artifact/artifact-list-page/artifact-list/artifact-list-tab/artifact-list-tab.component.ts b/src/portal/src/app/base/project/repository/artifact/artifact-list-page/artifact-list/artifact-list-tab/artifact-list-tab.component.ts index cf3d1c7dd..4e6615688 100644 --- a/src/portal/src/app/base/project/repository/artifact/artifact-list-page/artifact-list/artifact-list-tab/artifact-list-tab.component.ts +++ b/src/portal/src/app/base/project/repository/artifact/artifact-list-page/artifact-list/artifact-list-tab/artifact-list-tab.component.ts @@ -527,25 +527,27 @@ export class ArtifactListTabComponent implements OnInit, OnDestroy { } addLabel(label: Label) { if (!this.inprogress) { - const params: NewArtifactService.AddLabelParams = { - projectName: this.projectName, - repositoryName: dbEncodeURIComponent(this.repoName), - reference: this.selectedRow[0].digest, - label: label, - }; this.inprogress = true; - this.newArtifactService - .addLabel(params) - .pipe(finalize(() => (this.inprogress = false))) - .subscribe({ - next: res => { - this.refresh(); - }, - error: err => { - this.refresh(); - this.errorHandlerService.error(err); - }, - }); + this.selectedRow.forEach((artifact: Artifact) => { + const params: NewArtifactService.AddLabelParams = { + projectName: this.projectName, + repositoryName: dbEncodeURIComponent(this.repoName), + reference: artifact.digest, + label: label, + }; + this.newArtifactService + .addLabel(params) + .pipe(finalize(() => (this.inprogress = false))) + .subscribe({ + next: res => { + this.refresh(); + }, + error: err => { + this.refresh(); + this.errorHandlerService.error(err); + }, + }); + }) } } removeLabel(label: Label) {