Skip to content

Commit

Permalink
Show message to the user after a successful certificate installation (#…
Browse files Browse the repository at this point in the history
…951)

* Show message to the user after a successful certificate installation

* Show a simplified message (different for install and uninstall cases)

---------

Co-authored-by: Xayton <30591904+Xayton@users.noreply.github.com>
  • Loading branch information
MatteoPologruto and Xayton committed May 15, 2024
1 parent 3190a1a commit 2fa738f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions certificates/certificates.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import (
"os"
"time"

"github.com/arduino/arduino-create-agent/utilities"
"github.com/arduino/go-paths-helper"
log "github.com/sirupsen/logrus"
)
Expand Down Expand Up @@ -286,4 +287,5 @@ func GenerateAndInstallCertificates(certDir *paths.Path) {
log.Errorf("cannot install certificates something went wrong: %s", err)
DeleteCertificates(certDir)
}
utilities.UserPrompt("The HTTPS certificate has been installed correctly.", "{\"OK\"}", "OK", "OK", "Arduino Agent: HTTPS certificate installation")
}
1 change: 1 addition & 0 deletions systray/systray_real.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ func (s *Systray) start() {
if err != nil {
log.Errorf("cannot set installCerts value in config.ini: %s", err)
}
utilities.UserPrompt("The HTTPS certificate has been uninstalled.", "{\"OK\"}", "OK", "OK", "Arduino Agent: HTTPS certificate installation")
}
s.Restart()
}
Expand Down

0 comments on commit 2fa738f

Please sign in to comment.