diff --git a/web/src/pages/DataManagement/IngestPipeline.js b/web/src/pages/DataManagement/IngestPipeline.js index 12329d09..c7d0c597 100644 --- a/web/src/pages/DataManagement/IngestPipeline.js +++ b/web/src/pages/DataManagement/IngestPipeline.js @@ -19,7 +19,7 @@ import { Badge, Divider, Steps, - Radio, + Popconfirm } from 'antd'; import StandardTable from '@/components/StandardTable'; import PageHeaderWrapper from '@/components/PageHeaderWrapper'; @@ -213,21 +213,30 @@ class IngestPipeline extends PureComponent { }; handleDeleteClick = e => { + Modal.confirm({ + title: '删除Pipeline', + content: '确定删除该Pipeline吗?', + okText: '确认', + cancelText: '取消', + onOk: () => this.deleteItem(), + }); + }; + deleteItem = ()=>{ const { dispatch } = this.props; const { selectedRows } = this.state; if (!selectedRows) return; - dispatch({ - type: 'pipeline/delete', - payload: { - key: selectedRows.map(row => row.name), - }, - callback: () => { - this.setState({ - selectedRows: [], - }); - }, + dispatch({ + type: 'pipeline/delete', + payload: { + key: selectedRows.map(row => row.name), + }, + callback: () => { + this.setState({ + selectedRows: [], }); + }, + }); }; handleSelectRows = rows => { diff --git a/web/src/pages/DataManagement/LogstashConfig.js b/web/src/pages/DataManagement/LogstashConfig.js index 2b67b5fa..5fb9c703 100644 --- a/web/src/pages/DataManagement/LogstashConfig.js +++ b/web/src/pages/DataManagement/LogstashConfig.js @@ -1,6 +1,8 @@ import React, { Component,Fragment } from 'react'; import { connect } from 'dva'; -import { Card,Form,Input, Select,Button,message } from 'antd'; +import { Card,Form,Input, Select,Button,message, Drawer, + List +} from 'antd'; const { Option } = Select; import { formatMessage, FormattedMessage } from 'umi/locale'; import DescriptionList from '@/components/DescriptionList'; @@ -18,6 +20,28 @@ const operationTabList = [ tab: '对接Kafka', } ]; + const configRawData = [ + { + title: 'schedule', + content: [`Schedule of when to periodically run statement, in Cron format for example: "* * * * *" (execute query every minute, on the minute)`, + `There is no schedule by default. If no schedule is given, then the statement is run exactly once.`], + }, + { + title: 'jdbc_driver_library', + content: ['JDBC driver library path to third party driver library. In case of multiple libraries being required you can pass them separated by a comma.'], + }, + { + title: 'jdbc_driver_class', + content: ['JDBC driver class to load, for example, "org.apache.derby.jdbc.ClientDriver"'], + }, + { + title: 'jdbc_connection_string', + content: ['JDBC connection string, for example, "jdbc:oracle:test:@192.168.1.68:1521/testdb"'], + },{ + title:'jdbc_paging_enabled', + content: ['This will cause a sql statement to be broken up into multiple queries. Each query will use limits and offsets to collectively retrieve the full result-set. The limit size is set with jdbc_page_size.','Be aware that ordering is not guaranteed between queries.'] + }, + ]; @connect(({logstash,loading }) => ({ data: logstash.logstash, @@ -29,6 +53,8 @@ const operationTabList = [ class LogstashConfig extends Component { state = { operationkey: 'tab1', + drawerVisible: false, + drawerData: configRawData, }; componentDidMount() { message.loading('数据加载中..', 'initdata'); @@ -65,6 +91,28 @@ class LogstashConfig extends Component { } }); }; + + handleDrawerVisible = () => { + this.setState(preState=>{ + return { + drawerVisible: !preState.drawerVisible, + } + }) + }; + onCloseDrawer = ()=>{ + this.setState({ + drawerVisible: false, + }); + }; + + onDrawerSearch = (value)=>{ + let data = configRawData.filter((conf)=>{ + return conf.title.includes(value); + }); + this.setState({ + drawerData: data, + }); + }; render() { const { operationkey } = this.state; @@ -92,7 +140,7 @@ class LogstashConfig extends Component { }; const contentList = { tab1: ( -