-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DOP-22354] add Transfer canvas (#66)
* [DOP-22354] add Transfer canvas * [DOP-22354] fix after review --------- Co-authored-by: Zabilsya <kvcherniko@mts.ru>
- Loading branch information
Showing
65 changed files
with
578 additions
and
47 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,10 @@ | ||
import S3Icon from './s3.svg'; | ||
import ClickhouseIcon from './clickhouse.svg'; | ||
import HdfsIcon from './hdfs.svg'; | ||
import HiveIcon from './hive.svg'; | ||
import MssqlIcon from './mssql.svg'; | ||
import MysqlIcon from './mysql.svg'; | ||
import OracleIcon from './oracle.svg'; | ||
import PostgresIcon from './postgres.svg'; | ||
|
||
export { ClickhouseIcon, HdfsIcon, HiveIcon, MssqlIcon, MysqlIcon, OracleIcon, PostgresIcon, S3Icon }; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
3 changes: 2 additions & 1 deletion
3
src/entities/connection/ui/ConnectionTypeForm/components/ConnectionS3/index.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
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
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
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
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
30 changes: 28 additions & 2 deletions
30
src/features/transfer/MutateTransferForm/components/SourceParamsNode/SourceParamsNode.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 |
---|---|---|
@@ -1,9 +1,35 @@ | ||
import React from 'react'; | ||
import React, { useMemo } from 'react'; | ||
import { CanvasNode } from '@shared/ui'; | ||
import { Handle, Position } from '@xyflow/react'; | ||
import { Form } from 'antd'; | ||
import { CONNECTION_ICONS } from '@entities/connection'; | ||
import { ConnectionType } from '@shared/types'; | ||
|
||
import { SourceParams } from '../SourceParams'; | ||
import { TransferCanvasEdge } from '../TransferConnectionsCanvas'; | ||
|
||
import { SourceParamsNodeProps } from './types'; | ||
import classes from './styles.module.less'; | ||
|
||
export const SourceParamsNode = ({ data }: SourceParamsNodeProps) => { | ||
return <SourceParams groupId={data.groupId} initialSourceConnectionType={data.initialSourceConnectionType} />; | ||
const connectionType = Form.useWatch<ConnectionType>(['source_params', 'type']); | ||
|
||
const icon = useMemo(() => { | ||
return CONNECTION_ICONS[connectionType]; | ||
}, [connectionType]); | ||
|
||
const children = useMemo(() => { | ||
return ( | ||
<> | ||
<SourceParams groupId={data.groupId} initialSourceConnectionType={data.initialSourceConnectionType} /> | ||
<Handle type="source" position={Position.Right} id={TransferCanvasEdge.SOURCE} /> | ||
</> | ||
); | ||
}, [data.groupId, data.initialSourceConnectionType]); | ||
|
||
return ( | ||
<CanvasNode className={classes.root} title="Source" icon={icon}> | ||
{children} | ||
</CanvasNode> | ||
); | ||
}; |
3 changes: 3 additions & 0 deletions
3
src/features/transfer/MutateTransferForm/components/SourceParamsNode/styles.module.less
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,3 @@ | ||
.root { | ||
width: 300px; | ||
} |
4 changes: 2 additions & 2 deletions
4
src/features/transfer/MutateTransferForm/components/SourceParamsNode/types.ts
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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import { Node, NodeProps } from '@xyflow/react'; | ||
|
||
import { SourceParamsProps } from '../SourceParams'; | ||
import { TransferCanvasNode } from '../TransferConnectionsCanvas'; | ||
|
||
//TODO: [DOP-22354] change 'sourceParams' to NodeType.SOURCE | ||
export interface SourceParamsNodeData extends Node<SourceParamsProps, 'sourceParams'> {} | ||
export interface SourceParamsNodeData extends Node<SourceParamsProps, TransferCanvasNode.SOURCE> {} | ||
|
||
export interface SourceParamsNodeProps extends NodeProps<SourceParamsNodeData> {} |
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
Oops, something went wrong.