summaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)Author
2024-04-16Temporarily disable UI tests (#406)cyqsimon
* Temporarily disable UI tests - Too many sporadic errors occlude actual problems; see #400 - These tests will be re-enabled once the big refactor is complete * Write changelog
2024-04-15Fix Windows FP discrepancy issue in test (#400)cyqsimon
* Fix Windows FP discrepancy issue in test * Write changelog
2024-04-02Enable Android build (#384)Felix Obenhuber
* Support build for target_os android The target_os `android` is quite similar to `linux` but must be mentioned in the guards explicitly. Tested for target `aarch64-linux-android`. * Add target aarch64-linux-android to ci Use `cross` for building target `aarch64-linux-android`. In the `ci` workflow the matrix branch of `os` `ubuntu-latest` is used because the matrix organization is host os centric instead of target. Releases are build with `cross` for target `aarch64-linux-android`. Install `cross` if needed for a run. At the time of writing the latest release of `cross` can't build binaries for target `aarch64-linux-android` and it's common sense that the latest git tag or `master` shall be used [1]. [1] https://github.com/cross-rs/cross/issues/1222 * Add android related readme section
2024-03-25Fix IPv6 socket detect logic (#383)cyqsimon
* Fix IPv6 socket detect logic * Write changelog
2024-03-25Apply suggestions from new clippy lint `clippy::assigning_clones` (#382)cyqsimon
* fix: clippy warnings * Additional fix * Write changelog --------- Co-authored-by: Krithic Kumar <krithickumarub@protonmail.com>
2024-03-25Remove unnecessary logging synchronisation (#381)cyqsimon
* Revert 89e1140 - simplelog is already thread safe - see https://github.com/Drakulix/simplelog.rs/issues/146 * Write changelog * Fix import for MacOS
2024-03-18feat: add `PID` column to `Process` table (#379)Krithic Kumar
* feat: add `PID` column to `Process` table * fix(tests): populate fake data with the correct `ProcessInfo` type * test: update snapshots * refactor: use more idiomatic rust * refactor: rename function from `get_proc_name` to `get_proc_info` * refactor: only display PID when width available is highest ref: https://github.com/imsnif/bandwhich/pull/165#issuecomment-620852892 * tests: update snapshots * chore: update CHANGELOG * fix: clippy warnings * Revert "fix: clippy warnings" This reverts commit e5f06cba1943d60b43a19957c42e3178c6916f69. We will do this separately for the sake of keeping a clean history * refactor: use `u32` for PID * refactor: more idiomatic rust --------- Co-authored-by: cyqsimon <28627918+cyqsimon@users.noreply.github.com>
2024-03-03chore(deps): bump ratatui from 0.25.0 to 0.26.1 (#368)dependabot[bot]
* chore(deps): bump ratatui from 0.25.0 to 0.26.1 Bumps [ratatui](https://github.com/ratatui-org/ratatui) from 0.25.0 to 0.26.1. - [Release notes](https://github.com/ratatui-org/ratatui/releases) - [Changelog](https://github.com/ratatui-org/ratatui/blob/main/CHANGELOG.md) - [Commits](https://github.com/ratatui-org/ratatui/compare/v0.25.0...v0.26.1) --- updated-dependencies: - dependency-name: ratatui dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Use legacy layout (for now) --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: cyqsimon <28627918+cyqsimon@users.noreply.github.com>
2024-03-01Remove redundant imports (#377)cyqsimon
* Remove redundant imports - Now linted by clippy in 1.78 - See https://github.com/rust-lang/rust/pull/117772 * Write changelog * Remove Windows-only redundant imports in build script
2024-01-28Generate completion & manpage (#357)cyqsimon
* Generate completion & manpage * Write changelog
2024-01-28Hot-fix: Windows compile issue (#356)cyqsimon
2024-01-28chore(deps): bump ratatui from 0.24.0 to 0.25.0 (#348)dependabot[bot]
* chore(deps): bump ratatui from 0.24.0 to 0.25.0 Bumps [ratatui](https://github.com/ratatui-org/ratatui) from 0.24.0 to 0.25.0. - [Release notes](https://github.com/ratatui-org/ratatui/releases) - [Changelog](https://github.com/ratatui-org/ratatui/blob/main/CHANGELOG.md) - [Commits](https://github.com/ratatui-org/ratatui/compare/v0.24.0...v0.25.0) --- updated-dependencies: - dependency-name: ratatui dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Update API changes --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: cyqsimon <28627918+cyqsimon@users.noreply.github.com>
2023-12-08Show interface names (#340)ilyes-ced
* added interface names * some fixes * Set interface name in UI only once * Code style * Add changelog entry --------- Co-authored-by: cyqsimon <28627918+cyqsimon@users.noreply.github.com>
2023-11-02Display bandwidth in different unit families (#328)cyqsimon
* Allow selecting unit families - Supported units are {binary,SI}-{bytes,bits} * Fix typo * Better error msg in the unreachable case * - I can't believe I did this. Frankly, terrible. * Add unit test * Add peta&pebi units to be absolutely future-proof * Minor code style improvement
2023-11-01Bump ratatui to 0.24.0 (#327)cyqsimon
2023-11-01Log unresolved processes in more detail + general refactor (#318)cyqsimon
* Refactor & reorganisation of `get_proc_name` * Log both src & dst when we fail to resolve connection to process - Per recommendation in https://github.com/imsnif/bandwhich/issues/196#issuecomment-1763278674
2023-10-29Fix vague CLI option documentation; closes #314 (#316)cyqsimon
2023-10-26Use `once_cell::sync::Lazy` to make regex usage more ergonomic (#313)cyqsimon
2023-10-26Minor code style improvements (#312)cyqsimon
- Build regex only once using `once_cell::sync::Lazy` - Reduce code duplication
2023-10-21Reset clippy levelscyqsimon
- Also denies `enum_glob_use`
2023-10-21Refactor `OsInputOutput` (combine interfaces & frames into single Vec) (#310)cyqsimon
* Refactor `OsInputOutput` (combine interfaces & frames into single Vec) * Add note on handling a separate failure case * Reduce code duplication
2023-10-20Make logging race-free using a global lock & macro (#309)cyqsimon
* Make logging race-free using a global lock & macro * Fix clippy complaint * Fix import for MacOS * Make `mt_log` expand to an expression
2023-10-19Table formatting logic overhaul (#305)cyqsimon
* Table formatting logic overhaul - Columns now auto-expand and auto-shrink proportionally - Data column selection logic is now set per-table - Necessary boilerplate added to allow tables with more (or fewer) columns in the future * Better naming: `TableLayout` -> `DisplayLayout` * Fix clippy complaints * Optimise layout cutoff widths - These values are pretty much arbitrary. I'm open to further optimising them in the future. * Updated test snapshots to match new layout settings * Remove unnecessary logging * Correct `debug_fn` impl for `column_selector` * Further optimise bandwidth column display * Update test snapshots * Layout width preset minor adjustment
2023-10-17Partially fix flaky tests (#308)cyqsimon
* Minor code style changes * Disable rendering of timestamps in tests * Update test snapshots * Test everything with insta macros (no more `assert(_eq)?`) - This has the benefit of creating snapshots for everything, allowing for later diffing * Don't use `assert_debug_snapshot` for large string outputs - This makes snapshots more human-inspectable * Code style improvement on two tests - `pause_by_space` - `rearranged_by_tab` * Minor code style improvements
2023-10-12Set known orphan connections max sizecyqsimon
2023-10-12Handle IPv4-mapped IPv6 addresses when resolving connection ownercyqsimon
2023-10-12Reduce logging noise by omitting known orphan connectionscyqsimon
2023-10-12Forgot to allow write access to log filecyqsimon
2023-10-12Add logging when the process name fails to resolvecyqsimon
2023-10-11Ignore connections that fail parsing instead of panicking on BSD (#288)cyqsimon
* Ignore connections that fail parsing instead of panicking on BSD - Tentative fix for #217 * Log when a connection fails parsing - I actually love unreadable code * Fix clippy complaint
2023-10-11Fix clippy complaintscyqsimon
2023-10-11Add logging infrastructure (#302)cyqsimon
* Add logging dependencies * Initialise logging
2023-10-11Reduce repitition using default `Opts`cyqsimon
2023-10-11Never use `&Option` in function signaturecyqsimon
2023-10-11Minor refactor of `main.rs` (#301)cyqsimon
* Move CLI structs to their own file * `main` returns `Result` directly * Slightly reduced nesting
2023-10-08Explicitly name `layout-*` tests as socyqsimon
2023-10-08Migrate all tests to using `cargo-insta`cyqsimon
2023-10-07Compact tests using `rstest`cyqsimon
2023-10-07Rm old, unused test snapshotscyqsimon
2023-09-20Add missing version flag to CLI (#290)Marcin Puc
2023-09-20Update test snapshot, another onecyqsimon
2023-09-20Update test snapshotcyqsimon
2023-09-11migrate structopt to clap (#285)liyixin
* migrate structopt to clap * add a entry in changelog * Move changelog entry from `Added` to `Fixed` --------- Co-authored-by: cyqsimon <28627918+cyqsimon@users.noreply.github.com>
2023-09-01fix(windows): don't send key twice (#280)sigmaSd
2023-08-26fix: fix snapshot testsNbiba Bedis
2023-08-26chore: drop lazy_staticNbiba Bedis
2023-08-25Use variable capture syntax in format macros where possiblecyqsimon
2023-08-25Compact importscyqsimon
2023-08-25Move completion file locationcyqsimon
2023-08-25Migrate from `failure` to `anyhow`+`thiserror`cyqsimon