File tree Expand file tree Collapse file tree 12 files changed +30
-37
lines changed
entities/connection/ui/ConnectionTypeForm/components
MutateTransferForm/components
shared/config/tanstackQuery/hooks/useInfiniteRequest Expand file tree Collapse file tree 12 files changed +30
-37
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ export const ConnectionAuthBasic = () => {
1111 return (
1212 < >
1313 { /* Hide Form.Item control, because its value is set in 'useSelectConnectionType' hook */ }
14- < Form . Item name = { [ 'auth_data' , 'type' ] } hidden />
14+ < Form . Item name = { [ 'auth_data' , 'type' ] } hidden />
1515 < Form . Item label = { t ( 'username' ) } name = { [ 'auth_data' , 'user' ] } rules = { [ { required : true } ] } >
1616 < Input size = "large" />
1717 </ Form . Item >
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ export const ConnectionAuthS3 = () => {
1111 return (
1212 < >
1313 { /* Hide Form.Item control, because its value is set in 'useSelectConnectionType' hook */ }
14- < Form . Item name = { [ 'auth_data' , 'type' ] } hidden />
14+ < Form . Item name = { [ 'auth_data' , 'type' ] } hidden />
1515 < Form . Item label = { t ( 'accessKey' ) } name = { [ 'auth_data' , 'access_key' ] } rules = { [ { required : true } ] } >
1616 < Input size = "large" />
1717 </ Form . Item >
Original file line number Diff line number Diff line change @@ -11,12 +11,8 @@ export const ConnectionAuthSamba = () => {
1111 return (
1212 < >
1313 { /* Hide Form.Item control, because its value is set in 'useSelectConnectionType' hook */ }
14- < Form . Item name = { [ 'auth_data' , 'type' ] } hidden />
15- < Form . Item
16- label = { t ( 'username' , { ns : 'auth' } ) }
17- name = { [ 'auth_data' , 'user' ] }
18- rules = { [ { required : true } ] }
19- >
14+ < Form . Item name = { [ 'auth_data' , 'type' ] } hidden />
15+ < Form . Item label = { t ( 'username' , { ns : 'auth' } ) } name = { [ 'auth_data' , 'user' ] } rules = { [ { required : true } ] } >
2016 < Input size = "large" />
2117 </ Form . Item >
2218 < Form . Item
@@ -26,11 +22,7 @@ export const ConnectionAuthSamba = () => {
2622 >
2723 < Input . Password size = "large" />
2824 </ Form . Item >
29- < Form . Item
30- label = { t ( 'samba.authType' ) }
31- name = { [ 'auth_data' , 'auth_type' ] }
32- initialValue = "NTLMv2"
33- >
25+ < Form . Item label = { t ( 'samba.authType' ) } name = { [ 'auth_data' , 'auth_type' ] } initialValue = "NTLMv2" >
3426 < Radio . Group >
3527 < Radio . Button value = "NTLMv1" > NTLMv1</ Radio . Button >
3628 < Radio . Button value = "NTLMv2" > NTLMv2</ Radio . Button >
Original file line number Diff line number Diff line change @@ -10,15 +10,15 @@ export const ConnectionHttpProtocol = () => {
1010 const formInstance = Form . useFormInstance ( ) ;
1111 Form . useWatch ( 'protocol' , formInstance ) ;
1212
13- const [ defaultPort , setDefaultPort ] = useState ( " 443" ) ;
13+ const [ defaultPort , setDefaultPort ] = useState ( ' 443' ) ;
1414
1515 const handleProtocolChange = ( e : RadioChangeEvent ) => {
1616 if ( e . target . value === 'https' ) {
17- setDefaultPort ( " 443" ) ;
17+ setDefaultPort ( ' 443' ) ;
1818 } else {
19- setDefaultPort ( "80" ) ;
19+ setDefaultPort ( '80' ) ;
2020 }
21- }
21+ } ;
2222
2323 return (
2424 < >
@@ -28,10 +28,10 @@ export const ConnectionHttpProtocol = () => {
2828 rules = { [ { required : true } ] }
2929 initialValue = "https"
3030 >
31- < Radio . Group onChange = { handleProtocolChange } >
32- < Radio . Button value = "http" > HTTP</ Radio . Button >
33- < Radio . Button value = "https" > HTTPS</ Radio . Button >
34- </ Radio . Group >
31+ < Radio . Group onChange = { handleProtocolChange } >
32+ < Radio . Button value = "http" > HTTP</ Radio . Button >
33+ < Radio . Button value = "https" > HTTPS</ Radio . Button >
34+ </ Radio . Group >
3535 </ Form . Item >
3636 < Form . Item label = { t ( 'port' ) } name = { [ 'connection_data' , 'port' ] } >
3737 < InputNumber size = "large" min = { MIN_ALLOWED_PORT } max = { MAX_ALLOWED_PORT } placeholder = { defaultPort } />
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ export const ConnectionPostgres = () => {
1717 < InputNumber size = "large" min = { MIN_ALLOWED_PORT } max = { MAX_ALLOWED_PORT } placeholder = "5432" />
1818 </ Form . Item >
1919 < Form . Item label = { t ( 'databaseName' ) } name = { [ 'connection_data' , 'database_name' ] } rules = { [ { required : true } ] } >
20- < Input size = "large" placeholder = "postgres" />
20+ < Input size = "large" placeholder = "postgres" />
2121 </ Form . Item >
2222 < ConnectionAuthBasic />
2323 </ >
Original file line number Diff line number Diff line change @@ -14,7 +14,12 @@ export const ConnectionS3 = () => {
1414 < Input size = "large" placeholder = "s3.mycompany.com" />
1515 </ Form . Item >
1616 < ConnectionHttpProtocol />
17- < Form . Item label = { t ( 's3.bucketStyle' ) } name = { [ 'connection_data' , 'bucket_style' ] } rules = { [ { required : true } ] } initialValue = "domain" >
17+ < Form . Item
18+ label = { t ( 's3.bucketStyle' ) }
19+ name = { [ 'connection_data' , 'bucket_style' ] }
20+ rules = { [ { required : true } ] }
21+ initialValue = "domain"
22+ >
1823 < Radio . Group >
1924 < Radio . Button value = "domain" > bucket.s3.mycompany.com</ Radio . Button >
2025 < Radio . Button value = "path" > s3.mycompany.com/bucket</ Radio . Button >
@@ -24,7 +29,7 @@ export const ConnectionS3 = () => {
2429 < Input size = "large" />
2530 </ Form . Item >
2631 < Form . Item label = { t ( 's3.region' ) } name = { [ 'connection_data' , 'region' ] } >
27- < Input size = "large" placeholder = "us-east-1" />
32+ < Input size = "large" placeholder = "us-east-1" />
2833 </ Form . Item >
2934 < ConnectionAuthS3 />
3035 </ >
Original file line number Diff line number Diff line change @@ -7,19 +7,19 @@ import { ConnectionAuthSamba } from '../ConnectionAuthSamba';
77
88export const ConnectionSamba = ( ) => {
99 const { t } = useTranslation ( 'connection' ) ;
10-
10+
1111 const formInstance = Form . useFormInstance ( ) ;
1212 Form . useWatch ( 'protocol' , formInstance ) ;
1313
14- const [ defaultPort , setDefaultPort ] = useState ( " 445" ) ;
14+ const [ defaultPort , setDefaultPort ] = useState ( ' 445' ) ;
1515
1616 const handleProtocolChange = ( e : RadioChangeEvent ) => {
1717 if ( e . target . value === 'SMB' ) {
18- setDefaultPort ( " 445" ) ;
18+ setDefaultPort ( ' 445' ) ;
1919 } else {
20- setDefaultPort ( " 139" ) ;
20+ setDefaultPort ( ' 139' ) ;
2121 }
22- }
22+ } ;
2323
2424 return (
2525 < >
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ export const ConnectionWebdav = () => {
1313 < Form . Item label = { t ( 'host' ) } name = { [ 'connection_data' , 'host' ] } rules = { [ { required : true } ] } >
1414 < Input size = "large" placeholder = "myserver.mycompany.com" />
1515 </ Form . Item >
16- < ConnectionHttpProtocol />
16+ < ConnectionHttpProtocol />
1717 < ConnectionAuthBasic />
1818 </ >
1919 ) ;
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ export const SourceParams = memo(({ groupId }: SourceParamsProps) => {
3434 placeholder = { t ( 'selectSourceConnection' , { ns : 'transfer' } ) }
3535 />
3636 </ Form . Item >
37- < Form . Item name = { [ 'source_params' , 'type' ] } hidden />
37+ < Form . Item name = { [ 'source_params' , 'type' ] } hidden />
3838 { TRANSFER_SOURCE_CONNECTION_TYPE_COMPONENT [ selectedConnectionType ! ] }
3939 </ >
4040 ) ;
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ export const TargetParams = memo(({ groupId }: TargetParamsProps) => {
3434 placeholder = { t ( 'selectTargetConnection' , { ns : 'transfer' } ) }
3535 />
3636 </ Form . Item >
37- < Form . Item name = { [ 'target_params' , 'type' ] } hidden />
37+ < Form . Item name = { [ 'target_params' , 'type' ] } hidden />
3838 { TRANSFER_TARGET_CONNECTION_TYPE_COMPONENT [ selectedConnectionType ! ] }
3939 </ >
4040 ) ;
You can’t perform that action at this time.
0 commit comments