42 references to PanelStatusGlyph
Aspire.Tray.Tests (42)
src\Aspire.Tray\Common\TrayPanel.cs (11)
969TrayPanelGlyphs.AddStatus(commands, PanelStatusGlyph.Busy, art.Inset(2, 2), palette); 1394internal static PanelStatusGlyph GetStatusGlyph(AppHostMenuItem host, bool live) => host switch 1396{ IsStarting: true } or { IsStopping: true } => PanelStatusGlyph.Busy, 1397{ IsRunning: false } => host.Error is null ? PanelStatusGlyph.Stopped : PanelStatusGlyph.Warning, 1398_ when !live => PanelStatusGlyph.Unknown, 1399{ Error: not null } => PanelStatusGlyph.Warning, 1400{ Health: AppHostHealth.Healthy } => PanelStatusGlyph.Healthy, 1401{ Health: AppHostHealth.Warning } => PanelStatusGlyph.Warning, 1402{ Health: AppHostHealth.Unhealthy } => PanelStatusGlyph.Unhealthy, 1403_ => 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 (24)
833[InlineData(true, false, false, (int)AppHostHealth.Healthy, (int)PanelStatusGlyph.Healthy)] 834[InlineData(true, false, false, (int)AppHostHealth.Warning, (int)PanelStatusGlyph.Warning)] 835[InlineData(true, false, false, (int)AppHostHealth.Unhealthy, (int)PanelStatusGlyph.Unhealthy)] 836[InlineData(true, false, false, (int)AppHostHealth.Unknown, (int)PanelStatusGlyph.Unknown)] 837[InlineData(false, false, false, (int)AppHostHealth.Healthy, (int)PanelStatusGlyph.Unknown)] 838[InlineData(true, true, false, (int)AppHostHealth.Healthy, (int)PanelStatusGlyph.Busy)] 839[InlineData(true, false, true, (int)AppHostHealth.Healthy, (int)PanelStatusGlyph.Warning)] 844Assert.Equal((PanelStatusGlyph)expected, TrayPanel.GetStatusGlyph(host, live)); 850Assert.Equal(PanelStatusGlyph.Stopped, TrayPanel.GetStatusGlyph(TrayPanelSamples.Offline("/src/A/A.cs"), live: true)); 851Assert.Equal(PanelStatusGlyph.Busy, TrayPanel.GetStatusGlyph(TrayPanelSamples.Offline("/src/A/A.cs", starting: true), live: true)); 852Assert.Equal(PanelStatusGlyph.Warning, TrayPanel.GetStatusGlyph(TrayPanelSamples.Offline("/src/A/A.cs", error: "No."), live: true)); 958[InlineData((int)PanelStatusGlyph.Healthy)] 959[InlineData((int)PanelStatusGlyph.Warning)] 960[InlineData((int)PanelStatusGlyph.Unhealthy)] 961[InlineData((int)PanelStatusGlyph.Unknown)] 962[InlineData((int)PanelStatusGlyph.Stopped)] 963[InlineData((int)PanelStatusGlyph.Busy)] 966var glyph = (PanelStatusGlyph)value; 1054TrayPanelGlyphs.AddStatus(commands, PanelStatusGlyph.Unhealthy, new(0, 0, 20, 20), palette); 1088(PanelStatusGlyph.Healthy, palette.Success, palette.SuccessMark), 1089(PanelStatusGlyph.Warning, palette.Warning, palette.WarningMark), 1090(PanelStatusGlyph.Unhealthy, palette.DangerFill, palette.DangerMark), 1091(PanelStatusGlyph.Unknown, palette.Neutral, palette.NeutralMark)