mirror of
https://github.com/amir20/dozzle.git
synced 2025-12-26 23:21:41 +01:00
fix: missed a few anlaytics that were not respecting no analytics flag (#3099)
This commit is contained in:
@@ -6,13 +6,16 @@ import (
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
func StartEvent(version string, mode string, agents []string, remoteClients []string, client docker.Client, subCommand string) {
|
||||
func StartEvent(args Args, mode string, client docker.Client, subCommand string) {
|
||||
if args.NoAnalytics {
|
||||
return
|
||||
}
|
||||
event := analytics.BeaconEvent{
|
||||
Name: "start",
|
||||
Version: version,
|
||||
Version: args.Version(),
|
||||
Mode: mode,
|
||||
RemoteAgents: len(agents),
|
||||
RemoteClients: len(remoteClients),
|
||||
RemoteAgents: len(args.RemoteAgent),
|
||||
RemoteClients: len(args.RemoteHost),
|
||||
SubCommand: subCommand,
|
||||
}
|
||||
|
||||
|
||||
@@ -51,14 +51,10 @@ func CreateMultiHostService(embededCerts embed.FS, args Args) *docker_support.Mu
|
||||
_, err := localClient.ListContainers()
|
||||
if err != nil {
|
||||
log.Debugf("could not connect to local Docker Engine: %s", err)
|
||||
if !args.NoAnalytics {
|
||||
go StartEvent(args.Version(), args.Mode, args.RemoteAgent, args.RemoteHost, nil, "")
|
||||
}
|
||||
go StartEvent(args, args.Mode, nil, "")
|
||||
} else {
|
||||
log.Debugf("connected to local Docker Engine")
|
||||
if !args.NoAnalytics {
|
||||
go StartEvent(args.Version(), args.Mode, args.RemoteAgent, args.RemoteHost, localClient, "")
|
||||
}
|
||||
go StartEvent(args, args.Mode, localClient, "")
|
||||
clients = append(clients, docker_support.NewDockerClientService(localClient))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user