diff --git a/web/config/router.config.js b/web/config/router.config.js index 52608058..4b932992 100644 --- a/web/config/router.config.js +++ b/web/config/router.config.js @@ -36,22 +36,13 @@ export default [ }, { path: '/platform/tasks', name: 'tasks', - component: './Dashboard/Workplace', + component: './Dashboard/TaskMonitor', }, { path: '/platform/search', name: 'search', component: './Dashboard/SearchMonitor', }, - // { - // path: '/platform/analysis', - // name: 'analysis', - // component: './Dashboard/Analysis', - // }, - // { - // path: '/platform/monitor', - // name: 'monitor', - // component: './Dashboard/Monitor', - // }, + ] }, diff --git a/web/src/pages/Dashboard/TaskMonitor.js b/web/src/pages/Dashboard/TaskMonitor.js index cbda8986..5ee39a22 100644 --- a/web/src/pages/Dashboard/TaskMonitor.js +++ b/web/src/pages/Dashboard/TaskMonitor.js @@ -1,13 +1,28 @@ import React, { PureComponent } from 'react'; import { connect } from 'dva'; import { formatMessage, FormattedMessage } from 'umi/locale'; -import { Row, Col, Card, Tooltip } from 'antd'; +import { Row, Col, Card } 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 { + G2, + Chart, + Geom, + Axis, + Tooltip, + Coord, + Label, + Legend, + View, + Guide, + Shape, + Facet, + Util +} from "bizcharts"; import Authorized from '@/utils/Authorized'; import styles from './Monitor.less'; @@ -39,8 +54,208 @@ class TaskMonitor extends PureComponent { const { monitor, loading } = this.props; const { tags } = monitor; + const taskTimedDta = [ + { + name: "node1-23", + value: 3 + }, + { + name: "node1-24", + value: 4 + }, + { + name: "node1-25", + value: 5 + }, + { + name: "node2-101", + value: 5.3 + }, + { + name: "node2-102", + value: 5.9 + }, + { + name: "node2-103", + value: 6 + }, + { + name: "node3-121", + value: 7 + }, + { + name: "node3-122", + value: 9 + }, + { + name: "node3-123", + value: 15 + } + ]; + const cols = { + value: { + min: 0, + alias:'Time(min)' + }, + name: { + range: [0.05, 0.95], + alias:'Task' + } + }; + const taskCategorydDta = [ + { + name: "索引重建任务", + value: 16 + }, + { + name: "数据导入任务", + value: 4 + }, + { + name: "数据导出任务", + value: 2 + }, + { + name: "备份任务", + value: 10 + }, + { + name: "恢复任务", + value: 6 + }, + { + name: "其他", + value: 1 + } + ]; + return ( -

task monitor

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ); } }