Skip to content
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

[UI] EVEREST-1677 Fix condition for displaying resource limit #1066

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
sx={{ whiteSpace: 'nowrap' }}
color={theme.palette.text.secondary}
>{`x ${numberOfUnits} ${+numberOfUnits > 1 ? unitPlural : unit}`}</Typography>
{value && numberOfUnits && (
{!!value && numberOfUnits && (
<Typography
variant="body1"
sx={{ whiteSpace: 'nowrap' }}
Expand Down Expand Up @@ -189,7 +189,7 @@
}
setValue(memoryInputName, sizeOptions[resourceSizePerUnit].memory);
}
}, [resourceSizePerUnit, allowDiskInputUpdate, setValue]);

Check warning on line 192 in ui/apps/everest/src/components/cluster-form/resources/resources.tsx

View workflow job for this annotation

GitHub Actions / CI_checks (lint)

React Hook useEffect has missing dependencies: 'cpuInputName', 'diskInputName', 'memoryInputName', and 'sizeOptions'. Either include them or remove the dependency array

useEffect(() => {
if (diskCapacityExceeded) {
Expand All @@ -197,7 +197,7 @@
} else {
clearErrors(diskInputName);
}
}, [diskCapacityExceeded, clearErrors, setError]);

Check warning on line 200 in ui/apps/everest/src/components/cluster-form/resources/resources.tsx

View workflow job for this annotation

GitHub Actions / CI_checks (lint)

React Hook useEffect has a missing dependency: 'diskInputName'. Either include it or remove the dependency array

useEffect(() => {
if (
Expand All @@ -206,7 +206,7 @@
) {
setValue(resourceSizePerUnitInputName, ResourceSize.custom);
}
}, [cpu, setValue]);

Check warning on line 209 in ui/apps/everest/src/components/cluster-form/resources/resources.tsx

View workflow job for this annotation

GitHub Actions / CI_checks (lint)

React Hook useEffect has missing dependencies: 'resourceSizePerUnit', 'resourceSizePerUnitInputName', and 'sizeOptions'. Either include them or remove the dependency array

useEffect(() => {
if (
Expand All @@ -216,7 +216,7 @@
) {
setValue(resourceSizePerUnitInputName, ResourceSize.custom);
}
}, [disk, allowDiskInputUpdate, setValue]);

Check warning on line 219 in ui/apps/everest/src/components/cluster-form/resources/resources.tsx

View workflow job for this annotation

GitHub Actions / CI_checks (lint)

React Hook useEffect has missing dependencies: 'resourceSizePerUnit', 'resourceSizePerUnitInputName', and 'sizeOptions'. Either include them or remove the dependency array

useEffect(() => {
if (
Expand All @@ -225,7 +225,7 @@
) {
setValue(resourceSizePerUnitInputName, ResourceSize.custom);
}
}, [memory, setValue]);

Check warning on line 228 in ui/apps/everest/src/components/cluster-form/resources/resources.tsx

View workflow job for this annotation

GitHub Actions / CI_checks (lint)

React Hook useEffect has missing dependencies: 'resourceSizePerUnit', 'resourceSizePerUnitInputName', and 'sizeOptions'. Either include them or remove the dependency array

return (
<FormGroup sx={{ mt: 3 }}>
Expand Down
Loading