Skip to content

Commit 2fa738f

Browse files
Show message to the user after a successful certificate installation (#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 <[email protected]>
1 parent 3190a1a commit 2fa738f

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

Diff for: certificates/certificates.go

+2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import (
3232
"os"
3333
"time"
3434

35+
"github.com/arduino/arduino-create-agent/utilities"
3536
"github.com/arduino/go-paths-helper"
3637
log "github.com/sirupsen/logrus"
3738
)
@@ -286,4 +287,5 @@ func GenerateAndInstallCertificates(certDir *paths.Path) {
286287
log.Errorf("cannot install certificates something went wrong: %s", err)
287288
DeleteCertificates(certDir)
288289
}
290+
utilities.UserPrompt("The HTTPS certificate has been installed correctly.", "{\"OK\"}", "OK", "OK", "Arduino Agent: HTTPS certificate installation")
289291
}

Diff for: systray/systray_real.go

+1
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ func (s *Systray) start() {
117117
if err != nil {
118118
log.Errorf("cannot set installCerts value in config.ini: %s", err)
119119
}
120+
utilities.UserPrompt("The HTTPS certificate has been uninstalled.", "{\"OK\"}", "OK", "OK", "Arduino Agent: HTTPS certificate installation")
120121
}
121122
s.Restart()
122123
}

0 commit comments

Comments
 (0)