|
|
@ -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: '获取接入数据统计失败' } |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|