@switch (inspectorTab()) {
@case ('entities') {
@for (node of nodes(); track node.id) {
{{ node.name }}
{{ node.type }}
@if (node.mentionCount) {
{{ node.mentionCount }}
}
} @empty {
}
}
@case ('relations') {
@for (relation of relations(); track relation.id) {
{{ relation.type }}
{{ relationLabel(relation) }}
{{ relation.evidenceCount ?? 0 }}
{{ 'XP.Knowledgebase.Evidence' | translate: { Default: 'evidence' } }}
} @empty {
}
}
@default {
@if (selectedEntity(); as entity) {
{{ entity.name }}
{{ entity.type }}
{{
'XP.Knowledgebase.GraphOrigin_' + (entity.origin ?? 'extracted')
| translate: { Default: entity.origin ?? 'extracted' }
}}
@if (entity.description) {
{{ entity.description }}
}
@if (entity.aliases?.length) {
@for (alias of entity.aliases; track alias) {
{{ alias }}
}
}
{{ 'XP.Knowledgebase.ExploreNeighborhood' | translate: { Default: 'Explore neighborhood' } }}
@if (relatedRelations().length) {
{{ 'XP.Knowledgebase.RelatedRelations' | translate: { Default: 'Related relations' } }}
{{ relatedRelations().length }}
@for (relation of relatedRelations(); track relation.id) {
{{ relationLabel(relation) }}
}
}
} @else if (selectedRelation(); as relation) {
{{ 'XP.Knowledgebase.Relation' | translate: { Default: 'Relation' } }}
{{ relation.type }}
{{ entityName(relation.sourceEntityId) }}
{{ entityName(relation.targetEntityId) }}
@if (relation.description) {
{{ relation.description }}
}
} @else {
}
@if (selected()) {
{{ 'XP.Knowledgebase.Evidence' | translate: { Default: 'Evidence' } }}
{{ mentions().length }}
@for (mention of mentions(); track mention.id) {
{{
mention.document?.name ?? mention.documentId ?? mention.chunkId
}}
{{ mention.quote || mention.chunkId }}
} @empty {
}
}
}
}