fix(UI): add resourse quota warning is consumed 100% [EE-6508] (#10914)

* add resourse quota warning is consumed 100%

* address review comments
pull/10919/head
Prabhat Khera 11 months ago committed by GitHub
parent 317eec2790
commit 98157350b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -57,13 +57,24 @@ export function ResourceQuotaFormSection({
<div className="flex flex-row">
<FormSectionTitle>Resource Limits</FormSectionTitle>
</div>
{(!cpuLimit || !memoryLimit) && (
<FormError>
Not enough resources available in the cluster to apply a resource
reservation.
</FormError>
)}
{/* keep the FormError component present, but invisible to avoid layout shift */}
<FormError
className={typeof errors === 'string' ? 'visible' : 'invisible'}
>
{/* 'error' keeps the formerror the exact same height while hidden so there is no layout shift */}
{typeof errors === 'string' ? errors : 'error'}
</FormError>
{cpuLimit && memoryLimit ? (
<FormError
className={typeof errors === 'string' ? 'visible' : 'invisible'}
>
{/* 'error' keeps the formerror the exact same height while hidden so there is no layout shift */}
{typeof errors === 'string' ? errors : 'error'}
</FormError>
) : null}
<FormControl
className="flex flex-row"
label="Memory limit (MB)"

Loading…
Cancel
Save