Skip to content

Commit f88674e

Browse files
committed
Change connection fields ordering
1 parent 05a3ad3 commit f88674e

File tree

8 files changed

+40
-40
lines changed

8 files changed

+40
-40
lines changed

src/entities/connection/ui/ConnectionTypeForm/components/ConnectionClickhouse/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ export const ConnectionClickhouse = () => {
1010

1111
return (
1212
<>
13-
<Form.Item label={t('databaseName')} name={['connection_data', 'database_name']}>
14-
<Input size="large" />
15-
</Form.Item>
1613
<Form.Item label={t('host')} name={['connection_data', 'host']} rules={[{ required: true }]}>
1714
<Input size="large" />
1815
</Form.Item>
1916
<Form.Item label={t('port')} name={['connection_data', 'port']}>
2017
<InputNumber size="large" min={MIN_ALLOWED_PORT} max={MAX_ALLOWED_PORT} />
2118
</Form.Item>
19+
<Form.Item label={t('databaseName')} name={['connection_data', 'database_name']}>
20+
<Input size="large" />
21+
</Form.Item>
2222
<ConnectionAuthBasic />
2323
</>
2424
);

src/entities/connection/ui/ConnectionTypeForm/components/ConnectionMsSql/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ export const ConnectionMsSql = () => {
1010

1111
return (
1212
<>
13-
<Form.Item label={t('databaseName')} name={['connection_data', 'database_name']} rules={[{ required: true }]}>
14-
<Input size="large" />
15-
</Form.Item>
1613
<Form.Item label={t('host')} name={['connection_data', 'host']} rules={[{ required: true }]}>
1714
<Input size="large" />
1815
</Form.Item>
1916
<Form.Item label={t('port')} name={['connection_data', 'port']}>
2017
<InputNumber size="large" min={MIN_ALLOWED_PORT} max={MAX_ALLOWED_PORT} />
2118
</Form.Item>
19+
<Form.Item label={t('databaseName')} name={['connection_data', 'database_name']} rules={[{ required: true }]}>
20+
<Input size="large" />
21+
</Form.Item>
2222
<ConnectionAuthBasic />
2323
</>
2424
);

src/entities/connection/ui/ConnectionTypeForm/components/ConnectionMySql/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ export const ConnectionMySql = () => {
1010

1111
return (
1212
<>
13-
<Form.Item label={t('databaseName')} name={['connection_data', 'database_name']} rules={[{ required: true }]}>
14-
<Input size="large" />
15-
</Form.Item>
1613
<Form.Item label={t('host')} name={['connection_data', 'host']} rules={[{ required: true }]}>
1714
<Input size="large" />
1815
</Form.Item>
1916
<Form.Item label={t('port')} name={['connection_data', 'port']}>
2017
<InputNumber size="large" min={MIN_ALLOWED_PORT} max={MAX_ALLOWED_PORT} />
2118
</Form.Item>
19+
<Form.Item label={t('databaseName')} name={['connection_data', 'database_name']} rules={[{ required: true }]}>
20+
<Input size="large" />
21+
</Form.Item>
2222
<ConnectionAuthBasic />
2323
</>
2424
);

src/entities/connection/ui/ConnectionTypeForm/components/ConnectionPostgres/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ export const ConnectionPostgres = () => {
1010

1111
return (
1212
<>
13-
<Form.Item label={t('databaseName')} name={['connection_data', 'database_name']} rules={[{ required: true }]}>
14-
<Input size="large" />
15-
</Form.Item>
1613
<Form.Item label={t('host')} name={['connection_data', 'host']} rules={[{ required: true }]}>
1714
<Input size="large" />
1815
</Form.Item>
1916
<Form.Item label={t('port')} name={['connection_data', 'port']}>
2017
<InputNumber size="large" min={MIN_ALLOWED_PORT} max={MAX_ALLOWED_PORT} />
2118
</Form.Item>
19+
<Form.Item label={t('databaseName')} name={['connection_data', 'database_name']} rules={[{ required: true }]}>
20+
<Input size="large" />
21+
</Form.Item>
2222
<ConnectionAuthBasic />
2323
</>
2424
);

src/entities/connection/ui/ConnectionTypeForm/components/ConnectionS3/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ export const ConnectionS3 = () => {
1818
<Form.Item label={t('protocol')} name={['connection_data', 'protocol']}>
1919
<Select size="large" options={CONNECTION_PROTOCOL_SELECT_OPTIONS} placeholder={t('selectProtocol')} />
2020
</Form.Item>
21+
<Form.Item label={t('port')} name={['connection_data', 'port']}>
22+
<InputNumber size="large" min={MIN_ALLOWED_PORT} max={MAX_ALLOWED_PORT} />
23+
</Form.Item>
2124
<Form.Item label={t('s3.bucketStyle')} name={['connection_data', 'bucket_style']}>
2225
<Select size="large" options={CONNECTION_BUCKET_STYLE_SELECT_OPTIONS} placeholder={t('s3.selectBucketStyle')} />
2326
</Form.Item>
2427
<Form.Item label={t('s3.bucket')} name={['connection_data', 'bucket']} rules={[{ required: true }]}>
2528
<Input size="large" />
2629
</Form.Item>
27-
<Form.Item label={t('port')} name={['connection_data', 'port']}>
28-
<InputNumber size="large" min={MIN_ALLOWED_PORT} max={MAX_ALLOWED_PORT} />
29-
</Form.Item>
3030
<Form.Item label={t('s3.region')} name={['connection_data', 'region']}>
3131
<Input size="large" />
3232
</Form.Item>

src/entities/connection/ui/ConnectionTypeForm/components/ConnectionSamba/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ export const ConnectionSamba = () => {
1616
<Form.Item label={t('host')} name={['connection_data', 'host']} rules={[{ required: true }]}>
1717
<Input size="large" />
1818
</Form.Item>
19-
<Form.Item label={t('samba.share')} name={['connection_data', 'share']} rules={[{ required: true }]}>
20-
<Input size="large" />
21-
</Form.Item>
2219
<Form.Item label={t('protocol')} name={['connection_data', 'protocol']}>
2320
<Select size="large" options={CONNECTION_SAMBA_PROTOCOL_SELECT_OPTIONS} placeholder={t('selectProtocol')} />
2421
</Form.Item>
2522
<Form.Item label={t('port')} name={['connection_data', 'port']}>
2623
<InputNumber size="large" min={MIN_ALLOWED_PORT} max={MAX_ALLOWED_PORT} />
2724
</Form.Item>
25+
<Form.Item label={t('samba.share')} name={['connection_data', 'share']} rules={[{ required: true }]}>
26+
<Input size="large" />
27+
</Form.Item>
2828
<Form.Item label={t('samba.domain')} name={['connection_data', 'domain']}>
2929
<Input size="large" />
3030
</Form.Item>

src/features/connection/ConnectionDetailInfo/utils/getConnectionData/index.ts

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,6 @@ export const getConnectionData = (connection: Connection, t: TFunction<'connecti
4141
label: t('host'),
4242
content: connection_data.host,
4343
},
44-
{
45-
label: t('samba.share'),
46-
content: connection_data.share,
47-
},
4844
{
4945
label: t('protocol'),
5046
content: connection_data.protocol,
@@ -53,17 +49,17 @@ export const getConnectionData = (connection: Connection, t: TFunction<'connecti
5349
label: t('port'),
5450
content: connection_data.port || '',
5551
},
52+
{
53+
label: t('samba.share'),
54+
content: connection_data.share,
55+
},
5656
{
5757
label: t('samba.domain'),
5858
content: connection_data.domain,
5959
},
6060
];
6161
case ConnectionType.ORACLE:
6262
return [
63-
{
64-
label: connection_data.service_name ? t('oracle.serviceName') : t('oracle.sid'),
65-
content: connection_data.service_name || connection_data.sid,
66-
},
6763
{
6864
label: t('host'),
6965
content: connection_data.host,
@@ -72,16 +68,16 @@ export const getConnectionData = (connection: Connection, t: TFunction<'connecti
7268
label: t('port'),
7369
content: connection_data.port,
7470
},
71+
{
72+
label: connection_data.service_name ? t('oracle.serviceName') : t('oracle.sid'),
73+
content: connection_data.service_name || connection_data.sid,
74+
},
7575
];
7676
case ConnectionType.POSTGRES:
7777
case ConnectionType.CLICKHOUSE:
7878
case ConnectionType.MYSQL:
7979
case ConnectionType.MSSQL:
8080
return [
81-
{
82-
label: t('databaseName'),
83-
content: connection_data.database_name || '',
84-
},
8581
{
8682
label: t('host'),
8783
content: connection_data.host,
@@ -90,21 +86,17 @@ export const getConnectionData = (connection: Connection, t: TFunction<'connecti
9086
label: t('port'),
9187
content: connection_data.port,
9288
},
89+
{
90+
label: t('databaseName'),
91+
content: connection_data.database_name || '',
92+
},
9393
];
9494
case ConnectionType.S3:
9595
return [
9696
{
9797
label: t('host'),
9898
content: connection_data.host,
9999
},
100-
{
101-
label: t('s3.bucketStyle'),
102-
content: connection_data.bucket_style,
103-
},
104-
{
105-
label: t('s3.bucket'),
106-
content: connection_data.bucket,
107-
},
108100
{
109101
label: t('protocol'),
110102
content: connection_data.protocol,
@@ -113,6 +105,14 @@ export const getConnectionData = (connection: Connection, t: TFunction<'connecti
113105
label: t('port'),
114106
content: connection_data.port || '',
115107
},
108+
{
109+
label: t('s3.bucketStyle'),
110+
content: connection_data.bucket_style,
111+
},
112+
{
113+
label: t('s3.bucket'),
114+
content: connection_data.bucket,
115+
},
116116
{
117117
label: t('s3.region'),
118118
content: connection_data.region || '',

src/shared/config/i18n/translations/en.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@
6363
"databaseName": "Database name",
6464
"cluster": "Cluster",
6565
"oracle": {
66-
"sid": "Sid",
66+
"sid": "SID",
6767
"serviceName": "Service name",
68-
"serviceNameOrSidRequired": "Either Service name or Sid is required"
68+
"serviceNameOrSidRequired": "Either Service Name or SID is required"
6969
},
7070
"s3": {
7171
"bucketStyle": "Bucket style",

0 commit comments

Comments
 (0)