fix: display image menu

This commit is contained in:
jialin
2025-11-10 10:07:25 +08:00
parent 0077d109e7
commit 285e274818
25 changed files with 91 additions and 86 deletions
+3 -3
View File
@@ -38,13 +38,13 @@ const CatalogForm: React.FC = () => {
key="quantization"
rules={[
{
required: true,
message: getRuleMessage('select', 'models.form.quantization', false)
required: false,
message: getRuleMessage('select', 'models.catalog.precision', false)
}
]}
>
<SealInput.Input
label={intl.formatMessage({ id: 'models.form.quantization' })}
label={intl.formatMessage({ id: 'models.catalog.precision' })}
disabled
></SealInput.Input>
</Form.Item>
+11 -1
View File
@@ -238,12 +238,16 @@ const DataForm: React.FC<DataFormProps> = forwardRef((props, ref) => {
onOk(allValues);
};
const handleClusterChange = (value: number) => {
const handleClusterChange = async (value: number) => {
getGPUOptionList({ clusterId: value });
getBackendOptions({ cluster_id: value });
if (scheduleType === ScheduleValueMap.Manual) {
form.setFieldValue(['gpu_selector', 'gpu_ids'], []);
}
await new Promise((resolve) => {
setTimeout(resolve, 150);
});
onValuesChange?.({}, form.getFieldsValue());
};
const getFieldPaths = (obj: Record<string, any>, prefix = ''): string => {
@@ -259,6 +263,12 @@ const DataForm: React.FC<DataFormProps> = forwardRef((props, ref) => {
return result[0] || '';
};
/**
* auto check compatibility or notify recreate when certain fields change
* @param changedValues
* @param allValues
* @returns
*/
const handleOnValuesChange = async (changedValues: any, allValues: any) => {
const fieldName = getFieldPaths(changedValues);