Skip to content

chore: change stale agent colour to yellow #34

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 28, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
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 @@ -11,6 +11,7 @@ public class AgentStatusToColorConverter : IValueConverter
private static readonly SolidColorBrush Green = new(Color.FromArgb(255, 52, 199, 89));
private static readonly SolidColorBrush Red = new(Color.FromArgb(255, 255, 59, 48));
private static readonly SolidColorBrush Gray = new(Color.FromArgb(255, 142, 142, 147));
private static readonly SolidColorBrush Yellow = new(Color.FromArgb(255, 204, 1, 0));

public object Convert(object value, Type targetType, object parameter, string language)
{
Expand All @@ -20,6 +21,7 @@ public object Convert(object value, Type targetType, object parameter, string la
{
AgentConnectionStatus.Green => Green,
AgentConnectionStatus.Red => Red,
AgentConnectionStatus.Yellow => Yellow,
_ => 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 @@ -10,6 +10,7 @@ public enum AgentConnectionStatus
{
Green,
Red,
Yellow,
Gray,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't yellow be above red in terms of severity?

}

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