mirror of
https://github.com/reactos/syzkaller.git
synced 2025-02-26 06:35:31 +00:00
dashboard/app: fix patched/missing on numbers
We currently print N/M which does not mean N out of M are patched, instead it means N patched and M are not patched. This is confusing. Print more traditional "N out of M".
This commit is contained in:
parent
11fa8bb3de
commit
9b1e75c0bc
@ -93,6 +93,7 @@ type uiBug struct {
|
||||
Commits string
|
||||
PatchedOn []string
|
||||
MissingOn []string
|
||||
NumManagers int
|
||||
}
|
||||
|
||||
type uiCrash struct {
|
||||
@ -389,7 +390,7 @@ func createUIBug(c context.Context, bug *Bug, state *ReportingState, managers []
|
||||
Status: status,
|
||||
Link: bugLink(id),
|
||||
ExternalLink: link,
|
||||
PatchedOn: bug.PatchedOn,
|
||||
NumManagers: len(managers),
|
||||
}
|
||||
if len(bug.Commits) != 0 {
|
||||
uiBug.Commits = fmt.Sprintf("%q", bug.Commits)
|
||||
@ -401,10 +402,13 @@ func createUIBug(c context.Context, bug *Bug, state *ReportingState, managers []
|
||||
break
|
||||
}
|
||||
}
|
||||
if !found {
|
||||
if found {
|
||||
uiBug.PatchedOn = append(uiBug.PatchedOn, mgr)
|
||||
} else {
|
||||
uiBug.MissingOn = append(uiBug.MissingOn, mgr)
|
||||
}
|
||||
}
|
||||
sort.Strings(uiBug.PatchedOn)
|
||||
sort.Strings(uiBug.MissingOn)
|
||||
}
|
||||
return uiBug
|
||||
|
@ -25,7 +25,7 @@ Use of this source code is governed by Apache 2 LICENSE that can be found in the
|
||||
<td class="stat {{if $b.NumCrashesBad}}bad{{end}}">{{$b.NumCrashes}}</td>
|
||||
<td class="stat">{{formatReproLevel $b.ReproLevel}}</td>
|
||||
<td class="stat">{{formatLateness $.Now $b.LastTime}}</td>
|
||||
<td class="patched" title="{{$b.Commits}}">{{if $b.Commits}}{{len $b.PatchedOn}}/{{len $b.MissingOn}}{{end}}</td>
|
||||
<td class="patched" title="{{$b.Commits}}">{{if $b.Commits}}{{len $b.PatchedOn}}/{{$b.NumManagers}}{{end}}</td>
|
||||
<td class="status">{{if $b.ExternalLink}}<a href="{{$b.ExternalLink}}">{{$b.Status}}</a>{{else}}{{$b.Status}}{{end}}</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
|
Loading…
x
Reference in New Issue
Block a user