2022-01-03 22:46:22 +08:00
|
|
|
<template>
|
2023-04-25 16:04:20 +08:00
|
|
|
<div class="entity-detail" style="height: 100%;">
|
|
|
|
|
<panel
|
|
|
|
|
:entity="entityData"
|
|
|
|
|
></panel>
|
2022-01-03 22:46:22 +08:00
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import { useRoute } from 'vue-router'
|
2023-04-25 16:04:20 +08:00
|
|
|
import Panel from '@/views/charts2/Panel'
|
|
|
|
|
import { panelTypeAndRouteMapping } from '@/utils/constants'
|
2022-01-03 22:46:22 +08:00
|
|
|
export default {
|
|
|
|
|
name: 'EntityDetail',
|
|
|
|
|
components: {
|
2023-04-25 16:04:20 +08:00
|
|
|
Panel
|
2022-01-03 22:46:22 +08:00
|
|
|
},
|
|
|
|
|
data () {
|
|
|
|
|
return {
|
|
|
|
|
}
|
|
|
|
|
},
|
2023-04-25 16:04:20 +08:00
|
|
|
setup (props) {
|
2022-01-03 22:46:22 +08:00
|
|
|
const { query } = useRoute()
|
|
|
|
|
let panelType
|
2023-06-29 14:40:50 +08:00
|
|
|
const entityData = { entityType: query.entityType, entityName: query.entityName }
|
2022-01-03 22:46:22 +08:00
|
|
|
switch (query.entityType) {
|
|
|
|
|
case 'ip': {
|
2023-04-25 16:04:20 +08:00
|
|
|
panelType = panelTypeAndRouteMapping.ipEntityDetail
|
2023-06-29 14:40:50 +08:00
|
|
|
entityData.ip = query.entityName
|
2022-01-03 22:46:22 +08:00
|
|
|
break
|
|
|
|
|
}
|
|
|
|
|
case 'domain': {
|
2023-04-25 16:04:20 +08:00
|
|
|
panelType = panelTypeAndRouteMapping.domainEntityDetail
|
2023-06-29 14:40:50 +08:00
|
|
|
entityData.domain = query.entityName
|
2022-01-03 22:46:22 +08:00
|
|
|
break
|
|
|
|
|
}
|
|
|
|
|
case 'app': {
|
2023-04-25 16:04:20 +08:00
|
|
|
panelType = panelTypeAndRouteMapping.appEntityDetail
|
2023-06-29 14:40:50 +08:00
|
|
|
entityData.appName = query.entityName
|
2022-01-03 22:46:22 +08:00
|
|
|
break
|
|
|
|
|
}
|
|
|
|
|
default: {
|
2023-04-25 16:04:20 +08:00
|
|
|
panelType = panelTypeAndRouteMapping.ipEntityDetail
|
2022-01-03 22:46:22 +08:00
|
|
|
break
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
entityData.type = panelType
|
|
|
|
|
return {
|
|
|
|
|
entityData
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
},
|
2022-04-25 15:29:44 +08:00
|
|
|
mounted () {
|
2022-01-03 22:46:22 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|