# Dashboard

This page explains the TUI layout, how each Monitor table column is displayed, and how the System panel computes its numbers.

## Layout

| Area | Position | Content |
|------|----------|---------|
| Monitor | Left, 2/3 width | One row per site, with a fixed header row |
| System | Top right | Stats and command help; shows SMTP settings after `smtp` |
| Command | Bottom right, 3 rows tall | Command input, focused on startup |

## Monitor Table Columns

| Column | Content | Color |
|--------|---------|-------|
| Website | Normalized URL | Green |
| Status | `online` / `offline` | Green / red |
| Duration | Response time in milliseconds (e.g. `128ms`) | Default |
| Code | HTTP status code; `0` shows `N/A` | 200–399 green, otherwise red |
| Last Check | Last check time as `HH:MM:SS` | Default |
| SSL Expire | `N Days`; `0` shows `N/A` | >30 green, 8–30 yellow, ≤7 red |

Rows follow the order sites were added to the watch list. A site that has not finished its first check does not appear yet.

## System Panel

| Item | How it is computed |
|------|--------------------|
| Last Update | Current time when the panel redraws |
| Total Sites | Number of sites with a check result |
| Online / Offline | Sites whose latest result is online / offline |
| Uptime | Online ÷ Total × 100 with one decimal; shows `0.0%` when Total is 0 |
| Email Notification | Green `Enable` when `enabled` is `true` and `host` is set, otherwise red `Disable` |

Uptime is the online ratio of **the current round**, not long-term availability; the program keeps no history.

## Redraw Triggers

| Event | Redrawn area |
|-------|--------------|
| End of each check round (startup, every minute, `refresh`) | Table and System panel |
| Successful `add` / `del` | Table and System panel |
| `smtp` / `back` / <kbd>Esc</kbd> | System panel only |
| `smtp <key> <value>` while in the SMTP view | System panel only |
