Fixed results table in test view
This commit is contained in:
parent
3eca29c2db
commit
29d9cbc59c
@ -82,7 +82,7 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
{{ range $res := .test.Results }}
|
{{ range $res := .test.Results }}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ $res.Hardware.Name }}</td>
|
<td>{{ .test.Hardware.Name }}</td>
|
||||||
<td>{{ $res.Benchmark.Name }}</td>
|
<td>{{ $res.Benchmark.Name }}</td>
|
||||||
<td>{{ $res.AverageScore }}</td>
|
<td>{{ $res.AverageScore }}</td>
|
||||||
<td>{{ $res.MinimumScore }}</td>
|
<td>{{ $res.MinimumScore }}</td>
|
||||||
|
@ -30,7 +30,7 @@ func TestGetView(c flamego.Context, t template.Template, data template.Data) {
|
|||||||
|
|
||||||
// find hardware from DB
|
// find hardware from DB
|
||||||
var test models.Test
|
var test models.Test
|
||||||
models.DB.Preload("Hardware").Preload("Benchmarks").Preload("Results").First(&test, testID)
|
models.DB.Preload("Hardware").Preload("Benchmarks").Preload("Results.Benchmark").First(&test, testID)
|
||||||
data["test"] = test
|
data["test"] = test
|
||||||
|
|
||||||
data["title"] = test.Name
|
data["title"] = test.Name
|
||||||
|
Loading…
Reference in New Issue
Block a user