[PR #4010] [MERGED] Add --filter-by-connection-type flag to status command #19300

Closed
opened 2026-08-05 05:05:50 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/4010
Author: @aliamerj
Created: 6/19/2025
Status: Merged
Merged: 7/21/2025
Merged by: @mlsmaycon

Base: mainHead: status/filter-by-connection-type


📝 Commits (1)

  • 4d78ec3 add new filter-by-connection-type flag

📊 Changes

6 files changed (+35 additions, -15 deletions)

View changed files

📝 client/cmd/debug.go (+1 -1)
📝 client/cmd/status.go (+12 -1)
📝 client/proto/daemon.pb.go (+7 -0)
📝 client/status/status.go (+11 -9)
📝 client/status/status_test.go (+1 -1)
📝 client/ui/debug.go (+3 -3)

📄 Description

Describe your changes

This PR introduces a new flag --filter-by-connection-type to the status command.
It allows users to filter peers by connection type (P2P or Relayed) in both JSON and detailed views.

Input validation is added in parseFilters() to ensure proper usage, and --detail is auto-enabled if no output format is specified (consistent with other filters).

Resolves #3883

Stack

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)
  • Extended the README / documentation, if necessary

By submitting this pull request, you confirm that you have read and agree to the terms of the Contributor License Agreement.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbirdio/netbird/pull/4010 **Author:** [@aliamerj](https://github.com/aliamerj) **Created:** 6/19/2025 **Status:** ✅ Merged **Merged:** 7/21/2025 **Merged by:** [@mlsmaycon](https://github.com/mlsmaycon) **Base:** `main` ← **Head:** `status/filter-by-connection-type` --- ### 📝 Commits (1) - [`4d78ec3`](https://github.com/netbirdio/netbird/commit/4d78ec37615672281e3f62a661eece030c6c97b2) add new filter-by-connection-type flag ### 📊 Changes **6 files changed** (+35 additions, -15 deletions) <details> <summary>View changed files</summary> 📝 `client/cmd/debug.go` (+1 -1) 📝 `client/cmd/status.go` (+12 -1) 📝 `client/proto/daemon.pb.go` (+7 -0) 📝 `client/status/status.go` (+11 -9) 📝 `client/status/status_test.go` (+1 -1) 📝 `client/ui/debug.go` (+3 -3) </details> ### 📄 Description ## Describe your changes This PR introduces a new flag `--filter-by-connection-type` to the status command. It allows users to filter peers by connection type (`P2P` or `Relayed`) in both JSON and detailed views. Input validation is added in `parseFilters()` to ensure proper usage, and `--detail` is auto-enabled if no output format is specified (consistent with other filters). ## Issue ticket number and link Resolves #3883 ## Stack <!-- branch-stack --> ### Checklist - [ ] Is it a bug fix - [ ] Is a typo/documentation fix - [x] Is a feature enhancement - [ ] It is a refactor - [ ] Created tests that fail without the change (if possible) - [ ] Extended the README / documentation, if necessary > By submitting this pull request, you confirm that you have read and agree to the terms of the [Contributor License Agreement](https://github.com/netbirdio/netbird/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT.md). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
saavagebueno added the pull-request label 2026-08-05 05:05:50 -04:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#19300