diff --git a/src/assets/css/components/views/detections/detection-overview.scss b/src/assets/css/components/views/detections/detection-overview.scss index 0a7b2c51..1cb56c55 100644 --- a/src/assets/css/components/views/detections/detection-overview.scss +++ b/src/assets/css/components/views/detections/detection-overview.scss @@ -8,6 +8,18 @@ display: flex; flex-direction: column; + .overview__metric { + display:flex; + flex-direction: row; + padding-top: 10px; + + .metric__column { + display:flex; + flex-direction: column; + margin-right: 15px; + } + } + .overview__title { padding: 10px 0; color: #333; @@ -33,6 +45,19 @@ color: #6B717B; } + .row__charts { + height: 20px; + width: 80px; + } + + .row__content--metric { + display: flex; + flex-wrap: nowrap; + color: #666666; + font-size:14px; + font-weight: 400; + } + .row__content { display: flex; color: #3976CB; diff --git a/src/utils/api.js b/src/utils/api.js index de3fa60a..d365a70b 100644 --- a/src/utils/api.js +++ b/src/utils/api.js @@ -93,7 +93,8 @@ export const api = { activeEntity: '/interface/detection/performance/filter/activeEntity', listBasic: '/interface/detection/performance/list/basic', listCount: '/interface/detection/performance/list/count', - overviewBasic: '/interface/detection/performance/detail/overview/basic' + overviewBasic: '/interface/detection/performance/detail/overview/basic', + metric:'/interface/detection/performance/detail/overview/metric' } } } diff --git a/src/views/detections/options/detectionOptions.js b/src/views/detections/options/detectionOptions.js index 4455a2e8..35d09d0e 100644 --- a/src/views/detections/options/detectionOptions.js +++ b/src/views/detections/options/detectionOptions.js @@ -1,6 +1,7 @@ import { chartColor, - tooLongFormatter + tooLongFormatter, + axisFormatter } from '@/views/charts/charts/tools' import unitConvert from '@/utils/unit-convert' import _ from 'lodash' @@ -286,3 +287,76 @@ export const activeAttackBar = { barCategoryGap: '10%' }] } +export const metricOption = { + tooltip: { + appendToBody: true, + trigger: 'axis', + textStyle: { + width: '20px', + overflow: 'truncate' + }, + //formatter: axisFormatter, + show: true, + className: 'nz-chart-tooltip', + extraCssText: 'box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);max-width: 300px !important' + }, + xAxis: { + type: 'time', + show: false + }, + yAxis: { + type: 'value', + show: false + }, + animation: false, + grid: { + left: 0, + bottom: 2, + top: 5, + right: 0 + }, + legend: { + show: false + }, + series: [ + { + name:'metric', + type: 'line', + legendHoverLink: false, + lineStyle: { + width: 1, + type:'dashed' + }, + color: '#ec836c', + data: [], + showSymbol: false + }, + { + name:'metric', + type: 'line', + legendHoverLink: false, + lineStyle: { + width: 1, + type:'solid' + }, + areaStyle: { + color: 'rgba(244, 187, 174, 0.59)' + }, + color: '#ec836c', + data: [], + showSymbol: false + }, + { + name:'metric', + type: 'line', + legendHoverLink: false, + lineStyle: { + width: 1, + type:'dashed' + }, + color: '#ec836c', + data: [], + showSymbol: false + } + ] +} diff --git a/src/views/detections/overview/DetectionPerformanceEventDomainOverview.vue b/src/views/detections/overview/DetectionPerformanceEventDomainOverview.vue index 4a499d6b..1e3506dd 100644 --- a/src/views/detections/overview/DetectionPerformanceEventDomainOverview.vue +++ b/src/views/detections/overview/DetectionPerformanceEventDomainOverview.vue @@ -59,13 +59,45 @@