fix: 去除未被使用的文件引用,以及调整部分代码格式
This commit is contained in:
@@ -61,9 +61,7 @@ export class Dataset {
|
||||
if (!(list && list.length > 0)) {
|
||||
return
|
||||
}
|
||||
let tempTitle
|
||||
let results
|
||||
tempTitle = {
|
||||
const tempTitle = {
|
||||
type: 'abstract',
|
||||
text: '',
|
||||
// displayText: "Filter",
|
||||
@@ -73,7 +71,7 @@ export class Dataset {
|
||||
}
|
||||
}
|
||||
|
||||
results = list.map((item) => {
|
||||
const results = list.map((item) => {
|
||||
return {
|
||||
// text: item.name,
|
||||
// displayText: `${item.label}(${item.name})`,
|
||||
@@ -91,9 +89,7 @@ export class Dataset {
|
||||
if (!(list && list.length > 0)) {
|
||||
return
|
||||
}
|
||||
let tempTitle = {}
|
||||
let results = []
|
||||
tempTitle = {
|
||||
const tempTitle = {
|
||||
type: 'abstract',
|
||||
text: '',
|
||||
// displayText: "Operator",
|
||||
@@ -102,7 +98,7 @@ export class Dataset {
|
||||
// hint(cm, callback, options) {}
|
||||
}
|
||||
|
||||
results = list.map((item) => {
|
||||
const results = list.map((item) => {
|
||||
return {
|
||||
text: item.name,
|
||||
displayText: item.name,
|
||||
@@ -168,25 +164,24 @@ export class Dataset {
|
||||
|
||||
getOperates (type, item) {
|
||||
// 获取 当前类型支持的操作符
|
||||
let operator_functions = ''
|
||||
let operatorFunctions = ''
|
||||
if (item && item.doc && item.doc.constraints && item.doc.constraints.operator_functions) {
|
||||
operator_functions = item.doc.constraints.operator_functions
|
||||
operatorFunctions = item.doc.constraints.operator_functions
|
||||
} else {
|
||||
const functions = this.sourceData.operatesDic.find(item => {
|
||||
return item.type === type
|
||||
})
|
||||
operator_functions = functions && functions.functions || ''
|
||||
// eslint-disable-next-line no-mixed-operators
|
||||
operatorFunctions = functions && functions.functions || ''
|
||||
}
|
||||
const funList = operator_functions.split(',')
|
||||
let result = []
|
||||
result = funList.map((item) => {
|
||||
const funList = operatorFunctions.split(',')
|
||||
return funList.map((item) => {
|
||||
return {
|
||||
text: item,
|
||||
displayText: item,
|
||||
className: 'filter-item el-dropdown-menu__item relative-item'
|
||||
}
|
||||
})
|
||||
return result
|
||||
}
|
||||
|
||||
getFunctions (type, item) {
|
||||
@@ -199,7 +194,7 @@ export class Dataset {
|
||||
const functions = this.sourceData.funcDic.find(item => {
|
||||
return item.type === type
|
||||
})
|
||||
functionsInfo = functions && functions.functions || ''
|
||||
functionsInfo = (functions && functions.functions) || ''
|
||||
}
|
||||
|
||||
const funList = functionsInfo.split(',')
|
||||
|
||||
@@ -247,9 +247,8 @@ import {
|
||||
chartActiveIpTableOrderOptions,
|
||||
chartPieTableTopOptions,
|
||||
eventSeverity,
|
||||
chartTableColumnMapping, panelTypeAndRouteMapping
|
||||
chartTableColumnMapping
|
||||
} from '@/utils/constants'
|
||||
import { useRouter } from 'vue-router'
|
||||
|
||||
export default {
|
||||
name: 'ChartHeader',
|
||||
|
||||
@@ -3,7 +3,7 @@ import { tooLongFormatter } from '../tools'
|
||||
import { chartColor, storageKey } from '@/utils/constants'
|
||||
|
||||
const legendFontSize = localStorage.getItem(storageKey.echartLegendFontSize)
|
||||
const labelFontSize = localStorage.getItem(storageKey.echartLabelFontSize)
|
||||
// const labelFontSize = localStorage.getItem(storageKey.echartLabelFontSize)
|
||||
export const pieWithTable = {
|
||||
tooltip: {
|
||||
appendToBody: true
|
||||
|
||||
@@ -17,7 +17,6 @@ import PopoverContent from './LinkDirectionGrid/PopoverContent'
|
||||
import { computeScore } from '@/utils/tools'
|
||||
import axios from 'axios'
|
||||
import _ from 'lodash'
|
||||
import { bigramAnalysis, bigramAnalysisOneWay, bigramNextHopAnalysis, bigramNextHopAnalysisOneWay } from './test-data'
|
||||
|
||||
export default {
|
||||
name: 'LinkDirectionGrid',
|
||||
|
||||
@@ -138,7 +138,6 @@ import { useRoute } from 'vue-router'
|
||||
import Loading from '@/components/common/Loading'
|
||||
import ChartTabs from '@/components/common/ChartTabs'
|
||||
import { useStore } from 'vuex'
|
||||
import { tooLongFormatter } from '@/views/charts/charts/tools'
|
||||
import { format } from 'echarts'
|
||||
import Parser from '@/components/advancedSearch/meta/parser'
|
||||
import { schemaDetectionSecurity } from '@/utils/static-data'
|
||||
@@ -274,7 +273,7 @@ export default {
|
||||
loading: false,
|
||||
oldActiveEntitySearchValue: '',
|
||||
initFlag: true, // 初始化标识,初始化时保证mounted执行
|
||||
detectionChart:shallowRef(null)
|
||||
detectionChart: shallowRef(null)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -494,7 +493,7 @@ export default {
|
||||
echarts.dispose(this.detectionChart)
|
||||
}
|
||||
this.detectionChart = echarts.init(chartDom)
|
||||
//this.chartInit.push(shallowRef(detectionChart))
|
||||
// this.chartInit.push(shallowRef(detectionChart))
|
||||
const securityTypeOption = this.$_.cloneDeep(pieForSeverity)
|
||||
securityTypeOption.series[0].data = data.map(d => {
|
||||
return { value: d.count, name: d.eventType, itemStyle: { color: getAttackColor(d.eventType) } }
|
||||
@@ -848,8 +847,8 @@ export default {
|
||||
|
||||
const chartDom = document.getElementById(`detectionCategoryPer${this.pageType}`)
|
||||
this.detectionChart = echarts.getInstanceByDom(chartDom)
|
||||
if(this.detectionChart){
|
||||
let securityTypeOption = this.$_.cloneDeep(this.detectionChart.getOption())
|
||||
if (this.detectionChart) {
|
||||
const securityTypeOption = this.$_.cloneDeep(this.detectionChart.getOption())
|
||||
echarts.dispose(this.detectionChart)
|
||||
if (chartDom) {
|
||||
this.detectionChart = echarts.init(chartDom)
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
import {
|
||||
detectionTooltipFormatter,
|
||||
tooLongFormatter
|
||||
} from '@/views/charts/charts/tools'
|
||||
import { tooLongFormatter } from '@/views/charts/charts/tools'
|
||||
import unitConvert from '@/utils/unit-convert'
|
||||
import _ from 'lodash'
|
||||
import { dateFormatByAppearance, xAxisTimeFormatter, xAxisTimeRich } from '@/utils/date-util'
|
||||
|
||||
@@ -72,7 +72,6 @@
|
||||
import dataListMixin from '@/mixins/data-list'
|
||||
import KnowledgeBaseTableForCard from '@/components/table/setting/knowledgeBaseTableForCard'
|
||||
import { api } from '@/utils/api'
|
||||
import { urlParamsHandler, overwriteUrl } from '@/utils/tools'
|
||||
import { knowledgeBaseCategory, knowledgeBaseSource, knowledgeCategoryValue } from '@/utils/constants'
|
||||
import axios from 'axios'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user