Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Dashboard/Controls/LandingPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ private void LoadServers()
_serverHealthStatuses.Add(new ServerHealthStatus(server));
}

// Sort servers alphabetically by display name
_serverHealthStatuses.OrderBy(s => s.Server.DisplayName).ToList().ForEach(s => _serverHealthStatuses.Move(_serverHealthStatuses.IndexOf(s), _serverHealthStatuses.Count - 1));

UpdateSubtitle();
UpdateEmptyState();
}
Expand Down
5 changes: 5 additions & 0 deletions Dashboard/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
using PerformanceMonitorDashboard.Controls;
using PerformanceMonitorDashboard.Helpers;
using PerformanceMonitorDashboard.Services;
using System.ComponentModel;
using System.Windows.Data;

namespace PerformanceMonitorDashboard
{
Expand Down Expand Up @@ -348,6 +350,9 @@ private void LoadServerList()
_serverListItems.Add(new ServerListItem(server, status));
}

// Add default sort for the list of servers by server display name.
_serverListItems.OrderBy(s => s.DisplayName).ToList().ForEach(s => _serverListItems.Move(_serverListItems.IndexOf(s), _serverListItems.Count - 1));

// Also refresh the landing page if it exists
if (_landingPage != null)
{
Expand Down