-
Notifications
You must be signed in to change notification settings - Fork 17
Add min/max GPUs to edit tool dialog #645
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
base: main
Are you sure you want to change the base?
Conversation
slr71
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't catch any issues. 👍
| maxDiskSpace={maxDiskSpace} | ||
| maxCPUCore={maxCPUCore} | ||
| maxMemory={maxMemory} | ||
| maxGPU={maxGPU} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This still needs to be destructred from props at the top of this EditToolForm component.
If this were a Typescript file, it probably would have been caught at compile-time 😖
|
|
||
| const gpu_limit = getIn(values, "container.max_gpus"); | ||
| if (gpu_limit > 0 && value > gpu_limit) { | ||
| return t("validationErrMinGpusGreaterThanMax"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This i18n message needs to be added to public/static/locales/en/tools.json.
|
|
||
| const min_gpu_limit = getIn(values, "container.min_gpus"); | ||
| if (0 < value && value < min_gpu_limit) { | ||
| return t("validationErrMaxGpusLessThanMin"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This i18n message needs to be added to public/static/locales/en/tools.json.
| {isAdmin && ( | ||
| <Field | ||
| name="container.min_gpus" | ||
| label={t("minGpus")} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This i18n message needs to be added to public/static/locales/en/tools.json.
| )} | ||
| <Field | ||
| name="container.max_gpus" | ||
| label={t("gpuLimit")} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This i18n message needs to be added to public/static/locales/en/tools.json.
Putting this up now. I need to test it a bit more and of course there's the user-facing side to do as well, but it's the last day before break anyway, so I may as well put what I have up.