-
Notifications
You must be signed in to change notification settings - Fork 337
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #130 from jojocys/master
doc: update info
- Loading branch information
Showing
7 changed files
with
214 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Flask==2.0.3 | ||
SQLAlchemy==1.4.41 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
packages/rath-client/src/pages/dataSource/selection/database/customConfig.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import { TextField, Stack, PrimaryButton, DefaultButton } from '@fluentui/react'; | ||
import React, { useCallback, useEffect, useState } from 'react'; | ||
import intl from 'react-intl-universal'; | ||
import { getConnectorServiceInfo, setConnectorServiceInfo } from './api'; | ||
|
||
interface CustomConfigProps { | ||
ping: () => void; | ||
} | ||
const CustomConfig: React.FC<CustomConfigProps> = props => { | ||
const { ping } = props; | ||
const [show, setShow] = useState<boolean>(false); | ||
const [serviceInfo, setServiceInfo] = useState(''); | ||
useEffect(() => { | ||
setServiceInfo(getConnectorServiceInfo()); | ||
}, []) | ||
const serviceInfoHandler = useCallback(() => { | ||
setConnectorServiceInfo(serviceInfo); | ||
ping(); | ||
}, [serviceInfo, ping]) | ||
return <div style={{ margin: '1em 0em' }}> | ||
<DefaultButton | ||
text={intl.get('dataSource.connectorConfig')} | ||
onClick={() => { | ||
setShow(v => !v) | ||
}} | ||
iconProps={{ iconName: 'Settings' }} | ||
/> | ||
{ | ||
show && <Stack horizontal verticalAlign='end' tokens={{ childrenGap: '6px' }}> | ||
<TextField | ||
style={{ width: '260px' }} | ||
label={intl.get('dataSource.connectorService')} | ||
value={serviceInfo} | ||
onChange={(e, val) => { | ||
setServiceInfo(val + '') | ||
}} | ||
/> | ||
<PrimaryButton | ||
text={intl.get('dataSource.apply')} | ||
onClick={serviceInfoHandler} | ||
/> | ||
</Stack> | ||
} | ||
</div> | ||
} | ||
|
||
export default CustomConfig; |
Oops, something went wrong.