1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-24 15:59:41 +02:00

fix(UI): add resourse quota warning is consumed 100% [EE-6508] (#10914)
Some checks are pending
ci / build_images (map[arch:amd64 platform:linux]) (push) Waiting to run
ci / build_images (map[arch:amd64 platform:windows version:1809]) (push) Waiting to run
ci / build_images (map[arch:amd64 platform:windows version:ltsc2022]) (push) Waiting to run
ci / build_images (map[arch:arm64 platform:linux]) (push) Waiting to run
ci / build_manifests (push) Blocked by required conditions
/ triage (push) Waiting to run
Lint / Run linters (push) Waiting to run
Test / test-server (map[arch:amd64 platform:windows version:1809]) (push) Waiting to run
Test / test-server (map[arch:amd64 platform:windows version:ltsc2022]) (push) Waiting to run
Test / test-server (map[arch:arm64 platform:linux]) (push) Waiting to run
Test / test-client (push) Waiting to run
Test / test-server (map[arch:amd64 platform:linux]) (push) Waiting to run

* add resourse quota warning is consumed 100%

* address review comments
This commit is contained in:
Prabhat Khera 2024-01-08 13:49:57 +13:00 committed by GitHub
parent 317eec2790
commit 98157350b6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)"