Skip to content

Commit

Permalink
Fix node sort order on dashboard
Browse files Browse the repository at this point in the history
Signed-off-by: Dave Thaler <[email protected]>
  • Loading branch information
dthaler committed Oct 9, 2024
1 parent 89d979e commit 8aa3dd9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions OrcanodeMonitor/Pages/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
</p>
<table>
<tr>
<th>Location</th>
<th>Type</th>
<th>Location</th>
<!--
<th>Latest recorded</th>
<th>Latest uploaded</th>
Expand All @@ -33,12 +33,12 @@
@foreach (Models.Orcanode item in Model.Nodes)
{
<tr>
<td title="@Html.DisplayFor(modelItem => item.DataplicityDescription)">
@Html.DisplayFor(modelItem => item.DisplayName)
</td>
<td>
@Html.DisplayFor(modelItem => item.Type)
</td>
<td title="@Html.DisplayFor(modelItem => item.DataplicityDescription)">
@Html.DisplayFor(modelItem => item.DisplayName)
</td>
<!--
<td>
@Html.DisplayFor(modelItem => item.LatestRecordedLocal)
Expand Down
3 changes: 2 additions & 1 deletion OrcanodeMonitor/Pages/Index.cshtml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ public async Task OnGetAsync()
_nodes = nodes.Where(n => n.DataplicityConnectionStatus != OrcanodeOnlineStatus.Absent ||
n.OrcasoundStatus != OrcanodeOnlineStatus.Absent ||
n.S3StreamStatus != OrcanodeOnlineStatus.Absent)
.OrderBy(n => n.DisplayName)
.OrderByDescending(n => n.Type)
.ThenBy(n => n.DisplayName)
.ToList();
}
}
Expand Down

0 comments on commit 8aa3dd9

Please sign in to comment.