mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-23 11:27:29 +00:00
health: show DisplayMessage actions in 'tailscale status'
Updates tailscale/corp#27759 Signed-off-by: James Sanderson <jsanderson@tailscale.com>
This commit is contained in:

committed by
James 'zofrex' Sanderson

parent
5fde183754
commit
13ee285675
@@ -1054,13 +1054,18 @@ func (t *Tracker) stringsLocked() []string {
|
||||
|
||||
warnLen := len(result)
|
||||
for _, c := range t.controlMessages {
|
||||
var msg string
|
||||
if c.Title != "" && c.Text != "" {
|
||||
result = append(result, c.Title+": "+c.Text)
|
||||
msg = c.Title + ": " + c.Text
|
||||
} else if c.Title != "" {
|
||||
result = append(result, c.Title)
|
||||
msg = c.Title + "."
|
||||
} else if c.Text != "" {
|
||||
result = append(result, c.Text)
|
||||
msg = c.Text
|
||||
}
|
||||
if c.PrimaryAction != nil {
|
||||
msg = msg + " " + c.PrimaryAction.Label + ": " + c.PrimaryAction.URL
|
||||
}
|
||||
result = append(result, msg)
|
||||
}
|
||||
sort.Strings(result[warnLen:])
|
||||
|
||||
|
Reference in New Issue
Block a user