diff --git a/src/mock/entity.js b/src/mock/entity.js
index f4c87fcd..9f85147a 100644
--- a/src/mock/entity.js
+++ b/src/mock/entity.js
@@ -1,8 +1,8 @@
import Mock from 'mockjs'
-
+const urlAndVersion = BASE_CONFIG.baseUrl + BASE_CONFIG.apiVersion
const openMock = true
if (openMock) {
- Mock.mock(new RegExp(BASE_CONFIG.baseUrl + BASE_CONFIG.apiVersion + '/entity/detail/traffic/throughput.*'), 'get', function (requestObj) {
+ Mock.mock(new RegExp(urlAndVersion + '/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' }]
@@ -66,7 +66,7 @@ if (openMock) {
}
}
})
- Mock.mock(new RegExp(BASE_CONFIG.baseUrl + 'interface/entityDetail/securityEvent.*'), 'get', function (requestObj) {
+ Mock.mock(new RegExp(urlAndVersion + '/entity/detail/event/security.*'), 'get', function (requestObj) {
const result = [
{
eventId: '1298414830886991872',
@@ -183,7 +183,7 @@ if (openMock) {
}
}
})
- Mock.mock(new RegExp(BASE_CONFIG.baseUrl + 'interface/entityDetail/performanceEvent.*'), 'get', function (requestObj) {
+ Mock.mock(new RegExp(urlAndVersion + '/entity/detail/event/performance.*'), 'get', function (requestObj) {
const result = [
{
eventId: '1308078720390412288',
diff --git a/src/utils/api.js b/src/utils/api.js
index d312e391..8b776987 100644
--- a/src/utils/api.js
+++ b/src/utils/api.js
@@ -232,8 +232,8 @@ export const api = {
},
entity: {
throughput: BASE_CONFIG.apiVersion + '/entity/detail/traffic/throughput',
- securityEvent: 'interface/entityDetail/securityEvent',
- performanceEvent: 'interface/entityDetail/performanceEvent',
+ security: BASE_CONFIG.apiVersion + '/entity/detail/event/security',
+ performance: BASE_CONFIG.apiVersion + '/entity/detail/event/performance',
domainNameResolutionRelatedApp: 'interface/entity/detail/overview/ip/relatedApp',
domainNameResolutionRelatedIP: 'interface/entity/detail/overview/ip/relatedIp',
domainNameResolutionRelatedDomain: 'interface/entity/detail/overview/ip/relatedDomain',
diff --git a/src/views/charts2/charts/entityDetail/EntityDetailTabs.vue b/src/views/charts2/charts/entityDetail/EntityDetailTabs.vue
index 88fec9e3..d278d13d 100644
--- a/src/views/charts2/charts/entityDetail/EntityDetailTabs.vue
+++ b/src/views/charts2/charts/entityDetail/EntityDetailTabs.vue
@@ -13,9 +13,9 @@
-
-
-
+
+
+
@@ -49,7 +49,12 @@ export default {
},
data () {
return {
- timer: null
+ timer: null,
+ // 最近一天的时间
+ oneDayTimeFilter: {
+ startTime: window.$dayJs.tz().valueOf() - 1440 * 60 * 1000,
+ endTime: window.$dayJs.tz().valueOf()
+ }
}
},
watch: {
diff --git a/src/views/charts2/charts/entityDetail/tabs/PerformanceEvent.vue b/src/views/charts2/charts/entityDetail/tabs/PerformanceEvent.vue
index 906e0cc3..ba278a1c 100644
--- a/src/views/charts2/charts/entityDetail/tabs/PerformanceEvent.vue
+++ b/src/views/charts2/charts/entityDetail/tabs/PerformanceEvent.vue
@@ -49,12 +49,11 @@