Skip to content

Commit

Permalink
Keep same tab for pages on same site (#184)
Browse files Browse the repository at this point in the history
Also add some more logging for unusual events

Fixes #182

Signed-off-by: Dave Thaler <[email protected]>
  • Loading branch information
dthaler authored Oct 30, 2024
1 parent 860358a commit ddbb47d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions OrcanodeMonitor/Core/Fetcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,7 @@ private static void UpdateOrcasoundNode(JsonElement feed, List<Orcanode> foundLi
{
// We have duplicate nodes to merge. In theory we shouldn't have any
// node state for the dataplicity-only node. (TODO: verify this)
logger.LogWarning($"Merging duplicate nodes for {node.DataplicitySerial}");
node.DataplicityDescription = dataplicityNode.DataplicityDescription;
node.DataplicityName = dataplicityNode.DataplicityName;
node.DataplicityOnline = dataplicityNode.DataplicityOnline;
Expand Down
2 changes: 1 addition & 1 deletion OrcanodeMonitor/Core/MezmoFetcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ public async static Task UpdateMezmoHostsAsync(OrcanodeMonitorContext context, I
Orcanode? oldNode = originalList.Find(a => a.S3NodeName == unfoundNode.S3NodeName);
if (oldNode != null)
{
logger.LogInformation($"Mezmo node no longer found: {unfoundNode.S3NodeName}");
logger.LogInformation($"Mezmo node not found: {unfoundNode.S3NodeName}");
oldNode.MezmoLogSize = 0;
}
}
Expand Down
6 changes: 3 additions & 3 deletions OrcanodeMonitor/Pages/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
@Html.DisplayFor(modelItem => item.DisplayName)
</td>
<td style="background-color: @Model.NodeDataplicityBackgroundColor(item)">
<a asp-page="/DataplicityNode" asp-route-serial="@item.DataplicitySerial" style="color: @Model.NodeDataplicityTextColor(item)" target="_blank">
<a asp-page="/DataplicityNode" asp-route-serial="@item.DataplicitySerial" style="color: @Model.NodeDataplicityTextColor(item)">
@Html.DisplayFor(modelItem => item.DataplicityConnectionStatus)
</a>
</td>
Expand Down Expand Up @@ -72,8 +72,8 @@
</td>
}
<td style="background-color: @Model.NodeUptimePercentageBackgroundColor(item)">
<a asp-page="/NodeEvents" asp-route-id="@item.ID" style="color: @Model.NodeUptimePercentageTextColor(item)" target="_blank"
aria-label="View events for @item.DisplayName (opens in new tab)">
<a asp-page="/NodeEvents" asp-route-id="@item.ID" style="color: @Model.NodeUptimePercentageTextColor(item)"
aria-label="View events for @item.DisplayName">
@Model.GetUptimePercentage(item)%
</a>
</td>
Expand Down

0 comments on commit ddbb47d

Please sign in to comment.