mirror of
https://github.com/tailscale/tailscale.git
synced 2025-02-27 10:47:35 +00:00
health: send ImpactsConnectivity value over LocalAPI (#12700)
Updates tailscale/tailscale#4136 We should make sure to send the value of ImpactsConnectivity over to the clients using LocalAPI as they need it to display alerts in the GUI properly. Signed-off-by: Andrea Gottardo <andrea@gottardo.me>
This commit is contained in:
parent
42f01afe26
commit
309afa53cf
@ -30,6 +30,7 @@ type UnhealthyState struct {
|
|||||||
BrokenSince *time.Time `json:",omitempty"`
|
BrokenSince *time.Time `json:",omitempty"`
|
||||||
Args Args `json:",omitempty"`
|
Args Args `json:",omitempty"`
|
||||||
DependsOn []WarnableCode `json:",omitempty"`
|
DependsOn []WarnableCode `json:",omitempty"`
|
||||||
|
ImpactsConnectivity bool `json:",omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// unhealthyState returns a unhealthyState of the Warnable given its current warningState.
|
// unhealthyState returns a unhealthyState of the Warnable given its current warningState.
|
||||||
@ -61,6 +62,7 @@ func (w *Warnable) unhealthyState(ws *warningState) *UnhealthyState {
|
|||||||
BrokenSince: &ws.BrokenSince,
|
BrokenSince: &ws.BrokenSince,
|
||||||
Args: ws.Args,
|
Args: ws.Args,
|
||||||
DependsOn: dependsOnWarnableCodes,
|
DependsOn: dependsOnWarnableCodes,
|
||||||
|
ImpactsConnectivity: w.ImpactsConnectivity,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -94,13 +94,13 @@ var LoginStateWarnable = Register(&Warnable{
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
// notInMapPollWarnable is a Warnable that warns the user that they cannot connect to the control server.
|
// notInMapPollWarnable is a Warnable that warns the user that we are using a stale network map.
|
||||||
var notInMapPollWarnable = Register(&Warnable{
|
var notInMapPollWarnable = Register(&Warnable{
|
||||||
Code: "not-in-map-poll",
|
Code: "not-in-map-poll",
|
||||||
Title: "Cannot connect to control server",
|
Title: "Out of sync",
|
||||||
Severity: SeverityMedium,
|
Severity: SeverityMedium,
|
||||||
DependsOn: []*Warnable{NetworkStatusWarnable},
|
DependsOn: []*Warnable{NetworkStatusWarnable},
|
||||||
Text: StaticMessage("Cannot connect to the control server (not in map poll). Check your Internet connection."),
|
Text: StaticMessage("Unable to connect to the Tailscale coordination server to synchronize the state of your tailnet. Peer reachability might degrade over time."),
|
||||||
})
|
})
|
||||||
|
|
||||||
// noDERPHomeWarnable is a Warnable that warns the user that Tailscale doesn't have a home DERP.
|
// noDERPHomeWarnable is a Warnable that warns the user that Tailscale doesn't have a home DERP.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user