mirror of
https://github.com/reactos/syzkaller.git
synced 2024-12-03 17:01:28 +00:00
dashboard/app: show when bugs are fixed and where
This commit is contained in:
parent
a2961665fd
commit
6db82ca081
@ -14,6 +14,8 @@
|
||||
Last: {{formatTime .Bug.LastTime}}<br>
|
||||
Reporting: {{if .Bug.Link}}<a href="{{.Bug.Link}}">{{.Bug.Status}}</a>{{else}}{{.Bug.Status}}{{end}}<br>
|
||||
Commits: {{.Bug.Commits}}<br>
|
||||
Patched on: {{.Bug.PatchedOn}}<br>
|
||||
Missing on: {{.Bug.MissingOn}}<br>
|
||||
|
||||
<table class="list_table">
|
||||
<caption>Crashes:</caption>
|
||||
|
@ -55,6 +55,8 @@ type uiBug struct {
|
||||
Status string
|
||||
Link string
|
||||
Commits string
|
||||
PatchedOn []string
|
||||
MissingOn []string
|
||||
}
|
||||
|
||||
type uiCrash struct {
|
||||
@ -109,7 +111,11 @@ func handleBug(c context.Context, w http.ResponseWriter, r *http.Request) error
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
uiBug := createUIBug(c, bug, state)
|
||||
managers, err := managerList(c, bug.Namespace)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
uiBug := createUIBug(c, bug, state, managers)
|
||||
crashes, err := loadCrashesForBug(c, bug)
|
||||
if err != nil {
|
||||
return err
|
||||
@ -149,9 +155,17 @@ func fetchBugs(c context.Context) ([]*uiBugGroup, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
managers := make(map[string][]string)
|
||||
for ns := range config.Namespaces {
|
||||
mgrs, err := managerList(c, ns)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
managers[ns] = mgrs
|
||||
}
|
||||
groups := make(map[string][]*uiBug)
|
||||
for _, bug := range bugs {
|
||||
uiBug := createUIBug(c, bug, state)
|
||||
uiBug := createUIBug(c, bug, state, managers[bug.Namespace])
|
||||
groups[bug.Namespace] = append(groups[bug.Namespace], uiBug)
|
||||
}
|
||||
var res []*uiBugGroup
|
||||
@ -166,7 +180,7 @@ func fetchBugs(c context.Context) ([]*uiBugGroup, error) {
|
||||
return res, nil
|
||||
}
|
||||
|
||||
func createUIBug(c context.Context, bug *Bug, state *ReportingState) *uiBug {
|
||||
func createUIBug(c context.Context, bug *Bug, state *ReportingState, managers []string) *uiBug {
|
||||
_, _, _, reportingIdx, status, link, err := needReport(c, "", state, bug)
|
||||
if err != nil {
|
||||
status = err.Error()
|
||||
@ -185,7 +199,23 @@ func createUIBug(c context.Context, bug *Bug, state *ReportingState) *uiBug {
|
||||
ReportingIndex: reportingIdx,
|
||||
Status: status,
|
||||
Link: link,
|
||||
Commits: fmt.Sprintf("%q", bug.Commits),
|
||||
PatchedOn: bug.PatchedOn,
|
||||
}
|
||||
if len(bug.Commits) != 0 {
|
||||
uiBug.Commits = fmt.Sprintf("%q", bug.Commits)
|
||||
for _, mgr := range managers {
|
||||
found := false
|
||||
for _, mgr1 := range bug.PatchedOn {
|
||||
if mgr == mgr1 {
|
||||
found = true
|
||||
break
|
||||
}
|
||||
}
|
||||
if !found {
|
||||
uiBug.MissingOn = append(uiBug.MissingOn, mgr)
|
||||
}
|
||||
}
|
||||
sort.Strings(uiBug.MissingOn)
|
||||
}
|
||||
return uiBug
|
||||
}
|
||||
|
@ -7,6 +7,7 @@
|
||||
<th>Repro</th>
|
||||
<th>Last</th>
|
||||
<th>Status</th>
|
||||
<th>Patched</th>
|
||||
</tr>
|
||||
{{range $b := $.Bugs}}
|
||||
<tr>
|
||||
@ -15,6 +16,7 @@
|
||||
<td class="repro">{{formatReproLevel $b.ReproLevel}}</td>
|
||||
<td class="time">{{formatTime $b.LastTime}}</td>
|
||||
<td class="status">{{if $b.Link}}<a href="{{$b.Link}}">{{$b.Status}}</a>{{else}}{{$b.Status}}{{end}}</td>
|
||||
<td class="patched">{{if $b.Commits}}{{len $b.PatchedOn}}/{{len $b.MissingOn}}{{end}}</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</table>
|
||||
|
@ -98,6 +98,10 @@ table td, table th {
|
||||
max-width: 300pt;
|
||||
}
|
||||
|
||||
.list_table .patched {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.list_table .kernel {
|
||||
width: 200pt;
|
||||
max-width: 200pt;
|
||||
|
Loading…
Reference in New Issue
Block a user