SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.
TypeScript apmapplication-monitoringdistributed-tracinggogood-first-issuejaegerloglogsmetricsmonitoringnextjsobservabilityopen-sourceopentelemetryprometheusreactreactjsself-hostedtracingtypescript
fix(dashboards): fix lock/unlock functionality (#7880)
Vibhu Pandeycd1c9ddf1120
diff --git a/ee/query-service/app/api/dashboard.go b/ee/query-service/app/api/dashboard.goindex f43db74be0..c96b00df0d 100644--- a/ee/query-service/app/api/dashboard.go+++ b/ee/query-service/app/api/dashboard.go@@ -41,8 +41,8 @@ func (ah *APIHandler) lockUnlockDashboard(w http.ResponseWriter, r *http.Requestreturn}- dashboard, err := dashboards.GetDashboard(r.Context(), claims.OrgID, uuid)- if err != nil {+ dashboard, apiErr := dashboards.GetDashboard(r.Context(), claims.OrgID, uuid)+ if apiErr != nil {render.Error(w, errors.Wrapf(err, errors.TypeInternal, errors.CodeInternal, "failed to get dashboard"))return}@@ -53,8 +53,8 @@ func (ah *APIHandler) lockUnlockDashboard(w http.ResponseWriter, r *http.Request}// Lock/Unlock the dashboard- err = dashboards.LockUnlockDashboard(r.Context(), claims.OrgID, uuid, lock)- if err != nil {+ apiErr = dashboards.LockUnlockDashboard(r.Context(), claims.OrgID, uuid, lock)+ if apiErr != nil {render.Error(w, errors.Wrapf(err, errors.TypeInternal, errors.CodeInternal, "failed to lock/unlock dashboard"))return}diff --git a/pkg/query-service/app/dashboards/model.go b/pkg/query-service/app/dashboards/model.goindex c7429e07f8..da2ce37785 100644--- a/pkg/query-service/app/dashboards/model.go+++ b/pkg/query-service/app/dashboards/model.go@@ -105,7 +105,6 @@ func DeleteDashboard(ctx context.Context, orgID, uuid string) *model.ApiError {}func GetDashboard(ctx context.Context, orgID, uuid string) (*types.Dashboard, *model.ApiError) {-dashboard := types.Dashboard{}err := store.BunDB().NewSelect().Model(&dashboard).Where("org_id = ?", orgID).Where("uuid = ?", uuid).Scan(ctx)if err != nil {