diff options
| author | Melodi <62381002+Melodi17@users.noreply.github.com> | 2026-09-06 09:02:31 +1000 |
|---|---|---|
| committer | Melodi <62381002+Melodi17@users.noreply.github.com> | 2026-09-06 09:02:31 +1000 |
| commit | a9bc03fb01b5d1ac41bf5592f384d22df5425aa4 (patch) | |
| tree | 16ae13e19d2a3cd7488202c30790d09557559d70 /src/marlin.web/Views/VCS/Details.cshtml | |
| parent | c00992ffad24212c4398736efd6d707d4cb0cc0d (diff) | |
feat: vcs and secret management support
Diffstat (limited to 'src/marlin.web/Views/VCS/Details.cshtml')
| -rw-r--r-- | src/marlin.web/Views/VCS/Details.cshtml | 44 |
1 files changed, 37 insertions, 7 deletions
diff --git a/src/marlin.web/Views/VCS/Details.cshtml b/src/marlin.web/Views/VCS/Details.cshtml index 8d25472..45c1a8f 100644 --- a/src/marlin.web/Views/VCS/Details.cshtml +++ b/src/marlin.web/Views/VCS/Details.cshtml @@ -1,13 +1,43 @@ @using marlin.core @using marlin.core.models -@model marlin.core.models.VersionControlSource +@using marlin.web.Controllers +@model (VersionControlSource Source, List<VCSController.SecretOption> SecretOptions) -<form method="post" asp-route-id="@Model.Id" asp-action="Edit"> - URL: <input type="text" name="@nameof(VersionControlSource.UpstreamUrl)" value="@Model.UpstreamUrl"/> - Filter: <input type="text" name="@nameof(VersionControlSource.BranchFilter)" value="@Model.BranchFilter"/> - Main Branch: <input type="text" name="@nameof(VersionControlSource.MainBranch)" value="@Model.MainBranch"/> - Polling Interval: <input type="number" name="@nameof(VersionControlSource.MinPollingInterval)" value="@Model.MinPollingInterval"/> +<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> -<a asp-action="List">Back</a>
\ No newline at end of file +<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> |
