A status list prints one line per result: the symbol and colour of its status, the name, then a detail in a muted column. Use it for checks, build steps or anything else that ends in pass, warn or fail.
Install-Module ConsoleMonster -Scope CurrentUser# Show check results as status lines: a symbol and colour per result, the name, then a detail.
Import-Module -Name ConsoleMonster
# Data: invented nightly checks; nothing is queried or changed.
$checks = @(
[pscustomobject] @{ Name = 'Backups completed'; Result = 'Pass'; Note = '02:10 · 41 GB' }
[pscustomobject] @{ Name = 'Certificates'; Result = 'Pass'; Note = 'next expiry in 64 days' }
[pscustomobject] @{ Name = 'Disk space'; Result = 'Warn'; Note = 'sql01 at 81%' }
[pscustomobject] @{ Name = 'Replication'; Result = 'Fail'; Note = 'dc02 last synced 3 h ago' }
[pscustomobject] @{ Name = 'Patch window'; Result = 'Skip'; Note = 'not scheduled tonight' }
)
# Layout: one line per check. Label, Status and Detail are the properties the list reads.
$list = $checks | ForEach-Object {
[pscustomobject] @{ Label = $_.Name; Status = $_.Result; Detail = $_.Note }
} | New-ConsoleStatusList
# Behaviour: print once.
$list | Show-ConsoleFull program
# Show check results as status lines: a symbol and colour per result, the name, then a detail.
Import-Module -Name ConsoleMonster
# Data: invented nightly checks; nothing is queried or changed.
$checks = @(
[pscustomobject] @{ Name = 'Backups completed'; Result = 'Pass'; Note = '02:10 · 41 GB' }
[pscustomobject] @{ Name = 'Certificates'; Result = 'Pass'; Note = 'next expiry in 64 days' }
[pscustomobject] @{ Name = 'Disk space'; Result = 'Warn'; Note = 'sql01 at 81%' }
[pscustomobject] @{ Name = 'Replication'; Result = 'Fail'; Note = 'dc02 last synced 3 h ago' }
[pscustomobject] @{ Name = 'Patch window'; Result = 'Skip'; Note = 'not scheduled tonight' }
)
# Layout: one line per check. Label, Status and Detail are the properties the list reads.
$list = $checks | ForEach-Object {
[pscustomobject] @{ Label = $_.Name; Status = $_.Result; Detail = $_.Note }
} | New-ConsoleStatusList
# Behaviour: print once.
$list | Show-ConsoleRun: ./status-results.ps1
dotnet new console -n StatusResults
cd StatusResults
dotnet add package ConsoleMonster// Show check results as status lines: a symbol and colour per result, the name, then a detail.
using ConsoleMonster;
using ConsoleMonster.Styling;
using ConsoleMonster.Widgets;
// Data: invented nightly checks; nothing is queried or changed.
var checks = new Check[]
{
new("Backups completed", StatusKind.Pass, "02:10 · 41 GB"),
new("Certificates", StatusKind.Pass, "next expiry in 64 days"),
new("Disk space", StatusKind.Warn, "sql01 at 81%"),
new("Replication", StatusKind.Fail, "dc02 last synced 3 h ago"),
new("Patch window", StatusKind.Skip, "not scheduled tonight")
};
// Layout: one line per check, with its status and detail.
StatusList list = new StatusList();
foreach (var check in checks)
list.Add(check.Name, check.Result, check.Note);
// Behaviour: print once.
Terminal.Write(list);
record Check(string Name, StatusKind Result, string Note);Full program
// Show check results as status lines: a symbol and colour per result, the name, then a detail.
using ConsoleMonster;
using ConsoleMonster.Styling;
using ConsoleMonster.Widgets;
// Data: invented nightly checks; nothing is queried or changed.
var checks = new Check[]
{
new("Backups completed", StatusKind.Pass, "02:10 · 41 GB"),
new("Certificates", StatusKind.Pass, "next expiry in 64 days"),
new("Disk space", StatusKind.Warn, "sql01 at 81%"),
new("Replication", StatusKind.Fail, "dc02 last synced 3 h ago"),
new("Patch window", StatusKind.Skip, "not scheduled tonight")
};
// Layout: one line per check, with its status and detail.
StatusList list = new StatusList();
foreach (var check in checks)
list.Add(check.Name, check.Result, check.Note);
// Behaviour: print once.
Terminal.Write(list);
record Check(string Name, StatusKind Result, string Note);Run: dotnet run
dotnet new console -n StatusResults
cd StatusResults
dotnet add package ConsoleMonster// Show check results as status lines: a symbol and colour per result, the name, then a detail.
using ConsoleMonster;
using ConsoleMonster.Styling;
using ConsoleMonster.Widgets;
// Data: invented nightly checks; nothing is queried or changed.
var checks = new Check[]
{
new("Backups completed", StatusKind.Pass, "02:10 · 41 GB"),
new("Certificates", StatusKind.Pass, "next expiry in 64 days"),
new("Disk space", StatusKind.Warn, "sql01 at 81%"),
new("Replication", StatusKind.Fail, "dc02 last synced 3 h ago"),
new("Patch window", StatusKind.Skip, "not scheduled tonight")
};
// Layout: one line per check, with its status and detail.
StatusList list = Ui.StatusList();
foreach (var check in checks)
list.Add(check.Name, check.Result, check.Note);
// Behaviour: print once.
list.Show();
record Check(string Name, StatusKind Result, string Note);
Full program
// Show check results as status lines: a symbol and colour per result, the name, then a detail.
using ConsoleMonster;
using ConsoleMonster.Styling;
using ConsoleMonster.Widgets;
// Data: invented nightly checks; nothing is queried or changed.
var checks = new Check[]
{
new("Backups completed", StatusKind.Pass, "02:10 · 41 GB"),
new("Certificates", StatusKind.Pass, "next expiry in 64 days"),
new("Disk space", StatusKind.Warn, "sql01 at 81%"),
new("Replication", StatusKind.Fail, "dc02 last synced 3 h ago"),
new("Patch window", StatusKind.Skip, "not scheduled tonight")
};
// Layout: one line per check, with its status and detail.
StatusList list = Ui.StatusList();
foreach (var check in checks)
list.Add(check.Name, check.Result, check.Note);
// Behaviour: print once.
list.Show();
record Check(string Name, StatusKind Result, string Note);
Run: dotnet run
✓ Backups completed 02:10 · 41 GB ✓ Certificates next expiry in 64 days ▲ Disk space sql01 at 81% ✗ Replication dc02 last synced 3 h ago – Patch window not scheduled tonight
✓ Backups completed 02:10 · 41 GB ✓ Certificates next expiry in 64 days ▲ Disk space sql01 at 81% ✗ Replication dc02 last synced 3 h ago – Patch window not scheduled tonight
Five invented checks at 80 columns.
- In PowerShell each item needs
LabelandStatus, and may haveDetail. Map your own property names with aForEach-Object, as above, or pass an ordered hashtable ofname = statuswith-InputObject. - The statuses include
Pass,Warn,Fail,Skip,Info,RunningandPending, in any letter case. Each has its own symbol, so the list still reads in a terminal without colour. - In C#,
StatusList.Addtakes the label, aStatusKindand an optional detail. - To update the lines while work runs, give the list a
-WidgetIdand change items withUpdate-Consoleinside a dashboard, as in your first live dashboard.
Next
- Show a settings summary: key and value pairs with the same status marks.
- Your first report: results as a table with a facts line.
- Facts, bars and hierarchy: when a count, a bar or a status line says it best.