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.

659 B
Raw Blame
import type { PageStoryArgs } from '@/storybook/runtime/resolveStory';

import type { panelsMocks } from '../Panels.stories.mocks';

/** The dashboard document loads before the panel queries, then the chart sizes itself. */
export const PANEL_LOAD = { timeout: 15000 };

export type PanelPlayArgs = PageStoryArgs<typeof panelsMocks>;

/** Whether a queried panel was answered with something to draw. */
export const hasData = (args: PanelPlayArgs): boolean => {
	if (args.dataState !== 'loaded' || args.result === 'empty') {
		return false;
	}
	if (args.kind === 'List') {
		return args.listRows > 0;
	}

	return args.kind === 'Number' || args.series > 0;
};