瀏覽代碼

fix: 调整dag数据

nobody 2 年之前
父節點
當前提交
1f32039e5e
共有 2 個文件被更改,包括 24 次插入0 次删除
  1. 24 0
      packages/yili-dag/src/DatasourceNodeInfo.tsx
  2. 0 0
      untitled.dag

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

@@ -21,6 +21,14 @@ export default class DatasourceNodeInfo extends React.Component<any, any> {
       project_id: 'test'
     })
     if (data.code === 200) {
+      data.data.push({
+        id: 0,
+        name: 'train'
+      })
+      data.data.push({
+        id: 1,
+        name: 'test'
+      })
       this.setState({debugTable: data.data})
     } else {
       message.error('获取调试数据表失败')
@@ -55,6 +63,22 @@ export default class DatasourceNodeInfo extends React.Component<any, any> {
               this.props.nodeInfo.dataTableId = val
               this.props.nodeInfo.dataTableName = option.label
               switch(val) {
+                case 0:
+                case 1:
+                  this.props.nodeInfo.inputSource = [
+                    {dataSelect: false, dataField:'uuid', dataType:'string'},
+                    {dataSelect: false, dataField:'label', dataType:'int'},
+                    {dataSelect: false, dataField: 'feature1',dataType: 'double',},
+                    {dataSelect: false, dataField: 'feature2',dataType: 'double',},
+                    {dataSelect: false, dataField: 'feature3',dataType: 'double',},
+                    {dataSelect: false, dataField: 'feature4',dataType: 'double',},
+                    {dataSelect: false, dataField: 'feature5',dataType: 'double',},
+                    {dataSelect: false, dataField: 'feature6',dataType: 'double',},
+                    {dataSelect: false, dataField: 'feature7',dataType: 'double',},
+                    {dataSelect: false, dataField: 'feature8',dataType: 'double',},
+                    {dataSelect: false, dataField: 'feature9',dataType: 'double',},
+                  ]
+                  break
                 case 4:
                   this.props.nodeInfo.inputSource = [
                     {dataSelect: true, dataField: 'name', dataType: 'string'},

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


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