{#if loading}
Slug
Type
Name
State
Health
{#each skeletonSlugWidths as slugWidth, i}
{/each}
{:else} {#snippet row(entity: Entity, level: number, ancestors: Set
)} {@const ancestorsWithSelf = new Set(ancestors).add(entity.slug)} {@const children = (childrenByParent.get(entity.slug) ?? []).filter( (c) => !ancestorsWithSelf.has(c.slug) )}
0 ? !collapsedNodes.has(entity.slug) : undefined} tabindex={0} onclick={() => onSelect(entity.slug)} onkeydown={(e) => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault() onSelect(entity.slug) } }} >
{#if children.length > 0}
toggleNode(entity.slug, e)} aria-label={collapsedNodes.has(entity.slug) ? `Expand ${entity.slug}` : `Collapse ${entity.slug}`} > {#if collapsedNodes.has(entity.slug)}
{:else}
{/if}
{/if}
{entity.slug} {#if children.length > 0}
({children.length})
{/if}
{entity.type}
{entity.name}
{#if children.length > 0 && !collapsedNodes.has(entity.slug)} {#each children as child (child.id)} {@render row(child, level + 1, ancestorsWithSelf)} {/each} {/if} {/snippet}
{@const ssSlug = getSortState('slug')}
sortBy('slug')} />
{@const ssType = getSortState('type')}
sortBy('type')} />
{@const ssName = getSortState('name')}
sortBy('name')} />
{@const ssState = getSortState('state')}
sortBy('state')} />
{@const ssHealth = getSortState('health')}
sortBy('health')} />
{#each topLevelEntities as entity (entity.id)} {@render row(entity, 1, new Set())} {:else}
{/each}
{/if}