mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-26 04:05:40 +01:00
fix: adds label for multiple selected artifacts
Signed-off-by: Antoine <anthonyfg9@gmail.com> Signed-off-by: anthony <floresgomezanthony@gmail.com>
This commit is contained in:
parent
438d4c03bb
commit
59fd605f2d
@ -527,25 +527,27 @@ export class ArtifactListTabComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
addLabel(label: Label) {
|
addLabel(label: Label) {
|
||||||
if (!this.inprogress) {
|
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.inprogress = true;
|
||||||
this.newArtifactService
|
this.selectedRow.forEach((artifact: Artifact) => {
|
||||||
.addLabel(params)
|
const params: NewArtifactService.AddLabelParams = {
|
||||||
.pipe(finalize(() => (this.inprogress = false)))
|
projectName: this.projectName,
|
||||||
.subscribe({
|
repositoryName: dbEncodeURIComponent(this.repoName),
|
||||||
next: res => {
|
reference: artifact.digest,
|
||||||
this.refresh();
|
label: label,
|
||||||
},
|
};
|
||||||
error: err => {
|
this.newArtifactService
|
||||||
this.refresh();
|
.addLabel(params)
|
||||||
this.errorHandlerService.error(err);
|
.pipe(finalize(() => (this.inprogress = false)))
|
||||||
},
|
.subscribe({
|
||||||
});
|
next: res => {
|
||||||
|
this.refresh();
|
||||||
|
},
|
||||||
|
error: err => {
|
||||||
|
this.refresh();
|
||||||
|
this.errorHandlerService.error(err);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
removeLabel(label: Label) {
|
removeLabel(label: Label) {
|
||||||
|
Loading…
Reference in New Issue
Block a user