Only check if diagnostics are disabled, remove telemetry enabled in true up review status response in favor of using front-end configs.
Этот коммит содержится в:
@@ -338,10 +338,10 @@ func requestTrueUpReview(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
// Do not send true-up review data if the user has already requested one for the quarter.
|
||||
// And only send a true-up review via as a one-time telemetry request if telemetry is disabled.
|
||||
telemetryService := c.App.Srv().GetTelemetryService()
|
||||
if !status.Completed && !telemetryService.TelemetryEnabled() {
|
||||
telemetryEnabled := c.App.Config().LogSettings.EnableDiagnostics
|
||||
if !status.Completed && telemetryEnabled != nil && !*telemetryEnabled {
|
||||
// Send telemetry data
|
||||
telemetryService.SendTelemetry(model.TrueUpReviewTelemetryName, profileMap)
|
||||
c.App.Srv().GetTelemetryService().SendTelemetry(model.TrueUpReviewTelemetryName, profileMap)
|
||||
|
||||
// Update the review status to reflect the completion.
|
||||
status.Completed = true
|
||||
|
||||
@@ -164,7 +164,5 @@ func (a *App) GetOrCreateTrueUpReviewStatus() (*model.TrueUpReviewStatus, *model
|
||||
}
|
||||
}
|
||||
|
||||
telemetryService := a.Srv().GetTelemetryService()
|
||||
status.TelemetryEnabled = telemetryService.TelemetryEnabled()
|
||||
return status, nil
|
||||
}
|
||||
|
||||
@@ -33,9 +33,8 @@ func (t *TrueUpReviewPlugins) ToMap() map[string]interface{} {
|
||||
}
|
||||
|
||||
type TrueUpReviewStatus struct {
|
||||
Completed bool `json:"complete"`
|
||||
DueDate int64 `json:"due_date"`
|
||||
TelemetryEnabled bool `json:"telemetry_enabled"`
|
||||
Completed bool `json:"complete"`
|
||||
DueDate int64 `json:"due_date"`
|
||||
}
|
||||
|
||||
func (t *TrueUpReviewStatus) ToSlice() []interface{} {
|
||||
|
||||
Ссылка в новой задаче
Block a user