Lots of changes

This commit is contained in:
2023-12-02 22:16:16 -05:00
parent 16704aeeb1
commit c5df026d04
16 changed files with 135 additions and 122 deletions

View File

@ -4,7 +4,7 @@
<h4>BLT</h4>
<ul>
<li><a href="/">Dashboard</a></li>
<li><a href="/project">Projects</a></li>
<li><a href="/test">Tests</a></li>
<li><a href="/hardware">Hardware</a></li>
<li><a href="/benchmark">Benchmarks</a></li>
</ul>

View File

@ -1,25 +0,0 @@
{{ template "header" . }}
<div class="row">
<h2>Create a project</h2>
<form class="twelve columns" action="/project/create" method="POST">
<div class="row">
<label for="project_name">
Project name:
<input id="project_name" class="u-full-width" type="text" name="project_name" placeholder="My hardware benchmarking project">
</label>
</div>
<div class="row">
<label for="project_description">
Project description:
<textarea id="project_description" class="twelve columns" cols="30" rows="10" name="project_description"></textarea>
</label>
</div>
<input class="button-primary u-full-width" type="submit" value="Submit">
</form>
</div>
{{ template "footer" . }}

View File

@ -1,13 +0,0 @@
{{ template "header" . }}
<div class="row">
<h2>{{ .project.Name }}</h2>
<p>{{ .project.Description }}</p>
<hr>
<p><a href="/project">Back</a></p>
</div>
{{ template "footer" . }}

View File

@ -0,0 +1,25 @@
{{ template "header" . }}
<div class="row">
<h2>Create a test</h2>
<form class="twelve columns" action="/test/create" method="POST">
<div class="row">
<label for="test_name">
Test name:
<input id="test_name" class="u-full-width" type="text" name="test_name" placeholder="My hardware benchmarking test">
</label>
</div>
<div class="row">
<label for="test_description">
Test description:
<textarea id="test_description" class="twelve columns" cols="30" rows="10" name="test_description"></textarea>
</label>
</div>
<input class="button-primary u-full-width" type="submit" value="Submit">
</form>
</div>
{{ template "footer" . }}

View File

@ -1,8 +1,8 @@
{{ template "header" . }}
<div class="row">
<h2>Projects</h2>
<a href="/project/create">Create a new project</a>
<h2>Tests</h2>
<a href="/test/create">Create a new test</a>
<table class="twelve columns">
<thead>
@ -13,9 +13,9 @@
</tr>
</thead>
<tbody>
{{ range $p := .projects }}
{{ range $p := .tests }}
<tr>
<td><a href="/project/{{ $p.ID }}">{{ $p.Name }}</a></td>
<td><a href="/test/{{ $p.ID }}">{{ $p.Name }}</a></td>
<td>{{ $p.CreatedAt.Format "01/02/2006 15:04am" }}</td>
<td>{{ $p.UpdatedAt.Format "01/02/2006 15:04am" }}</td>
</tr>

13
templates/test/view.tmpl Normal file
View File

@ -0,0 +1,13 @@
{{ template "header" . }}
<div class="row">
<h2>{{ .test.Name }}</h2>
<p>{{ .test.Description }}</p>
<hr>
<p><a href="/test">Back</a></p>
</div>
{{ template "footer" . }}