mirror of
https://github.com/komodorio/helm-dashboard.git
synced 2026-03-24 11:48:04 +00:00
Make user analytics optional (#59)
* Make user analytics optional * Mention analytics in README * Use analytics flag
This commit is contained in:
13
main.go
13
main.go
@@ -17,9 +17,10 @@ var (
|
||||
)
|
||||
|
||||
type options struct {
|
||||
Verbose bool `short:"v" long:"verbose" description:"Show verbose debug information"`
|
||||
NoBrowser bool `short:"b" long:"no-browser" description:"Do not attempt to open Web browser upon start"`
|
||||
Version bool `long:"version" description:"Show tool version"`
|
||||
Version bool `long:"version" description:"Show tool version"`
|
||||
Verbose bool `short:"v" long:"verbose" description:"Show verbose debug information"`
|
||||
NoBrowser bool `short:"b" long:"no-browser" description:"Do not attempt to open Web browser upon start"`
|
||||
NoTracking bool `long:"no-analytics" description:"Disable user analytics (GA, DataDog etc.)"`
|
||||
|
||||
Port uint `short:"p" long:"port" description:"Port to start server on" default:"8080"` // TODO: better default port to clash less?
|
||||
|
||||
@@ -31,7 +32,11 @@ func main() {
|
||||
|
||||
setupLogging(opts.Verbose)
|
||||
|
||||
address, webServerDone := dashboard.StartServer(version, int(opts.Port), opts.Namespace, opts.Verbose)
|
||||
address, webServerDone := dashboard.StartServer(version, int(opts.Port), opts.Namespace, opts.Verbose, opts.NoTracking)
|
||||
|
||||
if !opts.NoTracking {
|
||||
log.Infof("User analytics collected to improve the quality, disable it with --no-analytics")
|
||||
}
|
||||
|
||||
if opts.NoBrowser {
|
||||
log.Infof("Access web UI at: %s", address)
|
||||
|
||||
Reference in New Issue
Block a user