Fixed typos in model searches
This commit is contained in:
parent
ab6b94cb5f
commit
9ddf7fa928
@ -13,9 +13,9 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{{ range $h := .benchmarks }}
|
{{ range $b := .benchmarks }}
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="/benchmark/{{ $h.ID }}">{{ $h.Name }}</a></td>
|
<td><a href="/benchmark/{{ $b.ID }}">{{ $b.Name }}</a></td>
|
||||||
<td>{{ $h.CreatedAt.Format "01/02/2006 15:04am" }}</td>
|
<td>{{ $h.CreatedAt.Format "01/02/2006 15:04am" }}</td>
|
||||||
<td>{{ $h.UpdatedAt.Format "01/02/2006 15:04am" }}</td>
|
<td>{{ $h.UpdatedAt.Format "01/02/2006 15:04am" }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -17,7 +17,7 @@ import (
|
|||||||
func BenchmarkGetList(t template.Template, data template.Data) {
|
func BenchmarkGetList(t template.Template, data template.Data) {
|
||||||
// add benchmarks to template
|
// add benchmarks to template
|
||||||
var benchmarks []models.Benchmark
|
var benchmarks []models.Benchmark
|
||||||
models.DB.First(&benchmarks)
|
models.DB.Find(&benchmarks)
|
||||||
data["benchmarks"] = benchmarks
|
data["benchmarks"] = benchmarks
|
||||||
|
|
||||||
data["title"] = "List of Benchmarks"
|
data["title"] = "List of Benchmarks"
|
||||||
@ -30,7 +30,7 @@ func BenchmarkGetView(c flamego.Context, t template.Template, data template.Data
|
|||||||
|
|
||||||
// find benchmark from DB
|
// find benchmark from DB
|
||||||
var benchmark models.Benchmark
|
var benchmark models.Benchmark
|
||||||
models.DB.Find(&benchmark, benchmarkID)
|
models.DB.First(&benchmark, benchmarkID)
|
||||||
data["benchmark"] = benchmark
|
data["benchmark"] = benchmark
|
||||||
|
|
||||||
data["title"] = benchmark.Name
|
data["title"] = benchmark.Name
|
||||||
|
@ -17,7 +17,7 @@ import (
|
|||||||
func HardwareGetList(t template.Template, data template.Data) {
|
func HardwareGetList(t template.Template, data template.Data) {
|
||||||
// add hardwares to template
|
// add hardwares to template
|
||||||
var hardware []models.Hardware
|
var hardware []models.Hardware
|
||||||
models.DB.First(&hardware)
|
models.DB.Find(&hardware)
|
||||||
data["hardware"] = hardware
|
data["hardware"] = hardware
|
||||||
|
|
||||||
data["title"] = "List of Hardware"
|
data["title"] = "List of Hardware"
|
||||||
@ -30,7 +30,7 @@ func HardwareGetView(c flamego.Context, t template.Template, data template.Data)
|
|||||||
|
|
||||||
// find hardware from DB
|
// find hardware from DB
|
||||||
var hardware models.Hardware
|
var hardware models.Hardware
|
||||||
models.DB.Find(&hardware, hardwareID)
|
models.DB.First(&hardware, hardwareID)
|
||||||
data["hardware"] = hardware
|
data["hardware"] = hardware
|
||||||
|
|
||||||
data["title"] = hardware.Name
|
data["title"] = hardware.Name
|
||||||
|
@ -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.Find(&test, testID)
|
models.DB.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