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
2 changes: 2 additions & 0 deletions App/Converters/AgentStatusToColorConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ namespace Coder.Desktop.App.Converters;
public class AgentStatusToColorConverter : IValueConverter
{
private static readonly SolidColorBrush Green = new(Color.FromArgb(255, 52, 199, 89));
private static readonly SolidColorBrush Yellow = new(Color.FromArgb(255, 204, 1, 0));
private static readonly SolidColorBrush Red = new(Color.FromArgb(255, 255, 59, 48));
private static readonly SolidColorBrush Gray = new(Color.FromArgb(255, 142, 142, 147));

Expand All @@ -19,6 +20,7 @@ public object Convert(object value, Type targetType, object parameter, string la
return status switch
{
AgentConnectionStatus.Green => Green,
AgentConnectionStatus.Yellow => Yellow,
AgentConnectionStatus.Red => Red,
_ => Gray,
};
Expand Down
1 change: 1 addition & 0 deletions App/ViewModels/AgentViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ namespace Coder.Desktop.App.ViewModels;
public enum AgentConnectionStatus
{
Green,
Yellow,
Red,
Gray,
}
Expand Down
2 changes: 1 addition & 1 deletion App/ViewModels/TrayWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ private void UpdateFromRpcModel(RpcModel rpcModel)
HostnameSuffix = fqdnSuffix,
ConnectionStatus = lastHandshakeAgo < TimeSpan.FromMinutes(5)
? AgentConnectionStatus.Green
: AgentConnectionStatus.Red,
: AgentConnectionStatus.Yellow,
DashboardUrl = WorkspaceUri(coderUri, workspace?.Name),
});
}
Expand Down
Loading