diff --git a/LICENSE b/LICENSE index d5bfd919..04544e21 100644 --- a/LICENSE +++ b/LICENSE @@ -1,21 +1,21 @@ -End-User License Agreement (EULA) of INFINI LOGGING CENTER +End-User License Agreement (EULA) of INFINI SOFTWARE This End-User License Agreement ("EULA") is a legal agreement between you and HUNAN INFINI TECHNOLOGY CO,LTD -This EULA agreement governs your acquisition and use of our INFINI LOGGING CENTER software ("Software") directly from HUNAN INFINI TECHNOLOGY CO,LTD or indirectly through a HUNAN INFINI TECHNOLOGY CO,LTD authorized reseller or distributor (a "Reseller"). +This EULA agreement governs your acquisition and use of our INFINI software ("Software") directly from HUNAN INFINI TECHNOLOGY CO,LTD or indirectly through a HUNAN INFINI TECHNOLOGY CO,LTD authorized reseller or distributor (a "Reseller"). -Please read this EULA agreement carefully before completing the installation process and using the INFINI LOGGING CENTER software. It provides a license to use the INFINI LOGGING CENTER software and contains warranty information and liability disclaimers. +Please read this EULA agreement carefully before completing the installation process and using the INFINI software. It provides a license to use the INFINI LOGGING CENTER software and contains warranty information and liability disclaimers. -If you register for a free trial of the INFINI LOGGING CENTER software, this EULA agreement will also govern that trial. By clicking "accept" or installing and/or using the INFINI LOGGING CENTER software, you are confirming your acceptance of the Software and agreeing to become bound by the terms of this EULA agreement. +If you register for a free trial of the INFINI software, this EULA agreement will also govern that trial. By clicking "accept" or installing and/or using the INFINI LOGGING CENTER software, you are confirming your acceptance of the Software and agreeing to become bound by the terms of this EULA agreement. If you are entering into this EULA agreement on behalf of a company or other legal entity, you represent that you have the authority to bind such entity and its affiliates to these terms and conditions. If you do not have such authority or if you do not agree with the terms and conditions of this EULA agreement, do not install or use the Software, and you must not accept this EULA agreement. This EULA agreement shall apply only to the Software supplied by HUNAN INFINI TECHNOLOGY CO,LTD herewith regardless of whether other software is referred to or described herein. The terms also apply to any HUNAN INFINI TECHNOLOGY CO,LTD updates, supplements, Internet-based services, and support services for the Software, unless other terms accompany those items on delivery. If so, those terms apply. License Grant -HUNAN INFINI TECHNOLOGY CO,LTD hereby grants you a personal, non-transferable, non-exclusive licence to use the INFINI LOGGING CENTER software on your devices in accordance with the terms of this EULA agreement. +HUNAN INFINI TECHNOLOGY CO,LTD hereby grants you a personal, non-transferable, non-exclusive licence to use the INFINI software on your devices in accordance with the terms of this EULA agreement. -You are permitted to load the INFINI LOGGING CENTER software (for example a PC, laptop, mobile or tablet) under your control. You are responsible for ensuring your device meets the minimum requirements of the INFINI LOGGING CENTER software. +You are permitted to load the INFINI software (for example a PC, laptop, mobile or tablet) under your control. You are responsible for ensuring your device meets the minimum requirements of the INFINI LOGGING CENTER software. You are not permitted to: @@ -35,4 +35,4 @@ This EULA agreement is effective from the date you first use the Software and sh It will also terminate immediately if you fail to comply with any term of this EULA agreement. Upon such termination, the licenses granted by this EULA agreement will immediately terminate and you agree to stop all access and use of the Software. The provisions that by their nature continue and survive will survive any termination of this EULA agreement. Governing Law -This EULA agreement, and any dispute arising out of or in connection with this EULA agreement, shall be governed by and construed in accordance with the laws of cn. \ No newline at end of file +This EULA agreement, and any dispute arising out of or in connection with this EULA agreement, shall be governed by and construed in accordance with the laws of cn. diff --git a/main.go b/main.go index 737d3a6f..8b1c6221 100644 --- a/main.go +++ b/main.go @@ -15,19 +15,16 @@ var appUI *UI func main() { - terminalHeader := (" __ _ __ ____ __ _ __ __ \n") - terminalHeader += (" / // |/ // __// // |/ // / \n") - terminalHeader += (" / // || // _/ / // || // / \n") - terminalHeader += ("/_//_/|_//_/ /_//_/|_//_/ \n") - terminalHeader += (" __ _ __ __ __ _ __ __\n") - terminalHeader += (" / / ,' \\ ,'_/ ,'_/ / // |/ /,'_/\n") - terminalHeader += (" / /_/ o |/ /_n/ /_n / // || // /_n\n") - terminalHeader += ("/___/|_,' |__,'|__,'/_//_/|_/ |__,'\n") - terminalHeader += (" __ ___ _ __ _____ ___ ___ \n") - terminalHeader += (" ,'_/ / _/ / |/ //_ _// _/ / o | \n") - terminalHeader += ("/ /_ / _/ / || / / / / _/ / ,' \n") - terminalHeader += ("|__//___//_/|_/ /_/ /___//_/`_\\ \n") - terminalHeader += (" \n") + terminalHeader := (" .__ \n") + terminalHeader += (" ______ ____ _____ _______ ____ | |__ \n") + terminalHeader += (" / ___/_/ __ \\ \\__ \\ \\_ __ \\_/ ___\\ | | \\ \n") + terminalHeader += (" \\___ \\ \\ ___/ / __ \\_| | \\/\\ \\___ | Y \\ \n") + terminalHeader += ("/____ > \\___ >(____ /___| \\___ >|___| /\n") + terminalHeader += (" ____/ ____\\/ ____\\_/ |_ ____ _______ \\/ \n") + terminalHeader += ("_/ ___\\_/ __ \\ / \\\\ __\\_/ __ \\\\_ __ \\ \n") + terminalHeader += ("\\ \\___\\ ___/ | | \\| | \\ ___/ | | \\/ \n") + terminalHeader += (" \\___ >\\___ >|___| /|__| \\___ >|__| \n") + terminalHeader += (" \\/ \\/ \\/ \\/ \n") terminalFooter := (" __ _ __ ____ __ _ __ __ __ _____ __ \n") terminalFooter += (" / // |/ // __// // |/ // / / //_ _// \\ \n") diff --git a/search-center.yml b/search-center.yml index d0e77c7f..e026a2d9 100644 --- a/search-center.yml +++ b/search-center.yml @@ -1,13 +1,30 @@ elasticsearch: - name: default enabled: true - endpoint: https://192.168.3.98:9200 + endpoint: http://localhost:9200 index_prefix: infini- basic_auth: username: elastic password: 13A1EcwWs1He6w3BXHuJ +web: + enabled: true + ui: + enabled: true + path: .public + vfs: true + local: true + network: + binding: 127.0.0.1:2900 + skip_occupied_port: true + modules: + - name: elastic + elasticsearch: default + enabled: true + indexer_enabled: false + store_enabled: false + orm_enabled: false - name: web enabled: true network: diff --git a/ui.go b/ui.go index 9f2c7d13..7d6b5f32 100644 --- a/ui.go +++ b/ui.go @@ -8,7 +8,7 @@ import ( "infini.sh/framework/core/util" "infini.sh/framework/core/vfs" "infini.sh/search-center/.public" - "infini.sh/search-center/api/index_management" + uiapi "infini.sh/search-center/api" "infini.sh/search-center/config" "net/http" ) @@ -24,7 +24,7 @@ func (h UI) InitUI() { ui.HandleUI("/", vfs.FileServer(vfs.VFS())) - index_management.Init() + uiapi.Init() ui.HandleUIFunc("/api/", func(w http.ResponseWriter, req *http.Request) { log.Warn("api: ",req.URL," not implemented") diff --git a/web/config/router.config.js b/web/config/router.config.js index 9ae058ed..faf8c20d 100644 --- a/web/config/router.config.js +++ b/web/config/router.config.js @@ -247,34 +247,80 @@ export default [ //settings { - path: '/settings', - name: 'settings', + path: '/system', + name: 'system', icon: 'setting', - // component: './List/TableList', routes: [ { - path: '/settings/global', - name: 'global', - component: './Settings/Global/Global', - }, { - path: '/settings/security', + path: '/system/settings', + name: 'settings', + component: './System/Settings/Base', + hideChildrenInMenu: true, + routes: [ + { + path: '/system/settings', + redirect: '/system/settings/global', + }, + { + path: '/system/settings/global', + component: './System/Settings/Global', + }, { + path: '/system/settings/gateway', + component: './System/Settings/Gateway', + }, + ] + }, + { + path: '/system/security', name: 'security', + component: './System/Security/Base', hideChildrenInMenu: true, routes: [ { - path: '/settings/security', - name: 'security', - component: './Settings/Security/General', + path: '/system/security', + redirect: '/system/security/general', + }, + { + path: '/system/security/general', + component: './System/Security/General', }, { - path: '/settings/security/general', - name: 'general', - component: './Forms/BasicForm', + path: '/system/security/sso', + component: './System/Security/SSO', + }, { + path: '/system/security/roles', + component: './System/Security/Roles', + }, { + path: '/system/security/users', + component: './System/Security/Users', + }, { + path: '/system/security/certs', + component: './System/Security/Certs', }, ] }, { - path: '/settings/audit', - name: 'audit', - component: './List/TableList', + path: '/system/logs', + name: 'logs', + component: './System/Logs/Base', + hideChildrenInMenu: true, + routes: [ + { + path: '/system/logs', + redirect: '/system/logs/overview', + }, + { + path: '/system/logs/overview', + component: './System/Logs/Overview', + }, { + path: '/system/logs/audit', + component: './System/Logs/Audit', + }, { + path: '/system/logs/query', + component: './System/Logs/Audit', + }, { + path: '/system/logs/slow', + component: './System/Logs/Audit', + }, + ] }, ] }, diff --git a/web/src/components/SiderMenu/index.less b/web/src/components/SiderMenu/index.less index 082b445d..58d3fb02 100644 --- a/web/src/components/SiderMenu/index.less +++ b/web/src/components/SiderMenu/index.less @@ -21,7 +21,7 @@ display: inline-block; vertical-align: middle; font-size: 20px; - margin: 3px 0 0 12px; + margin: 6px 0 0 12px; font-family: 'Myriad Pro', 'Helvetica Neue', Arial, Helvetica, sans-serif; font-weight: 600; } diff --git a/web/src/components/TopNavHeader/index.js b/web/src/components/TopNavHeader/index.js index e89dbd61..ed1da50b 100644 --- a/web/src/components/TopNavHeader/index.js +++ b/web/src/components/TopNavHeader/index.js @@ -3,6 +3,7 @@ import Link from 'umi/link'; import RightContent from '../GlobalHeader/RightContent'; import BaseMenu from '../SiderMenu/BaseMenu'; import styles from './index.less'; +import { formatMessage, FormattedMessage } from 'umi/locale'; export default class TopNavHeader extends PureComponent { state = { @@ -30,7 +31,7 @@ export default class TopNavHeader extends PureComponent {
{ + 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: ( -
+
}> {getFieldDecorator('dbtype', { @@ -112,6 +160,7 @@ class LogstashConfig extends Component { )} + 配置释义 }> {getFieldDecorator('logstash.jdbcconf', { initialValue: data.jdbc.config, @@ -173,6 +222,30 @@ class LogstashConfig extends Component { onTabChange={this.onOperationTabChange} > {contentList[operationkey]} + + {this.onDrawerSearch(e.target.value)}} onSearch={this.onDrawerSearch} enterButton /> + ( + + +
+ {item.content.map((c)=>{ + return (

{c}

); + })} +
+
+ )} + /> +
); diff --git a/web/src/pages/DataManagement/backup/BakCycle.js b/web/src/pages/DataManagement/backup/BakCycle.js index 921f8f3b..ca0c808e 100644 --- a/web/src/pages/DataManagement/backup/BakCycle.js +++ b/web/src/pages/DataManagement/backup/BakCycle.js @@ -1,4 +1,4 @@ -import React, { PureComponent, Fragment } from 'react'; +import React, { PureComponent, Fragment,forwardRef } from 'react'; import { connect } from 'dva'; import { Row, @@ -11,7 +11,13 @@ import { message, Divider, Drawer, + Steps, + Select, + TimePicker, + Switch, + Icon, } from 'antd'; +import moment from 'moment'; import StandardTable from '@/components/StandardTable'; import styles from '../../List/TableList.less'; @@ -19,81 +25,187 @@ import styles from '../../List/TableList.less'; const FormItem = Form.Item; const { TextArea } = Input; -const CreateForm = Form.create()(props => { - const { modalVisible, form, handleAdd, handleModalVisible } = props; - const okHandle = () => { - form.validateFields((err, fieldsValue) => { - if (err) return; - form.resetFields(); - handleAdd(fieldsValue); - }); - }; +let RightSwitch = forwardRef((props, _ref) => { return ( - handleModalVisible()} - > - - {form.getFieldDecorator('name', { - rules: [{ required: true, message: '请输入至少五个字符的名称!', min: 5 }], - })()} - - - {form.getFieldDecorator('settings', { - rules: [{ required: true }], - })(