Skip to content

feat(explore): add the ad-hoc explore page #47

Description

@xe-nvdk

Context

The other half of the Grafana split: dashboards are for questions you already know you will ask again, Explore is for the one you are asking right now. Write SQL, see it charted immediately, no dashboard required.

Depends on the query runner, frame normalizer, and the panel types. Part of #19.

Scope

  • src/routes/(app)/explore/+page.svelte
  • Instance picker, time range picker, and the SQL editor from the console
  • Results render through the same panel renderers as dashboards — a visualization-type switcher above the result
  • Automatic type suggestion: a time column plus numerics defaults to time series, otherwise table
  • Query history (src/lib/queryHistory.ts already exists) in a side drawer
  • "Add to dashboard" — picks an existing dashboard or creates a new one, and carries the query and viz type over
  • Split view: two queries side by side for comparison
  • URL-encoded state so an explore session is shareable

Where to look

  • src/lib/components/SQLConsole.svelte, QueryEditor.svelte, ResultsPanel.svelte, SchemaExplorer.svelte
  • src/lib/queryHistory.ts

Notes

This should feel like the SQL console with charts attached, not a separate product. Reuse the console's components wherever they fit.

Acceptance criteria

  • Any query renders in any compatible visualization type
  • "Add to dashboard" produces a working panel with the query and viz intact
  • Explore state round-trips through the URL
  • Query history is searchable and re-runnable

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    dashboardsDashboarding and visualizationenhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions