summaryrefslogtreecommitdiff
path: root/src/marlin.web/Views/VCS
diff options
context:
space:
mode:
authorMelodi <62381002+Melodi17@users.noreply.github.com>2026-09-13 13:22:20 +1000
committerMelodi <62381002+Melodi17@users.noreply.github.com>2026-09-13 13:22:20 +1000
commitdf0737e55afeb5c01eb39909605970d1d3a73ffc (patch)
tree09823eaa310c60eefd2420dc305acae45c81900f /src/marlin.web/Views/VCS
parentee69ce25b2fba871920260028bb10c2d6b62b26f (diff)
refactor: cleanup; feat: connection to agent
Diffstat (limited to 'src/marlin.web/Views/VCS')
-rw-r--r--src/marlin.web/Views/VCS/Blobs.cshtml22
-rw-r--r--src/marlin.web/Views/VCS/Details.cshtml12
-rw-r--r--src/marlin.web/Views/VCS/List.cshtml2
-rw-r--r--src/marlin.web/Views/VCS/ListSecret.cshtml2
-rw-r--r--src/marlin.web/Views/VCS/Workflow.cshtml18
5 files changed, 54 insertions, 2 deletions
diff --git a/src/marlin.web/Views/VCS/Blobs.cshtml b/src/marlin.web/Views/VCS/Blobs.cshtml
new file mode 100644
index 0000000..ab35260
--- /dev/null
+++ b/src/marlin.web/Views/VCS/Blobs.cshtml
@@ -0,0 +1,22 @@
+@using System.Text
+@model ICollection<VersionControlledBlob>
+
+<table>
+ <thead>
+ <tr>
+ <th>path</th>
+ <th>size</th>
+ </tr>
+ </thead>
+ <tbody>
+ @foreach (var source in Model)
+ {
+ <tr>
+ <td>@source.Path</td>
+ <td>@source.Content.Length bytes</td>
+ </tr>
+ }
+ </tbody>
+</table>
+
+<a asp-action="Details" asp-route-id="@Model.First().SourceId">back</a>
diff --git a/src/marlin.web/Views/VCS/Details.cshtml b/src/marlin.web/Views/VCS/Details.cshtml
index 45c1a8f..a9ef0ea 100644
--- a/src/marlin.web/Views/VCS/Details.cshtml
+++ b/src/marlin.web/Views/VCS/Details.cshtml
@@ -25,6 +25,7 @@
<th></th>
<th>branch</th>
<th>commit</th>
+ <th>status</th>
</tr>
</thead>
<tbody>
@@ -34,6 +35,17 @@
<td>@(branch.Name == Model.Source.MainBranch ? "@" : "")</td>
<td>@branch.Name</td>
<td>@branch.Commit.Hash</td>
+ <td>
+ @if (branch.Commit.BlobsFetched)
+ {
+ <a asp-action="Blobs" asp-route-commitId="@branch.CommitId" asp-route-sourceId="@branch.SourceId">blobs</a>
+ }
+
+ @if (branch.Commit.WorkflowScanned)
+ {
+ <a asp-action="Workflow" asp-route-commitId="@branch.CommitId" asp-route-sourceId="@branch.SourceId">workflow</a>
+ }
+ </td>
</tr>
}
</tbody>
diff --git a/src/marlin.web/Views/VCS/List.cshtml b/src/marlin.web/Views/VCS/List.cshtml
index 4c248e4..f109c92 100644
--- a/src/marlin.web/Views/VCS/List.cshtml
+++ b/src/marlin.web/Views/VCS/List.cshtml
@@ -1,4 +1,4 @@
-@model ICollection<marlin.core.models.VersionControlSource>
+@model ICollection<VersionControlSource>
<a asp-action="Create">New</a>
diff --git a/src/marlin.web/Views/VCS/ListSecret.cshtml b/src/marlin.web/Views/VCS/ListSecret.cshtml
index aa5f15c..25db7fe 100644
--- a/src/marlin.web/Views/VCS/ListSecret.cshtml
+++ b/src/marlin.web/Views/VCS/ListSecret.cshtml
@@ -1,4 +1,4 @@
-@model (marlin.core.models.VersionControlSource Source, List<ISecret> Secrets)
+@model (VersionControlSource Source, List<ISecret> Secrets)
<a asp-action="CreateSecret" asp-route-sourceId="@Model.Source.Id">New</a>
diff --git a/src/marlin.web/Views/VCS/Workflow.cshtml b/src/marlin.web/Views/VCS/Workflow.cshtml
new file mode 100644
index 0000000..da32ab1
--- /dev/null
+++ b/src/marlin.web/Views/VCS/Workflow.cshtml
@@ -0,0 +1,18 @@
+@model WorkflowSnapshot
+
+<h2>Workflow snapshot for @Model.Commit.Hash</h2>
+
+@foreach (var recipe in Model.Workflow.Recipes)
+{
+ <section>
+ <h3>@recipe.Value.Name</h3>
+ <ol>
+ @foreach (var step in recipe.Value.Steps)
+ {
+ <li>@step.Value.Name</li>
+ }
+ </ol>
+ </section>
+}
+
+<a asp-action="Details" asp-route-id="@Model.Commit.SourceId">back</a>