fix: 修复实体、检测界面因路由路径问题不能打开,以及实体详情界面部分问题
This commit is contained in:
@@ -125,7 +125,7 @@
|
|||||||
:show-close="false"
|
:show-close="false"
|
||||||
>
|
>
|
||||||
<div class="cn-menu__left" v-if="otherMenu">
|
<div class="cn-menu__left" v-if="otherMenu">
|
||||||
<div class="left-menu" v-for="menu in otherMenu" :key="menu.id" @click="jump(menu.route,'','',0)">
|
<div class="left-menu" v-for="menu in otherMenu" :key="menu.id" @click="jumpOther(menu.route,'','',0)">
|
||||||
<i :class="menu.icon"></i>
|
<i :class="menu.icon"></i>
|
||||||
<span>{{ $t(menu.i18n || menu.name) }}</span>
|
<span>{{ $t(menu.i18n || menu.name) }}</span>
|
||||||
<i class="cn-icon cn-icon-right"></i>
|
<i class="cn-icon cn-icon-right"></i>
|
||||||
@@ -423,39 +423,6 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
generateBreadcrumb (breadcrumb, menus) {
|
generateBreadcrumb (breadcrumb, menus) {
|
||||||
if (this.route === '/entityDetail') {
|
|
||||||
const entityMenu = menus.find(m => m.route === '/entityExplorer')
|
|
||||||
const entityDetailMenu = menus.find(m => m.route === '/entityDetail')
|
|
||||||
breadcrumb.push({
|
|
||||||
code: entityMenu.code,
|
|
||||||
value: entityMenu.i18n ? this.$t(entityMenu.i18n) : entityMenu.name,
|
|
||||||
route: entityMenu.route,
|
|
||||||
type: entityMenu.type
|
|
||||||
})
|
|
||||||
breadcrumb.push({
|
|
||||||
code: entityDetailMenu.code,
|
|
||||||
value: entityDetailMenu.i18n ? this.$t(entityDetailMenu.i18n) : entityDetailMenu.name,
|
|
||||||
route: entityDetailMenu.route,
|
|
||||||
type: entityDetailMenu.type
|
|
||||||
})
|
|
||||||
return true
|
|
||||||
} else if (this.route === '/entityGraph') {
|
|
||||||
const entityMenu = menus.find(m => m.route === '/entityExplorer')
|
|
||||||
const entityGraphMenu = menus.find(m => m.route === '/entityGraph')
|
|
||||||
breadcrumb.push({
|
|
||||||
code: entityMenu.code,
|
|
||||||
value: entityMenu.i18n ? this.$t(entityMenu.i18n) : entityMenu.name,
|
|
||||||
route: entityMenu.route,
|
|
||||||
type: entityMenu.type
|
|
||||||
})
|
|
||||||
breadcrumb.push({
|
|
||||||
code: entityGraphMenu.code,
|
|
||||||
value: entityGraphMenu.i18n ? this.$t(entityGraphMenu.i18n) : entityGraphMenu.name,
|
|
||||||
route: entityGraphMenu.route,
|
|
||||||
type: entityGraphMenu.type
|
|
||||||
})
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
const menu = menus.find(m => m.route === this.route)
|
const menu = menus.find(m => m.route === this.route)
|
||||||
if (menu) {
|
if (menu) {
|
||||||
breadcrumb.unshift({
|
breadcrumb.unshift({
|
||||||
@@ -481,6 +448,65 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// generateBreadcrumb (breadcrumb, menus) {
|
||||||
|
// if (this.route === '/entityDetail') {
|
||||||
|
// const entityMenu = menus.find(m => m.route === '/entity')
|
||||||
|
// const entityDetailMenu = menus.find(m => m.route === '/entityDetail')
|
||||||
|
// breadcrumb.push({
|
||||||
|
// code: entityMenu.code,
|
||||||
|
// value: entityMenu.i18n ? this.$t(entityMenu.i18n) : entityMenu.name,
|
||||||
|
// route: entityMenu.route,
|
||||||
|
// type: entityMenu.type
|
||||||
|
// })
|
||||||
|
// breadcrumb.push({
|
||||||
|
// code: entityDetailMenu.code,
|
||||||
|
// value: entityDetailMenu.i18n ? this.$t(entityDetailMenu.i18n) : entityDetailMenu.name,
|
||||||
|
// route: entityDetailMenu.route,
|
||||||
|
// type: entityDetailMenu.type
|
||||||
|
// })
|
||||||
|
// return true
|
||||||
|
// } else if (this.route === '/entityGraph') {
|
||||||
|
// const entityMenu = menus.find(m => m.route === '/entity')
|
||||||
|
// const entityGraphMenu = menus.find(m => m.route === '/entityGraph')
|
||||||
|
// breadcrumb.push({
|
||||||
|
// code: entityMenu.code,
|
||||||
|
// value: entityMenu.i18n ? this.$t(entityMenu.i18n) : entityMenu.name,
|
||||||
|
// route: entityMenu.route,
|
||||||
|
// type: entityMenu.type
|
||||||
|
// })
|
||||||
|
// breadcrumb.push({
|
||||||
|
// code: entityGraphMenu.code,
|
||||||
|
// value: entityGraphMenu.i18n ? this.$t(entityGraphMenu.i18n) : entityGraphMenu.name,
|
||||||
|
// route: entityGraphMenu.route,
|
||||||
|
// type: entityGraphMenu.type
|
||||||
|
// })
|
||||||
|
// return true
|
||||||
|
// }
|
||||||
|
// const menu = menus.find(m => m.route === this.route)
|
||||||
|
// if (menu) {
|
||||||
|
// breadcrumb.unshift({
|
||||||
|
// code: menu.code,
|
||||||
|
// value: menu.i18n ? this.$t(menu.i18n) : menu.name,
|
||||||
|
// route: menu.route,
|
||||||
|
// type: menu.type
|
||||||
|
// })
|
||||||
|
// return true
|
||||||
|
// } else {
|
||||||
|
// for (let i = 0; i < menus.length; i++) {
|
||||||
|
// if (!_.isEmpty(menus[i].children)) {
|
||||||
|
// if (this.generateBreadcrumb(breadcrumb, menus[i].children)) {
|
||||||
|
// breadcrumb.unshift({
|
||||||
|
// code: menus[i].code,
|
||||||
|
// value: menus[i].i18n ? this.$t(menus[i].i18n) : menus[i].name,
|
||||||
|
// route: menus[i].route,
|
||||||
|
// type: menus[i].type
|
||||||
|
// })
|
||||||
|
// return true
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// },
|
||||||
handleClose () {
|
handleClose () {
|
||||||
this.showChangePin = false
|
this.showChangePin = false
|
||||||
},
|
},
|
||||||
@@ -696,6 +722,23 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// 仅处理除panel外的相关路径的导航
|
||||||
|
async jumpOther (route, index) {
|
||||||
|
route = route.replace('redirect:', '')
|
||||||
|
this.showMenu = false
|
||||||
|
if (route === this.route && index > 0) { // 当前只有一级菜单时,点击不进行刷新,重新跳转
|
||||||
|
this.refresh()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (route) {
|
||||||
|
this.$router.push({
|
||||||
|
path: route,
|
||||||
|
query: {
|
||||||
|
t: +new Date()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
async jump (route, columnName, columnValue, opeType) {
|
async jump (route, columnName, columnValue, opeType) {
|
||||||
if (route === '/panel/linkMonitor' && opeType === 3) {
|
if (route === '/panel/linkMonitor' && opeType === 3) {
|
||||||
return true
|
return true
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ const routes = [
|
|||||||
component: () => import('@/views/report/Report')
|
component: () => import('@/views/report/Report')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/entityExplorer',
|
path: '/entity',
|
||||||
component: () => import('@/views/entityExplorer/EntityExplorer')
|
component: () => import('@/views/entityExplorer/EntityExplorer')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -213,7 +213,7 @@ export const detectionPageType = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const listScrollPath = [
|
export const listScrollPath = [
|
||||||
'/entityExplorer',
|
'/entity',
|
||||||
'/detection/performanceEvent',
|
'/detection/performanceEvent',
|
||||||
'/detection/securityEvent'
|
'/detection/securityEvent'
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
<div class="basic-info__item">
|
<div class="basic-info__item">
|
||||||
<i class="cn-icon cn-icon-duration"></i>
|
<i class="cn-icon cn-icon-duration"></i>
|
||||||
<span>{{ $t('overall.duration') }} : </span>
|
<span>{{ $t('overall.duration') }} : </span>
|
||||||
<span :test-id="`duration-time${index}`">{{ unitConvert(item.durationMs, 'time', null, null, 0).join(' ') || '-' }}</span>
|
<span :test-id="`duration-time${index}`">{{ unitConvert(parseInt(item.durationS), 'time', 's', null, 0).join(' ') || '-' }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
class="detection-event-severity-color-block"
|
class="detection-event-severity-color-block"
|
||||||
:style="`background-color: ${eventSeverityColor[item.eventSeverity]}`">
|
:style="`background-color: ${eventSeverityColor[item.eventSeverity]}`">
|
||||||
</span>
|
</span>
|
||||||
<span class="detection-event-severity-block">{{ toUpperCaseByString(item.securityType) || '-' }}</span>
|
<span class="detection-event-severity-block">{{ item.eventName || '-' }}</span>
|
||||||
<i class="cn-icon cn-icon-attacker"></i>
|
<i class="cn-icon cn-icon-attacker"></i>
|
||||||
<span :test-id="`offender-ip${index}`">{{ item.offenderIp || '-' }}</span>
|
<span :test-id="`offender-ip${index}`">{{ item.offenderIp || '-' }}</span>
|
||||||
<div class="domain">{{ item.offenderDomain }}</div>
|
<div class="domain">{{ item.offenderDomain }}</div>
|
||||||
@@ -63,7 +63,7 @@
|
|||||||
<div class="basic-info__item">
|
<div class="basic-info__item">
|
||||||
<i class="cn-icon cn-icon-duration"></i>
|
<i class="cn-icon cn-icon-duration"></i>
|
||||||
<span>{{ $t('overall.duration') }} : </span>
|
<span>{{ $t('overall.duration') }} : </span>
|
||||||
<span>{{ unitConvert(item.durationMs, 'time', null, null, 0).join(' ') || '-' }}</span>
|
<span>{{ unitConvert(parseInt(item.durationS), 'time', 's', null, 0).join(' ') || '-' }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -109,14 +109,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
// this.initData()
|
this.initData()
|
||||||
this.isNoData = true
|
|
||||||
this.$emit('checkTag', entityDetailTabsName.securityEvent, 0)
|
|
||||||
this.toggleLoading(true)
|
|
||||||
const timer = setTimeout(() => {
|
|
||||||
this.toggleLoading(false)
|
|
||||||
clearInterval(timer)
|
|
||||||
}, 200)
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
unitConvert,
|
unitConvert,
|
||||||
|
|||||||
@@ -389,7 +389,7 @@ export default {
|
|||||||
if (!this.showList) {
|
if (!this.showList) {
|
||||||
// 首页进入搜索时重载页面,视觉上进入列表页面
|
// 首页进入搜索时重载页面,视觉上进入列表页面
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: '/entityExplorer',
|
path: '/entity',
|
||||||
query: {
|
query: {
|
||||||
listMode: this.listMode,
|
listMode: this.listMode,
|
||||||
q: urlQ,
|
q: urlQ,
|
||||||
|
|||||||
Reference in New Issue
Block a user