43 references to PanelStatusGlyph
Aspire.Tray.Tests (43)
src\Aspire.Tray\Common\TrayPanel.cs (11)
1117TrayPanelGlyphs.AddStatus(commands, PanelStatusGlyph.Busy, art.Inset(2, 2), palette); 1543internal static PanelStatusGlyph GetStatusGlyph(AppHostMenuItem host, bool live) => host switch 1545{ IsStarting: true } or { IsStopping: true } => PanelStatusGlyph.Busy, 1546{ IsRunning: false } => host.Error is null ? PanelStatusGlyph.Stopped : PanelStatusGlyph.Warning, 1547_ when !live => PanelStatusGlyph.Unknown, 1548{ Error: not null } => PanelStatusGlyph.Warning, 1549{ Health: AppHostHealth.Healthy } => PanelStatusGlyph.Healthy, 1550{ Health: AppHostHealth.Warning } => PanelStatusGlyph.Warning, 1551{ Health: AppHostHealth.Unhealthy } => PanelStatusGlyph.Unhealthy, 1552_ => PanelStatusGlyph.Unknown
src\Aspire.Tray\Common\TrayPanelGlyphs.cs (7)
52public static void AddStatus(List<PanelCommand> commands, PanelStatusGlyph glyph, PanelRect bounds, TrayPanelPalette palette) 58case PanelStatusGlyph.Healthy: 62case PanelStatusGlyph.Warning: 67case PanelStatusGlyph.Unhealthy: 71case PanelStatusGlyph.Unknown: 79case PanelStatusGlyph.Stopped: 83case PanelStatusGlyph.Busy:
TrayPanelTests.cs (25)
835[InlineData(true, false, false, (int)AppHostHealth.Healthy, (int)PanelStatusGlyph.Healthy)] 836[InlineData(true, false, false, (int)AppHostHealth.Warning, (int)PanelStatusGlyph.Warning)] 837[InlineData(true, false, false, (int)AppHostHealth.Unhealthy, (int)PanelStatusGlyph.Unhealthy)] 838[InlineData(true, false, false, (int)AppHostHealth.Unknown, (int)PanelStatusGlyph.Unknown)] 839[InlineData(true, false, false, (int)AppHostHealth.NoResources, (int)PanelStatusGlyph.Unknown)] 840[InlineData(false, false, false, (int)AppHostHealth.Healthy, (int)PanelStatusGlyph.Unknown)] 841[InlineData(true, true, false, (int)AppHostHealth.Healthy, (int)PanelStatusGlyph.Busy)] 842[InlineData(true, false, true, (int)AppHostHealth.Healthy, (int)PanelStatusGlyph.Warning)] 847Assert.Equal((PanelStatusGlyph)expected, TrayPanel.GetStatusGlyph(host, live)); 853Assert.Equal(PanelStatusGlyph.Stopped, TrayPanel.GetStatusGlyph(TrayPanelSamples.Offline("/src/A/A.cs"), live: true)); 854Assert.Equal(PanelStatusGlyph.Busy, TrayPanel.GetStatusGlyph(TrayPanelSamples.Offline("/src/A/A.cs", starting: true), live: true)); 855Assert.Equal(PanelStatusGlyph.Warning, TrayPanel.GetStatusGlyph(TrayPanelSamples.Offline("/src/A/A.cs", error: "No."), live: true)); 1063[InlineData((int)PanelStatusGlyph.Healthy)] 1064[InlineData((int)PanelStatusGlyph.Warning)] 1065[InlineData((int)PanelStatusGlyph.Unhealthy)] 1066[InlineData((int)PanelStatusGlyph.Unknown)] 1067[InlineData((int)PanelStatusGlyph.Stopped)] 1068[InlineData((int)PanelStatusGlyph.Busy)] 1071var glyph = (PanelStatusGlyph)value; 1159TrayPanelGlyphs.AddStatus(commands, PanelStatusGlyph.Unhealthy, new(0, 0, 20, 20), palette); 1193(PanelStatusGlyph.Healthy, palette.Success, palette.SuccessMark), 1194(PanelStatusGlyph.Warning, palette.Warning, palette.WarningMark), 1195(PanelStatusGlyph.Unhealthy, palette.DangerFill, palette.DangerMark), 1196(PanelStatusGlyph.Unknown, palette.Neutral, palette.NeutralMark)