import React, { PureComponent, Fragment } from 'react'; import { connect } from 'dva'; 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 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(), 1000); }); @Secured(havePermissionAsync) @connect(({ monitor, loading }) => ({ monitor, loading: loading.models.monitor, })) export default class Monitor extends PureComponent { componentDidMount() { const { dispatch } = this.props; dispatch({ type: 'monitor/fetchTags', }); } render() { const { monitor, loading } = this.props; const { tags } = monitor; return ( } />
map
); } }