block editing v2 prov capi clusters#16711
Conversation
457b0b2 to
02ebcd8
Compare
There was a problem hiding this comment.
Pull request overview
This PR implements UI restrictions for v2 provisioning CAPI clusters that were created using upstream CAPI infrastructure providers instead of Rancher's machine providers. These clusters cannot be edited through the Rancher UI and require special handling.
Changes:
- Added
isCapiHybridgetter to identify clusters using upstream CAPI infrastructure providers - Disabled editing capabilities (detail links, edit config, snapshots, rotate certificates/encryption keys, autoscaler actions)
- Added warning message to cluster list indicating these clusters cannot be modified through the UI
- Hidden machine provider display for CAPI hybrid clusters
- Added comprehensive test coverage with mocked CAPI cluster data
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| shell/models/provisioning.cattle.io.cluster.js | Added isCapiHybrid getter and integrated checks throughout permission and action methods to disable editing for CAPI hybrid clusters |
| shell/list/provisioning.cattle.io.cluster.vue | Added getCustomDetailLink method to disable detail page navigation for CAPI hybrid clusters |
| shell/components/formatter/ClusterLink.vue | Added getCustomDetailLink prop support to allow custom link resolution logic |
| shell/components/SortableTable/index.vue | Changed to use v-clean-html directive for rendering state descriptions that may contain HTML |
| shell/assets/translations/en-us.yaml | Added warning message for CAPI clusters that cannot be modified through UI |
| cypress/e2e/tests/pages/manager/v2prov-capi.spec.ts | Added test suite verifying CAPI hybrid cluster restrictions |
| cypress/e2e/po/components/list-row.po.ts | Added description() method to access state description rows in tests |
| cypress/e2e/blueprints/manager/v2prov-capi-cluster-mocks.ts | Added mock data for provisioning and management CAPI clusters |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
fdec137 to
49c6750
Compare
49c6750 to
0131c68
Compare
| :colspan="fullColspan - (tableActions ? 1: 0)" | ||
| > | ||
| <div | ||
| class="text-error" |
There was a problem hiding this comment.
If we tweak this change in the future we should consider dropping this to a warning
richard-cox
left a comment
There was a problem hiding this comment.
Happy to go with Mo's main review. I haven't tested, but visually checked PR. One minor comment if we change something in the future.
Also discussed this generally with Neil and we're happy for this to merge and make any changes separately.






Summary
Fixes #16679
Occurred changes and/or fixed issues
Screenshot/Video
Checklist
Admin,Standard UserandUser Base