From 3ecfcd275271a4135724b30bfb6073fdac7a3d32 Mon Sep 17 00:00:00 2001 From: hyx Date: Fri, 10 Jun 2022 10:35:51 +0800 Subject: [PATCH] =?UTF-8?q?CN-592=20=E5=9F=9F=E5=90=8D=E9=80=92=E5=BD=92?= =?UTF-8?q?=E8=A7=A3=E6=9E=90=E6=A0=B7=E5=BC=8F=E4=BC=98=E5=8C=96:=20?= =?UTF-8?q?=E7=AC=AC=E4=B8=89=E5=88=97=20dnsType=20=E8=A7=A3=E6=9E=90?= =?UTF-8?q?=E7=BB=93=E6=9E=9C=E4=B8=8D=E5=AF=B9=EF=BC=8C=E8=BF=9B=E8=A1=8C?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/layout/Container.vue | 10 +++++----- src/utils/constants.js | 6 +++--- .../charts/charts/ChartDomainRecursiveResolve.vue | 14 ++++++++++++-- src/views/detections/DetectionList.vue | 6 +++--- src/views/entityExplorer/entityList/EntityList.vue | 6 +++--- 5 files changed, 26 insertions(+), 16 deletions(-) diff --git a/src/components/layout/Container.vue b/src/components/layout/Container.vue index 912b9267..8def27cc 100644 --- a/src/components/layout/Container.vue +++ b/src/components/layout/Container.vue @@ -18,11 +18,11 @@ export default { return this.$route.name !== undefined ? this.$route.name + +new Date() : this.$route + +new Date() }, entityDetectionStyle () { - let route = this.$route.name !== undefined ? this.$route.name : this.$route - if(listScrollPath.indexOf(route.path)>-1){ - return "overflow:auto;" - }else { - return "" + const route = this.$route.name !== undefined ? this.$route.name : this.$route + if (listScrollPath.indexOf(route.path) > -1) { + return 'overflow:auto;' + } else { + return '' } } } diff --git a/src/utils/constants.js b/src/utils/constants.js index 9c48d0ff..2aa29c06 100644 --- a/src/utils/constants.js +++ b/src/utils/constants.js @@ -146,9 +146,9 @@ export const detectionPageType = { } export const listScrollPath = [ - "/entityExplorer", - "/detection/performanceEvent", - "/detection/securityEvent" + '/entityExplorer', + '/detection/performanceEvent', + '/detection/securityEvent' ] export const dnsServerRole = { diff --git a/src/views/charts/charts/ChartDomainRecursiveResolve.vue b/src/views/charts/charts/ChartDomainRecursiveResolve.vue index 92a0cdd6..e84d0f29 100644 --- a/src/views/charts/charts/ChartDomainRecursiveResolve.vue +++ b/src/views/charts/charts/ChartDomainRecursiveResolve.vue @@ -52,7 +52,7 @@ export default { }, data () { return { - /* dnsRecordType:[ + dnsRecordType: [ 'A', 'AAAA', 'AFSDB', @@ -80,7 +80,7 @@ export default { 'SRV', 'TLSA', 'TXT' - ] */ + ] } }, methods: { @@ -161,6 +161,16 @@ export default { specialArray[4] = specialArray[4] + ' ' + i } }) + const dnsTypes = specialArray[4].split(separator) + let isDnsTypeFinish = false + dnsTypes.forEach(item => { + if (!isDnsTypeFinish && this.dnsRecordType.indexOf(item) > -1) { + specialArray[3] = specialArray[3] + ' ' + item + specialArray[4] = specialArray[4].substring(specialArray[4].indexOf(item) + item.length) + } else { + isDnsTypeFinish = true + } + }) rowArray = specialArray } const obj = { diff --git a/src/views/detections/DetectionList.vue b/src/views/detections/DetectionList.vue index 72f24040..30da9f47 100644 --- a/src/views/detections/DetectionList.vue +++ b/src/views/detections/DetectionList.vue @@ -69,9 +69,9 @@ export default { this.$refs[`detectionRow${this.collapseIndex}`].collapse() }, handleScroll (e) { - if(e.target.className==="cn-detection__shadow"){ - let container = document.getElementById("cnContainer") - container.scrollTop += e.deltaY/2 + if (e.target.className === 'cn-detection__shadow') { + const container = document.getElementById('cnContainer') + container.scrollTop += e.deltaY / 2 } } }, diff --git a/src/views/entityExplorer/entityList/EntityList.vue b/src/views/entityExplorer/entityList/EntityList.vue index 23a5f050..af6d8e07 100644 --- a/src/views/entityExplorer/entityList/EntityList.vue +++ b/src/views/entityExplorer/entityList/EntityList.vue @@ -116,9 +116,9 @@ export default { this.$emit('next', val) }, handleScrollEntity (e) { - if(e.target.className==="cn-entity__shadow"){ - let container = document.getElementById("cnContainer") - container.scrollTop += e.deltaY/2 + if (e.target.className === 'cn-entity__shadow') { + const container = document.getElementById('cnContainer') + container.scrollTop += e.deltaY / 2 } } },