diff --git a/src/components/layout/Header.vue b/src/components/layout/Header.vue index 17f21cf5..67d2f19e 100644 --- a/src/components/layout/Header.vue +++ b/src/components/layout/Header.vue @@ -337,7 +337,7 @@ export default { return this.$store.getters.menuList.find(menu => menu.code === 'locationIntelligence') }, otherMenu () { - return this.$store.getters.menuList.filter(menu => ['locationIntelligence','networkAnalytics', 'I18N', 'entityDetail', 'entityGraph', 'detectionPolicy'].indexOf(menu.code) === -1) + return this.$store.getters.menuList.filter(menu => ['locationIntelligence', 'networkAnalytics', 'I18N', 'entityDetail', 'entityGraph', 'detectionPolicy'].indexOf(menu.code) === -1) /* function excludeButton (menu) { for (let i = 0; i < menu.length; i++) { diff --git a/src/mock/location.js b/src/mock/location.js index bb5c1dae..a1d87556 100644 --- a/src/mock/location.js +++ b/src/mock/location.js @@ -23,251 +23,251 @@ if (openMock) { } } }) - Mock.mock(new RegExp(BASE_CONFIG.baseUrl + 'v1/locationIntelligence/active/subscribers.*'), 'get', function (requestObj) { + Mock.mock(new RegExp(BASE_CONFIG.baseUrl + 'v1/locationIntelligence/active/trend.*'), 'get', function (requestObj) { const lineData = [ [ 1707357180, - "0" + '0' ], [ 1707357240, - "67781" + '67781' ], [ 1707357300, - "8878" + '8878' ], [ 1707357360, - "71386" + '71386' ], [ 1707357420, - "119827" + '119827' ], [ 1707357480, - "63332" + '63332' ], [ 1707357540, - "139829" + '139829' ], [ 1707357600, - "12184" + '12184' ], [ 1707357660, - "3922" + '3922' ], [ 1707357720, - "41349" + '41349' ], [ 1707357780, - "54148" + '54148' ], [ 1707357840, - "2530" + '2530' ], [ 1707357900, - "17814" + '17814' ], [ 1707357960, - "0" + '0' ], [ 1707358020, - "25336" + '25336' ], [ 1707358080, - "5684" + '5684' ], [ 1707358140, - "46829" + '46829' ], [ 1707358200, - "2546" + '2546' ], [ 1707358260, - "33345" + '33345' ], [ 1707358320, - "304847" + '304847' ], [ 1707358380, - "73994" + '73994' ], [ 1707358440, - "170837" + '170837' ], [ 1707358500, - "35891" + '35891' ], [ 1707358560, - "138272" + '138272' ], [ 1707358620, - "194981" + '194981' ], [ 1707358680, - "292987" + '292987' ], [ 1707358740, - "95844" + '95844' ], [ 1707358800, - "7424" + '7424' ], [ 1707358860, - "22057" + '22057' ], [ 1707358920, - "61791" + '61791' ], [ 1707358980, - "23838" + '23838' ], [ 1707359040, - "11664" + '11664' ], [ 1707359100, - "76485" + '76485' ], [ 1707359160, - "37542" + '37542' ], [ 1707359220, - "40851" + '40851' ], [ 1707359280, - "27611" + '27611' ], [ 1707359340, - "170709" + '170709' ], [ 1707359400, - "2290" + '2290' ], [ 1707359460, - "15577" + '15577' ], [ 1707359520, - "124024" + '124024' ], [ 1707359580, - "22947" + '22947' ], [ 1707359640, - "4131" + '4131' ], [ 1707359700, - "208705" + '208705' ], [ 1707359760, - "120407" + '120407' ], [ 1707359820, - "58706" + '58706' ], [ 1707359880, - "90036" + '90036' ], [ 1707359940, - "41000" + '41000' ], [ 1707360000, - "87489" + '87489' ], [ 1707360060, - "12170" + '12170' ], [ 1707360120, - "24611" + '24611' ], [ 1707360180, - "25815" + '25815' ], [ 1707360240, - "50903" + '50903' ], [ 1707360300, - "102385" + '102385' ], [ 1707360360, - "58121" + '58121' ], [ 1707360420, - "95365" + '95365' ], [ 1707360480, - "66674" + '66674' ], [ 1707360540, - "89708" + '89708' ], [ 1707360600, - "64098" + '64098' ], [ 1707360660, - "41778" + '41778' ], [ 1707360720, - "246241" + '246241' ], [ 1707360780, - "0" + '0' ] ] return { @@ -280,4 +280,24 @@ if (openMock) { } } }) + Mock.mock(new RegExp(BASE_CONFIG.baseUrl + 'v1/locationIntelligence/active/count.*'), 'get', function (requestObj) { + const item = JSON.parse(requestObj.body) + if (item && item.cycle === 0) { + return { + msg: 'success', + code: 200, + data: { + total: 19366 + } + } + } else { + return { + msg: 'success', + code: 200, + data: { + total: 16366 + } + } + } + }) } diff --git a/src/utils/api.js b/src/utils/api.js index c977c67f..56073af9 100644 --- a/src/utils/api.js +++ b/src/utils/api.js @@ -355,7 +355,8 @@ export const api = { location: { map: apiVersion + '/locationIntelligence/map', density: apiVersion + '/locationIntelligence/population/density', - trend: apiVersion + '/locationIntelligence/active/subscribers' + trend: apiVersion + '/locationIntelligence/active/trend', + count: apiVersion + '/locationIntelligence/active/count' } } diff --git a/src/utils/constants.js b/src/utils/constants.js index 811e29e7..955f8c50 100644 --- a/src/utils/constants.js +++ b/src/utils/constants.js @@ -1901,7 +1901,7 @@ export const pluginBasicInfo = [ { id: 112, name: 'IpVanish VPN', - type: ['IP','Domain'], + type: ['IP', 'Domain'], schedule: 'plugin.hourly', desc: 'knowledgeBase.desc.ipVanishDomain', iconUrl: 'images/knowledge-base-logo/ip-vanish.png' @@ -1909,7 +1909,7 @@ export const pluginBasicInfo = [ { id: 113, name: 'Ivacy VPN', - type: ['IP','Domain'], + type: ['IP', 'Domain'], schedule: 'plugin.hourly', desc: 'knowledgeBase.desc.ivacyDomain', iconUrl: 'images/knowledge-base-logo/ivacy.png' @@ -1925,7 +1925,7 @@ export const pluginBasicInfo = [ { id: 115, name: 'CyberGhost VPN', - type: ['IP','Domain'], + type: ['IP', 'Domain'], schedule: 'plugin.hourly', desc: 'knowledgeBase.desc.cyberGhostDomain', iconUrl: 'images/knowledge-base-logo/cyber-ghost.png' @@ -1933,7 +1933,7 @@ export const pluginBasicInfo = [ { id: 116, name: 'Windscribe VPN', - type: ['IP','Domain'], + type: ['IP', 'Domain'], schedule: 'plugin.hourly', desc: 'knowledgeBase.desc.windscribeDomain', iconUrl: 'images/knowledge-base-logo/windscribe.png' @@ -1961,7 +1961,7 @@ export const pluginBasicInfo = [ schedule: 'plugin.hourly', desc: 'knowledgeBase.desc.vpnunlimited', iconUrl: 'images/knowledge-base-logo/vpnunlimited.png' - }, + } ] export const builtInKnowledgeBaseBasicInfo = [ diff --git a/src/views/location/Index.vue b/src/views/location/Index.vue index 09e63a96..e3b7e3fd 100644 --- a/src/views/location/Index.vue +++ b/src/views/location/Index.vue @@ -26,14 +26,23 @@