diff --git a/back/src/views/modules/workBench/components/risk-view.vue b/back/src/views/modules/workBench/components/risk-view.vue index 33fb27ad..f7f884d3 100644 --- a/back/src/views/modules/workBench/components/risk-view.vue +++ b/back/src/views/modules/workBench/components/risk-view.vue @@ -1,32 +1,129 @@ \ No newline at end of file + diff --git a/front/src/api/capabilityCloud.js b/front/src/api/capabilityCloud.js index d6e2e151..011517fe 100644 --- a/front/src/api/capabilityCloud.js +++ b/front/src/api/capabilityCloud.js @@ -97,7 +97,7 @@ export function callTheTrendPort(start, end, params) { export function totalCallsSnum(params) { return request({ url: - `metrics/api/v1/query?query=sum(increase(apigateway_http_status))&time=${params}`, + `/metrics/api/v1/query?time=${params}&query=sum(apigateway_http_status)`, method: 'get', }) } @@ -105,7 +105,7 @@ export function totalCallsSnum(params) { export function totalCallsSnum2(params) { return request({ url: - `metrics/api/v1/query?query=sum(increase(apigateway_http_status{code=~"^2.."}))&time=${params}`, + `metrics/api/v1/query?query=sum(apigateway_http_status{code=~"^2.."})&time=${params}`, method: 'get', }) } diff --git a/front/src/views/capabilityCloud/components/ComponentServices.vue b/front/src/views/capabilityCloud/components/ComponentServices.vue index b3359fd0..fc2dbd45 100644 --- a/front/src/views/capabilityCloud/components/ComponentServices.vue +++ b/front/src/views/capabilityCloud/components/ComponentServices.vue @@ -408,18 +408,14 @@ //总调用次数接口 const TotalCallsAPI = () => { const end = Date.parse(new Date()) / 1000 - if (!xinhaianIsShow) { - totalCallsSnum(end).then((res) => { - snum.value[1].num = res.data.data.result[0].value[1] - totalCallsSnum2(end).then((resSon) => { - snum.value[2].num = - ((snum.value[1].num - resSon.data.data.result[0].value[1]) / - snum.value[1].num) * - 100 + - '%' - }) + totalCallsSnum(end).then((res) => { + debugger + snum.value[1].num = res.data.data.result[0].value[1] + totalCallsSnum2(end).then((resSon) => { + snum.value[2].num = + (resSon.data.data.result[0].value[1] / snum.value[1].num) * 100 + '%' }) - } + }) } const init = () => { timeSwitch(timeSwitchindex.value)