Skip to content

Commit

Permalink
Log viewer: added context display
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugeny committed May 30, 2022
1 parent 172e5b6 commit 89e93c1
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 4 deletions.
2 changes: 2 additions & 0 deletions warpgate-admin/app/openapi-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,7 @@
"required": [
"id",
"text",
"values",
"timestamp",
"session_id"
],
Expand All @@ -500,6 +501,7 @@
"text": {
"type": "string"
},
"values": {},
"timestamp": {
"type": "string",
"format": "date-time"
Expand Down
35 changes: 31 additions & 4 deletions warpgate-admin/app/src/LogViewer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,15 @@ onDestroy(() => {
{/if}
</td>
{/if}
<td class="text">
{item.text}
<td class="content">
<span class="text">
{item.text}
</span>

{#each Object.entries(item.values ?? {}) as pair}
<span class="key">{pair[0]}:</span>
<span class="value">{pair[1]}</span>
{/each}
</td>
</tr>
{/each}
Expand Down Expand Up @@ -219,8 +226,28 @@ onDestroy(() => {
opacity: .75;
}
:not(:last-child) {
padding-right: 15px;
td:not(:last-child) {
padding-right: 1em;
}
.content {
display: flex;
.text {
font-weight: bold;
margin-right: 0.6em;
}
.key {
margin-left: 0.5em;
margin-right: 0.3em;
opacity: .5;
font-style: italic;
}
.value {
font-style: italic;
}
}
}
Expand Down

0 comments on commit 89e93c1

Please sign in to comment.