Compare commits

...

6 Commits

Author SHA1 Message Date
陈劲松
83a9b3fa57 Merge branch 'cherry-pick-16a255be' into 'dev-22.10'
CN-811 feat: networkoverview下钻第三级菜单折线图请求参数调整

See merge request cyber-narrator/cn-ui!6
2022-11-28 09:28:22 +00:00
changcode
cc3157c578 CN-811 feat: networkoverview下钻第三级菜单折线图请求参数调整
(cherry picked from commit 16a255be50)
2022-11-28 17:28:11 +08:00
陈劲松
d7b78da80f Merge branch 'cherry-pick-35fcbab8' into 'dev-22.10'
fix: 修复apps tab切换判断导致的loading一直存在,apps列表删除问题

See merge request cyber-narrator/cn-ui!5
2022-11-28 08:51:21 +00:00
@changcode
5f68b966ba fix: 修复apps tab切换判断导致的loading一直存在,apps列表删除问题
(cherry picked from commit 35fcbab852)
2022-11-28 16:51:06 +08:00
陈劲松
d175d834d1 Merge branch 'cherry-pick-9f6a9877' into 'dev-22.10'
CN-798 下钻table新增一系列维度后的问题:npm在customize里勾选client ip、client...

See merge request cyber-narrator/cn-ui!3
2022-11-15 07:36:32 +00:00
hyx
bb188483a7 CN-798 下钻table新增一系列维度后的问题:npm在customize里勾选client ip、client country等新增的维度后,没有被缓存;新增client asn和server asn维度;
(cherry picked from commit 9f6a98779b)
2022-11-15 15:35:54 +08:00
4 changed files with 26 additions and 8 deletions

View File

@@ -546,7 +546,9 @@ export default {
this.urlChangeParams[this.curTabState.tabOperationBeforeType] = this.getUrlParam(this.curTabState.tabOperationType, '', true) this.urlChangeParams[this.curTabState.tabOperationBeforeType] = this.getUrlParam(this.curTabState.tabOperationType, '', true)
this.urlChangeParams[this.curTabState.tabOperationType] = opeType this.urlChangeParams[this.curTabState.tabOperationType] = opeType
if (opeType === 3) { if (opeType === 3) {
this.urlChangeParams.queryCondition = '' if (route !== '/panel/networkOverview') {
this.urlChangeParams.queryCondition = ''
}
} }
} else { } else {
this.urlChangeParams[this.curTabState.tabOperationType] = operationType.mainMenu this.urlChangeParams[this.curTabState.tabOperationType] = operationType.mainMenu

View File

@@ -5,7 +5,7 @@
</div> </div>
<div class="app-cards"> <div class="app-cards">
<div class="app-card" @mouseenter="mouseenter(app)" @mouseleave="mouseleave(app)" v-for="(app, index) in appData" :key="index"> <div class="app-card" @mouseenter="mouseenter(app)" @mouseleave="mouseleave(app)" v-for="(app, index) in appData" :key="app.type + app.name">
<div class="app-card-title"> <div class="app-card-title">
<div class="app-card-title-name"> <div class="app-card-title-name">
<i class="cn-icon" :class="app.type === 'provider' ? 'cn-icon-entity' : 'cn-icon-app2'"></i> <i class="cn-icon" :class="app.type === 'provider' ? 'cn-icon-entity' : 'cn-icon-app2'"></i>
@@ -461,7 +461,7 @@ export default {
} else { } else {
params.pageNo = 1 params.pageNo = 1
} }
if (this.appTypeTab === 0) { if (parseFloat(this.appTypeTab) === 0) {
params.type = 'overviewProvide' params.type = 'overviewProvide'
get(api.dict, params).then(res => { get(api.dict, params).then(res => {
if (res.code === 200) { if (res.code === 200) {
@@ -486,7 +486,7 @@ export default {
this.loading = false this.loading = false
this.loadingBody = false this.loadingBody = false
}) })
} else if (this.appTypeTab === 1) { } else if (parseFloat(this.appTypeTab) === 1) {
params.type = 'overviewApp' params.type = 'overviewApp'
get(api.dict, params).then(res => { get(api.dict, params).then(res => {
res.data.list = res.data.list.filter(l => !this.appData.some(pd => pd.type === 'app' && pd.name === l.value)) res.data.list = res.data.list.filter(l => !this.appData.some(pd => pd.type === 'app' && pd.name === l.value))

View File

@@ -81,10 +81,14 @@ export default {
const lineRefer = ref(query.lineRefer || 'Average') const lineRefer = ref(query.lineRefer || 'Average')
const lineTab = ref(query.lineTab || '') const lineTab = ref(query.lineTab || '')
const queryCondition = ref(query.queryCondition || '') const queryCondition = ref(query.queryCondition || '')
const tabOperationType = ref(query.tabOperationType)
const networkOverviewBeforeTab = ref(query.networkOverviewBeforeTab)
return { return {
lineRefer, lineRefer,
lineTab, lineTab,
queryCondition, queryCondition,
tabOperationType,
networkOverviewBeforeTab,
myChart: shallowRef(null) myChart: shallowRef(null)
} }
}, },
@@ -171,10 +175,22 @@ export default {
startTime: getSecond(this.timeFilter.startTime), startTime: getSecond(this.timeFilter.startTime),
endTime: getSecond(this.timeFilter.endTime) endTime: getSecond(this.timeFilter.endTime)
} }
// const condition = this.$store.getters.getQueryCondition let condition = ''
// const condition = this.$route.query.queryCondition ? this.$route.query.queryCondition : '' if (this.queryCondition && this.tabOperationType !== '3') {
if (this.queryCondition) {
params.q = this.queryCondition params.q = this.queryCondition
} else if (this.tabOperationType == '3' && this.queryCondition) {
if (this.queryCondition.indexOf(' OR ') > -1) {
if (this.networkOverviewBeforeTab === 'isp') {
condition = this.queryCondition.split(/["|'= ](.*?)["|'= ]/)
params.q = `notEmpty(${condition[0]}) OR notEmpty(${condition[9]})`
} else {
condition = this.queryCondition.split(/["|'= ](.*?)["|'= ]/)
params.q = `notEmpty(${condition[0]}) OR notEmpty(${condition[5]})`
}
} else {
condition = this.queryCondition.split(/['=](.*?)['=]/)
params.q = `notEmpty(${condition[0]})`
}
} }
this.toggleLoading(true) this.toggleLoading(true)
get(api.netWorkOverview.totalTrafficAnalysis, params).then((res) => { get(api.netWorkOverview.totalTrafficAnalysis, params).then((res) => {

View File

@@ -169,7 +169,7 @@
</li> </li>
</transition-group> </transition-group>
</el-tab-pane> </el-tab-pane>
<el-tab-pane :label="$t('network.direction')" name="metrics" width="50%" > <el-tab-pane :label="tableType==='networkOverview'?$t('network.direction'):$t('network.metrics')" name="metrics" width="50%" >
<transition-group name="dragMetric" class="list" tag="ul" ref="metric"> <transition-group name="dragMetric" class="list" tag="ul" ref="metric">
<template v-for="(item, index) in customTableTitles" :key="item.label"> <template v-for="(item, index) in customTableTitles" :key="item.label">
<li v-if="index>0" <li v-if="index>0"