mirror of https://github.com/portainer/portainer
fix(UI): add resourse quota warning is consumed 100% [EE-6508] (#10914)
* add resourse quota warning is consumed 100% * address review commentspull/10919/head
parent
317eec2790
commit
98157350b6
|
@ -57,13 +57,24 @@ export function ResourceQuotaFormSection({
|
||||||
<div className="flex flex-row">
|
<div className="flex flex-row">
|
||||||
<FormSectionTitle>Resource Limits</FormSectionTitle>
|
<FormSectionTitle>Resource Limits</FormSectionTitle>
|
||||||
</div>
|
</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 */}
|
{/* keep the FormError component present, but invisible to avoid layout shift */}
|
||||||
|
{cpuLimit && memoryLimit ? (
|
||||||
<FormError
|
<FormError
|
||||||
className={typeof errors === 'string' ? 'visible' : 'invisible'}
|
className={typeof errors === 'string' ? 'visible' : 'invisible'}
|
||||||
>
|
>
|
||||||
{/* 'error' keeps the formerror the exact same height while hidden so there is no layout shift */}
|
{/* 'error' keeps the formerror the exact same height while hidden so there is no layout shift */}
|
||||||
{typeof errors === 'string' ? errors : 'error'}
|
{typeof errors === 'string' ? errors : 'error'}
|
||||||
</FormError>
|
</FormError>
|
||||||
|
) : null}
|
||||||
|
|
||||||
<FormControl
|
<FormControl
|
||||||
className="flex flex-row"
|
className="flex flex-row"
|
||||||
label="Memory limit (MB)"
|
label="Memory limit (MB)"
|
||||||
|
|
Loading…
Reference in New Issue