diff options
Diffstat (limited to 'src/marlin.web/Views/Jobs')
| -rw-r--r-- | src/marlin.web/Views/Jobs/Details.cshtml | 25 | ||||
| -rw-r--r-- | src/marlin.web/Views/Jobs/List.cshtml | 4 | ||||
| -rw-r--r-- | src/marlin.web/Views/Jobs/Logs.cshtml | 14 |
3 files changed, 31 insertions, 12 deletions
diff --git a/src/marlin.web/Views/Jobs/Details.cshtml b/src/marlin.web/Views/Jobs/Details.cshtml index 9b27fe3..ccc128e 100644 --- a/src/marlin.web/Views/Jobs/Details.cshtml +++ b/src/marlin.web/Views/Jobs/Details.cshtml @@ -1,8 +1,11 @@ @model Job -@Model.Id - -@Model.Branch.Name +@section Crumbs { + <li> + <a asp-action="Details" asp-route-id="@Model.Id">Job @Model.Id</a> + @Html.DisplayFor(x => x.Status) + </li> +} <dl> <dt>Id</dt> @@ -13,16 +16,18 @@ <dt>Commit</dt> <dd>@Model.Commit.Hash</dd> - + <dt>Status</dt> <dd>@Model.Status</dd> </dl> -<ul> - @foreach (var line in Model.Logs.OrderBy(x=>x.At)) - { - <li style="color: @(line.Error ? "red" : "black")">[@line.At.ToString("HH:mm:ss")] [@line.StepId] @line.Message</li> - } -</ul> +<div class="groupbox"> + <div class="groupbox-title"> + Logs + (<a asp-action="Logs" asp-route-id="@Model.Id">Expand</a>) + (<a>Download</a>) + </div> + <partial name="DisplayTemplates/LogEventRecords" model="@Model.Logs.OrderByDescending(x => x.At).Take(10).Reverse()"/> +</div> <a asp-action="List">Back</a> diff --git a/src/marlin.web/Views/Jobs/List.cshtml b/src/marlin.web/Views/Jobs/List.cshtml index 968a94f..86df3a4 100644 --- a/src/marlin.web/Views/Jobs/List.cshtml +++ b/src/marlin.web/Views/Jobs/List.cshtml @@ -5,8 +5,8 @@ <table> <thead> <tr> + <th></th> <th>id</th> - <th>status</th> <th>recipe</th> <th>vcs</th> <th>branch</th> @@ -18,8 +18,8 @@ @foreach (var source in Model) { <tr> + <td>@Html.DisplayFor(x => source.Status)</td> <td><a asp-action="Details" asp-route-id="@source.Id">@source.Id</a></td> - <td>@source.Status</td> <td>@source.Recipe</td> <td>@source.Source.UpstreamUrl</td> <td>@source.Branch.Name</td> diff --git a/src/marlin.web/Views/Jobs/Logs.cshtml b/src/marlin.web/Views/Jobs/Logs.cshtml new file mode 100644 index 0000000..4deffbd --- /dev/null +++ b/src/marlin.web/Views/Jobs/Logs.cshtml @@ -0,0 +1,14 @@ +@model Job + +@section Crumbs { + <li> + <a asp-action="Details" asp-route-id="@Model.Id">Job @Model.Id</a> + @Html.DisplayFor(x => x.Status) + </li> + + <li> + Logs + </li> +} + +<partial name="DisplayTemplates/LogEventRecords" model="@Model.Logs.OrderBy(x => x.At)"/>
\ No newline at end of file |
