mirror of
https://github.com/wavetermdev/waveterm.git
synced 2024-12-21 16:38:23 +01:00
send autoupdate enabled/channel w/ telemetry
This commit is contained in:
parent
ec6a5bbeb3
commit
63f41c146c
@ -78,6 +78,16 @@ func IsTelemetryEnabled() bool {
|
|||||||
return settings.Settings.TelemetryEnabled
|
return settings.Settings.TelemetryEnabled
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func IsAutoUpdateEnabled() bool {
|
||||||
|
settings := wconfig.GetWatcher().GetFullConfig()
|
||||||
|
return settings.Settings.AutoUpdateEnabled
|
||||||
|
}
|
||||||
|
|
||||||
|
func AutoUpdateChannel() string {
|
||||||
|
settings := wconfig.GetWatcher().GetFullConfig()
|
||||||
|
return settings.Settings.AutoUpdateChannel
|
||||||
|
}
|
||||||
|
|
||||||
func IsAllowedRenderer(renderer string) bool {
|
func IsAllowedRenderer(renderer string) bool {
|
||||||
return allowedRenderers[renderer]
|
return allowedRenderers[renderer]
|
||||||
}
|
}
|
||||||
|
@ -130,7 +130,15 @@ func SendTelemetry(ctx context.Context, clientId string) error {
|
|||||||
}
|
}
|
||||||
log.Printf("[wcloud] sending telemetry data\n")
|
log.Printf("[wcloud] sending telemetry data\n")
|
||||||
dayStr := daystr.GetCurDayStr()
|
dayStr := daystr.GetCurDayStr()
|
||||||
input := TelemetryInputType{ClientId: clientId, UserId: clientId, CurDay: dayStr, Activity: activity, AppType: "w2"}
|
input := TelemetryInputType{
|
||||||
|
ClientId: clientId,
|
||||||
|
UserId: clientId,
|
||||||
|
AppType: "w2",
|
||||||
|
AutoUpdateEnabled: telemetry.IsAutoUpdateEnabled(),
|
||||||
|
AutoUpdateChannel: telemetry.AutoUpdateChannel(),
|
||||||
|
CurDay: dayStr,
|
||||||
|
Activity: activity,
|
||||||
|
}
|
||||||
req, err := makeAnonPostReq(ctx, TelemetryUrl, input)
|
req, err := makeAnonPostReq(ctx, TelemetryUrl, input)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
@ -13,10 +13,11 @@ type NoTelemetryInputType struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type TelemetryInputType struct {
|
type TelemetryInputType struct {
|
||||||
UserId string `json:"userid"`
|
UserId string `json:"userid"`
|
||||||
ClientId string `json:"clientid"`
|
ClientId string `json:"clientid"`
|
||||||
AppType string `json:"apptype"`
|
AppType string `json:"apptype,omitempty"`
|
||||||
CurDay string `json:"curday"`
|
AutoUpdateEnabled bool `json:"autoupdateenabled,omitempty"`
|
||||||
DefaultShell string `json:"defaultshell"`
|
AutoUpdateChannel string `json:"autoupdatechannel,omitempty"`
|
||||||
Activity []*telemetry.ActivityType `json:"activity"`
|
CurDay string `json:"curday"`
|
||||||
|
Activity []*telemetry.ActivityType `json:"activity"`
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user