add clone button for build parameters
All checks were successful
All checks were successful
This commit is contained in:
@@ -90,13 +90,15 @@ class Web {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
app.get('/build{/}', (_, res) => {
|
app.get('/build{/}', async(req, res) => {
|
||||||
|
const query = ('id' in req.query && typeof req.query.id === 'string' && await this.db.getBuild(sqids.decode(req.query.id)?.[0])) || req.query;
|
||||||
res.render('build-new', {
|
res.render('build-new', {
|
||||||
page: {
|
page: {
|
||||||
title: 'Archery',
|
title: 'Archery',
|
||||||
titlesuffix: 'New Build',
|
titlesuffix: 'New Build',
|
||||||
description: 'Kick off a build'
|
description: 'Kick off a build',
|
||||||
}
|
},
|
||||||
|
query
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -10,19 +10,19 @@
|
|||||||
<div class="content">
|
<div class="content">
|
||||||
<h1>Start a build</h1>
|
<h1>Start a build</h1>
|
||||||
<form action="/build" method="post" class="grid-2col">
|
<form action="/build" method="post" class="grid-2col">
|
||||||
<label for="repoTxt">Repo</label> <input type="text" name="repo" id="repoTxt" required />
|
<label for="repoTxt">Repo</label> <input type="text" name="repo" id="repoTxt" required <% if (typeof query.repo === 'string') { %>value="<%= query.repo %>"<% } %> />
|
||||||
<label for="commitTxt">Commit</label> <input type="text" name="commit" id="commitTxt" />
|
<label for="commitTxt">Commit</label> <input type="text" name="commit" id="commitTxt" <% if (typeof query.commit === 'string') { %>value="<%= query.commit %>"<% } %> />
|
||||||
<label for="patchTxt">Patch</label> <textarea name="patch" id="patchTxt"></textarea>
|
<label for="patchTxt">Patch</label> <textarea name="patch" id="patchTxt"><% if (typeof query.patch === 'string') { %><%= query.patch %><% } %></textarea>
|
||||||
<label for="distroTxt">Distro</label>
|
<label for="distroTxt">Distro</label>
|
||||||
<select name="distro" id="distroTxt" required>
|
<select name="distro" id="distroTxt" required>
|
||||||
<option value="arch">Arch</option>
|
<option value="arch" <% if (query.distro === 'arch') { %>selected<% } %>>Arch</option>
|
||||||
<option value="artix">Artix</option>
|
<option value="artix" <% if (query.distro === 'artix') { %>selected<% } %>>Artix</option>
|
||||||
</select>
|
</select>
|
||||||
<label for="dependsTxt">Dependencies</label>
|
<label for="dependsTxt">Dependencies</label>
|
||||||
<select name="dependencies" id="dependsTxt" required>
|
<select name="dependencies" id="dependsTxt" required>
|
||||||
<option value="stable">Stable</option>
|
<option value="stable" <% if (query.dependencies === 'stable') { %>selected<% } %>>Stable</option>
|
||||||
<option value="testing">Testing</option>
|
<option value="testing" <% if (query.dependencies === 'testing') { %>selected<% } %>>Testing</option>
|
||||||
<option value="staging">Staging</option>
|
<option value="staging" <% if (query.dependencies === 'staging') { %>selected<% } %>>Staging</option>
|
||||||
</select>
|
</select>
|
||||||
<div class="span-2"><button type="submit">Build</button></div>
|
<div class="span-2"><button type="submit">Build</button></div>
|
||||||
</form>
|
</form>
|
||||||
|
@@ -20,6 +20,9 @@
|
|||||||
<label>Start time</label> <span class="to-local-time"><%= build.startTime %></span>
|
<label>Start time</label> <span class="to-local-time"><%= build.startTime %></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
|
<a href="/build?id=<%= build.sqid %>" class="button">Clone</a>
|
||||||
|
</div>
|
||||||
<% if (!ended) { %>
|
<% if (!ended) { %>
|
||||||
<div id="cancelRow">
|
<div id="cancelRow">
|
||||||
<a href="/build/<%= build.sqid %>/cancel" class="button">Cancel build</a>
|
<a href="/build/<%= build.sqid %>/cancel" class="button">Cancel build</a>
|
||||||
|
Reference in New Issue
Block a user