43 references to PanelStatusGlyph
Aspire.Tray.Tests (43)
src\Aspire.Tray\Common\TrayPanel.cs (11)
1229TrayPanelGlyphs.AddStatus(commands, PanelStatusGlyph.Busy, art.Inset(2, 2), palette); 1653internal static PanelStatusGlyph GetStatusGlyph(AppHostMenuItem host, bool live) => host switch 1655{ IsStarting: true } or { IsStopping: true } => PanelStatusGlyph.Busy, 1656{ IsRunning: false } => host.Error is null ? PanelStatusGlyph.Stopped : PanelStatusGlyph.Warning, 1657_ when !live => PanelStatusGlyph.Unknown, 1658{ Error: not null } => PanelStatusGlyph.Warning, 1659{ Health: AppHostHealth.Healthy } => PanelStatusGlyph.Healthy, 1660{ Health: AppHostHealth.Warning } => PanelStatusGlyph.Warning, 1661{ Health: AppHostHealth.Unhealthy } => PanelStatusGlyph.Unhealthy, 1662_ => 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)
939[InlineData(true, false, false, (int)AppHostHealth.Healthy, (int)PanelStatusGlyph.Healthy)] 940[InlineData(true, false, false, (int)AppHostHealth.Warning, (int)PanelStatusGlyph.Warning)] 941[InlineData(true, false, false, (int)AppHostHealth.Unhealthy, (int)PanelStatusGlyph.Unhealthy)] 942[InlineData(true, false, false, (int)AppHostHealth.Unknown, (int)PanelStatusGlyph.Unknown)] 943[InlineData(true, false, false, (int)AppHostHealth.NoResources, (int)PanelStatusGlyph.Unknown)] 944[InlineData(false, false, false, (int)AppHostHealth.Healthy, (int)PanelStatusGlyph.Unknown)] 945[InlineData(true, true, false, (int)AppHostHealth.Healthy, (int)PanelStatusGlyph.Busy)] 946[InlineData(true, false, true, (int)AppHostHealth.Healthy, (int)PanelStatusGlyph.Warning)] 951Assert.Equal((PanelStatusGlyph)expected, TrayPanel.GetStatusGlyph(host, live)); 957Assert.Equal(PanelStatusGlyph.Stopped, TrayPanel.GetStatusGlyph(TrayPanelSamples.Offline("/src/A/A.cs"), live: true)); 958Assert.Equal(PanelStatusGlyph.Busy, TrayPanel.GetStatusGlyph(TrayPanelSamples.Offline("/src/A/A.cs", starting: true), live: true)); 959Assert.Equal(PanelStatusGlyph.Warning, TrayPanel.GetStatusGlyph(TrayPanelSamples.Offline("/src/A/A.cs", error: "No."), live: true)); 1194[InlineData((int)PanelStatusGlyph.Healthy)] 1195[InlineData((int)PanelStatusGlyph.Warning)] 1196[InlineData((int)PanelStatusGlyph.Unhealthy)] 1197[InlineData((int)PanelStatusGlyph.Unknown)] 1198[InlineData((int)PanelStatusGlyph.Stopped)] 1199[InlineData((int)PanelStatusGlyph.Busy)] 1202var glyph = (PanelStatusGlyph)value; 1290TrayPanelGlyphs.AddStatus(commands, PanelStatusGlyph.Unhealthy, new(0, 0, 20, 20), palette); 1324(PanelStatusGlyph.Healthy, palette.Success, palette.SuccessMark), 1325(PanelStatusGlyph.Warning, palette.Warning, palette.WarningMark), 1326(PanelStatusGlyph.Unhealthy, palette.DangerFill, palette.DangerMark), 1327(PanelStatusGlyph.Unknown, palette.Neutral, palette.NeutralMark)