Skip to content

Commit

Permalink
Show expiration information with metric search (#1517)
Browse files Browse the repository at this point in the history
  • Loading branch information
Iinh authored Nov 17, 2022
1 parent 8dd0e39 commit c8c2a42
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions src/components/ItemList.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -174,17 +174,22 @@
<!-- We have to do inline styling here to override Protocol CSS rules -->
<!-- https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity -->
<col width="35%" />
<col
width={itemType === "metrics" || itemType === "tags" ? "20%" : "65%"}
/>
<col
width={itemType === "metrics" || itemType === "tags" ? "45%" : "0"}
/>
{#if itemType === "metrics"}
<col width="15%" />
<col width="15%" />
<col width="35%" />
{:else if itemType === "tags"}
<col width="20%" />
<col width="45%" />
{:else}
<col width="65%" />
{/if}
<thead>
<tr>
<th scope="col" style="text-align: center;">Name</th>
{#if itemType === "metrics"}
<th scope="col" style="text-align: center;">Type</th>
<th scope="col" style="text-align: center;">Expiration</th>
{:else if itemType === "tags"}
<th scope="col" style="text-align: center;">Metric Count</th>
{/if}
Expand Down Expand Up @@ -270,6 +275,11 @@
<code>{@html highlightSearch(item.type, search)}</code>
</div>
</td>
<td style="text-align: center;">
<div class="item-property">
{item.expires ? item.expires : "never"}
</div>
</td>
{:else if itemType === "tags"}
<td style="text-align: center;">
<div class="item-property">
Expand Down

0 comments on commit c8c2a42

Please sign in to comment.