| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Modal, Button } from 'antd' |
| | | import { Modal, Button, notification } from 'antd' |
| | | import { SettingOutlined } from '@ant-design/icons' |
| | | |
| | | import VerifyCard from './verifycard' |
| | |
| | | } |
| | | |
| | | let maxScript = 0 |
| | | let useExec = false |
| | | |
| | | if (window.GLOB.funcs && window.GLOB.funcs.length > 0) { |
| | | window.GLOB.funcs.forEach(m => { |
| | |
| | | if (item.status === 'false') return |
| | | |
| | | if (/exec\s/ig.test(item.sql)) { |
| | | useExec = true |
| | | maxScript = 1000 |
| | | } else if (item.sql.length > maxScript) { |
| | | maxScript = item.sql.length |
| | |
| | | if (item.status === 'false') return |
| | | |
| | | if (/exec\s/ig.test(item.sql)) { |
| | | useExec = true |
| | | maxScript = 1000 |
| | | } else if (item.sql.length > maxScript) { |
| | | maxScript = item.sql.length |
| | |
| | | |
| | | res.setting.maxScript = maxScript |
| | | |
| | | if (useExec && res.setting.sync === 'true') { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '当前数据源使用了同步查询且自定义脚本中存在函数exec,如遇接口报错需关闭同步查询后重新测试。', |
| | | duration: 5 |
| | | }) |
| | | } |
| | | |
| | | if (config.subtype !== 'dualdatacard') { |
| | | delete res.subColumns |
| | | if (config.type === 'interface') { |