use the API specified URL for the transparency link (#6205)

This commit is contained in:
Roberto Dip 2022-06-13 17:11:19 -03:00 committed by GitHub
parent 19c5e3545b
commit ae21f0b227
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -0,0 +1 @@
* Updated the "Transparency" menu item to use a custom URL if specified (premium only)

View file

@ -43,6 +43,7 @@ func main() {
basePath := deviceURL.Scheme + "://" + deviceURL.Host
deviceToken := path.Base(deviceURL.Path)
transparencyURL := basePath + "/api/latest/fleet/device/" + deviceToken + "/transparency"
onReady := func() {
log.Info().Msg("ready")
@ -145,7 +146,7 @@ func main() {
log.Error().Err(err).Msg("open browser my device")
}
case <-transparencyItem.ClickedCh:
if err := open.Browser("https://fleetdm.com/transparency"); err != nil {
if err := open.Browser(transparencyURL); err != nil {
log.Error().Err(err).Msg("open browser transparency")
}
}