update debug bundle setting page

This commit is contained in:
Eduard Gert
2026-06-12 12:09:10 +02:00
parent f8ccbb07bb
commit 860be01ebe
18 changed files with 431 additions and 277 deletions
+25
View File
@@ -9,6 +9,9 @@ import (
"path/filepath"
"runtime"
"strings"
"time"
"google.golang.org/protobuf/types/known/durationpb"
"github.com/netbirdio/netbird/client/proto"
"github.com/netbirdio/netbird/version"
@@ -113,6 +116,28 @@ func (s *Debug) RegisterUILog(ctx context.Context, path string) error {
return err
}
func (s *Debug) StartBundleCapture(ctx context.Context, timeoutSeconds int32) error {
cli, err := s.conn.Client()
if err != nil {
return err
}
req := &proto.StartBundleCaptureRequest{}
if timeoutSeconds > 0 {
req.Timeout = durationpb.New(time.Duration(timeoutSeconds) * time.Second)
}
_, err = cli.StartBundleCapture(ctx, req)
return err
}
func (s *Debug) StopBundleCapture(ctx context.Context) error {
cli, err := s.conn.Client()
if err != nil {
return err
}
_, err = cli.StopBundleCapture(ctx, &proto.StopBundleCaptureRequest{})
return err
}
func (s *Debug) SetLogLevel(ctx context.Context, lvl LogLevel) error {
cli, err := s.conn.Client()
if err != nil {