From 95d907cae792db27bc5731bb58a64c45b4735e3e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=88=98=E6=B4=AA=E6=B4=AA?= <2498601771@qq.com>
Date: Tue, 6 Jun 2023 10:39:42 +0800
Subject: [PATCH] =?UTF-8?q?CN-1063:=20=E4=BA=BA=E5=B7=A5=E6=B5=8B=E8=AF=95?=
=?UTF-8?q?--=E5=AE=9E=E4=BD=93=E8=AF=A6=E6=83=85=E6=B5=81=E9=87=8F?=
=?UTF-8?q?=E6=8A=98=E7=BA=BF=E5=9B=BE=E5=92=8C=E5=BA=95=E4=B8=8B3?=
=?UTF-8?q?=E4=B8=AAtab?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/mock/entity.js | 20 +++++++++----------
src/utils/api.js | 2 +-
src/utils/tools.js | 12 +++++++++++
.../tabs/InformationAggregation.vue | 10 ++++++++--
.../entityDetail/tabs/PerformanceEvent.vue | 20 +++++++++++--------
.../entityDetail/tabs/SecurityEvent.vue | 16 +++++++++------
6 files changed, 53 insertions(+), 27 deletions(-)
diff --git a/src/mock/entity.js b/src/mock/entity.js
index 3fa37c1b..254fcda2 100644
--- a/src/mock/entity.js
+++ b/src/mock/entity.js
@@ -76,7 +76,7 @@ if (openMock) {
victimIp: '116.178.217.92',
offenderDomain: 'baidu.com',
victimDomain: 'mi.com',
- eventSeverity: 'Critical',
+ eventSeverity: 'critical',
malwareName: 'NetWire RC',
cryptominingPool: null,
startTime: 1683186600,
@@ -91,7 +91,7 @@ if (openMock) {
victimIp: '116.178.217.93',
offenderDomain: 'baidu.com',
victimDomain: 'mi.com',
- eventSeverity: 'Low',
+ eventSeverity: 'low',
malwareName: 'NetWire RC',
cryptominingPool: null,
startTime: 1683186600,
@@ -106,7 +106,7 @@ if (openMock) {
victimIp: '116.178.217.93',
offenderDomain: 'baidu.com',
victimDomain: 'mi.com',
- eventSeverity: 'Low',
+ eventSeverity: 'low',
malwareName: 'NetWire RC',
cryptominingPool: null,
startTime: 1683186600,
@@ -121,7 +121,7 @@ if (openMock) {
victimIp: '116.178.217.93',
offenderDomain: 'baidu.com',
victimDomain: 'mi.com',
- eventSeverity: 'Low',
+ eventSeverity: 'low',
malwareName: 'NetWire RC',
cryptominingPool: null,
startTime: 1683186600,
@@ -136,7 +136,7 @@ if (openMock) {
victimIp: '116.178.217.93',
offenderDomain: 'baidu.com',
victimDomain: 'mi.com',
- eventSeverity: 'Low',
+ eventSeverity: 'low',
malwareName: 'NetWire RC',
cryptominingPool: null,
startTime: 1683186600,
@@ -151,7 +151,7 @@ if (openMock) {
victimIp: '116.178.217.93',
offenderDomain: 'baidu.com',
victimDomain: 'mi.com',
- eventSeverity: 'Low',
+ eventSeverity: 'low',
malwareName: 'NetWire RC',
cryptominingPool: null,
startTime: 1683186600,
@@ -166,7 +166,7 @@ if (openMock) {
victimIp: '116.178.217.93',
offenderDomain: 'baidu.com',
victimDomain: 'mi.com',
- eventSeverity: 'Low',
+ eventSeverity: 'low',
malwareName: 'NetWire RC',
cryptominingPool: null,
startTime: 1683186600,
@@ -191,7 +191,7 @@ if (openMock) {
serverIp: '116.178.78.180',
domain: null,
appName: null,
- eventSeverity: 'Critical',
+ eventSeverity: 'critical',
eventType: 'Http error',
startTime: 1683250500,
durationMs: 900000,
@@ -203,7 +203,7 @@ if (openMock) {
serverIp: '116.178.78.180',
domain: null,
appName: null,
- eventSeverity: 'Info',
+ eventSeverity: 'info',
eventType: 'Http error',
startTime: 1683250500,
durationMs: 900000,
@@ -289,7 +289,7 @@ if (openMock) {
data: result
}
})
- Mock.mock(new RegExp(`${BASE_CONFIG.baseUrl}${BASE_CONFIG.apiVersion}/entity/kb/intelligence/list.*`), 'get', function (requestObj) {
+ Mock.mock(new RegExp(`${BASE_CONFIG.baseUrl}${BASE_CONFIG.apiVersion}/entity/detail/kb/intelligence/list.*`), 'get', function (requestObj) {
const result = [
{
location: {
diff --git a/src/utils/api.js b/src/utils/api.js
index b23f72c4..53dea2f8 100644
--- a/src/utils/api.js
+++ b/src/utils/api.js
@@ -241,7 +241,7 @@ export const api = {
openPort: '',
basicInfo: BASE_CONFIG.apiVersion + '/entity/detail/basic',
tags: BASE_CONFIG.apiVersion + '/entity/detail/kb/intelligence/tag',
- informationAggregation: BASE_CONFIG.apiVersion + '/entity/kb/intelligence/list'
+ informationAggregation: BASE_CONFIG.apiVersion + '/entity/detail/kb/intelligence/list'
}
}
diff --git a/src/utils/tools.js b/src/utils/tools.js
index 0606d2e3..384f6b2c 100644
--- a/src/utils/tools.js
+++ b/src/utils/tools.js
@@ -1271,3 +1271,15 @@ export function copySelectionText () {
}
return copySuccess
}
+
+/**
+ * 字符串首字母转大写
+ * @param str
+ * @returns {*}
+ */
+export function toUpperCaseByString (str) {
+ if (str) {
+ str = str.slice(0, 1).toUpperCase() + str.slice(1).toLowerCase()
+ }
+ return str
+}
diff --git a/src/views/charts2/charts/entityDetail/tabs/InformationAggregation.vue b/src/views/charts2/charts/entityDetail/tabs/InformationAggregation.vue
index bf88b995..43d6490f 100644
--- a/src/views/charts2/charts/entityDetail/tabs/InformationAggregation.vue
+++ b/src/views/charts2/charts/entityDetail/tabs/InformationAggregation.vue
@@ -76,10 +76,10 @@
>