Skip to content

Commit

Permalink
fix datasource bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Zzm0809 committed Oct 16, 2023
1 parent c7006f6 commit 683c351
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ const MetaData = (props: any) => {
submitter={false}
>
<ProFormSelect
style={{ paddingInline: 10 }}
style={{ paddingInline: 6 }}
// width={leftContainer.width }
width={'xl'}
// addonAfter={<ReloadOutlined spin={isLoadingDatabase} title={l('button.refresh')} onClick={() => refreshDataBase()} />}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,11 @@ const DiffModal: React.FC<DiffModalProps> = (props) => {
{l('pages.datastudio.sql.sqlChanged')}-{fileName}
</div>
}
maskClosable={false}
onCancel={() => onUse(false)}
open={open}
footer={null}
width={'60%'}
width={'75%'}
>
<div style={{ margin: '10px 0' }}>
<Text>{l('pages.datastudio.sql.sqlChangedPrompt')}</Text>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,14 @@ import {
} from '@/pages/RegCenter/DataSource/components/constants';
import { DataSources } from '@/types/RegCenter/data.d';
import { l } from '@/utils/intl';
import { ProForm, ProFormGroup, ProFormSelect, ProFormText } from '@ant-design/pro-components';
import { AutoComplete, Input } from 'antd';
import {
ProForm,
ProFormGroup,
ProFormSelect,
ProFormText,
ProFormTextArea
} from '@ant-design/pro-components';
import { AutoComplete } from 'antd';
import { FormInstance } from 'antd/es/form/hooks/useForm';
import { Values } from 'async-validator';
import React, { useState } from 'react';
Expand Down Expand Up @@ -116,19 +122,29 @@ const DataSourceProForm: React.FC<DataSourceProFormProps> = (props) => {

<ProForm.Group>
<AutoComplete
virtual
size={'small'}
placement={'topLeft'}
autoClearSearchValue
options={AUTO_COMPLETE_TYPE}
onSelect={(value) => form.setFieldsValue({ url: value })}
style={{
width: parent.innerWidth / 2 - 80,
minHeight: parent.innerHeight / 4 - 110,
marginBottom: 0
}}
filterOption
onSelect={(value) => form && form.setFieldsValue({ url: value })}
>
<ProForm.Item
<ProFormTextArea
name='url'
width={parent.innerWidth / 2 - 80}
label={l('rc.ds.url')}
rules={[{ required: true, message: l('rc.ds.urlPlaceholder') }]}
>
<Input.TextArea rows={3} cols={130} placeholder={l('rc.ds.urlPlaceholder')} />
</ProForm.Item>
placeholder={l('rc.ds.urlPlaceholder')}
/>
</AutoComplete>
</ProForm.Group>
<br />

{!excludeFormItem && (
<ProFormGroup>
<ProForm.Item
Expand Down

0 comments on commit 683c351

Please sign in to comment.