diff --git a/web/config/router.config.js b/web/config/router.config.js index ffd299d1..ea8bc503 100644 --- a/web/config/router.config.js +++ b/web/config/router.config.js @@ -23,8 +23,8 @@ export default [ path: '/platform', name: 'platform', icon: 'dashboard', - component: './Dashboard/Analysis', routes: [ + // { path: '/', redirect: '/platform/gateway' }, { path: '/platform/gateway', name: 'gateway', @@ -72,41 +72,54 @@ export default [ },{ path: '/data/indices', name: 'index', - // component: './DataManagement/Indices', - // routes: [ - // { - // path: '/data/indices', - // redirect: '/data/indices/summary', - // }, - // { - // path: '/data/indices/summary', - // component: './DataManagement/IndexSummary', - // }, - // { - // path: '/data/indices/doc', - // component: './DataManagement/Document', - // }, - // { - // path: '/data/indices/template', - // component: './DataManagement/IndexTemplate', - // }, - // { - // path: '/data/indices/ilm', - // component: './DataManagement/IndexLifeCycle', - // }, - // ] + component: './DataManagement/Indices', + routes: [ + { + path: '/data/indices', + redirect: '/data/indices/summary', + }, + { + path: '/data/indices/summary', + component: './DataManagement/IndexSummary', + }, + { + path: '/data/indices/doc', + component: './DataManagement/Document', + }, + { + path: '/data/indices/template', + component: './DataManagement/IndexTemplate', + }, + { + path: '/data/indices/ilm', + component: './DataManagement/IndexLifeCycle', + }, + ] }, { - path: '/list/table-list', + path: '/data/backup', name: 'snapshot', - component: './List/TableList', + component: './DataManagement/Backup', + routes: [ + { + path: '/data/backup', + redirect: '/data/backup/bakandrestore', + }, + { + path: '/data/backup/bakandrestore', + component: './DataManagement/backup/BakAndRestore', + },{ + path: '/data/backup/bakcycle', + component: './DataManagement/backup/BakCycle', + } + ] }, { - path: '/list/table-list', + path: '/data/rebuild', name: 'rebuild', - component: './List/TableList', + component: './DataManagement/Rebuild', }, { - path: '/list/table-list', + path: '/data/import', name: 'export', - component: './List/TableList', + component: './DataManagement/Import', }, ] }, diff --git a/web/src/pages/DataManagement/Backup.js b/web/src/pages/DataManagement/Backup.js new file mode 100644 index 00000000..30f7a9e2 --- /dev/null +++ b/web/src/pages/DataManagement/Backup.js @@ -0,0 +1,47 @@ +import React, { Component } from 'react'; +import router from 'umi/router'; +import { connect } from 'dva'; +import PageHeaderWrapper from '@/components/PageHeaderWrapper'; + +@connect() +class Backup extends Component { + handleTabChange = key => { + const { match } = this.props; + switch (key) { + case 'bakandrestore': + router.push(`${match.url}/bakandrestore`); + break; + case 'bakcycle': + router.push(`${match.url}/bakcycle`); + break; + default: + break; + } + } + render() { + const tabList = [ + { + key: 'bakandrestore', + tab: '索引备份与还原', + }, + { + key: 'bakcycle', + tab: '备份周期管理', + } + ]; + + const { match, children, location } = this.props; + + return ( + + {children} + + ); + } +} + +export default Backup; diff --git a/web/src/pages/DataManagement/Document.js b/web/src/pages/DataManagement/Document.js new file mode 100644 index 00000000..2ea4a252 --- /dev/null +++ b/web/src/pages/DataManagement/Document.js @@ -0,0 +1,376 @@ +import React, { PureComponent, Fragment } from 'react'; +import { connect } from 'dva'; +import { + Row, + Col, + Card, + Form, + Input, + Button, + Modal, + message, + Divider, +} from 'antd'; +import StandardTable from '@/components/StandardTable'; +import PageHeaderWrapper from '@/components/PageHeaderWrapper'; + +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); + }); + }; + return ( + handleModalVisible()} + > + + {form.getFieldDecorator('index', { + rules: [{ required: true, message: '请输入至少五个字符的名称!', min: 5 }], + })()} + + + {form.getFieldDecorator('settings', { + rules: [{ required: true }], + })(