Merge remote-tracking branch 'origin/team' into team

This commit is contained in:
JiaJu Zhuang
2023-08-26 19:15:09 +08:00
4 changed files with 5 additions and 7 deletions

View File

@ -148,7 +148,7 @@ export const dataSourceFormConfigs: IConnectionConfig[] = [
inputType: InputType.SELECT,
labelNameCN: '环境',
labelNameEN: 'Env',
name: 'env',
name: 'environmentId',
required: true,
selects: [],
styles: {

View File

@ -77,8 +77,9 @@ export default forwardRef(function CreateConnection(props: IProps, ref: Forwarde
return t.type === backfillData.type
});
data.baseInfo.items.forEach((t: IFormItem) => {
if (t.name === 'env' && envList?.length) {
if (t.name === 'environmentId' && envList?.length) {
t.selects = envList;
t.defaultValue = envList[0].value;
}
})
return data;

View File

@ -135,10 +135,7 @@ function DataSourceManagement() {
if (JSON.stringify(connectionInfo.current) === '{}') {
return;
}
connectionInfo.current = {
...data,
environmentId: 2,
}
connectionInfo.current = data;
const isUpdate = isValid(connectionInfo?.current?.id);
const requestApi = isUpdate ? updateDataSource : createDataSource;

View File

@ -181,7 +181,7 @@ function UniversalDrawer(props: IProps) {
type: AffiliationType.TEAM_DATASOURCE,
searchType: SearchType.DATASOURCE,
title: '归属链接',
byIdKey: 'userId',
byIdKey: 'teamId',
queryListApi: getDataSourceListFromTeam,
updateListApi: updateDataSourceListFromTeam,
deleteApi: deleteDataSourceFromTeam,