-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: adds labels for multiple selected artifacts #20873
base: main
Are you sure you want to change the base?
fix: adds labels for multiple selected artifacts #20873
Conversation
2790574
to
7c4107b
Compare
@antoine29 Thanks for submitting the PR. |
this.errorHandlerService.error(err); | ||
}, | ||
}); | ||
this.selectedRow.forEach((artifact: Artifact) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The refresh() method will be called when the first callback is called, this is not expected.
We should call the refresh() method only when all requests are completed.
Maybe 'forkJoin' function can match our requirements.
this.selectedRow will be reset to empty array when the refresh() method is called.
this.selectedRow = []
if all the iteration is not done after the first request get completed, it will call the refresh() to reset the
this.selectedRow = []
Add/Remove labels will not be triggered for the items that not iterated before the selectedRow was reset to []
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #20873 +/- ##
===========================================
+ Coverage 45.36% 66.26% +20.89%
===========================================
Files 244 1046 +802
Lines 13333 114163 +100830
Branches 2719 2845 +126
===========================================
+ Hits 6049 75653 +69604
- Misses 6983 34386 +27403
- Partials 301 4124 +3823
Flags with carried forward coverage won't be shown. Click here to find out more. |
@xuelichao thanks for the feedback. I'll look at the 'forkjoin' operator. |
Signed-off-by: Antoine <[email protected]> Signed-off-by: anthony <[email protected]>
Signed-off-by: anthony <[email protected]>
7c4107b
to
f1c142d
Compare
Signed-off-by: anthony <[email protected]>
f1c142d
to
0e3caf9
Compare
This PR is being marked stale due to a period of inactivty. If this PR is still relevant, please comment or remove the stale label. Otherwise, this PR will close in 30 days. |
Thank you for contributing to Harbor!
Comprehensive Summary of your change
When selecting multiple artifacts and adding a label for these, only the first selected artifact gets labeled. Current frontend code is adding the label only to the first selected artifact. This PR is fixing this by iterating the array and adding the label to each selected artifact.
Issue being fixed
Fixes #20681
Please indicate you've done the following: