diff --git a/Plugin/unraid/README-unraid.md b/Plugin/unraid/README-unraid.md index 90a3f15..98b3e21 100644 --- a/Plugin/unraid/README-unraid.md +++ b/Plugin/unraid/README-unraid.md @@ -110,10 +110,12 @@ naming every card on the Monitor grid, its width and its order, and generates th from it — the column ladder, the span clamps at each width, the row-height cap, and the compensation when a conditional card is absent. Column counts are 8/4/2/1 and spans are 1/2/4/8, which is what lets the board re-cut itself at any width with no holes and no hand-placed card. -Breakpoints are arithmetic over `VV_MON_CARD_FLOOR`, never chosen by eye. `pages/monitor.php` -carries the card bodies and nothing about where they go; moving a card is moving a line in that -array. The page cross-checks the declaration against the cards that actually rendered and says so -in the browser if they disagree. +Breakpoints are arithmetic over `VV_MON_CARD_FLOOR`, never chosen by eye. The row-height cap is +conditional on the same arithmetic: it applies only where a rung fits one screen, because a rung +with more rows than that scrolls the page however its rows are sized, and capping there would clip +every card to buy nothing. `pages/monitor.php` carries the card bodies and nothing about where +they go; moving a card is moving a line in that array. The page cross-checks the declaration +against the cards that actually rendered and says so in the browser if they disagree. **Caching.** Several endpoints serve from `$VV_CACHE_DIR` (`/tmp/varaverk/api`, tmpfs) rather than hitting live APIs on every page view, refreshed by `Tools/api_cache_writer.sh`. `?live=1` bypasses the diff --git a/Plugin/unraid/include/monitor_board.php b/Plugin/unraid/include/monitor_board.php index 40c067f..3cdacab 100644 --- a/Plugin/unraid/include/monitor_board.php +++ b/Plugin/unraid/include/monitor_board.php @@ -80,9 +80,13 @@ const VV_MON_PAD = 20; // horizontal padding the Unraid page wrapper takes off // The column ladder, widest first. const VV_MON_RUNGS = [8, 4, 2, 1]; -// Cap on how many rows may share one screen height. The row-height cap divides the viewport by -// this, so a card can never grow past a quarter of the screen and push the rest off it. Rungs -// with fewer rows than this divide by their own row count instead and fill the screen. +// Cap on how many rows may share one screen height — and the line between two behaviours, not one +// rule. A rung with no more rows than this fits a screen: the row-height cap divides the viewport +// by the rung's own row count, or by this when the rung has more, so the board fills the screen +// and no card grows past its share. A rung with MORE rows than this cannot fit however its rows +// are sized, so the cap is dropped there and rows size to content instead — see +// vv_mon_rung_overflows(). Capping a board that scrolls regardless buys nothing and clips every +// card to pay for it. This board is 4 rows at eight columns and 8 at four, so both cases are live. const VV_MON_ROWS_PER_SCREEN = 4; // ── The board ───────────────────────────────────────────────────────────────────────────────── diff --git a/Plugin/unraid/pages/readme/monitor-readme.md b/Plugin/unraid/pages/readme/monitor-readme.md index 0040ea6..a73a334 100644 --- a/Plugin/unraid/pages/readme/monitor-readme.md +++ b/Plugin/unraid/pages/readme/monitor-readme.md @@ -10,6 +10,22 @@ a minute, so polling faster could not make it newer — it only decides how soon **Cards you do not have do not appear.** No GPU, no UPS, no VMs, no partner — the card is absent rather than showing zeros. An empty card would be a permanent reminder of nothing. +**The board re-flows on a narrow screen.** On a tablet or a phone the cards regroup into fewer, +wider columns rather than shrinking in place. Nothing is hidden and nothing is dropped — the same +cards are there in the same order, cut into different rows. + +Below the full-width layout the page scrolls as a whole instead of each card scrolling inside +itself. A board that is taller than the screen has to scroll somewhere, and scrolling the page +once is better than being handed a screen of cards that are each too short to read. + +**Cards in the same row share a height.** They line up along the bottom, so a card with little to +say carries empty space under it. That space means its neighbour is the taller card — not that a +reading is missing. + +The System card is the one exception. On a narrow screen it stops after Version and the Varaverk +figures below scroll, so that the host itself — hostname, clock, array state, uptime — is what +you get without scrolling anything. + --- ## Reference — System, power, CPU, memory, network