diff options
Diffstat (limited to 'src/marlin.web/Views/VCS/ListSecret.cshtml')
| -rw-r--r-- | src/marlin.web/Views/VCS/ListSecret.cshtml | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/src/marlin.web/Views/VCS/ListSecret.cshtml b/src/marlin.web/Views/VCS/ListSecret.cshtml new file mode 100644 index 0000000..aa5f15c --- /dev/null +++ b/src/marlin.web/Views/VCS/ListSecret.cshtml @@ -0,0 +1,45 @@ +@model (marlin.core.models.VersionControlSource Source, List<ISecret> Secrets) + +<a asp-action="CreateSecret" asp-route-sourceId="@Model.Source.Id">New</a> + +<table> + <thead> + <tr> + <th>id</th> + <th>label</th> + <th>kind</th> + <th>value</th> + <th>actions</th> + </tr> + </thead> + <tbody> + @foreach (var secret in Model.Secrets) + { + <tr> + <td>@secret.Id</td> + <td>@secret.Label</td> + <td>@secret.Kind</td> + <td> + @if (secret.MayReveal) + { + @foreach (var pair in secret.Content) + { + <span>@pair.Key = @pair.Value</span> + } + } + else + { + <span>secret cannot be revealed</span> + } + </td> + <td> + <form asp-action="DeleteSecret" method="post" asp-route-sourceId="@Model.Source.Id" asp-route-id="@secret.Id"> + <button type="submit">delete</button> + </form> + </td> + </tr> + } + </tbody> +</table> + +<a asp-action="Details", asp-route-id="@Model.Source.Id">back</a> |
