CN-854: 支持从npm-events点击跳转至detections-performance events

This commit is contained in:
刘洪洪
2023-01-06 18:03:45 +08:00
parent dcb5ff97af
commit 212c4b3eca
2 changed files with 59 additions and 3 deletions

View File

@@ -24,7 +24,7 @@
<span class="data-recent-table-severity" :class="scope.row[item.prop]">{{scope.row[item.prop]}}</span>
</template>
<template v-else-if="item.prop === 'eventKey'">
<span class="data-recent-table-entity">{{scope.row[item.prop]}}</span>
<span class="data-recent-table-entity" @click="jumpPage(scope.row)">{{splitEventKey(scope.row[item.prop])}}</span>
</template>
<template v-else-if="item.prop === 'eventType'">
<span class="data-recent-table-eventType">{{scope.row[item.prop]}}</span>
@@ -84,7 +84,9 @@ export default {
watch: {
timeFilter: {
handler (n) {
this.recentEventsListData()
if (n) {
this.recentEventsListData()
}
}
}
},
@@ -133,6 +135,29 @@ export default {
}).finally(() => {
this.toggleLoading(false)
})
},
/**
* 只要实体名称
* @param key
* @returns {*}
*/
splitEventKey (key) {
let name = ''
if (key) {
name = key.split(' ')[0]
} else {
name = '-'
}
return name
},
jumpPage (item) {
this.$router.push({
path: '/detection/performanceEvent',
query: {
t: +new Date(),
eventId: item.eventId
}
})
}
},
mounted () {