Browse Source

bug修复

Leo 2 years ago
parent
commit
970bae3cb0

File diff suppressed because it is too large
+ 0 - 0
demo1.dag


File diff suppressed because it is too large
+ 0 - 0
demo2.dag


+ 2 - 2
packages/filebrowser/src/api/config.ts

@@ -1,6 +1,6 @@
 const config = {
-  endpoint: 'http://aihub-dag-test.digitalyili.com'
-  // endpoint: 'http://192.168.199.107:18082'
+  // endpoint: 'http://aihub-dag-test.digitalyili.com'
+  endpoint: 'http://192.168.199.107:18082'
 };
 
 export default config;

+ 2 - 2
packages/jldbq-extenison/src/api/config.ts

@@ -1,6 +1,6 @@
 const config = {
-  endpoint: 'http://aihub-dag-test.digitalyili.com'
-  // endpoint: 'http://192.168.199.107:18082'
+  // endpoint: 'http://aihub-dag-test.digitalyili.com'
+  endpoint: 'http://192.168.199.107:18082'
 };
 
 export default config;

+ 5 - 2
packages/yili-dag/src/AlgoNode.tsx

@@ -42,7 +42,7 @@ export default class AlgoNode extends React.Component<{ node?: Node }> {
   render() {
     const { node } = this.props;
     const data = node?.getData() as NodeStatus;
-    const { label, status = 'default', type } = data;
+    const { label, status = 'default', type, nodeName = '' } = data;
 
     return (
       <div className={`node ${status}`}>
@@ -53,7 +53,10 @@ export default class AlgoNode extends React.Component<{ node?: Node }> {
         {type === 'outputsource' && (
           <img src={image.outputLogo} alt="outputLogo" />
         )}
-        <span className="label">{label}</span>
+        <div className="label">
+          <div>{label}</div>
+          <div className="node_name">{nodeName}</div>
+        </div>
         <div className="status">
           {status === 'undone' && <img src={image.undoneNode} alt="未执行" />}
           {status === 'success' && (

+ 17 - 6
packages/yili-dag/src/Dag.tsx

@@ -116,7 +116,7 @@ Graph.registerNode(
   {
     inherit: 'react-shape',
     width: 180,
-    height: 36,
+    height: 50,
     component: <AlgoNode />,
     portMarkup: [Markup.getForeignObjectMarkup()],
     ports: {
@@ -210,7 +210,8 @@ export default class Dag extends React.Component<any, any> {
       nodeTableCol: [],
       nodeTablePins: [],
       selectedPin: 0,
-      filename: ''
+      filename: '',
+      currentDblNode: ''
     };
   }
 
@@ -542,7 +543,10 @@ export default class Dag extends React.Component<any, any> {
       'node:dblclick',
       (args: { cell: Cell; node: Node; options: Model.SetOptions }) => {
         const nodeData = args.cell.data;
-        this.setState({ selectedNodeData: nodeData });
+        this.setState({
+          currentDblNode: args.node,
+          selectedNodeData: nodeData
+        });
         this.showNodeInfo();
       }
     );
@@ -638,7 +642,7 @@ export default class Dag extends React.Component<any, any> {
     });
     stencil.resizeGroup('customScript', {
       width: 200,
-      height: customScriptNodes.length * 60
+      height: customScriptNodes.length * 80
     });
 
     // 设置图
@@ -851,18 +855,25 @@ export default class Dag extends React.Component<any, any> {
           >
             {/* 数据源节点 */}
             {this.state.selectedNodeData?.type === 'datasource' && (
-              <DatasourceNodeInfo nodeInfo={this.state.selectedNodeData} />
+              <DatasourceNodeInfo
+                nodeInfo={this.state.selectedNodeData}
+                node={this.state.currentDblNode}
+              />
             )}
             {/* 脚本节点 */}
             {this.state.selectedNodeData?.type === 'script' && (
               <ScriptNodeInfo
                 nodeInfo={this.state.selectedNodeData}
                 graph={this.state.dagGraph}
+                node={this.state.currentDblNode}
               />
             )}
             {/* 输出源节点 */}
             {this.state.selectedNodeData?.type === 'outputsource' && (
-              <OutputNodeInfo nodeInfo={this.state.selectedNodeData} />
+              <OutputNodeInfo
+                nodeInfo={this.state.selectedNodeData}
+                node={this.state.currentDblNode}
+              />
             )}
           </Drawer>
           {/* 工具栏 */}

+ 1 - 0
packages/yili-dag/src/DatasourceNodeInfo.tsx

@@ -82,6 +82,7 @@ export default class DatasourceNodeInfo extends React.Component<any, any> {
               placeholder="请输入节点名称"
               onChange={e => {
                 this.props.nodeInfo.nodeName = e.target.value;
+                this.props.node.setData({ ...this.props.nodeInfo });
               }}
             />
           </Form.Item>

+ 1 - 0
packages/yili-dag/src/OutputNodeInfo.tsx

@@ -55,6 +55,7 @@ export default class OutputNodeInfo extends React.Component<any, any> {
               placeholder="请输入节点名称"
               onChange={e => {
                 this.props.nodeInfo.nodeName = e.target.value;
+                this.props.node.setData({ ...this.props.nodeInfo });
               }}
             />
           </Form.Item>

+ 1 - 0
packages/yili-dag/src/ScriptNodeInfo.tsx

@@ -254,6 +254,7 @@ export default class ScriptNodeInfo extends React.Component<any, any> {
             const nodeName = values.nodeName;
             this.props.nodeInfo.paramText = paramText;
             this.props.nodeInfo.nodeName = nodeName;
+            this.props.node.setData({ ...this.props.nodeInfo });
           }}
         >
           <Form.Item name="nodeId" label="节点ID">

+ 2 - 2
packages/yili-dag/src/request.ts

@@ -1,8 +1,8 @@
 import axios from 'axios';
 
 const request = axios.create({
-  baseURL: 'http://aihub-dag-test.digitalyili.com',
-  // baseURL: 'http://192.168.199.107:18082',
+  // baseURL: 'http://aihub-dag-test.digitalyili.com',
+  baseURL: 'http://192.168.199.107:18082',
   timeout: 1200000,
   headers: {
     'Content-Type': 'application/json;charset=UTF-8',

+ 7 - 0
packages/yili-dag/style/AlgoNode.css

@@ -23,6 +23,13 @@
   color: #666;
   font-size: 12px;
 }
+
+.node_name {
+  color: #000;
+  font-weight: 500;
+  font-size: 14px;
+}
+
 .node .status {
   flex-shrink: 0;
 }

Some files were not shown because too many files changed in this diff