Conversation
Fixed a regression that caused corruption of unicode data when saving JSON.
Introduce an async operations facility under src/ops so vSphere work for the VM power-action flow no longer blocks the main event loop (terminal input, property updates, redraws). Architecture: - operation_types.rs holds OperationId for shared request/result correlation. - Ops supervisor owns a bounded mpsc queue (256), a concurrency limit (8) via Semaphore, and spawns per-request tokio tasks that call existing vm_power_actions helpers and post results on the existing Event::App channel. - OpsHandle wraps the mpsc sender; shutdown drops the sender so the supervisor recv loop ends; quit also aborts the ops worker join handle alongside the perf worker and EventHandler shutdown. App integration: - AppEvent gains VmActionPrefetchSucceeded/Failed and OperationSucceeded/Failed with explicit payloads (no anyhow::Result in AppEvent). - OpenVmActions queues PrefetchVmActions instead of awaiting prefetch in the UI handler; execute path queues ExecuteInventoryOperation instead of awaiting execute_vm_power_action in handle_terminal_event. - App tracks next_operation_id, vm_action_pending_execute for execute results, and ignores stale prefetch completions if the user dismissed loading. VmActionUi: - LoadingPrefetch state with a loading modal; Esc closes and discards late prefetch results.
…Retriever for VM actions - Replace simplelog with flexi_logger: state-dir logs, app vs wire files, rotation/retention, UTC timestamps, [logging] config + LOG_LEVEL / legacy migration, wire_logging on client - Bump vim_rs to 0.4.3; use ObjectRetriever again in vm_power_actions now that it takes dyn VimClient
… labels Add a VM Summary experience so operators can inspect a selected VM without leaving the resource browser: a scrollable popup shows CPU, memory, VMware Tools status, storage, and per-NIC networking derived from guest info and hardware config. For administrators, the goal is a single place to answer “what is this VM running, how is it connected, and are Tools OK?” Network names prefer sensible labels from the backing type: standard port groups, distributed port groups (with unresolved DVPG placeholders when the name is not yet available), NSX opaque networks (type and ID), and SR-IOV (device name or PCI-style id). That reduces “-” or opaque MO references in the network column. For developers, the implementation is split into fetch (PropertyCollector- driven retrieval and normalization), merge logic joining guest NIC keys to virtual Ethernet devices, formatting for display units and states, and a dedicated UI layer with keyboard navigation. The feature is wired through the existing event/ops and resource manager flow so it behaves like other browser actions. Tests cover merge edge cases and formatters; CI parity (fmt, clippy -D warnings, test) is expected for this change set.
Split terminal input from PropertyCollector long-polls so keystrokes no longer cancel in-flight WaitForUpdatesEx calls. Gate PC waits with a watch channel: on for resource browser and managed property browser, off for static/event property views and on quit. Use 60s server-side wait windows instead of a tight select/timeout loop. Centralize intent in refresh_polling_demand(): set PC demand and push PerfRequest; use PerfRequest::paused() with empty entities when perf should stop (property panes, VM summary modal, etc.) so QueryPerf does not run on stale visible-row sets. Add polling_policy helpers and unit tests; debug logs on target pc_wait. CHANGELOG: document behavior under [Unreleased]. CHANGELOG & README updated for VM summary
Avoid rearming the background PerformanceManager worker when the selected row changes but the visible VM/Host set is unchanged. Track the last perf demand signature so ad-hoc refreshes only fire when the observed entities, pause/running state, or perf generation actually changes.
Bump version to 0.2.5, refresh UI snapshots and README install URLs, and document 0.2.5 in CHANGELOG (VM Summary, polling/logging changes, async VM ops, JSON unicode fix).
- Introduced constants for label, value, border, and background colors to enhance UI consistency. - Replaced hardcoded color values with the new constants in the VM summary UI rendering logic. - Adjusted styles for various UI elements to use the updated color scheme, improving overall visual clarity.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added
son the Virtual Machine inventory table): opens a centered popup with a consolidated view of the selected VM—name and MO id, primary IP(s), overall status, power state and uptime, guest OS, vCPU count and CPU usage (MHz), a one-line VMware Tools summary, host memory in use versus configured size, resolved host name, provisioned disk usage, plus scrollable Networking and Disks tables. Networking lists each NIC (label, network name when it can be resolved from the backing, MAC, guest IPs); disks list virtual disks with path/backing and datastore names when available. The vSphere work runs asynchronously so typing, search, and redraws stay responsive; you briefly see “Loading VM summary…” until data arrives. Esc or q closes the popup; while it is open, ↑/↓, j/k, Page Up/Page Down, Home/End, g/G, and Ctrl+B/Ctrl+F scroll the content.Changed
WaitForUpdatesExlong-polls no longer share onetokio::select!, so keystrokes no longer cancel and restart in-flight waits (which previously amplified server load during UI activity). Awatchchannel gates when long-polls run: on for the resource inventory table and the managed-object property browser, off for the static/event JSON property browser and during shutdown. Long-polls use a 60-second server-side wait window instead of a short timeout loop. Performance (QueryPerf) requests are explicitly cleared when perf should stop (property browsers, VM summary popup open, or other pauses) so the background worker does not keep polling with a stale visible-row set.refresh_polling_demand()centralizes these rules;polling_policyunit tests document PropertyCollector vs perf demand.PerformanceManagerworker. vTUI now only sends an immediate perf refresh when the effective observed entity set, pause/running state, or perf generation actually changes.logs/vtui.logunder the current working directory. Application and wire diagnostics use flexi_logger with append, rotation, retention, and optional compression under the platform state directory: on Unix-like systems$XDG_STATE_HOME/vtui/logs/(or~/.local/state/vtui/logs/whenXDG_STATE_HOMEis unset or not absolute), and on Windows%LOCALAPPDATA%\vtui\logs\. Filenames follow flexi_logger conventions (e.g. currentvtui-app/vtui-wirelogs plus rotated siblings). Timestamps are UTC with millisecond precision and aZsuffix. Configure verbosity and rotation in a global[logging]section ofconfig.toml;LOG_LEVELremains supported and applies application logging only. Wire capture is configured with[logging.wire] mode(off,summary,detailed) and is passed tovim_rs::WireLoggingModeonClientBuilder::wire_logging; targetsvim_rs::wire::jsonandvim_rs::wire::soapare routed tovtui-wire.logwithout floodingvtui-app.log. Per-target overrides use[[logging.filters]]. Legacy[environments.*].log_levelis still read for one release when no global[logging].leveland noLOG_LEVELapply, with a deprecation warning.RUST_LOGis intentionally ignored for vTUI’s own logger setup (a note is printed if set). If file logging cannot be initialized, vTUI warns and falls back to stderr-only logging instead of aborting.src/opsso vSphere work for the VM power-action flow no longer blocks the main event loop (terminal input, property updates, redraws).Fixed