Skip to content

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.

chore(dashboard-story): answer variable endpoints outside the Data state control (#13000)

Vinicius Lourenço434b28254967
diff --git a/frontend/src/pages/DashboardPage/stories/DashboardPage.stories.mocks.tsx b/frontend/src/pages/DashboardPage/stories/DashboardPage.stories.mocks.tsx
index cc10d046ba..0699e16d4b 100644
--- a/frontend/src/pages/DashboardPage/stories/DashboardPage.stories.mocks.tsx
+++ b/frontend/src/pages/DashboardPage/stories/DashboardPage.stories.mocks.tsx
@@ -225,17 +225,21 @@ export const dashboardMocks = defineStoryMocks({
}),
),
- rest.post(
- 'http://localhost/api/v2/variables/query',
- response.json(() => ({
- status: 'success',
- data: { variableValues: serviceVariableValues(values.variableValues) },
- })),
+ // The variable bar resolves before the panels and stays laid out while
+ // they load or fail, so its two endpoints answer on their own rather
+ // than through the Data control.
+ rest.post('http://localhost/api/v2/variables/query', (_req, res, ctx) =>
+ res(
+ ctx.status(200),
+ ctx.json({
+ status: 'success',
+ data: { variableValues: serviceVariableValues(values.variableValues) },
+ }),
+ ),
),
- rest.get(
- 'http://localhost/api/v1/fields/values',
- response.json(() => fieldValuesResponse(NAMESPACE_VALUES)),
+ rest.get('http://localhost/api/v1/fields/values', (_req, res, ctx) =>
+ res(ctx.status(200), ctx.json(fieldValuesResponse(NAMESPACE_VALUES))),
),
// The header reads the public link on every load, so it answers even while