diff --git a/assets/styles/kourend.sass b/assets/styles/kourend.sass
index ea014be..c3598c7 100644
--- a/assets/styles/kourend.sass
+++ b/assets/styles/kourend.sass
@@ -59,7 +59,7 @@ table tr:nth-child(even)
table tbody tr
transition: background 180ms ease-in-out
&:hover
- background: lightgrey
+ background: #d8d8d8
/* Material card styles */
.card-1
@@ -108,12 +108,12 @@ table tbody tr
a
color: white
+ text-decoration: none
font-size: 2.25rem
line-height: 64px
transition: all 200ms ease-in-out
&:hover
color: #eee
- font-size: 2.5rem
#main-content
padding: 15px 25px
diff --git a/runner.conf b/runner.conf
deleted file mode 100644
index 1c95660..0000000
--- a/runner.conf
+++ /dev/null
@@ -1,14 +0,0 @@
-root: .
-tmp_path: ./tmp
-build_name: runner-build
-build_log: runner-build-errors.log
-valid_ext: .go, .tpl, .tmpl, .html
-no_rebuild_ext: .tpl, .tmpl, .html
-ignored: assets, tmp, node_modules, data, vendor
-build_delay: 600
-colors: 1
-log_color_main: cyan
-log_color_build: yellow
-log_color_runner: green
-log_color_watcher: magenta
-log_color_app:
diff --git a/templates/benchmark/list.tmpl b/templates/benchmark/list.tmpl
index bebd020..e32b0d4 100644
--- a/templates/benchmark/list.tmpl
+++ b/templates/benchmark/list.tmpl
@@ -16,8 +16,8 @@
{{ range $b := .benchmarks }}
| {{ $b.Name }} |
- {{ $b.CreatedAt.Format "01/02/2006 15:04am" }} |
- {{ $b.UpdatedAt.Format "01/02/2006 15:04am" }} |
+ {{ $b.CreatedAt.Format "01/02/2006 3:04pm" }} |
+ {{ $b.UpdatedAt.Format "01/02/2006 3:04pm" }} |
{{ end }}
diff --git a/templates/hardware/list.tmpl b/templates/hardware/list.tmpl
index 7c8dfaa..33da829 100644
--- a/templates/hardware/list.tmpl
+++ b/templates/hardware/list.tmpl
@@ -16,8 +16,8 @@
{{ range $h := .hardware }}
| {{ $h.Name }} |
- {{ $h.CreatedAt.Format "01/02/2006 15:04am" }} |
- {{ $h.UpdatedAt.Format "01/02/2006 15:04am" }} |
+ {{ $h.CreatedAt.Format "01/02/2006 3:04pm" }} |
+ {{ $h.UpdatedAt.Format "01/02/2006 3:04pm" }} |
{{ end }}
diff --git a/templates/hardware/view.tmpl b/templates/hardware/view.tmpl
index f58ae6e..470db68 100644
--- a/templates/hardware/view.tmpl
+++ b/templates/hardware/view.tmpl
@@ -27,7 +27,7 @@
| {{ $test.Name }} |
{{ len $test.Benchmarks }} |
- {{ $test.CreatedAt.Format "01/02/2006 15:04am" }} |
+ {{ $test.CreatedAt.Format "01/02/2006 3:04pm" }} |
{{ end }}
diff --git a/templates/index/dashboard.tmpl b/templates/index/dashboard.tmpl
index a19e34e..22fd253 100644
--- a/templates/index/dashboard.tmpl
+++ b/templates/index/dashboard.tmpl
@@ -2,4 +2,79 @@
This is the BLT dashboard.
+
+ Recently updated tests:
+
+
+
+
+ | Title |
+ Created at |
+ Last updated |
+
+
+
+ {{ range $p := .tests }}
+
+ | {{ $p.Name }} |
+ {{ $p.CreatedAt.Format "01/02/2006 3:04pm" }} |
+ {{ $p.UpdatedAt.Format "01/02/2006 3:04pm" }} |
+
+ {{ end }}
+
+
+
+ Visit the tests page to for more information and actions.
+
+
+
+
+
+
+
Recently updated hardware:
+
+
+
+
+ | Name |
+ Created at |
+ Last updated |
+
+
+
+ {{ range $h := .hardware }}
+
+ | {{ $h.Name }} |
+ {{ $h.CreatedAt.Format "01/02/2006 3:04pm" }} |
+ {{ $h.UpdatedAt.Format "01/02/2006 3:04pm" }} |
+
+ {{ end }}
+
+
+
+
+
+
Recently updated benchmarks:
+
+
+
+
+ | Name |
+ Created at |
+ Last updated |
+
+
+
+ {{ range $b := .benchmarks }}
+
+ | {{ $b.Name }} |
+ {{ $b.CreatedAt.Format "01/02/2006 3:04pm" }} |
+ {{ $b.UpdatedAt.Format "01/02/2006 3:04pm" }} |
+
+ {{ end }}
+
+
+
+
+
{{ template "footer" . }}
diff --git a/templates/test/list.tmpl b/templates/test/list.tmpl
index 1c645ef..526b752 100644
--- a/templates/test/list.tmpl
+++ b/templates/test/list.tmpl
@@ -16,8 +16,8 @@
{{ range $p := .tests }}
| {{ $p.Name }} |
- {{ $p.CreatedAt.Format "01/02/2006 15:04am" }} |
- {{ $p.UpdatedAt.Format "01/02/2006 15:04am" }} |
+ {{ $p.CreatedAt.Format "01/02/2006 3:04pm" }} |
+ {{ $p.UpdatedAt.Format "01/02/2006 3:04pm" }} |
{{ end }}
diff --git a/web/routes/index.go b/web/routes/index.go
index 4926e8d..06ea529 100644
--- a/web/routes/index.go
+++ b/web/routes/index.go
@@ -4,9 +4,25 @@ import (
"net/http"
"github.com/flamego/template"
+
+ "git.metaunix.net/bitgoblin/blt/models"
)
func GetDashboard(t template.Template, data template.Data) {
+ // add tests to template; limited to 10 most recent
+ var tests []models.Test
+ models.DB.Order("updated_at desc").Limit(10).Find(&tests)
+ data["tests"] = tests
+
+ // add hardwares to template; limited to 5 most recent
+ var hardware []models.Hardware
+ models.DB.Order("updated_at desc").Limit(5).Find(&hardware)
+ data["hardware"] = hardware
+ // add benchmarks to template; limited to 5 most recent
+ var benchmarks []models.Benchmark
+ models.DB.Order("updated_at desc").Limit(5).Find(&benchmarks)
+ data["benchmarks"] = benchmarks
+
data["title"] = "Dashboard"
t.HTML(http.StatusOK, "index/dashboard")
}