Splunk

viz> harness

$ local dev mode

Live No-Data ·
Status
Theme
Mode
>_

man harness

Getting Started

  1. Select a visualization from the dropdown
  2. Adjust data fields using sliders, dropdowns, and text inputs
  3. Tweak formatter settings — the canvas re-renders in real-time
  4. Click Test No Data to verify the no-data message
  5. Resize the panel to test responsive behaviour

Theme

Use the sun/moon icon to toggle between light and dark mode. This changes both the harness UI and the theme reported to the visualization via getCurrentTheme(), so your viz renders in the correct mode.

When the harness is in light mode, a contrast icon appears next to the theme toggle. It drops a dark backdrop behind the viz stage only — useful for previewing a dark-themed viz without switching the whole harness (and therefore the viz's reported theme) over. The viz still receives light from getCurrentTheme(); only the stage backdrop changes.

Panel Size

Set exact dimensions with the width × height inputs, or click Fit to fill the available space. The visualization receives a reflow() call on resize.

Data Fields

These controls inject values into the Splunk-format data passed to the viz. Slider values update in real-time. Fields starting with _ are control fields (e.g., row count) that affect data generation but aren't data columns.

Formatter Settings

These mirror the viz's formatter.html settings. They map to config[ns + 'settingName'] in the viz JS. Defaults must match the JS fallback values.

Adding a New Viz

  1. Create a harness.json alongside your viz's formatter.html
  2. Add the viz name to harness-manifest.json

No changes to this HTML file needed.

Limitations

  • Data is static or slider-driven, not from live SPL
  • this.drilldown() is a no-op in the mock
  • Source loads via eval() — check the console for errors

$ cat TEST-HARNESS.md — full documentation including harness.json schema, data modes, and troubleshooting.

select viz