Skip to content

Add hostname to output#9

Merged
JannikSt merged 5 commits into
mainfrom
feature/hostname-output
Dec 3, 2025
Merged

Add hostname to output#9
JannikSt merged 5 commits into
mainfrom
feature/hostname-output

Conversation

@JannikSt
Copy link
Copy Markdown
Owner

@JannikSt JannikSt commented Dec 3, 2025

Summary

  • Adds hostname to the UI title bar: ibtop - InfiniBand Monitor @ {hostname}
  • Adds hostname field to JSON output for programmatic access
  • Adds hostname crate as dependency

Closes #8

Test plan

  • Run IBTOP_FAKE_DATA=1 cargo run -- --json and verify hostname appears in JSON output
  • Run IBTOP_DEMO=1 cargo run and verify hostname appears in title bar

- Add hostname to UI title bar: "ibtop - InfiniBand Monitor @ {hostname}"
- Add hostname field to JSON output wrapper
- Add hostname crate dependency

Closes #8
@JannikSt JannikSt requested a review from Copilot December 3, 2025 09:04
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds hostname information to both the UI title bar and JSON output, making it easier to identify which host is being monitored, especially useful in multi-host environments.

  • Adds hostname crate (v0.4) as a dependency
  • Wraps JSON output in a new IbtopOutput struct containing hostname and adapters
  • Displays hostname in the UI title bar with format: "ibtop - InfiniBand Monitor @ {hostname}"

Reviewed changes

Copilot reviewed 4 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
Cargo.toml Bumps version to 0.1.6 and adds hostname = "0.4" dependency
Cargo.lock Updates lock file with hostname crate and its transitive dependencies (cfg-if, libc, windows-link)
src/types.rs Introduces IbtopOutput struct to wrap hostname and adapter data for JSON output
src/main.rs Retrieves hostname in JSON mode and wraps output with new IbtopOutput struct
src/ui.rs Adds hostname to UI title bar by calling hostname::get() during each frame render

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/ui.rs Outdated
Comment thread src/ui.rs Outdated
@JannikSt JannikSt merged commit 83fbfa1 into main Dec 3, 2025
1 check passed
@JannikSt JannikSt deleted the feature/hostname-output branch December 3, 2025 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

include hostname in the output so that i'll know which host it is from screenshots

2 participants