Skip to content

Commit 2312766

Browse files
committed
Show correct zset score
1 parent 6d112c8 commit 2312766

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

src/Dashboards/Redis/RedisTrait.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,7 @@ private function viewKey(Redis $redis): string {
327327
'value' => $item,
328328
'encode_fn' => $item_encode_fn,
329329
'formatted' => $item_is_formatted,
330+
'score' => $type === 'zset' ? (string) $redis->zScore($key, $item) : $value_key,
330331
];
331332
}
332333

templates/partials/view_key.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
<div class="overflow-y-auto flex justify-between border-b px-4 py-1.5">
5959
<span>
6060
{% if type != 'set' %}
61-
{{ title }} {{ include('components/badge.twig', {text: item.key, pill: true, class: 'font-bold', bg: 'bg-slate-400'}) }}
61+
{{ title }} {{ include('components/badge.twig', {text: item.score, pill: true, class: 'font-bold', bg: 'bg-slate-400'}) }}
6262
{% endif %}
6363

6464
{% if item.encode_fn %}

0 commit comments

Comments
 (0)