fix: 执行lint
This commit is contained in:
@@ -12,8 +12,9 @@ module.exports = {
|
||||
],
|
||||
plugins: [
|
||||
'@vue/babel-plugin-jsx',
|
||||
['@babel/proposal-class-properties', { loose: true }],
|
||||
['@babel/plugin-proposal-class-properties', { loose: true }],
|
||||
['@babel/plugin-proposal-private-methods', { loose: true }],
|
||||
['@babel/plugin-proposal-private-property-in-object', { loose: true }],
|
||||
'@babel/transform-runtime',
|
||||
'lodash'
|
||||
],
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -23,7 +23,7 @@ import CodeMirror from 'codemirror'
|
||||
import { toRaw } from 'vue'
|
||||
import _ from 'lodash'
|
||||
import { columnType } from '@/components/advancedSearch/meta/meta'
|
||||
import {handleErrorTip} from "@/components/advancedSearch/meta/error";
|
||||
import { handleErrorTip } from '@/components/advancedSearch/meta/error'
|
||||
|
||||
export default {
|
||||
name: 'TextMode',
|
||||
|
||||
@@ -233,6 +233,7 @@ export default class Parser {
|
||||
break
|
||||
}
|
||||
} else if (s === ' ') {
|
||||
// 预留
|
||||
} else if (s === '(') {
|
||||
token = new Token(types.leftBracket, s)
|
||||
token.setStart(i)
|
||||
|
||||
@@ -4,7 +4,7 @@ import { riskLevelMapping } from '@/utils/constants'
|
||||
import _ from 'lodash'
|
||||
// 补全语句,用于解析
|
||||
const sqlPrev = 'select a from b where '
|
||||
export default class SqlParser/* extends SqlParserVisitor*/ {
|
||||
export default class SqlParser/* extends SqlParserVisitor */ {
|
||||
constructor (init, columnList) {
|
||||
// super()
|
||||
this.tempMeta = null
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { defaultPageSize } from '@/utils/constants'
|
||||
import { storageKey } from '@/utils/constants'
|
||||
import { defaultPageSize, storageKey } from '@/utils/constants'
|
||||
|
||||
import { urlParamsHandler, overwriteUrl } from '@/utils/tools'
|
||||
import { ref } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
|
||||
@@ -383,7 +383,7 @@ export default {
|
||||
async mounted () {
|
||||
this.from = Object.keys(this.entityType)[0]
|
||||
// 是否需要dns的qtype和rcode的数据字典
|
||||
if(this.$route.params.typeName === fromRoute.dnsServiceInsights) {
|
||||
if (this.$route.params.typeName === fromRoute.dnsServiceInsights) {
|
||||
this.dnsQtypeMapData = await getDnsMapData('dnsQtype')
|
||||
this.dnsRcodeMapData = await getDnsMapData('dnsRcode')
|
||||
}
|
||||
@@ -463,7 +463,7 @@ export default {
|
||||
get(curTableInCode.url.drilldownList, params).then(async response => {
|
||||
if (response.code === 200) {
|
||||
this.breadcrumbColumnValueListShow = response.data.result
|
||||
if(this.from === fromRoute.dnsServiceInsights) {
|
||||
if (this.from === fromRoute.dnsServiceInsights) {
|
||||
this.dnsQtypeMapData = await getDnsMapData('dnsQtype')
|
||||
this.dnsRcodeMapData = await getDnsMapData('dnsRcode')
|
||||
}
|
||||
|
||||
@@ -4,27 +4,27 @@ const openMock = false
|
||||
if (openMock) {
|
||||
Mock.mock(new RegExp(BASE_CONFIG.baseUrl + 'visual/panel.*'), 'get', function (requestObj) {
|
||||
return {
|
||||
"msg": "success",
|
||||
"code": 200,
|
||||
"data": {
|
||||
"total": 1,
|
||||
"pageSize": 10,
|
||||
"pages": 1,
|
||||
"pageNo": 1,
|
||||
"list": [
|
||||
msg: 'success',
|
||||
code: 200,
|
||||
data: {
|
||||
total: 1,
|
||||
pageSize: 10,
|
||||
pages: 1,
|
||||
pageNo: 1,
|
||||
list: [
|
||||
{
|
||||
"id": 2,
|
||||
"name": "Network & App",
|
||||
"i18n": "npm.npm",
|
||||
"type": 2,
|
||||
"params": "",
|
||||
"cby": 1,
|
||||
"ctime": "2021-06-03 08:27:32",
|
||||
"uby": 1,
|
||||
"utime": "2021-06-03 08:28:10",
|
||||
"remark": "",
|
||||
"state": 1,
|
||||
"buildIn": 1
|
||||
id: 2,
|
||||
name: 'Network & App',
|
||||
i18n: 'npm.npm',
|
||||
type: 2,
|
||||
params: '',
|
||||
cby: 1,
|
||||
ctime: '2021-06-03 08:27:32',
|
||||
uby: 1,
|
||||
utime: '2021-06-03 08:28:10',
|
||||
remark: '',
|
||||
state: 1,
|
||||
buildIn: 1
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -58,8 +58,8 @@ const panel = {
|
||||
httpCancel: null, // 终止http请求
|
||||
rangeEchartsData: {}, // 框选echarts图表
|
||||
routerHistoryList: [], // 路由跳转记录列表
|
||||
dnsQtypeMapData:[],
|
||||
dnsRcodeMapData:[]
|
||||
dnsQtypeMapData: [],
|
||||
dnsRcodeMapData: []
|
||||
},
|
||||
mutations: {
|
||||
setShowRightBox (state, flag) {
|
||||
|
||||
@@ -64,9 +64,9 @@ const user = {
|
||||
if (tempArr[1]) {
|
||||
tempArr = tempArr[1].split('&')
|
||||
tempArr.forEach(t => {
|
||||
let firstEqualIndex = t.indexOf('=')
|
||||
let key = t.substring(0, firstEqualIndex)
|
||||
let value = t.substring(firstEqualIndex + 1)
|
||||
const firstEqualIndex = t.indexOf('=')
|
||||
const key = t.substring(0, firstEqualIndex)
|
||||
const value = t.substring(firstEqualIndex + 1)
|
||||
query[key] = value
|
||||
})
|
||||
}
|
||||
@@ -97,9 +97,9 @@ const user = {
|
||||
version: defaultConfigs.version,
|
||||
config: defaultConfigs.config
|
||||
})
|
||||
let userId = localStorage.getItem(storageKey.userId)
|
||||
let oldVersion = await getConfigVersion(userId)
|
||||
if(oldVersion !== defaultConfigs.version ){
|
||||
const userId = localStorage.getItem(storageKey.userId)
|
||||
const oldVersion = await getConfigVersion(userId)
|
||||
if (oldVersion !== defaultConfigs.version) {
|
||||
db[dbDrilldownTableConfig].delete(userId)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -877,10 +877,10 @@ export async function getDnsMapData (type) {
|
||||
}
|
||||
return codeValueMap
|
||||
}
|
||||
export function handleSpecialValue(value){
|
||||
export function handleSpecialValue (value) {
|
||||
value = value.replaceAll("'", "\\\\'")
|
||||
.replaceAll('"','\\"')
|
||||
.replaceAll('&','%26')
|
||||
.replaceAll('"', '\\"')
|
||||
.replaceAll('&', '%26')
|
||||
return value
|
||||
}
|
||||
export function combineTabList (tableType, list, commonTabList) {
|
||||
@@ -946,9 +946,9 @@ export async function readDrilldownTableConfigByUser () {
|
||||
export async function getConfigVersion (id) {
|
||||
let defaultCongfigInDb = await db[dbDrilldownTableConfig].get({ id: id })
|
||||
let version
|
||||
if(defaultCongfigInDb) {
|
||||
if (defaultCongfigInDb) {
|
||||
version = defaultCongfigInDb ? defaultCongfigInDb.version : ''
|
||||
}else {
|
||||
} else {
|
||||
defaultCongfigInDb = await db[dbDrilldownTableConfig].get({ id: 'default' })
|
||||
}
|
||||
return version
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import _ from 'lodash'
|
||||
export default {
|
||||
name: 'ChartDomainRecursiveResolve',
|
||||
props: {
|
||||
|
||||
@@ -47,7 +47,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
handleQueryParams (queryParams) {
|
||||
return this.timeFilter = {
|
||||
this.timeFilter = {
|
||||
startTime: Number(queryParams.startTime) * 1000,
|
||||
endTime: Number(queryParams.endTime) * 1000
|
||||
}
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import _ from 'lodash'
|
||||
export default {
|
||||
name: 'ChartOneSituationStatistics',
|
||||
props: {
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
<div class="ship-body-list-title">{{$t('relationShip.alert')}}</div>
|
||||
<div class="ship-body-list-value security">
|
||||
<template v-if="shipSeverity.length > 0">
|
||||
<span v-for="ship in shipSeverity" class="ship-severity">
|
||||
<span v-for="ship in shipSeverity" class="ship-severity" :key="ship">
|
||||
<span class="ship-body-list-security-alert" :class="iconClass(ship)">{{ ship.eventSeverity }}</span>
|
||||
<span class="ship-body-list-security-length">{{ ship.totalNumberOfEvents }}</span>
|
||||
</span>
|
||||
|
||||
@@ -88,7 +88,7 @@ export default {
|
||||
layout = [...n]
|
||||
}
|
||||
|
||||
/*const overviewAppChart = layout.find(c => c.type === typeMapping.networkOverview.appList)
|
||||
/* const overviewAppChart = layout.find(c => c.type === typeMapping.networkOverview.appList)
|
||||
let actuallyLength = 0
|
||||
if (overviewAppChart) {
|
||||
const params = overviewAppChart.params.app ? overviewAppChart.params : { app: [] }
|
||||
@@ -98,7 +98,7 @@ export default {
|
||||
actuallyLength = params.app.find(p => p.user === 'default').list.length + 1
|
||||
}
|
||||
overviewAppChart.h = actuallyLength % 3 > 0 ? (Math.floor(actuallyLength / 3) + 1) * 2 + 2 : Math.floor(actuallyLength / 3) * 2 + 2
|
||||
}*/
|
||||
} */
|
||||
this.layout = layout
|
||||
const overviewAppChart = layout.find(c => c.type === typeMapping.networkOverview.appList)
|
||||
if (overviewAppChart) {
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
export const appTestData = [
|
||||
{
|
||||
"type": "bytes",
|
||||
"l11": {
|
||||
"analysis": {
|
||||
"rate": 2,
|
||||
"total":2245435
|
||||
type: 'bytes',
|
||||
l11: {
|
||||
analysis: {
|
||||
rate: 2,
|
||||
total: 2245435
|
||||
},
|
||||
"values": [
|
||||
values: [
|
||||
[
|
||||
1435781430781,
|
||||
3
|
||||
@@ -17,12 +17,12 @@ export const appTestData = [
|
||||
]
|
||||
]
|
||||
},
|
||||
"a0": {
|
||||
"analysis": {
|
||||
"rate": 2,
|
||||
"total":3245435
|
||||
a0: {
|
||||
analysis: {
|
||||
rate: 2,
|
||||
total: 3245435
|
||||
},
|
||||
"values": [
|
||||
values: [
|
||||
[
|
||||
1435781430781,
|
||||
1
|
||||
@@ -35,13 +35,13 @@ export const appTestData = [
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "packets",
|
||||
"l11": {
|
||||
"analysis": {
|
||||
"rate": 3,
|
||||
"total":4245435
|
||||
type: 'packets',
|
||||
l11: {
|
||||
analysis: {
|
||||
rate: 3,
|
||||
total: 4245435
|
||||
},
|
||||
"values": [
|
||||
values: [
|
||||
[
|
||||
1435781430781,
|
||||
4
|
||||
@@ -52,12 +52,12 @@ export const appTestData = [
|
||||
]
|
||||
]
|
||||
},
|
||||
"a0": {
|
||||
"analysis": {
|
||||
"rate": 3,
|
||||
"total":2245435
|
||||
a0: {
|
||||
analysis: {
|
||||
rate: 3,
|
||||
total: 2245435
|
||||
},
|
||||
"values": [
|
||||
values: [
|
||||
[
|
||||
1435781430781,
|
||||
2
|
||||
@@ -70,13 +70,13 @@ export const appTestData = [
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "sessions",
|
||||
"l11": {
|
||||
"analysis": {
|
||||
"rate": 2,
|
||||
"total": 2245435
|
||||
type: 'sessions',
|
||||
l11: {
|
||||
analysis: {
|
||||
rate: 2,
|
||||
total: 2245435
|
||||
},
|
||||
"values": [
|
||||
values: [
|
||||
[
|
||||
1435781430781,
|
||||
3
|
||||
@@ -87,12 +87,12 @@ export const appTestData = [
|
||||
]
|
||||
]
|
||||
},
|
||||
"a0": {
|
||||
"analysis": {
|
||||
"rate": 3,
|
||||
"total": 3245435
|
||||
a0: {
|
||||
analysis: {
|
||||
rate: 3,
|
||||
total: 3245435
|
||||
},
|
||||
"values": [
|
||||
values: [
|
||||
[
|
||||
1435781430781,
|
||||
1
|
||||
@@ -107,64 +107,64 @@ export const appTestData = [
|
||||
]
|
||||
export const appPrevTestData = [
|
||||
{
|
||||
"type": "bytes",
|
||||
"l11": {
|
||||
"rate": 2,
|
||||
"total":3245435
|
||||
type: 'bytes',
|
||||
l11: {
|
||||
rate: 2,
|
||||
total: 3245435
|
||||
},
|
||||
"a0": {
|
||||
"rate": 3,
|
||||
"total":4245435
|
||||
a0: {
|
||||
rate: 3,
|
||||
total: 4245435
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "packets",
|
||||
"l11": {
|
||||
"rate": 2,
|
||||
"total":3245435
|
||||
type: 'packets',
|
||||
l11: {
|
||||
rate: 2,
|
||||
total: 3245435
|
||||
},
|
||||
"a0": {
|
||||
"rate": 4,
|
||||
"total":4245435
|
||||
a0: {
|
||||
rate: 4,
|
||||
total: 4245435
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "sessions",
|
||||
"l11": {
|
||||
"rate": 3,
|
||||
"total":233451
|
||||
type: 'sessions',
|
||||
l11: {
|
||||
rate: 3,
|
||||
total: 233451
|
||||
},
|
||||
"a0": {
|
||||
"rate": 3,
|
||||
"total":4245435
|
||||
a0: {
|
||||
rate: 3,
|
||||
total: 4245435
|
||||
}
|
||||
}
|
||||
]
|
||||
export const providerTestData = [
|
||||
{
|
||||
"type": "bytes",
|
||||
"d3": {
|
||||
"analysis": {
|
||||
"rate": 4,
|
||||
"total":4245435
|
||||
type: 'bytes',
|
||||
d3: {
|
||||
analysis: {
|
||||
rate: 4,
|
||||
total: 4245435
|
||||
},
|
||||
"values": [
|
||||
values: [
|
||||
[
|
||||
1435781430781,
|
||||
"1"
|
||||
'1'
|
||||
],
|
||||
[
|
||||
1435781431781,
|
||||
"1"
|
||||
'1'
|
||||
]
|
||||
]
|
||||
},
|
||||
"a0": {
|
||||
"analysis": {
|
||||
"rate": 2,
|
||||
"total":3245435
|
||||
a0: {
|
||||
analysis: {
|
||||
rate: 2,
|
||||
total: 3245435
|
||||
},
|
||||
"values": [
|
||||
values: [
|
||||
[
|
||||
1435781430781,
|
||||
1
|
||||
@@ -177,13 +177,13 @@ export const providerTestData = [
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "packets",
|
||||
"d3": {
|
||||
"analysis": {
|
||||
"rate": 3,
|
||||
"total": 1245435
|
||||
type: 'packets',
|
||||
d3: {
|
||||
analysis: {
|
||||
rate: 3,
|
||||
total: 1245435
|
||||
},
|
||||
"values": [
|
||||
values: [
|
||||
[
|
||||
1435781430781,
|
||||
2
|
||||
@@ -194,12 +194,12 @@ export const providerTestData = [
|
||||
]
|
||||
]
|
||||
},
|
||||
"a0": {
|
||||
"analysis": {
|
||||
"rate": 3,
|
||||
"total": 3245435
|
||||
a0: {
|
||||
analysis: {
|
||||
rate: 3,
|
||||
total: 3245435
|
||||
},
|
||||
"values": [
|
||||
values: [
|
||||
[
|
||||
1435781430781,
|
||||
5
|
||||
@@ -212,29 +212,29 @@ export const providerTestData = [
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "sessions",
|
||||
"d3": {
|
||||
"analysis": {
|
||||
"rate": 2,
|
||||
"total":2245435
|
||||
type: 'sessions',
|
||||
d3: {
|
||||
analysis: {
|
||||
rate: 2,
|
||||
total: 2245435
|
||||
},
|
||||
"values": [
|
||||
values: [
|
||||
[
|
||||
1435781430781,
|
||||
"1"
|
||||
'1'
|
||||
],
|
||||
[
|
||||
1435781431781,
|
||||
"1"
|
||||
'1'
|
||||
]
|
||||
]
|
||||
},
|
||||
"a0": {
|
||||
"analysis": {
|
||||
"rate": 3,
|
||||
"total": 3245435
|
||||
a0: {
|
||||
analysis: {
|
||||
rate: 3,
|
||||
total: 3245435
|
||||
},
|
||||
"values": [
|
||||
values: [
|
||||
[
|
||||
1435781430781,
|
||||
1
|
||||
@@ -249,36 +249,36 @@ export const providerTestData = [
|
||||
]
|
||||
export const providerPrevTestData = [
|
||||
{
|
||||
"type": "bytes",
|
||||
"d3": {
|
||||
"rate": 2,
|
||||
"total":2245435
|
||||
type: 'bytes',
|
||||
d3: {
|
||||
rate: 2,
|
||||
total: 2245435
|
||||
},
|
||||
"a0": {
|
||||
"rate": 3,
|
||||
"total":4245435
|
||||
a0: {
|
||||
rate: 3,
|
||||
total: 4245435
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "packets",
|
||||
"d3": {
|
||||
"rate": 2,
|
||||
"total":3245435
|
||||
type: 'packets',
|
||||
d3: {
|
||||
rate: 2,
|
||||
total: 3245435
|
||||
},
|
||||
"a0": {
|
||||
"rate": 4,
|
||||
"total":4245435
|
||||
a0: {
|
||||
rate: 4,
|
||||
total: 4245435
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "sessions",
|
||||
"d3": {
|
||||
"rate": 3,
|
||||
"total":233451
|
||||
type: 'sessions',
|
||||
d3: {
|
||||
rate: 3,
|
||||
total: 233451
|
||||
},
|
||||
"a0": {
|
||||
"rate": 3,
|
||||
"total":4245435
|
||||
a0: {
|
||||
rate: 3,
|
||||
total: 4245435
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
|
||||
<script>
|
||||
import { api } from '@/utils/api'
|
||||
import { dateFormatByAppearance, getSecond } from '@/utils/date-util'
|
||||
import { getSecond } from '@/utils/date-util'
|
||||
import { get } from '@/utils/http'
|
||||
import chartMixin from '@/views/charts2/chart-mixin'
|
||||
|
||||
|
||||
@@ -1,233 +1,233 @@
|
||||
export const mapData = [
|
||||
{
|
||||
"score": 5,
|
||||
"locationId": "AU",
|
||||
"direction": "server",
|
||||
"locationCountry": "australia"
|
||||
score: 5,
|
||||
locationId: 'AU',
|
||||
direction: 'server',
|
||||
locationCountry: 'australia'
|
||||
},
|
||||
{
|
||||
"score": 3,
|
||||
"locationId": "AT",
|
||||
"direction": "server",
|
||||
"locationCountry": "austria"
|
||||
score: 3,
|
||||
locationId: 'AT',
|
||||
direction: 'server',
|
||||
locationCountry: 'austria'
|
||||
},
|
||||
{
|
||||
"score": 1,
|
||||
"locationId": "",
|
||||
"direction": "server",
|
||||
"locationCountry": "bolivia"
|
||||
score: 1,
|
||||
locationId: '',
|
||||
direction: 'server',
|
||||
locationCountry: 'bolivia'
|
||||
},
|
||||
{
|
||||
"score": 5,
|
||||
"locationId": "BR",
|
||||
"direction": "server",
|
||||
"locationCountry": "brazil"
|
||||
score: 5,
|
||||
locationId: 'BR',
|
||||
direction: 'server',
|
||||
locationCountry: 'brazil'
|
||||
},
|
||||
{
|
||||
"score": 1,
|
||||
"locationId": "CM",
|
||||
"direction": "server",
|
||||
"locationCountry": "cameroon"
|
||||
score: 1,
|
||||
locationId: 'CM',
|
||||
direction: 'server',
|
||||
locationCountry: 'cameroon'
|
||||
},
|
||||
{
|
||||
"score": 5,
|
||||
"locationId": "CL",
|
||||
"direction": "server",
|
||||
"locationCountry": "chile"
|
||||
score: 5,
|
||||
locationId: 'CL',
|
||||
direction: 'server',
|
||||
locationCountry: 'chile'
|
||||
},
|
||||
{
|
||||
"score": 4,
|
||||
"locationId": "CN",
|
||||
"direction": "server",
|
||||
"locationCountry": "china"
|
||||
score: 4,
|
||||
locationId: 'CN',
|
||||
direction: 'server',
|
||||
locationCountry: 'china'
|
||||
},
|
||||
{
|
||||
"score": 1,
|
||||
"locationId": "CY",
|
||||
"direction": "server",
|
||||
"locationCountry": "cyprus"
|
||||
score: 1,
|
||||
locationId: 'CY',
|
||||
direction: 'server',
|
||||
locationCountry: 'cyprus'
|
||||
},
|
||||
{
|
||||
"score": 1,
|
||||
"locationId": "CZ",
|
||||
"direction": "server",
|
||||
"locationCountry": "czech republic"
|
||||
score: 1,
|
||||
locationId: 'CZ',
|
||||
direction: 'server',
|
||||
locationCountry: 'czech republic'
|
||||
},
|
||||
{
|
||||
"score": 5,
|
||||
"locationId": "FR",
|
||||
"direction": "server",
|
||||
"locationCountry": "france"
|
||||
score: 5,
|
||||
locationId: 'FR',
|
||||
direction: 'server',
|
||||
locationCountry: 'france'
|
||||
},
|
||||
{
|
||||
"score": 2,
|
||||
"locationId": "ID",
|
||||
"direction": "server",
|
||||
"locationCountry": "indonesia"
|
||||
score: 2,
|
||||
locationId: 'ID',
|
||||
direction: 'server',
|
||||
locationCountry: 'indonesia'
|
||||
},
|
||||
{
|
||||
"score": 2,
|
||||
"locationId": "IE",
|
||||
"direction": "server",
|
||||
"locationCountry": "ireland"
|
||||
score: 2,
|
||||
locationId: 'IE',
|
||||
direction: 'server',
|
||||
locationCountry: 'ireland'
|
||||
},
|
||||
{
|
||||
"score": 5,
|
||||
"locationId": "JP",
|
||||
"direction": "server",
|
||||
"locationCountry": "japan"
|
||||
score: 5,
|
||||
locationId: 'JP',
|
||||
direction: 'server',
|
||||
locationCountry: 'japan'
|
||||
},
|
||||
{
|
||||
"score": 1,
|
||||
"locationId": "KW",
|
||||
"direction": "server",
|
||||
"locationCountry": "kuwait"
|
||||
score: 1,
|
||||
locationId: 'KW',
|
||||
direction: 'server',
|
||||
locationCountry: 'kuwait'
|
||||
},
|
||||
{
|
||||
"score": 1,
|
||||
"locationId": "KG",
|
||||
"direction": "server",
|
||||
"locationCountry": "kyrgyzstan"
|
||||
score: 1,
|
||||
locationId: 'KG',
|
||||
direction: 'server',
|
||||
locationCountry: 'kyrgyzstan'
|
||||
},
|
||||
{
|
||||
"score": 2,
|
||||
"locationId": "MX",
|
||||
"direction": "server",
|
||||
"locationCountry": "mexico"
|
||||
score: 2,
|
||||
locationId: 'MX',
|
||||
direction: 'server',
|
||||
locationCountry: 'mexico'
|
||||
},
|
||||
{
|
||||
"score": 1,
|
||||
"locationId": "CN-AH",
|
||||
"direction": "server",
|
||||
"locationCountry": "moldova"
|
||||
score: 1,
|
||||
locationId: 'CN-AH',
|
||||
direction: 'server',
|
||||
locationCountry: 'moldova'
|
||||
},
|
||||
{
|
||||
"score": 4,
|
||||
"locationId": "MN",
|
||||
"direction": "server",
|
||||
"locationCountry": "mongolia"
|
||||
score: 4,
|
||||
locationId: 'MN',
|
||||
direction: 'server',
|
||||
locationCountry: 'mongolia'
|
||||
},
|
||||
{
|
||||
"score": 1,
|
||||
"locationId": "MZ",
|
||||
"direction": "server",
|
||||
"locationCountry": "mozambique"
|
||||
score: 1,
|
||||
locationId: 'MZ',
|
||||
direction: 'server',
|
||||
locationCountry: 'mozambique'
|
||||
},
|
||||
{
|
||||
"score": 1,
|
||||
"locationId": "NZ",
|
||||
"direction": "server",
|
||||
"locationCountry": "new zealand"
|
||||
score: 1,
|
||||
locationId: 'NZ',
|
||||
direction: 'server',
|
||||
locationCountry: 'new zealand'
|
||||
},
|
||||
{
|
||||
"score": 4,
|
||||
"locationId": "NE",
|
||||
"direction": "server",
|
||||
"locationCountry": "niger"
|
||||
score: 4,
|
||||
locationId: 'NE',
|
||||
direction: 'server',
|
||||
locationCountry: 'niger'
|
||||
},
|
||||
{
|
||||
"score": 1,
|
||||
"locationId": "PT",
|
||||
"direction": "server",
|
||||
"locationCountry": "portugal"
|
||||
score: 1,
|
||||
locationId: 'PT',
|
||||
direction: 'server',
|
||||
locationCountry: 'portugal'
|
||||
},
|
||||
{
|
||||
"score": 3,
|
||||
"locationId": "RO",
|
||||
"direction": "server",
|
||||
"locationCountry": "romania"
|
||||
score: 3,
|
||||
locationId: 'RO',
|
||||
direction: 'server',
|
||||
locationCountry: 'romania'
|
||||
},
|
||||
{
|
||||
"score": 1,
|
||||
"locationId": "SR",
|
||||
"direction": "server",
|
||||
"locationCountry": "suriname"
|
||||
score: 1,
|
||||
locationId: 'SR',
|
||||
direction: 'server',
|
||||
locationCountry: 'suriname'
|
||||
},
|
||||
{
|
||||
"score": 4,
|
||||
"locationId": "SE",
|
||||
"direction": "server",
|
||||
"locationCountry": "sweden"
|
||||
score: 4,
|
||||
locationId: 'SE',
|
||||
direction: 'server',
|
||||
locationCountry: 'sweden'
|
||||
},
|
||||
{
|
||||
"score": 3,
|
||||
"locationId": "CH",
|
||||
"direction": "server",
|
||||
"locationCountry": "switzerland"
|
||||
score: 3,
|
||||
locationId: 'CH',
|
||||
direction: 'server',
|
||||
locationCountry: 'switzerland'
|
||||
},
|
||||
{
|
||||
"score": 1,
|
||||
"locationId": "TH",
|
||||
"direction": "server",
|
||||
"locationCountry": "thailand"
|
||||
score: 1,
|
||||
locationId: 'TH',
|
||||
direction: 'server',
|
||||
locationCountry: 'thailand'
|
||||
},
|
||||
{
|
||||
"score": 5,
|
||||
"locationId": "",
|
||||
"direction": "server",
|
||||
"locationCountry": "the netherlands"
|
||||
score: 5,
|
||||
locationId: '',
|
||||
direction: 'server',
|
||||
locationCountry: 'the netherlands'
|
||||
},
|
||||
{
|
||||
"score": 1,
|
||||
"locationId": "TK",
|
||||
"direction": "server",
|
||||
"locationCountry": "tokelau"
|
||||
score: 1,
|
||||
locationId: 'TK',
|
||||
direction: 'server',
|
||||
locationCountry: 'tokelau'
|
||||
},
|
||||
{
|
||||
"score": 2,
|
||||
"locationId": "AE",
|
||||
"direction": "server",
|
||||
"locationCountry": "united arab emirates"
|
||||
score: 2,
|
||||
locationId: 'AE',
|
||||
direction: 'server',
|
||||
locationCountry: 'united arab emirates'
|
||||
},
|
||||
{
|
||||
"score": 6,
|
||||
"locationId": "RU",
|
||||
"direction": "server",
|
||||
"locationCountry": "russia"
|
||||
score: 6,
|
||||
locationId: 'RU',
|
||||
direction: 'server',
|
||||
locationCountry: 'russia'
|
||||
},
|
||||
{
|
||||
"score": 6,
|
||||
"locationId": "US",
|
||||
"direction": "server",
|
||||
"locationCountry": "united states"
|
||||
score: 6,
|
||||
locationId: 'US',
|
||||
direction: 'server',
|
||||
locationCountry: 'united states'
|
||||
},
|
||||
{
|
||||
"score": 3,
|
||||
"locationId": "UZ",
|
||||
"direction": "server",
|
||||
"locationCountry": "uzbekistan"
|
||||
score: 3,
|
||||
locationId: 'UZ',
|
||||
direction: 'server',
|
||||
locationCountry: 'uzbekistan'
|
||||
},
|
||||
{
|
||||
"score": 1,
|
||||
"locationId": "",
|
||||
"direction": "server",
|
||||
"locationCountry": "venezuela"
|
||||
score: 1,
|
||||
locationId: '',
|
||||
direction: 'server',
|
||||
locationCountry: 'venezuela'
|
||||
}
|
||||
]
|
||||
export const drillDownData = [
|
||||
{
|
||||
"score": 1,
|
||||
"locationId": "CN-AH",
|
||||
"direction": "server",
|
||||
"locationCountry": "moldova"
|
||||
score: 1,
|
||||
locationId: 'CN-AH',
|
||||
direction: 'server',
|
||||
locationCountry: 'moldova'
|
||||
},
|
||||
{
|
||||
"score": 3,
|
||||
"locationId": "CN-SH",
|
||||
"direction": "server",
|
||||
"locationCountry": "moldova"
|
||||
score: 3,
|
||||
locationId: 'CN-SH',
|
||||
direction: 'server',
|
||||
locationCountry: 'moldova'
|
||||
},
|
||||
{
|
||||
"score": 6,
|
||||
"locationId": "CN-CQ",
|
||||
"direction": "server",
|
||||
"locationCountry": "moldova"
|
||||
score: 6,
|
||||
locationId: 'CN-CQ',
|
||||
direction: 'server',
|
||||
locationCountry: 'moldova'
|
||||
},
|
||||
{
|
||||
"score": 2,
|
||||
"locationId": "CN-FJ",
|
||||
"direction": "server",
|
||||
"locationCountry": "moldova"
|
||||
score: 2,
|
||||
locationId: 'CN-FJ',
|
||||
direction: 'server',
|
||||
locationCountry: 'moldova'
|
||||
}
|
||||
|
||||
]
|
||||
|
||||
@@ -201,12 +201,11 @@ import { ref } from 'vue'
|
||||
import { operationType, unitTypes, networkTable, tableColumnType, networkDefaultLimit, curTabState, storageKey, dbDrilldownTableConfig, fromRoute } from '@/utils/constants'
|
||||
import { get } from '@/utils/http'
|
||||
import unitConvert from '@/utils/unit-convert'
|
||||
import { getChainRatio, computeScore, urlParamsHandler, overwriteUrl, getUserDrilldownTableGeo, readDrilldownTableConfigByUser, combinDrilldownTableWithUserConfig, getDnsMapData,handleSpecialValue,getConfigVersion } from '@/utils/tools'
|
||||
import { getChainRatio, computeScore, urlParamsHandler, overwriteUrl, readDrilldownTableConfigByUser, combinDrilldownTableWithUserConfig, getDnsMapData, handleSpecialValue, getConfigVersion } from '@/utils/tools'
|
||||
import { getSecond } from '@/utils/date-util'
|
||||
import chartMixin from '@/views/charts2/chart-mixin'
|
||||
import ChartNoData from '@/views/charts/charts/ChartNoData'
|
||||
import { db } from '@/indexedDB'
|
||||
import { api, getDictList } from '@/utils/api'
|
||||
import _ from 'lodash'
|
||||
|
||||
export default {
|
||||
name: 'NetworkOverviewTabs',
|
||||
@@ -274,9 +273,6 @@ export default {
|
||||
default: 'Bits/s'
|
||||
}
|
||||
},
|
||||
components: {
|
||||
ChartNoData
|
||||
},
|
||||
watch: {
|
||||
timeFilter: {
|
||||
handler (n) {
|
||||
@@ -623,14 +619,14 @@ export default {
|
||||
endTime: getSecond(this.timeFilter.endTime)
|
||||
}
|
||||
if (tabList.length > 0) {
|
||||
let conditionGroup = tabList.filter(item => item != '')
|
||||
let conditionHandleRlt = []
|
||||
const conditionGroup = tabList.filter(item => item != '')
|
||||
const conditionHandleRlt = []
|
||||
conditionGroup.forEach(condition => {
|
||||
condition = handleSpecialValue(condition)//condition.replaceAll("'", "\\\\'")
|
||||
condition = "'"+condition+ "'"
|
||||
condition = handleSpecialValue(condition)// condition.replaceAll("'", "\\\\'")
|
||||
condition = "'" + condition + "'"
|
||||
conditionHandleRlt.push(condition)
|
||||
})
|
||||
queryParams.params = conditionHandleRlt.join(",")
|
||||
queryParams.params = conditionHandleRlt.join(',')
|
||||
queryParams.type = curTab.prop
|
||||
}
|
||||
|
||||
@@ -692,7 +688,7 @@ export default {
|
||||
}
|
||||
item[tableColumn.prop] = [(item[tableColumn.prop] || item[tableColumn.prop] === 0) ? item[tableColumn.prop] : '', trend, trendPercent]
|
||||
})
|
||||
}else {
|
||||
} else {
|
||||
tableColumn.showError = true
|
||||
tableColumn.errorMsg = response.message || 'Unknown'
|
||||
}
|
||||
@@ -730,12 +726,12 @@ export default {
|
||||
}
|
||||
if (Object.keys(item.scoreGroup).length >= 5) {
|
||||
item.score = computeScore(item.scoreGroup)
|
||||
if(!_.isNumber(item.score)){
|
||||
if (!_.isNumber(item.score)) {
|
||||
item.score = 0
|
||||
}
|
||||
}
|
||||
})
|
||||
}else {
|
||||
} else {
|
||||
tableColumn.showError = true
|
||||
tableColumn.errorMsg = response.message || 'Unknown'
|
||||
}
|
||||
@@ -752,7 +748,7 @@ export default {
|
||||
}
|
||||
get(self.gerColumnUrl(tableColumn), queryCycleParams).then(response => {
|
||||
if (response.code === 200) {
|
||||
if(!tableColumn.showError){
|
||||
if (!tableColumn.showError) {
|
||||
tableColumn.showError = false
|
||||
tableColumn.errorMsg = ''
|
||||
}
|
||||
@@ -803,7 +799,7 @@ export default {
|
||||
item[tableColumn.prop] = [(item[tableColumn.prop] || item[tableColumn.prop] === 0) ? item[tableColumn.prop] : '', trend, trendPercent]
|
||||
}
|
||||
})
|
||||
}else {
|
||||
} else {
|
||||
tableColumn.showError = true
|
||||
tableColumn.errorMsg = response.message || 'Unknown'
|
||||
}
|
||||
@@ -871,7 +867,7 @@ export default {
|
||||
this.tableData.forEach(val => {
|
||||
arr.push(val)
|
||||
})
|
||||
if (column.order == 'descending') {
|
||||
if (column.order === 'descending') {
|
||||
arr.sort((a, b) => {
|
||||
const str1 = Array.isArray(a[column.prop]) ? a[column.prop][0] : a[column.prop]
|
||||
const str2 = Array.isArray(b[column.prop]) ? b[column.prop][0] : b[column.prop]
|
||||
@@ -892,7 +888,7 @@ export default {
|
||||
const char1 = aObj[i]
|
||||
const char2 = bObj[i]
|
||||
const char1Type = this.getChartType(char1)
|
||||
const char2Type = this.getChartType(char2)
|
||||
// const char2Type = this.getChartType(char2)
|
||||
if (char1 === char2) {
|
||||
continue
|
||||
} else {
|
||||
@@ -911,7 +907,7 @@ export default {
|
||||
}
|
||||
})
|
||||
this.tableData = arr
|
||||
} else if (column.order == 'ascending') {
|
||||
} else if (column.order === 'ascending') {
|
||||
arr.sort((a, b) => {
|
||||
const str1 = Array.isArray(a[column.prop]) ? a[column.prop][0] : a[column.prop]
|
||||
const str2 = Array.isArray(b[column.prop]) ? b[column.prop][0] : b[column.prop]
|
||||
@@ -932,7 +928,7 @@ export default {
|
||||
const char1 = aObj[i]
|
||||
const char2 = bObj[i]
|
||||
const char1Type = this.getChartType(char1)
|
||||
const char2Type = this.getChartType(char2)
|
||||
// const char2Type = this.getChartType(char2)
|
||||
if (char1 === char2) {
|
||||
continue
|
||||
} else {
|
||||
@@ -966,7 +962,6 @@ export default {
|
||||
}
|
||||
this.urlChangeParams[this.curTabState.tabOperationType] = operationType.changeMetric
|
||||
const curTab = this.getCurTab()
|
||||
const label = curTab.label
|
||||
this.urlChangeParams[this.curTabState.tableMetric] = this.metric
|
||||
|
||||
let queryParams = {
|
||||
@@ -1111,7 +1106,7 @@ export default {
|
||||
this.urlChangeParams[this.curTabState.networkOverviewBeforeTab] = tab.prop
|
||||
},
|
||||
setQueryCondition (tab, value) {
|
||||
value = handleSpecialValue(value)//value.replaceAll("'", "\\\\'")
|
||||
value = handleSpecialValue(value)// value.replaceAll("'", "\\\\'")
|
||||
const queryCondition = []
|
||||
if (tab.prop === 'protocolPort') {
|
||||
const valueGroup = value.split(':')
|
||||
@@ -1180,11 +1175,11 @@ export default {
|
||||
}
|
||||
})
|
||||
} else {
|
||||
const changeTab = tabList.find(item => item.name == tabName)// 下钻的tab
|
||||
const changeTab = tabList.find(item => item.name === tabName)// 下钻的tab
|
||||
this.list = changeTab.drilldownTabs
|
||||
this.list.forEach(tab => {
|
||||
/* this.list.forEach(tab => {
|
||||
const hiddenTab = tabList.find(item => item.name == tab.name)
|
||||
})
|
||||
}) */
|
||||
const curTab = this.getCurTab(clickTab)
|
||||
tabList.forEach(tab => {
|
||||
if (tab.name === curTab.name) {
|
||||
@@ -1194,14 +1189,14 @@ export default {
|
||||
}
|
||||
|
||||
await this.saveUserLocalConfig()
|
||||
let forthMenuName = ''
|
||||
/* let forthMenuName = ''
|
||||
if (clickTab.prop === 'qtype') {
|
||||
forthMenuName = this.dnsQtypeMapData.get(columnValue)
|
||||
} else if (clickTab.prop === 'rcode') {
|
||||
forthMenuName = this.dnsRcodeMapData.get(columnValue)
|
||||
} else {
|
||||
forthMenuName = columnValue
|
||||
}
|
||||
} */
|
||||
this.$store.getters.menuList.forEach(menu => {
|
||||
if (this.$_.isEmpty(menu.children) && menu.route) {
|
||||
if (this.$route.path === menu.route) {
|
||||
@@ -1226,10 +1221,10 @@ export default {
|
||||
}
|
||||
})
|
||||
if (!this.getUrlParam(this.curTabState.tabIndex)) {
|
||||
let thirdMenu = this.urlChangeParams[this.curTabState.thirdMenu]
|
||||
if(thirdMenu === 'network.serverIps'){
|
||||
const thirdMenu = this.urlChangeParams[this.curTabState.thirdMenu]
|
||||
if (thirdMenu === 'network.serverIps') {
|
||||
this.urlChangeParams[this.curTabState.tabIndex] = 1
|
||||
}else if(thirdMenu === 'network.clientIps' || thirdMenu === 'network.ips'){
|
||||
} else if (thirdMenu === 'network.clientIps' || thirdMenu === 'network.ips') {
|
||||
this.urlChangeParams[this.curTabState.tabIndex] = 0
|
||||
}
|
||||
}
|
||||
@@ -1275,7 +1270,7 @@ export default {
|
||||
this.$store.commit('setRouterHistoryList', historyList)
|
||||
},
|
||||
handleSearchParams (columnValue) {
|
||||
columnValue = handleSpecialValue(columnValue)//columnValue.replaceAll("'", "\\\\'")
|
||||
columnValue = handleSpecialValue(columnValue)// columnValue.replaceAll("'", "\\\\'")
|
||||
const queryCondition = []
|
||||
const curTab = this.getCurTab()
|
||||
if (curTab.prop === 'protocolPort') {
|
||||
@@ -1618,8 +1613,6 @@ export default {
|
||||
if (tab && tab.hasMetricSearch === true) {
|
||||
const columnsForMetric = tab.metrics.find(metric => metric.name === this.metric)
|
||||
columnsForMetric.columns = columns
|
||||
} else {
|
||||
tab.columns = tab.columns
|
||||
}
|
||||
},
|
||||
combineColumnList (tabName) {
|
||||
@@ -1824,10 +1817,10 @@ export default {
|
||||
this.drillDownTableConfigs = await combinDrilldownTableWithUserConfig()
|
||||
this.tableType = this.$route.params ? this.$route.params.typeName : 'networkOverview'
|
||||
// 是否需要dns的qtype和rcode的数据字典
|
||||
if(this.tableType === fromRoute.dnsServiceInsights) {
|
||||
if (this.tableType === fromRoute.dnsServiceInsights) {
|
||||
this.dnsQtypeMapData = this.$store.getters.getDnsQtypeMapData
|
||||
this.dnsRcodeMapData = this.$store.getters.getDnsRcodeMapData
|
||||
if(!this.dnsQtypeMapData || this.dnsQtypeMapData.size === 0){
|
||||
if (!this.dnsQtypeMapData || this.dnsQtypeMapData.size === 0) {
|
||||
this.dnsQtypeMapData = await getDnsMapData('dnsQtype')
|
||||
this.dnsRcodeMapData = await getDnsMapData('dnsRcode')
|
||||
this.$store.commit('setDnsQtypeMapData', this.dnsQtypeMapData)
|
||||
|
||||
@@ -177,7 +177,7 @@ export default {
|
||||
} else {
|
||||
this.npmNetworkLastCycleData = [res]
|
||||
}
|
||||
let timer = null
|
||||
const timer = null
|
||||
if (timer) {
|
||||
clearTimeout(timer)
|
||||
}
|
||||
@@ -185,7 +185,7 @@ export default {
|
||||
this.npmNetworkQuantity(this.npmNetworkCycleData, this.npmNetworkLastCycleData, 0)
|
||||
}, 300)
|
||||
}).catch((e) => {
|
||||
let timer = null
|
||||
const timer = null
|
||||
if (timer) {
|
||||
clearTimeout(timer)
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ export default {
|
||||
return {
|
||||
leftOffset: 27,
|
||||
currentTab: ref(0),
|
||||
isCurTabReady:false
|
||||
isCurTabReady: false
|
||||
}
|
||||
},
|
||||
mixins: [chartMixin],
|
||||
@@ -63,7 +63,7 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleClick(tab){
|
||||
handleClick (tab) {
|
||||
const { query } = this.$route
|
||||
const newUrl = urlParamsHandler(window.location.href, query, {
|
||||
tabIndex: tab.index
|
||||
@@ -80,16 +80,16 @@ export default {
|
||||
activeBar.style.cssText += `width: ${clientWidth + 2}px; left: ${offsetLeft + this.leftOffset + clientLeft - 1}px;`
|
||||
}
|
||||
},
|
||||
disableTab(n){
|
||||
disableTab (n) {
|
||||
this.tabs[n].disable = true
|
||||
const tabEle = document.getElementById('tab-'+n)
|
||||
const tabEle = document.getElementById('tab-' + n)
|
||||
tabEle.style.cssText = 'cursor: not-allowed;'
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
const { query } = useRoute()
|
||||
const tabIndexParam = query.tabIndex
|
||||
let curTabIndexInUrl = tabIndexParam ? parseInt(tabIndexParam) : null
|
||||
const curTabIndexInUrl = tabIndexParam ? parseInt(tabIndexParam) : null
|
||||
if (this.chart.panelId === drillDownPanelTypeMapping.npmOverviewIp) {
|
||||
const self = this
|
||||
// 当client或server的session数为0时,对应tab置灰,不可选,默认高亮另一个不为0的tab
|
||||
@@ -107,37 +107,37 @@ export default {
|
||||
self.serverSessions = self.sessionData.serverSessions / (self.sessionData.clientSessions * 1 + self.sessionData.serverSessions * 1)
|
||||
}
|
||||
}).finally(() => {
|
||||
let thirdMenu = this.$route.query['thirdMenu']
|
||||
const thirdMenu = this.$route.query.thirdMenu
|
||||
self.tabs[0].disable = false
|
||||
self.tabs[1].disable = false
|
||||
let curTabIndex = 0
|
||||
if(thirdMenu === 'network.clientIps'){
|
||||
if (thirdMenu === 'network.clientIps') {
|
||||
curTabIndex = 0
|
||||
if (self.serverSessions === 0) {
|
||||
self.disableTab(1)
|
||||
}else if(curTabIndexInUrl !== null){
|
||||
} else if (curTabIndexInUrl !== null) {
|
||||
curTabIndex = curTabIndexInUrl
|
||||
}
|
||||
}else if(thirdMenu === 'network.serverIps'){
|
||||
} else if (thirdMenu === 'network.serverIps') {
|
||||
curTabIndex = 1
|
||||
if (self.clientSessions === 0) {
|
||||
self.disableTab(0)
|
||||
}else if(curTabIndexInUrl !== null){
|
||||
} else if (curTabIndexInUrl !== null) {
|
||||
curTabIndex = curTabIndexInUrl
|
||||
}
|
||||
}else if (self.clientSessions === 0) {
|
||||
} else if (self.clientSessions === 0) {
|
||||
curTabIndex = 1
|
||||
self.disableTab(0)
|
||||
} else if (self.serverSessions === 0) {
|
||||
curTabIndex = 0
|
||||
self.disableTab(1)
|
||||
} else if(curTabIndexInUrl !== null){
|
||||
} else if (curTabIndexInUrl !== null) {
|
||||
curTabIndex = curTabIndexInUrl
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
self.currentTab = curTabIndex
|
||||
self.isCurTabReady = true
|
||||
//URL中tabIndex的设置,client初始化时查询条件需要:side条件
|
||||
// URL中tabIndex的设置,client初始化时查询条件需要:side条件
|
||||
const { query } = this.$route
|
||||
const newUrl = urlParamsHandler(window.location.href, query, {
|
||||
tabIndex: self.currentTab
|
||||
@@ -152,7 +152,7 @@ export default {
|
||||
})
|
||||
})
|
||||
} else {
|
||||
this.currentTab = curTabIndexInUrl ? curTabIndexInUrl : 0
|
||||
this.currentTab = curTabIndexInUrl || 0
|
||||
this.isCurTabReady = true
|
||||
setTimeout(() => {
|
||||
this.handleActiveBar(this.currentTab)
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import {
|
||||
chartColor,
|
||||
chartColor1,
|
||||
chartColor2,
|
||||
chartColor3,
|
||||
|
||||
@@ -107,7 +107,7 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/*search (metaList, formatSql) {
|
||||
/* search (metaList, formatSql) {
|
||||
let sql = formatSql
|
||||
// 全文搜索处理
|
||||
if (metaList && this.$_.isArray(metaList)) {
|
||||
@@ -120,7 +120,7 @@ export default {
|
||||
}
|
||||
}
|
||||
this.$emit('search', metaList, sql)
|
||||
},*/
|
||||
}, */
|
||||
search ({ q, metaList }) {
|
||||
this.$emit('search', { q, metaList })
|
||||
},
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
import {
|
||||
chartColor,
|
||||
tooLongFormatter,
|
||||
axisFormatter
|
||||
tooLongFormatter
|
||||
} from '@/views/charts/charts/tools'
|
||||
import unitConvert from '@/utils/unit-convert'
|
||||
import _ from 'lodash'
|
||||
@@ -94,7 +92,7 @@ export const multipleBarOption = {
|
||||
splitLine: {
|
||||
show: false
|
||||
},
|
||||
minInterval:1
|
||||
minInterval: 1
|
||||
},
|
||||
grid: {
|
||||
top: 40,
|
||||
|
||||
@@ -2,14 +2,13 @@ import _ from 'lodash'
|
||||
import { get } from '@/utils/http'
|
||||
import * as echarts from 'echarts'
|
||||
import { entityListLineOption } from '@/views/charts/charts/chart-options'
|
||||
import { riskLevelMapping, unitTypes, storageKey } from '@/utils/constants'
|
||||
import { riskLevelMapping, unitTypes } from '@/utils/constants'
|
||||
import unitConvert from '@/utils/unit-convert'
|
||||
import { shallowRef, markRaw } from 'vue'
|
||||
import { metricOption } from '@/views/detections/options/detectionOptions'
|
||||
import { sortBy, reverseSortBy } from '@/utils/tools'
|
||||
import { getSecond } from '@/utils/date-util'
|
||||
import { api } from '@/utils/api'
|
||||
import axios from 'axios'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
|
||||
Reference in New Issue
Block a user