-
Notifications
You must be signed in to change notification settings - Fork 76
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: expand volume option is greyed under Volume tab but working in the volume detail section #896
Conversation
WalkthroughThe changes adjust the logic governing the "Expand Volume" action in two files. In Changes
Sequence Diagram(s)sequenceDiagram
participant U as User
participant VA as VolumeActions
participant CC as Condition Checker
U->>VA: Request "Expand Volume" action
VA->>CC: Check if Scheduled.status !== "true"
alt Status is not "true"
CC-->>VA: Condition met
VA-->>U: Enable "Expand Volume" action
else Status is "true"
CC-->>VA: Condition not met
VA-->>U: Disable "Expand Volume" action
end
sequenceDiagram
participant U as User
participant VB as VolumeBulkActions
participant DF as disableExpandVolume
U->>VB: Initiate bulk action for "Expand Volume"
VB->>DF: Evaluate each row's Scheduled status
alt At least one row not "true"
DF-->>VB: Return disable flag
VB-->>U: Disable "Expand Volume" action for bulk selection
else All rows "true"
DF-->>VB: Return flag false
VB-->>U: Enable "Expand Volume" action for bulk selection
end
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
@@ -248,7 +248,7 @@ function actions({ | |||
}) | |||
|
|||
availableActions.push({ key: 'cloneVolume', name: 'Clone Volume', disabled: selected.standby || isRestoring(selected) }) | |||
availableActions.push({ key: 'expandVolume', name: 'Expand Volume', disabled: selected?.conditions?.Scheduled?.status?.toLowerCase() === 'false' }) | |||
availableActions.push({ key: 'expandVolume', name: 'Expand Volume', disabled: selected?.conditions?.Scheduled?.status?.toLowerCase() !== 'true' }) |
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.
Disable the button if the value is false
or undefined
.
Signed-off-by: Yi-Ya Chen <[email protected]>
What this PR does / why we need it
Expand Volume
should be consistent across the volume details page and bulk actionsExpand Volume
should be enabled for detached volumeIssue
[BUG] Expand Volume option is greyed under Volume tab but working in the volume detail section. #7529
Test Result
Expand Volume
option should be enabledExpand Volume
should also be enabled thereAdditional documentation or context
N/A
Summary by CodeRabbit