fix: pick backend_parameter, env, backend_version from spec in catalog

This commit is contained in:
jialin
2025-06-27 16:38:19 +08:00
parent 5861508153
commit 47a5ef915b
9 changed files with 70 additions and 41 deletions
@@ -25,6 +25,8 @@ import ColumnWrapper from './column-wrapper';
import CompatibilityAlert from './compatible-alert';
import DataForm from './data-form';
const pickFieldsFromSpec = ['backend_version', 'backend_parameters', 'env'];
type AddModalProps = {
title: string;
action: PageActionType;
@@ -202,7 +204,7 @@ const AddModal: React.FC<AddModalProps> = (props) => {
});
selectSpecRef.current = spec;
return {
..._.omit(spec, ['name']),
..._.pick(spec, pickFieldsFromSpec),
categories: _.get(current, 'categories.0', null)
};
};