-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
99 additions
and
87 deletions.
There are no files selected for viewing
35 changes: 0 additions & 35 deletions
35
log-viewer/src/lib/components/timeline/LogDurations.svelte
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,8 +12,7 @@ | |
tags: ['autodocs'], | ||
args: { | ||
span, | ||
runStart: range.from, | ||
runEnd: range.to | ||
range | ||
} | ||
}; | ||
</script> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<script lang="ts"> | ||
import type { SpanEntry, TimeRange } from '../../log'; | ||
import SpanDuration from './SpanDuration.svelte'; | ||
/** | ||
* The Span to render in the tree. | ||
*/ | ||
export let span: SpanEntry; | ||
/** | ||
* How deeply nested is this sub-tree? | ||
*/ | ||
export let level: number = 0; | ||
/** | ||
* The duration of the entire run of the logger | ||
*/ | ||
export let range: TimeRange; | ||
</script> | ||
|
||
<!-- | ||
@component | ||
A tree-view of Spans/TaskSpans to show their names and nested structure. | ||
This is a recursive component that builds itself up by creating sub-trees. | ||
--> | ||
|
||
<div class="group grid grid-cols-3 grid-rows-1 items-stretch border-b bg-gray-50"> | ||
<div class="col-span-1 grid items-stretch"> | ||
<button class="group grid w-full items-stretch text-left" style="padding-left: {level}em"> | ||
<span | ||
class="grid items-center border-l border-r border-gray-300 bg-white px-2 text-sm group-hover:bg-gray-100" | ||
> | ||
<span>{span.name}</span> | ||
</span> | ||
</button> | ||
</div> | ||
<div class="col-span-2 bg-white px-2 group-hover:bg-gray-100"> | ||
<SpanDuration {span} {range} /> | ||
</div> | ||
</div> |
7 changes: 5 additions & 2 deletions
7
log-viewer/src/lib/components/timeline/SpanTree.stories.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,18 @@ | ||
<script lang="ts"> | ||
import type { DebugLog } from '../../log'; | ||
import LogDurations from './LogDurations.svelte'; | ||
import { type DebugLog, logRange } from '../../log'; | ||
import SpanTree from './SpanTree.svelte'; | ||
/** | ||
* The Debug Log you want to render | ||
*/ | ||
export let log: DebugLog; | ||
$: range = logRange(log); | ||
</script> | ||
|
||
<!-- | ||
@component | ||
Timeline and Tree view of the given DebugLog | ||
--> | ||
|
||
<div class="grid grid-cols-3 grid-rows-1"> | ||
<div class="col-span-1"> | ||
<SpanTree logs={log.logs} /> | ||
</div> | ||
<div class="col-span-2"><LogDurations logs={log.logs} /></div> | ||
</div> | ||
<SpanTree logs={log.logs} {range} /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters