|
@@ -144,10 +144,7 @@ export default class ScriptNodeInfo extends React.Component<any, any> {
|
|
|
};
|
|
|
|
|
|
changeCollapse = async (val: any) => {
|
|
|
- if (
|
|
|
- this.props.scriptInputs[val]?.target_type === 'sql' &&
|
|
|
- this.props.scriptInputs[val]?.source_type === 'InputSource'
|
|
|
- ) {
|
|
|
+ if (this.props.scriptInputs[val]?.source_type === 'InputSource') {
|
|
|
const { data } = await getSqlDsTable(
|
|
|
this.props.scriptInputs[val].source_tableName
|
|
|
);
|
|
@@ -159,18 +156,20 @@ export default class ScriptNodeInfo extends React.Component<any, any> {
|
|
|
});
|
|
|
}
|
|
|
} else {
|
|
|
- const params = {
|
|
|
- dag_uuid: this.props.dagId,
|
|
|
- node_id: this.props.scriptInputs[val].nodeId,
|
|
|
- out_pin: this.props.scriptInputs[val].out_pin
|
|
|
- };
|
|
|
- const { data } = await getNodeResult(params);
|
|
|
- if (data.code === 200) {
|
|
|
- const { col, tableData } = this.formatTableData(data.data);
|
|
|
- this.setState({
|
|
|
- columns: col,
|
|
|
- tableData
|
|
|
- });
|
|
|
+ if (this.props.scriptInputs[val]?.source_state === 'success') {
|
|
|
+ const params = {
|
|
|
+ dag_uuid: this.props.dagId,
|
|
|
+ node_id: this.props.scriptInputs[val].nodeId,
|
|
|
+ out_pin: this.props.scriptInputs[val].out_pin
|
|
|
+ };
|
|
|
+ const { data } = await getNodeResult(params);
|
|
|
+ if (data.code === 200) {
|
|
|
+ const { col, tableData } = this.formatTableData(data.data);
|
|
|
+ this.setState({
|
|
|
+ columns: col,
|
|
|
+ tableData
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
};
|
|
@@ -397,17 +396,12 @@ export default class ScriptNodeInfo extends React.Component<any, any> {
|
|
|
bordered
|
|
|
columns={this.state.columns}
|
|
|
dataSource={this.state.tableData}
|
|
|
- scroll={{ x: this.state.columns * 120, y: 400 }}
|
|
|
+ scroll={{ x: this.state.columns * 250, y: 400 }}
|
|
|
pagination={{ showSizeChanger: false }}
|
|
|
/>
|
|
|
</div>
|
|
|
</Panel>
|
|
|
))}
|
|
|
- {/* <Panel header="input1" key="1" style={{position: 'relative', paddingTop: 0}}>
|
|
|
-
|
|
|
- </Panel>
|
|
|
- <Panel header="input2" key="2"></Panel>
|
|
|
- <Panel header="input3" key="3"></Panel> */}
|
|
|
</Collapse>
|
|
|
)}
|
|
|
</div>
|