Example
Server health
CPU, memory, disk and load.
{
"v": 1,
"preferredFamily": "systemMedium",
"refresh": 600,
"accessibility": "eu-west-1: CPU 34 percent, memory 71 percent, disk 52 percent. All systems normal.",
"view": {
"type": "vstack",
"spacing": 8,
"padding": 14,
"bg": "#041624",
"children": [
{
"type": "hstack",
"spacing": 6,
"children": [
{
"type": "text",
"text": "eu-west-1",
"style": "caption",
"weight": "semibold",
"color": "#DDDDDD"
},
{"type": "spacer"},
{
"type": "text",
"text": "4 nodes · load 0.84",
"style": "caption",
"color": "#9AA4B2",
"monoDigits": true
}
]
},
{
"type": "hstack",
"spacing": 4,
"children": [
{
"type": "vstack",
"spacing": 6,
"w": "fill",
"children": [
{
"type": "gauge",
"style": "ring",
"value": 0.34,
"tint": "green",
"track": "green/25",
"thickness": 6,
"w": 56,
"h": 56,
"center": {
"type": "text",
"text": "34%",
"style": "caption",
"weight": "semibold",
"design": "rounded",
"color": "white"
}
},
{
"type": "hstack",
"spacing": 3,
"children": [
{
"type": "symbol",
"name": "cpu",
"style": "caption2",
"color": "#9AA4B2"
},
{
"type": "text",
"text": "CPU",
"style": "caption2",
"color": "#9AA4B2"
}
]
}
]
},
{
"type": "vstack",
"spacing": 6,
"w": "fill",
"children": [
{
"type": "gauge",
"style": "ring",
"value": 0.71,
"tint": "yellow",
"track": "yellow/25",
"thickness": 6,
"w": 56,
"h": 56,
"center": {
"type": "text",
"text": "71%",
"style": "caption",
"weight": "semibold",
"design": "rounded",
"color": "white"
}
},
{
"type": "hstack",
"spacing": 3,
"children": [
{
"type": "symbol",
"name": "memorychip",
"style": "caption2",
"color": "#9AA4B2"
},
{
"type": "text",
"text": "Memory",
"style": "caption2",
"color": "#9AA4B2"
}
]
}
]
},
{
"type": "vstack",
"spacing": 6,
"w": "fill",
"children": [
{
"type": "gauge",
"style": "ring",
"value": 0.52,
"tint": "green",
"track": "green/25",
"thickness": 6,
"w": 56,
"h": 56,
"center": {
"type": "text",
"text": "52%",
"style": "caption",
"weight": "semibold",
"design": "rounded",
"color": "white"
}
},
{
"type": "hstack",
"spacing": 3,
"children": [
{
"type": "symbol",
"name": "externaldrive",
"style": "caption2",
"color": "#9AA4B2"
},
{
"type": "text",
"text": "Disk",
"style": "caption2",
"color": "#9AA4B2"
}
]
}
]
}
]
},
{
"type": "hstack",
"spacing": 5,
"children": [
{
"type": "symbol",
"name": "checkmark.seal.fill",
"style": "caption",
"color": "green",
"accentable": true
},
{
"type": "text",
"text": "All systems normal",
"style": "caption",
"weight": "medium",
"color": "#DDDDDD"
}
]
}
]
}
} How it works
Each ring is a gauge with style: "ring", a thickness and a track in its own tint with an opacity. The number in the middle is the gauge's center. center accepts any node.
The three columns each have "w": "fill", so they share the row equally for any label length. The payload sets no x positions and no column widths.
The status line is a symbol and a text in an hstack. When your server decides something is wrong, it sends checkmark.seal.fill and the rest of the payload in orange or red. The layout does not change.
Put it on your Home Screen
We serve this example at the URL below. The server generates the timestamps at the time of each request. Add the URL as a hook in the app, and the widget works on your phone.
https://webhookwidget.com/demo/health Next
The day ahead: Four scheduled views from one response.
All examples