fix: 修复问题:app-risk筛选、实体下拉预览地图、实体下拉npm值
This commit is contained in:
@@ -191,7 +191,6 @@ export default {
|
|||||||
const requestUrl = url || (chartParams && chartParams.url)
|
const requestUrl = url || (chartParams && chartParams.url)
|
||||||
if (requestUrl) {
|
if (requestUrl) {
|
||||||
get(replaceUrlPlaceholder(requestUrl, this.queryParams)).then(response => {
|
get(replaceUrlPlaceholder(requestUrl, this.queryParams)).then(response => {
|
||||||
1
|
|
||||||
// if (this.chartInfo.type === 23 && testData) {
|
// if (this.chartInfo.type === 23 && testData) {
|
||||||
// response = testData.data
|
// response = testData.data
|
||||||
// } else if (this.chartInfo.type === 24 && testData) {
|
// } else if (this.chartInfo.type === 24 && testData) {
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleQueryParams (queryParams) {
|
handleQueryParams (queryParams) {
|
||||||
return this.timeFilter = {
|
this.timeFilter = {
|
||||||
startTime: Number(queryParams.startTime) * 1000,
|
startTime: Number(queryParams.startTime) * 1000,
|
||||||
endTime: Number(queryParams.endTime) * 1000
|
endTime: Number(queryParams.endTime) * 1000
|
||||||
}
|
}
|
||||||
@@ -126,7 +126,7 @@ export default {
|
|||||||
self.loadPieTableData(this.allSelectPieChartName)
|
self.loadPieTableData(this.allSelectPieChartName)
|
||||||
} else { // 否则查询当前name数据
|
} else { // 否则查询当前name数据
|
||||||
self.selectPieChartName = echartParams.name
|
self.selectPieChartName = echartParams.name
|
||||||
self.loadPieTableData(echartParams.name)
|
self.loadPieTableData(echartParams.data.data.appRisk || echartParams.name)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ export default {
|
|||||||
...r,
|
...r,
|
||||||
showValue: (r.value || r.value === 0) ? valueToRangeValue(r.value, chartParams.unitType).join(' ') : ''
|
showValue: (r.value || r.value === 0) ? valueToRangeValue(r.value, chartParams.unitType).join(' ') : ''
|
||||||
}))
|
}))
|
||||||
polygonSeries.data = [...seriesData]
|
!this.$_.isEmpty(seriesData) && (polygonSeries.data = [...seriesData])
|
||||||
const sorted = seriesData.sort((a, b) => b.value - a.value)
|
const sorted = seriesData.sort((a, b) => b.value - a.value)
|
||||||
const allZero = this.$_.isEmpty(sorted) || Number(sorted[0].value) === 0 // 数据全为0的情况,legend只显示1个颜色
|
const allZero = this.$_.isEmpty(sorted) || Number(sorted[0].value) === 0 // 数据全为0的情况,legend只显示1个颜色
|
||||||
|
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ import { defaultPageSize, detectionPageType } from '@/utils/constants'
|
|||||||
import { getNowTime, getSecond } from '@/utils/date-util'
|
import { getNowTime, getSecond } from '@/utils/date-util'
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
import * as echarts from 'echarts'
|
import * as echarts from 'echarts'
|
||||||
import { multipleBarOption, pieForSeverity, activeAttackBar, getAttackColor, getSeverityColor,getSeriesIndex } from '@/views/detections/options/detectionOptions'
|
import { multipleBarOption, pieForSeverity, activeAttackBar, getAttackColor, getSeverityColor, getSeriesIndex } from '@/views/detections/options/detectionOptions'
|
||||||
import { api, getData } from '@/utils/api'
|
import { api, getData } from '@/utils/api'
|
||||||
import { useRoute } from 'vue-router'
|
import { useRoute } from 'vue-router'
|
||||||
|
|
||||||
@@ -201,21 +201,21 @@ export default {
|
|||||||
getData(api.detection[this.pageType].eventSeverityTrend, params).then(data => {
|
getData(api.detection[this.pageType].eventSeverityTrend, params).then(data => {
|
||||||
data = [
|
data = [
|
||||||
{
|
{
|
||||||
legend: "critical",
|
legend: 'critical',
|
||||||
values: [[1435781430781, "5"], [1435781431781, "3"],[1435781432781, "5"], [1435781433781, "3"]]
|
values: [[1435781430781, '5'], [1435781431781, '3'], [1435781432781, '5'], [1435781433781, '3']]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
legend: "high",
|
legend: 'high',
|
||||||
values: [[1435781430781, "2"], [1435781431781, "3"],[1435781432781, "6"], [1435781433781, "4"]]
|
values: [[1435781430781, '2'], [1435781431781, '3'], [1435781432781, '6'], [1435781433781, '4']]
|
||||||
}, {
|
}, {
|
||||||
legend: "medium",
|
legend: 'medium',
|
||||||
values: [[1435781430781, "4"], [1435781431781, "1"],[1435781432781, "5"], [1435781433781, "3"]]
|
values: [[1435781430781, '4'], [1435781431781, '1'], [1435781432781, '5'], [1435781433781, '3']]
|
||||||
}, {
|
}, {
|
||||||
legend: "low",
|
legend: 'low',
|
||||||
values: [[1435781430781, "1"], [1435781431781, "4"],[1435781432781, "1"], [1435781433781, "3"]]
|
values: [[1435781430781, '1'], [1435781431781, '4'], [1435781432781, '1'], [1435781433781, '3']]
|
||||||
}, {
|
}, {
|
||||||
legend: "info",
|
legend: 'info',
|
||||||
values: [[1435781430781, "5"], [1435781431781, "7"],[1435781432781, "5"], [1435781433781, "8"]]
|
values: [[1435781430781, '5'], [1435781431781, '7'], [1435781432781, '5'], [1435781433781, '8']]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
const chartDom = document.getElementById(`eventSeverityTrendBar${this.pageType}`)
|
const chartDom = document.getElementById(`eventSeverityTrendBar${this.pageType}`)
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ const severitySeriesIndexMappings = [
|
|||||||
{ value: 'critical', index: '0' },
|
{ value: 'critical', index: '0' },
|
||||||
{ value: 'high', index: '1' },
|
{ value: 'high', index: '1' },
|
||||||
{ value: 'medium', index: '2' },
|
{ value: 'medium', index: '2' },
|
||||||
{ value: 'low', index: '3'},
|
{ value: 'low', index: '3' },
|
||||||
{ value: 'info', index: '4' }
|
{ value: 'info', index: '4' }
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@@ -171,7 +171,7 @@
|
|||||||
:chart-info="chart"
|
:chart-info="chart"
|
||||||
:chart-data="chartData"
|
:chart-data="chartData"
|
||||||
:entity="entityCopy"
|
:entity="entityCopy"
|
||||||
:query-params="getQueryParams"
|
:query-params="queryParams"
|
||||||
:hide-header="true"
|
:hide-header="true"
|
||||||
@getCurrentTimeRange="getCurrentTimeRange"
|
@getCurrentTimeRange="getCurrentTimeRange"
|
||||||
></chart>
|
></chart>
|
||||||
@@ -281,7 +281,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'entityData.appName': {
|
entityData: {
|
||||||
immediate: true,
|
immediate: true,
|
||||||
deep: true,
|
deep: true,
|
||||||
handler (n) {
|
handler (n) {
|
||||||
@@ -290,6 +290,7 @@ export default {
|
|||||||
this.singleValues.chartDatas.splice(1, 1, this.$_.get(n, 'httpResponseLatency'))
|
this.singleValues.chartDatas.splice(1, 1, this.$_.get(n, 'httpResponseLatency'))
|
||||||
this.singleValues.chartDatas.splice(2, 1, this.$_.get(n, 'sslConLatency'))
|
this.singleValues.chartDatas.splice(2, 1, this.$_.get(n, 'sslConLatency'))
|
||||||
this.singleValues.chartDatas.splice(3, 1, this.$_.get(n, 'sequenceGapLossPercent'))
|
this.singleValues.chartDatas.splice(3, 1, this.$_.get(n, 'sequenceGapLossPercent'))
|
||||||
|
this.singleValues.chartDatas.splice(4, 1, this.$_.get(n, 'pktRetransPercent'))
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.getRelatedServerDataOne(this.relatedServerDomainUrl)
|
this.getRelatedServerDataOne(this.relatedServerDomainUrl)
|
||||||
this.getRelatedServerDataTow(this.relatedServerIpUrl)
|
this.getRelatedServerDataTow(this.relatedServerIpUrl)
|
||||||
@@ -299,6 +300,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
|
this.queryParams = this.getQueryParams()
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.chartGetMap()
|
this.chartGetMap()
|
||||||
|
|||||||
@@ -179,7 +179,7 @@
|
|||||||
:chart-info="chart"
|
:chart-info="chart"
|
||||||
:chart-data="chartData"
|
:chart-data="chartData"
|
||||||
:entity="entityCopy"
|
:entity="entityCopy"
|
||||||
:query-params="getQueryParams"
|
:query-params="queryParams"
|
||||||
:hide-header="true"
|
:hide-header="true"
|
||||||
@getCurrentTimeRange="getCurrentTimeRange"
|
@getCurrentTimeRange="getCurrentTimeRange"
|
||||||
></chart>
|
></chart>
|
||||||
@@ -288,7 +288,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'entityData.domainName': {
|
entityData: {
|
||||||
immediate: true,
|
immediate: true,
|
||||||
deep: true,
|
deep: true,
|
||||||
handler (n) {
|
handler (n) {
|
||||||
@@ -307,6 +307,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
|
this.queryParams = this.getQueryParams()
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.chartGetMap()
|
this.chartGetMap()
|
||||||
|
|||||||
@@ -163,7 +163,7 @@
|
|||||||
:chart-info="chart"
|
:chart-info="chart"
|
||||||
:chart-data="chartData"
|
:chart-data="chartData"
|
||||||
:entity="entityCopy"
|
:entity="entityCopy"
|
||||||
:query-params="getQueryParams"
|
:query-params="queryParams"
|
||||||
:hide-header="true"
|
:hide-header="true"
|
||||||
@getCurrentTimeRange="getCurrentTimeRange"
|
@getCurrentTimeRange="getCurrentTimeRange"
|
||||||
></chart>
|
></chart>
|
||||||
@@ -275,7 +275,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'entityData.ipAddr': {
|
entityData: {
|
||||||
deep: true,
|
deep: true,
|
||||||
handler (n) {
|
handler (n) {
|
||||||
if (n) {
|
if (n) {
|
||||||
@@ -293,6 +293,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
|
this.queryParams = this.getQueryParams()
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.chartGetMap()
|
this.chartGetMap()
|
||||||
|
|||||||
@@ -23,7 +23,8 @@ export default {
|
|||||||
chartOption: null,
|
chartOption: null,
|
||||||
sentChart: null,
|
sentChart: null,
|
||||||
receivedChart: null
|
receivedChart: null
|
||||||
}
|
},
|
||||||
|
queryParams: {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|||||||
Reference in New Issue
Block a user