mirror of
https://github.com/netbirdio/netbird.git
synced 2026-09-26 00:29:06 +02:00
ui: detect outdated daemon via WailsUIReady probe
Add a no-op WailsUIReady RPC the UI probes once at startup. A reachable daemon that returns Unimplemented predates this UI and is too old to drive it; the probe distinguishes that from an unreachable daemon. On an outdated daemon the UI fires a localized OS notification, since the main window may not open to show an in-app error. Proto regenerated with protoc 33.1 to keep the v6.33.1 header.
This commit is contained in:
@@ -2121,6 +2121,12 @@ func (s *Server) GetFeatures(ctx context.Context, msg *proto.GetFeaturesRequest)
|
||||
return features, nil
|
||||
}
|
||||
|
||||
// WailsUIReady is a no-op the Wails UI probes at startup; merely answering it
|
||||
// (rather than returning Unimplemented) tells the UI this daemon is new enough.
|
||||
func (s *Server) WailsUIReady(context.Context, *proto.WailsUIReadyRequest) (*proto.WailsUIReadyResponse, error) {
|
||||
return &proto.WailsUIReadyResponse{}, nil
|
||||
}
|
||||
|
||||
// checkDisableAdvancedView reports the MDM-policy directive for the
|
||||
// upcoming UI's advanced-view section. Tristate: returns nil when no
|
||||
// MDM directive is set so the UI applies its own default; returns
|
||||
|
||||
Reference in New Issue
Block a user