mirror of
https://github.com/portainer/portainer.git
synced 2025-07-23 15:29:42 +02:00
fix(app): get min resource limits [EE-6567] (#10994)
Co-authored-by: testa113 <testa113>
This commit is contained in:
parent
b81babe682
commit
77c38306b2
4 changed files with 13 additions and 2 deletions
|
@ -15,6 +15,8 @@ type Props = {
|
|||
errors: FormikErrors<ResourceQuotaFormValues>;
|
||||
namespaceHasQuota: boolean;
|
||||
resourceQuotaCapacityExceeded: boolean;
|
||||
minMemoryLimit: number;
|
||||
minCpuLimit: number;
|
||||
maxMemoryLimit: number;
|
||||
maxCpuLimit: number;
|
||||
};
|
||||
|
@ -25,6 +27,8 @@ export function ResourceReservationFormSection({
|
|||
errors,
|
||||
namespaceHasQuota,
|
||||
resourceQuotaCapacityExceeded,
|
||||
minMemoryLimit,
|
||||
minCpuLimit,
|
||||
maxMemoryLimit,
|
||||
maxCpuLimit,
|
||||
}: Props) {
|
||||
|
@ -52,6 +56,7 @@ export function ResourceReservationFormSection({
|
|||
<SliderWithInput
|
||||
value={Number(values.memoryLimit) ?? 0}
|
||||
onChange={(value) => onChange({ ...values, memoryLimit: value })}
|
||||
min={minMemoryLimit}
|
||||
max={maxMemoryLimit}
|
||||
step={128}
|
||||
dataCy="k8sAppCreate-memoryLimit"
|
||||
|
@ -79,7 +84,7 @@ export function ResourceReservationFormSection({
|
|||
)
|
||||
}
|
||||
value={values.cpuLimit}
|
||||
min={0}
|
||||
min={minCpuLimit}
|
||||
max={maxCpuLimit}
|
||||
step={0.1}
|
||||
dataCy="k8sAppCreate-cpuLimitSlider"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue