update dashboard router
This commit is contained in:
parent
4fc343bb46
commit
4d521d370f
|
@ -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',
|
||||
},
|
||||
]
|
||||
},
|
||||
|
|
|
@ -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 (
|
||||
<h1>search monitor</h1>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Search;
|
Loading…
Reference in New Issue