From 07b455f928ae5c2cd07f4d61c1b499f56ea3dd08 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Fri, 26 Apr 2024 12:04:41 +0200 Subject: dashboard/app: don't print discussion info where there are none MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently we print somewhat verbose "💬 0 [3d18h]" when there are no discussions, the date repeats the reporting date. It' makes it hard to visually see when there are conversations and when there are none. Print nothing when there are no discussions. --- dashboard/app/templates.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'dashboard') diff --git a/dashboard/app/templates.html b/dashboard/app/templates.html index e37772bc8..84f733a06 100644 --- a/dashboard/app/templates.html +++ b/dashboard/app/templates.html @@ -190,10 +190,10 @@ Use of this source code is governed by Apache 2 LICENSE that can be found in the {{if $.DispDiscuss}} {{$d := $b.Discussions}} - {{- if $d.LastPatchMessage.IsZero -}} - 💬 {{$d.ExternalMessages}} [{{formatLateness $.Now $d.LastMessage}}] - {{else}} + {{- if not $d.LastPatchMessage.IsZero -}} PATCH [{{formatLateness $.Now $d.LastPatchMessage}}] + {{- else if $d.ExternalMessages -}} + 💬 {{$d.ExternalMessages}} [{{formatLateness $.Now $d.LastMessage}}] {{- end -}} {{end}} -- cgit mrf-deployment