fix: 执行lint

This commit is contained in:
chenjinsong
2022-12-08 16:09:46 +08:00
parent 136d98649d
commit 4bba03d41d
26 changed files with 362 additions and 371 deletions

View File

@@ -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

View File

@@ -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',

View File

@@ -233,6 +233,7 @@ export default class Parser {
break
}
} else if (s === ' ') {
// 预留
} else if (s === '(') {
token = new Token(types.leftBracket, s)
token.setStart(i)

View File

@@ -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'

View File

@@ -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
}
]
}

View File

@@ -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,8 +97,8 @@ const user = {
version: defaultConfigs.version,
config: defaultConfigs.config
})
let userId = localStorage.getItem(storageKey.userId)
let oldVersion = await getConfigVersion(userId)
const userId = localStorage.getItem(storageKey.userId)
const oldVersion = await getConfigVersion(userId)
if (oldVersion !== defaultConfigs.version) {
db[dbDrilldownTableConfig].delete(userId)
}

View File

@@ -42,6 +42,7 @@
</template>
<script>
import _ from 'lodash'
export default {
name: 'ChartDomainRecursiveResolve',
props: {

View File

@@ -47,7 +47,7 @@ export default {
},
methods: {
handleQueryParams (queryParams) {
return this.timeFilter = {
this.timeFilter = {
startTime: Number(queryParams.startTime) * 1000,
endTime: Number(queryParams.endTime) * 1000
}

View File

@@ -17,7 +17,6 @@
</template>
<script>
import _ from 'lodash'
export default {
name: 'ChartOneSituationStatistics',
props: {

View File

@@ -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>

View File

@@ -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
}
}
]

View File

@@ -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'

View File

@@ -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'
}
]

View File

@@ -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 + "'"
conditionHandleRlt.push(condition)
})
queryParams.params = conditionHandleRlt.join(",")
queryParams.params = conditionHandleRlt.join(',')
queryParams.type = curTab.prop
}
@@ -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 = {
@@ -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,7 +1221,7 @@ export default {
}
})
if (!this.getUrlParam(this.curTabState.tabIndex)) {
let thirdMenu = this.urlChangeParams[this.curTabState.thirdMenu]
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') {
@@ -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) {

View File

@@ -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)
}

View File

@@ -89,7 +89,7 @@ export default {
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,7 +107,7 @@ 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
@@ -152,7 +152,7 @@ export default {
})
})
} else {
this.currentTab = curTabIndexInUrl ? curTabIndexInUrl : 0
this.currentTab = curTabIndexInUrl || 0
this.isCurTabReady = true
setTimeout(() => {
this.handleActiveBar(this.currentTab)

View File

@@ -1,5 +1,4 @@
import {
chartColor,
chartColor1,
chartColor2,
chartColor3,

View File

@@ -1,7 +1,5 @@
import {
chartColor,
tooLongFormatter,
axisFormatter
tooLongFormatter
} from '@/views/charts/charts/tools'
import unitConvert from '@/utils/unit-convert'
import _ from 'lodash'

View File

@@ -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: {