From 8f8f412877f475d9b0096ec6c2e41cf40b7c22e8 Mon Sep 17 00:00:00 2001 From: chenjinsong <523037378@qq.com> Date: Tue, 22 Feb 2022 15:59:30 +0800 Subject: [PATCH] =?UTF-8?q?CN-297=20feat:=20detections=E4=B8=8B=E6=8B=89?= =?UTF-8?q?=EF=BC=88=E9=83=A8=E5=88=86=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/css/components/index.scss | 1 + .../views/detections/detection-overview.scss | 49 +++ src/utils/api.js | 4 +- src/views/detections/DetectionOverview.vue | 283 +++++++++++++++++- src/views/detections/DetectionRow.vue | 3 +- 5 files changed, 335 insertions(+), 5 deletions(-) create mode 100644 src/assets/css/components/views/detections/detection-overview.scss diff --git a/src/assets/css/components/index.scss b/src/assets/css/components/index.scss index a6bcb87e..87807789 100644 --- a/src/assets/css/components/index.scss +++ b/src/assets/css/components/index.scss @@ -23,6 +23,7 @@ @import './views/detections/detection-filter'; @import './views/detections/detection-list/detection-list'; @import './views/detections/detection-list/row'; +@import './views/detections/detection-overview'; @import './views/charts/panel'; @import 'views/charts/chartIpOpenPortBar'; @import './views/charts/chartTable'; diff --git a/src/assets/css/components/views/detections/detection-overview.scss b/src/assets/css/components/views/detections/detection-overview.scss new file mode 100644 index 00000000..d8889ec8 --- /dev/null +++ b/src/assets/css/components/views/detections/detection-overview.scss @@ -0,0 +1,49 @@ +.detection-detail-overview { + display: flex; + position: relative; + padding: 0 30px; + + &>div { + flex: 0 0 50%; + display: flex; + flex-direction: column; + + .overview__title { + padding: 10px 0; + color: #333; + font-weight: bold; + font-size: 14px; + + &:first-of-type { + padding-top: 0; + } + } + + .overview__row { + display: flex; + flex-direction: row; + align-items: flex-start; + flex-wrap: nowrap; + padding: 2px 10px 2px 0; + font-size: 14px; + + .row__label { + padding-right: 20px; + min-width: 100px; + color: #6B717B; + } + + .row__content { + display: flex; + color: #3976CB; + + &.row__content--link { + font-style: italic; + text-decoration: underline; + color: #1890FF; + cursor: pointer; + } + } + } + } +} diff --git a/src/utils/api.js b/src/utils/api.js index 438d6e39..d9611aee 100644 --- a/src/utils/api.js +++ b/src/utils/api.js @@ -81,7 +81,9 @@ export const api = { detectionVictimIp: '/interface/detection/filter/victimIp', detectionVictimLocation: '/interface/detection/filter/victimLocation', detectionSeverity: '/interface/detection/filter/severity', - detectionListBasic: '/interface/detection/list/basic' + detectionListBasic: '/interface/detection/list/basic', + detectionOverviewBasic: '/interface/detection/detail/overview/basic', + detectionOverviewEvent: '/interface/detection/detail/overview/event' } /* panel */ diff --git a/src/views/detections/DetectionOverview.vue b/src/views/detections/DetectionOverview.vue index 09125f11..7b60c808 100644 --- a/src/views/detections/DetectionOverview.vue +++ b/src/views/detections/DetectionOverview.vue @@ -1,9 +1,288 @@ diff --git a/src/views/detections/DetectionRow.vue b/src/views/detections/DetectionRow.vue index 9c2342c4..40518c4c 100644 --- a/src/views/detections/DetectionRow.vue +++ b/src/views/detections/DetectionRow.vue @@ -51,7 +51,7 @@
@@ -74,7 +74,6 @@ export default { }, data () { return { - entityData: [], isCollapse: true, // 是否是折叠状态 eventSeverityColor: { critical: '#D84C4C',