Skip to content

Commit 0418869

Browse files
authored
Merge pull request #140 from sapcc/fix_payg_setting
fix visibility of the forbid autogrowth setting
2 parents 5afdfa5 + 00ca970 commit 0418869

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

.changeset/proud-donkeys-roll.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@sapcc/limes-ui": patch
3+
---
4+
5+
Remove forbid autogrowth setting for resources that are not committable and don't have remaining commitments"

src/components/mainView/Resource.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ const Resource = (props) => {
170170
{isAZUnaware(props.resource.per_az) && (
171171
<ProjectBadges az={props.resource.per_az[0]} unit={unitName} displayValues={true} />
172172
)}
173-
{scope.isProject() && <ForbidAutogrowth {...forbidAutogrowthForwardProps} />}
173+
{scope.isProject() && editableResource && <ForbidAutogrowth {...forbidAutogrowthForwardProps} />}
174174
</Stack>
175175
)}
176176
<ResourceBarBuilder

src/components/mainView/subComponents/ForbidAutogrowth.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,12 @@ const ForbidAutogrowth = (props) => {
104104
)}
105105
<p data-testid="forbidAutogrowthConfirmText">
106106
Do you want to <strong>{autogrowthForbidden ? "disable" : "enable"}</strong> Pay-As-You-Go?
107+
{autogrowthForbidden && (
108+
<div className="text-sm mt-2">
109+
Disabling will limit your available quota to either your existing commitments or your current usage,
110+
whichever value is greater. Changes to this setting typically take around 15 minutes to take effect.
111+
</div>
112+
)}
107113
</p>
108114
</Modal>
109115
</>

0 commit comments

Comments
 (0)