fix: 更新实体详情折线图接口
This commit is contained in:
@@ -2,7 +2,7 @@ import Mock from 'mockjs'
|
||||
|
||||
const openMock = true
|
||||
if (openMock) {
|
||||
Mock.mock(new RegExp(BASE_CONFIG.baseUrl + 'interface/entityDetail/totalTrafficAnalysis.*'), 'get', function (requestObj) {
|
||||
Mock.mock(new RegExp(BASE_CONFIG.baseUrl + BASE_CONFIG.apiVersion + '/entity/detail/traffic/throughput.*'), 'get', function (requestObj) {
|
||||
const titleList = ['totalBitsRate', 'inboundBitsRate', 'outboundBitsRate', 'internalBitsRate', 'throughBitsRate', 'other']
|
||||
const arr = [{ type: 'Bits/s' }, { type: 'Packets/s' }, { type: 'Sessions/s' }]
|
||||
|
||||
|
||||
@@ -231,7 +231,7 @@ export const api = {
|
||||
drilldownTrafficAnalysis: '/interface/dns/overview/drilldown/trafficAnalysis'
|
||||
},
|
||||
entity: {
|
||||
totalTrafficAnalysis: 'interface/entityDetail/totalTrafficAnalysis',
|
||||
throughput: BASE_CONFIG.apiVersion + '/entity/detail/traffic/throughput',
|
||||
securityEvent: 'interface/entityDetail/securityEvent',
|
||||
performanceEvent: 'interface/entityDetail/performanceEvent',
|
||||
domainNameResolutionRelatedApp: 'interface/entity/detail/overview/ip/relatedApp',
|
||||
|
||||
@@ -208,8 +208,10 @@ export default {
|
||||
const newVal = val ? _.clone(val) : this.metric
|
||||
|
||||
const params = {
|
||||
resource: this.entity.entityName,
|
||||
startTime: getSecond(this.timeFilter.startTime),
|
||||
endTime: getSecond(this.timeFilter.endTime)
|
||||
endTime: getSecond(this.timeFilter.endTime),
|
||||
metric: newVal
|
||||
}
|
||||
|
||||
if (this.queryCondition) {
|
||||
@@ -217,8 +219,7 @@ export default {
|
||||
}
|
||||
|
||||
this.toggleLoading(true)
|
||||
// axios.get(api.netWorkOverview.totalTrafficAnalysis, { params: params }).then(response => {
|
||||
axios.get(api.entity.totalTrafficAnalysis, { params: params }).then(response => {
|
||||
axios.get(`${api.entity.throughput}/${this.entity.entityType}`, { params: params }).then(response => {
|
||||
const res = response.data
|
||||
|
||||
if (res.code === 200) {
|
||||
|
||||
Reference in New Issue
Block a user