diff --git a/api/app/lib/controllers/homepage/index.js b/api/app/lib/controllers/homepage/index.js index 91cb542..18e23c7 100644 --- a/api/app/lib/controllers/homepage/index.js +++ b/api/app/lib/controllers/homepage/index.js @@ -156,6 +156,7 @@ function getClusterInfo(opts) { } } +//获取restful统计信息 function getRestfulInfo(opts) { return async function (ctx, next) { const models = ctx.fs.dc.models; @@ -209,11 +210,11 @@ function getRestfulInfo(opts) { } } +//获取接入数据统计 function getAccessData(opts) { return async function (ctx, next) { - const models = ctx.fs.dc.models; try { - const projects = '1,2,3,4,5,6,7,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38' + const projects = '2,35,37,45,70,111,170,187,210,275,276,279' const url = 'https://statistics.anxinyun.cn/statistic?projects=' + projects let res = await request.get(url) ctx.status = 200; @@ -221,7 +222,7 @@ function getAccessData(opts) { } catch (error) { ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`); ctx.status = 400; - ctx.body = { message: '获取预警列表失败' } + ctx.body = { message: '获取接入数据统计失败' } } } } diff --git a/web/client/src/sections/auth/containers/login.js b/web/client/src/sections/auth/containers/login.js index bf4f1a9..e1cabcb 100644 --- a/web/client/src/sections/auth/containers/login.js +++ b/web/client/src/sections/auth/containers/login.js @@ -36,7 +36,7 @@ const Login = props => { useEffect(() => { if (user && user.authorized) { - dispatch(push('/homePage')); + user?.role == '数据消费者' ? dispatch(push('/metadataManagement/latestMetadata')) : dispatch(push('/homePage')); } }, [user]) diff --git a/web/client/src/sections/homePage/components/abnormalMonitoring.js b/web/client/src/sections/homePage/components/abnormalMonitoring.js index ecb5206..e2107ed 100644 --- a/web/client/src/sections/homePage/components/abnormalMonitoring.js +++ b/web/client/src/sections/homePage/components/abnormalMonitoring.js @@ -40,7 +40,6 @@ function AbnormalMonitoring(props) { height={100} multiellipsis marginTop={-50} - // columnWidth={[200, 170, 120, 120]} /> } diff --git a/web/client/src/sections/homePage/components/accessData.js b/web/client/src/sections/homePage/components/accessData.js index 71a117e..2d37d29 100644 --- a/web/client/src/sections/homePage/components/accessData.js +++ b/web/client/src/sections/homePage/components/accessData.js @@ -1,8 +1,8 @@ -import React, { useEffect, useState } from 'react' +import React from 'react' import Box from './public/table-card'; import { useFsRequest } from '$utils'; import { mathRound } from './util' -function AccessData(props) { +function AccessData() { const { data: accessdata = [] } = useFsRequest({ url: 'homepage/accessdata', diff --git a/web/client/src/sections/homePage/components/alarmList.js b/web/client/src/sections/homePage/components/alarmList.js index 07ac796..55181b5 100644 --- a/web/client/src/sections/homePage/components/alarmList.js +++ b/web/client/src/sections/homePage/components/alarmList.js @@ -1,4 +1,4 @@ -import React, { useEffect, useState } from 'react' +import React from 'react' import Box from './public/table-card'; import CarouselList from './public/carousel-list'; import { Tooltip } from 'antd'; diff --git a/web/client/src/sections/homePage/components/centerTop.js b/web/client/src/sections/homePage/components/centerTop.js index 3e5f32a..a70d656 100644 --- a/web/client/src/sections/homePage/components/centerTop.js +++ b/web/client/src/sections/homePage/components/centerTop.js @@ -1,4 +1,4 @@ -import React, { useEffect, useState } from 'react' +import React from 'react' import './style.less' function CenterTop(props) { diff --git a/web/client/src/sections/homePage/components/dataShare.js b/web/client/src/sections/homePage/components/dataShare.js index 8ae17a4..c8f2b08 100644 --- a/web/client/src/sections/homePage/components/dataShare.js +++ b/web/client/src/sections/homePage/components/dataShare.js @@ -1,6 +1,6 @@ -import React, { useEffect, useState } from 'react' +import React from 'react' import Box from './public/table-card'; -import { ApiTable, useFsRequest } from '$utils'; +import { useFsRequest } from '$utils'; import { mathRound } from './util'; function DataShare(props) { diff --git a/web/client/src/sections/homePage/components/hotspotData.js b/web/client/src/sections/homePage/components/hotspotData.js index 0f1d7ea..f8a7240 100644 --- a/web/client/src/sections/homePage/components/hotspotData.js +++ b/web/client/src/sections/homePage/components/hotspotData.js @@ -17,18 +17,18 @@ function HotspotData(props) {