fix: 审计事件详情
This commit is contained in:
@@ -3,15 +3,19 @@
|
||||
<ElButton v-if="eventId" link type="primary" @click="openEvent">事件详情</ElButton>
|
||||
<ElButton v-if="actorRef" link type="primary" @click="openActor"> 操作者行为时间线 </ElButton>
|
||||
<ElButton
|
||||
v-show="showResources"
|
||||
v-for="resource in stableResourceRefs"
|
||||
:key="`${resource.resource_type}:${resource.resource_id}`"
|
||||
link
|
||||
type="primary"
|
||||
:title="resourceTimelineLabel(resource)"
|
||||
:aria-label="resourceTimelineLabel(resource)"
|
||||
@click="openResource(resource)"
|
||||
>
|
||||
资源审计时间线
|
||||
{{ resourceTimelineLabel(resource) }}
|
||||
</ElButton>
|
||||
<ElButton
|
||||
v-show="showResources"
|
||||
v-for="resource in searchableResourceRefs"
|
||||
:key="`${resource.resource_type}:${resource.resource_key}`"
|
||||
link
|
||||
@@ -52,6 +56,7 @@
|
||||
AuditSearchResourceType
|
||||
} from '@/types/api'
|
||||
import { openAuditInvestigation, openAuditResourceSearch } from './investigationController'
|
||||
import { auditResourceTypeLabels } from '@/utils/business/audit'
|
||||
import { resolveInvestigationReference } from '@/utils/business/auditNavigation'
|
||||
|
||||
const props = withDefaults(
|
||||
@@ -59,8 +64,9 @@
|
||||
refs?: AuditInvestigationRefs | null
|
||||
currentEventId?: string
|
||||
showEmpty?: boolean
|
||||
showResources?: boolean
|
||||
}>(),
|
||||
{ currentEventId: '', showEmpty: true }
|
||||
{ currentEventId: '', showEmpty: true, showResources: true }
|
||||
)
|
||||
const searchableTypes = new Set<AuditSearchResourceType>([
|
||||
'iot_card',
|
||||
@@ -111,8 +117,8 @@
|
||||
actorRef.value ||
|
||||
requestId.value ||
|
||||
correlationId.value ||
|
||||
stableResourceRefs.value.length ||
|
||||
searchableResourceRefs.value.length ||
|
||||
(props.showResources &&
|
||||
(stableResourceRefs.value.length || searchableResourceRefs.value.length)) ||
|
||||
stableIntegrationRefs.value.length
|
||||
)
|
||||
)
|
||||
@@ -135,6 +141,10 @@
|
||||
resourceType: resource.resource_type,
|
||||
id: resource.resource_id
|
||||
})
|
||||
const resourceTimelineLabel = (
|
||||
resource: AuditInvestigationResourceRef & { resource_id: string }
|
||||
) =>
|
||||
`资源审计时间线 · ${auditResourceTypeLabels[resource.resource_type] || resource.resource_type} · ${resource.resource_id}`
|
||||
const searchResource = (
|
||||
resource: AuditInvestigationResourceRef & {
|
||||
resource_type: AuditSearchResourceType
|
||||
|
||||
Reference in New Issue
Block a user