From 4d521d370f1d358caecb040a8f76c521a2096175 Mon Sep 17 00:00:00 2001 From: shiyang Date: Thu, 12 Nov 2020 22:29:33 +0800 Subject: [PATCH] update dashboard router --- web/config/router.config.js | 8 +++--- web/src/pages/Dashboard/Search.js | 48 +++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 4 deletions(-) create mode 100644 web/src/pages/Dashboard/Search.js diff --git a/web/config/router.config.js b/web/config/router.config.js index 49056d30..db691815 100644 --- a/web/config/router.config.js +++ b/web/config/router.config.js @@ -34,13 +34,13 @@ export default [ name: 'cluster', component: './Dashboard/Monitor', }, { - path: '/list/table-list', + path: '/platform/tasks', name: 'tasks', - component: './List/TableList', + component: './Dashboard/Workplace', }, { - path: '/list/table-list', + path: '/platform/search', name: 'search', - component: './List/TableList', + component: './Dashboard/Search', }, ] }, diff --git a/web/src/pages/Dashboard/Search.js b/web/src/pages/Dashboard/Search.js new file mode 100644 index 00000000..0f9f44ac --- /dev/null +++ b/web/src/pages/Dashboard/Search.js @@ -0,0 +1,48 @@ +import React, { PureComponent } from 'react'; +import { connect } from 'dva'; +import { formatMessage, FormattedMessage } from 'umi/locale'; +import { Row, Col, Card, Tooltip } from 'antd'; +import numeral from 'numeral'; +import { Pie, WaterWave, Gauge, TagCloud } from '@/components/Charts'; +import NumberInfo from '@/components/NumberInfo'; +import CountDown from '@/components/CountDown'; +import ActiveChart from '@/components/ActiveChart'; +import GridContent from '@/components/PageHeaderWrapper/GridContent'; + +import Authorized from '@/utils/Authorized'; +import styles from './Monitor.less'; + +const { Secured } = Authorized; + +const targetTime = new Date().getTime() + 3900000; + +// use permission as a parameter +const havePermissionAsync = new Promise(resolve => { + // Call resolve on behalf of passed + setTimeout(() => resolve(), 300); +}); + +@Secured(havePermissionAsync) +@connect(({ monitor, loading }) => ({ + monitor, + loading: loading.models.monitor, +})) +class Search extends PureComponent { + componentDidMount() { + const { dispatch } = this.props; + dispatch({ + type: 'monitor/fetchTags', + }); + } + + render() { + const { monitor, loading } = this.props; + const { tags } = monitor; + + return ( +

search monitor

+ ); + } +} + +export default Search;