Skip to content

Commit

Permalink
feature: add seatunnel menubar
Browse files Browse the repository at this point in the history
  • Loading branch information
wangqi committed Jan 6, 2024
1 parent 868c13d commit 6eb1531
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,16 @@ import {DAG_NODE} from "../shape/connector-shape";
export const BaseNode: React.FC<Props<Record<string, any>>> = ({data}) => {
const intl = useIntl();
const {startDrag} = useDnd();
let id = 0;

const handleMouseDown = (
e: React.MouseEvent<Element, MouseEvent>,
) => {
id += 1;
const handleMouseDown = (e: React.MouseEvent<Element, MouseEvent>,) => {
console.log('handleMouseDown', data)
startDrag(
{
id: id.toString(),
shape: DAG_NODE,
data: {
id: id.toString(),
label: data.title,
status: 'default',
meta: data.meta,
},
ports: data.ports,
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, {useEffect, useState} from 'react';
import React, {useEffect} from 'react';
import {useIntl} from '@umijs/max';
import {useGraphStore} from '@antv/xflow';
import {EdgeOptions, NodeOptions} from "@antv/xflow/src/types";
Expand All @@ -12,10 +12,6 @@ const InitShape: React.FC<Props<WsDiJob>> = ({data}) => {
const intl = useIntl()
const addNodes = useGraphStore((state) => state.addNodes);
const addEdges = useGraphStore((state) => state.addEdges);
const updateNode = useGraphStore((state) => state.updateNode);
const updateEdge = useGraphStore((state) => state.updateEdge);

const [wsDiJob, setWsDiJob] = useState<WsDiJob>()

useEffect(() => {
WsDiJobService.selectJobById(data.id).then((response) => {
Expand Down

0 comments on commit 6eb1531

Please sign in to comment.