interface with db
This commit is contained in:
25
views/build-new.ejs
Normal file
25
views/build-new.ejs
Normal file
@@ -0,0 +1,25 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
|
||||
|
||||
<head>
|
||||
<%- include("head", locals) %>
|
||||
</head>
|
||||
|
||||
<body class="preload">
|
||||
<%- include("navigation", locals) %>
|
||||
<div class="content">
|
||||
<h1>Start a build</h1>
|
||||
<form action="/build" method="post" class="grid-2col">
|
||||
<label for="repoTxt">Repo</label> <input type="text" name="repo" id="repoTxt" required />
|
||||
<label for="commitTxt">Commit</label> <input type="text" name="commit" id="commitTxt" />
|
||||
<label for="patchTxt">Patch</label> <textarea name="patch" id="patchTxt"></textarea>
|
||||
<label for="distroTxt">Distro</label>
|
||||
<select name="distro" id="distroTxt" required>
|
||||
<option value="arch">Arch</option>
|
||||
<option value="artix">Artix</option>
|
||||
</select>
|
||||
<div class="span-2"><button type="submit">Build</button></div>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@@ -8,17 +8,18 @@
|
||||
<body class="preload">
|
||||
<%- include("navigation", locals) %>
|
||||
<div class="content">
|
||||
<h1>Start a build</h1>
|
||||
<form action="/build" method="post" class="grid-2col">
|
||||
<label for="repoTxt">Repo</label> <input type="text" name="repo" id="repoTxt" required />
|
||||
<label for="commitTxt">Commit</label> <input type="text" name="commit" id="commitTxt" />
|
||||
<label for="distroTxt">Distro</label>
|
||||
<select name="distro" id="distroTxt" required>
|
||||
<option value="arch">Arch</option>
|
||||
<option value="artix">Artix</option>
|
||||
</select>
|
||||
<div class="span-2"><button type="submit">Build</button></div>
|
||||
</form>
|
||||
<h1>Build #<%= build.id %></h1>
|
||||
<h2><%= build.status %></h2>
|
||||
<div class="grid-2col">
|
||||
<label>Repo</label> <span><%= build.repo %></span>
|
||||
<label>Commit</label> <span><% if (build.commit) { %><%= build.commit %><% } else { %>latest<% } %></span>
|
||||
<label>Patch</label> <span><% if (build.patch) { %><a href="/build/<%= build.id %>/patch">patch file</a><% } else { %>none<% } %></span>
|
||||
<label>Distro</label> <span><%= build.distro %></span>
|
||||
<label>Start time</label> <span><%= build.startTime %></span>
|
||||
</div>
|
||||
<p><a href="/build/<%= build.id %>/logs">Full logs</a></p>
|
||||
<div class="logs">
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -17,6 +17,15 @@
|
||||
<th>Build Duration</th>
|
||||
<th>Build Status</th>
|
||||
</tr>
|
||||
<% builds.forEach(build => { %>
|
||||
<tr>
|
||||
<td><a href="/build/<%= build.id %>"><%= build.repo %></a></td>
|
||||
<td><%= build.distro %></td>
|
||||
<td><%= build.startTime %></td>
|
||||
<td>TODO</td>
|
||||
<td><%= build.status %></td>
|
||||
</tr>
|
||||
<% }) %>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
|
@@ -11,7 +11,7 @@
|
||||
<ul class="sidebar_links">
|
||||
<li><a href="/build">New Build</a></li>
|
||||
<li><a href="/">All Builds</a></li>
|
||||
<li><a href="/?status=failed">Failed Builds</a></li>
|
||||
<li><a href="/?status=error">Failed Builds</a></li>
|
||||
<li><a href="/?distro=arch">Arch Builds</a></li>
|
||||
<li><a href="/?distro=artix">Artix Builds</a></li>
|
||||
</ul>
|
||||
|
Reference in New Issue
Block a user