Creating a fix so we show the StatusCard when the user can scale and the resource count is 0#16839
Merged
codyrancher merged 2 commits intorancher:masterfrom Mar 5, 2026
Merged
Conversation
codyrancher
commented
Mar 4, 2026
codyrancher
commented
Mar 4, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes workload detail pages so the Pods StatusCard can still render when a scalable workload is scaled to 0 pods, and introduces a configurable empty-state message for the StatusCard.
Changes:
- Adjusted
Workload.podsCardto return a card whenpodsis an empty array (instead of returningnull). - Added
noResourcesMessageprop + empty-state rendering to the StatusCard component. - Updated muted text styling to use
text-deemphasizedand added an en-us translation string for the “no pods” message.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
shell/models/workload.js |
Updates Pods card gating logic and passes a new empty-state message prop. |
shell/models/__tests__/workload.test.ts |
Updates/extends unit tests for podsCard, including the “scaled to 0” case. |
shell/components/Resource/Detail/ResourceRow.vue |
Switches muted text styling class to text-deemphasized. |
shell/components/Resource/Detail/Card/StatusCard/index.vue |
Adds optional noResourcesMessage prop and renders an empty-state message when there are no rows. |
shell/assets/translations/en-us.yaml |
Adds the podsCard.noPods translation string used for the empty-state message. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
momesgin
approved these changes
Mar 4, 2026
…the resource count is 0 Addresses rancher#14581 (comment)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Addresses #14581 (comment)
Occurred changes and/or fixed issues
Technical notes summary
Areas or cases that should be tested
Areas which could experience regressions
Screenshot/Video
Checklist
Admin,Standard UserandUser Base