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.
|
// 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.
|
// And only send a true-up review via as a one-time telemetry request if telemetry is disabled.
|
||||||
telemetryService := c.App.Srv().GetTelemetryService()
|
telemetryEnabled := c.App.Config().LogSettings.EnableDiagnostics
|
||||||
if !status.Completed && !telemetryService.TelemetryEnabled() {
|
if !status.Completed && telemetryEnabled != nil && !*telemetryEnabled {
|
||||||
// Send telemetry data
|
// Send telemetry data
|
||||||
telemetryService.SendTelemetry(model.TrueUpReviewTelemetryName, profileMap)
|
c.App.Srv().GetTelemetryService().SendTelemetry(model.TrueUpReviewTelemetryName, profileMap)
|
||||||
|
|
||||||
// Update the review status to reflect the completion.
|
// Update the review status to reflect the completion.
|
||||||
status.Completed = true
|
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
|
return status, nil
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,7 +35,6 @@ func (t *TrueUpReviewPlugins) ToMap() map[string]interface{} {
|
|||||||
type TrueUpReviewStatus struct {
|
type TrueUpReviewStatus struct {
|
||||||
Completed bool `json:"complete"`
|
Completed bool `json:"complete"`
|
||||||
DueDate int64 `json:"due_date"`
|
DueDate int64 `json:"due_date"`
|
||||||
TelemetryEnabled bool `json:"telemetry_enabled"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t *TrueUpReviewStatus) ToSlice() []interface{} {
|
func (t *TrueUpReviewStatus) ToSlice() []interface{} {
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user