update dashboard router

This commit is contained in:
shiyang 2020-11-12 22:29:33 +08:00
parent 4fc343bb46
commit 4d521d370f
2 changed files with 52 additions and 4 deletions

View File

@ -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',
},
]
},

View File

@ -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;