Commit 4d4da5b
authored
Fix bulk-delete review findings: selection count, partial-failure refresh, API group (#871)
Three fixes for issues found in post-merge review of #322:
- Selection count mismatch: the bulk bar, select-all checkbox, and
confirm dialog now all derive from checkedItems (checked rows still
visible under current filters) — the same set the delete acts on.
Previously the bar showed the raw checked-set size, which overstated
the deletion scope when filters hid checked rows.
- Partial-failure refresh: bulk delete invalidates queries in onSettled
instead of onSuccess, so resources deleted before a partial failure
disappear from the table instead of lingering.
- API group disambiguation: DELETE /api/resources accepts ?group= and
resolves via GetGVRWithGroup. Kind-only resolution picks whichever
group discovery found first, so deletes from CRD tables whose kind
collides with another group (Knative vs core Service, CAPI vs CNPG
Cluster) could 404 or delete the same-named object in the wrong
group. Both the single-resource and bulk delete paths now pass the
table's group through.1 parent 884f6c6 commit 4d4da5b
5 files changed
Lines changed: 34 additions & 20 deletions
File tree
- internal/server
- packages/k8s-ui/src/components
- resources
- pkg/k8score
- web/src/api
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2595 | 2595 | | |
2596 | 2596 | | |
2597 | 2597 | | |
| 2598 | + | |
2598 | 2599 | | |
2599 | 2600 | | |
2600 | 2601 | | |
| |||
2604 | 2605 | | |
2605 | 2606 | | |
2606 | 2607 | | |
| 2608 | + | |
2607 | 2609 | | |
2608 | 2610 | | |
2609 | 2611 | | |
| |||
Lines changed: 18 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1808 | 1808 | | |
1809 | 1809 | | |
1810 | 1810 | | |
1811 | | - | |
| 1811 | + | |
1812 | 1812 | | |
1813 | 1813 | | |
1814 | 1814 | | |
| |||
3416 | 3416 | | |
3417 | 3417 | | |
3418 | 3418 | | |
3419 | | - | |
3420 | | - | |
3421 | | - | |
3422 | | - | |
3423 | | - | |
3424 | | - | |
3425 | | - | |
| 3419 | + | |
| 3420 | + | |
| 3421 | + | |
| 3422 | + | |
| 3423 | + | |
3426 | 3424 | | |
3427 | 3425 | | |
3428 | 3426 | | |
3429 | 3427 | | |
3430 | 3428 | | |
| 3429 | + | |
| 3430 | + | |
| 3431 | + | |
| 3432 | + | |
| 3433 | + | |
| 3434 | + | |
3431 | 3435 | | |
3432 | 3436 | | |
3433 | 3437 | | |
| |||
4057 | 4061 | | |
4058 | 4062 | | |
4059 | 4063 | | |
4060 | | - | |
| 4064 | + | |
4061 | 4065 | | |
4062 | 4066 | | |
4063 | 4067 | | |
4064 | | - | |
| 4068 | + | |
4065 | 4069 | | |
4066 | 4070 | | |
4067 | 4071 | | |
| |||
4185 | 4189 | | |
4186 | 4190 | | |
4187 | 4191 | | |
4188 | | - | |
4189 | | - | |
| 4192 | + | |
| 4193 | + | |
4190 | 4194 | | |
4191 | 4195 | | |
4192 | | - | |
| 4196 | + | |
4193 | 4197 | | |
4194 | 4198 | | |
4195 | 4199 | | |
| |||
4425 | 4429 | | |
4426 | 4430 | | |
4427 | 4431 | | |
| 4432 | + | |
4428 | 4433 | | |
4429 | 4434 | | |
4430 | 4435 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
| 68 | + | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
169 | | - | |
| 169 | + | |
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| |||
378 | 379 | | |
379 | 380 | | |
380 | 381 | | |
381 | | - | |
| 382 | + | |
382 | 383 | | |
383 | 384 | | |
384 | 385 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1699 | 1699 | | |
1700 | 1700 | | |
1701 | 1701 | | |
1702 | | - | |
| 1702 | + | |
1703 | 1703 | | |
| 1704 | + | |
| 1705 | + | |
| 1706 | + | |
1704 | 1707 | | |
1705 | 1708 | | |
1706 | 1709 | | |
| |||
1729 | 1732 | | |
1730 | 1733 | | |
1731 | 1734 | | |
1732 | | - | |
| 1735 | + | |
1733 | 1736 | | |
1734 | | - | |
| 1737 | + | |
1735 | 1738 | | |
| 1739 | + | |
1736 | 1740 | | |
1737 | 1741 | | |
1738 | 1742 | | |
| |||
1752 | 1756 | | |
1753 | 1757 | | |
1754 | 1758 | | |
1755 | | - | |
| 1759 | + | |
| 1760 | + | |
| 1761 | + | |
1756 | 1762 | | |
1757 | 1763 | | |
1758 | 1764 | | |
| |||
0 commit comments