ant migrate v4

pull/289/head
vapao 2020-11-25 10:11:02 +08:00
parent d97570b338
commit 097acb4f6c
3 changed files with 22 additions and 6 deletions

View File

@ -27,8 +27,8 @@ function initRoutes(routes) {
}
}
initRoutes(routes)
updatePermissions()
initRoutes(routes)
// 404
function NotFound() {

View File

@ -58,7 +58,7 @@ export default function () {
onClick={() => handleClick('week')}>本周</span>
<span className={range === 'month' ? styles.spanButtonActive : styles.spanButton}
onClick={() => handleClick('month')}>本月</span>
<DatePicker.RangePicker style={{width: 230}} value={duration} onChange={handleClick}/>
<DatePicker.RangePicker allowClear={false} style={{width: 250}} value={duration} onChange={handleClick}/>
</div>
)}>
<Chart height={300} data={res} padding={[10, 0, 30, 35]} scale={{count: {alias: '发布申请数量'}}} forceFit>

View File

@ -28,22 +28,38 @@ export default class StatisticCard extends React.Component {
<Row gutter={16} style={{marginBottom: 20}}>
<Col span={6}>
<Card loading={loading}>
<Statistic title="应用" value={res.app} formatter={v => <a href="/deploy/app">{v}</a>} suffix="个"/>
<Statistic
title="应用"
value={res.app}
suffix={<span style={{fontSize: 16}}></span>}
formatter={v => <a href="/deploy/app">{v}</a>}/>
</Card>
</Col>
<Col span={6}>
<Card loading={loading}>
<Statistic title="主机" value={res.host} formatter={v => <a href="/host">{v}</a>} suffix="台"/>
<Statistic
title="主机"
value={res.host}
suffix={<span style={{fontSize: 16}}></span>}
formatter={v => <a href="/host">{v}</a>}/>
</Card>
</Col>
<Col span={6}>
<Card loading={loading}>
<Statistic title="任务" value={res.task} formatter={v => <a href="/schedule">{v}</a>} suffix="个"/>
<Statistic
title="任务"
value={res.task}
suffix={<span style={{fontSize: 16}}></span>}
formatter={v => <a href="/schedule">{v}</a>}/>
</Card>
</Col>
<Col span={6}>
<Card loading={loading}>
<Statistic title="监控" value={res['detection']} formatter={v => <a href="/monitor">{v}</a>} suffix="项"/>
<Statistic
title="监控"
value={res['detection']}
suffix={<span style={{fontSize: 16}}></span>}
formatter={v => <a href="/monitor">{v}</a>}/>
</Card>
</Col>
</Row>