blob: 45c1a8fbaa07720c87b446c6b57a5dce6164c029 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
@using marlin.core
@using marlin.core.models
@using marlin.web.Controllers
@model (VersionControlSource Source, List<VCSController.SecretOption> SecretOptions)
<form method="post" asp-route-id="@Model.Source.Id" asp-action="Edit">
URL: <input type="text" name="@nameof(VersionControlSource.UpstreamUrl)" value="@Model.Source.UpstreamUrl"/><br/>
Filter: <input type="text" name="@nameof(VersionControlSource.BranchFilter)" value="@Model.Source.BranchFilter"/><br/>
Main Branch: <input type="text" name="@nameof(VersionControlSource.MainBranch)" value="@Model.Source.MainBranch"/><br/>
Polling Interval: <input type="number" name="@nameof(VersionControlSource.MinPollingInterval)" value="@Model.Source.MinPollingInterval"/><br/>
Access Secret:
<select name="@nameof(VersionControlSource.AccessSecretId)">
<option value="">(none)</option>
@foreach (var secret in Model.SecretOptions)
{
<option value="@secret.Id" selected="@(secret.Id == Model.Source.AccessSecretId)">@secret.Label</option>
}
</select><br/>
<button type="submit">Save</button>
</form>
<table>
<thead>
<tr>
<th></th>
<th>branch</th>
<th>commit</th>
</tr>
</thead>
<tbody>
@foreach (var branch in Model.Source.Branches)
{
<tr>
<td>@(branch.Name == Model.Source.MainBranch ? "@" : "")</td>
<td>@branch.Name</td>
<td>@branch.Commit.Hash</td>
</tr>
}
</tbody>
</table>
<a asp-action="ListSecret" asp-route-sourceId="@Model.Source.Id">Secrets</a>
<a asp-action="List">Back</a>
|