Commit d2c3eef
committed
feat(console-menu): merge review/summary into a single diff-against-DB step
Review step now renders a box that lists only fields whose value will actually
change (old → new), with a "NEW INTERFACE" headline when no DB row exists for
the selected interface. The box is embedded into the CliMenu title so it
survives configureTerminal()->clear() on menu open — a prior stdout echo was
being wiped immediately, causing the "flashes and disappears" behaviour.
- NetworkWizard::reviewAndConfirm loads the live LanInterfaces row by
interface name, hands it to renderChangesBoxed(), and embeds the result
into the menu title. The intermediate "Press Enter to continue" prompt
is gone — one screen, one decision.
- WizardHelpers::renderChangesBoxed returns the box as a string instead of
echoing. Width 60 leaves headroom for CliMenu's margin/border/padding.
- New helpers: buildConfigDiff, labelIpv4Mode, labelIpv6Mode, labelIpv4Dns,
labelIpv6Dns, formatDiffRow, padRight, boxTopLine, boxBottomLine, boxLine.
- IPv4 and IPv6 DNS are diffed separately, so a manual IPv6 DNS change is no
longer masked when IPv4 is DHCP.
- Padding uses mb_strlen rather than sprintf '%-Ns' (which counts bytes), so
UTF-8 box glyphs and em-dashes don't push columns sideways.
- Dead code removed: showConfigSummary, showConfigSummaryBoxed, and the four
printBox* helpers — there were no other callers.1 parent b2ff938 commit d2c3eef
2 files changed
Lines changed: 215 additions & 178 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
447 | 447 | | |
448 | 448 | | |
449 | 449 | | |
450 | | - | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
451 | 456 | | |
452 | | - | |
453 | | - | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
454 | 463 | | |
455 | 464 | | |
456 | 465 | | |
| |||
460 | 469 | | |
461 | 470 | | |
462 | 471 | | |
463 | | - | |
| 472 | + | |
464 | 473 | | |
465 | 474 | | |
466 | 475 | | |
| |||
0 commit comments