Move TimeRange types to lib/timeRange to break import cycle
CollapsibleSection.tsx and LogTimeline.tsx imported from each other (TimeRange/TimeRangePresetId one way, sectionHeaderClassName the other). Move the range types/helpers into a dependency-free webapp/src/lib/timeRange.ts and repoint all importers there. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TeyhRfMYjMditek6geDRoQ
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
a47f771087
commit
4cc9205abf
@@ -14,7 +14,7 @@ import {
|
||||
YAxis,
|
||||
} from 'recharts'
|
||||
import type { ChartType, PromqlSeries } from '../lib/api'
|
||||
import type { TimeRange } from './LogTimeline'
|
||||
import type { TimeRange } from '../lib/timeRange'
|
||||
|
||||
/// Renders a label combination as a series key/legend string, e.g. `{"path":"/a"}` -> `path=/a`; no labels renders as `value`.
|
||||
export function seriesLabel(labels: Record<string, string>): string {
|
||||
|
||||
Reference in New Issue
Block a user