docs: add custom panels for dashboards (#7627) - #8169
Conversation
Add a page for the new custom panel type (HTML, CSS, and Liquid template with an optional ES|QL query), link it from the panel types table and the Agent Builder dashboard pages, and register it in the TOC. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…7627) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Elastic Docs AI PR menuCheck the box to run an AI review for this pull request.
Powered by GitHub Agentic Workflows and docs-actions. For more information, reach out to the docs team. |
🔍 Preview links for changed docs |
Elastic Docs Style Checker (Vale)Summary: 1 warning found
|
| File | Line | Rule | Message |
|---|---|---|---|
| explore-analyze/visualize/custom-panels.md | 37 | Elastic.Spelling | 'Gantt' is a possible misspelling. |
The Vale linter checks documentation changes against the Elastic Docs style guide. To use Vale locally or report issues, refer to Elastic style guide for Vale.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…7627) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…#7627) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…te (#7627) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…rsions (#7627) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Create custom panel flyout, a chat-created Sankey panel, and the top of a themed dashboard built from custom panels. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…op (#7627) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Five examples with query, template, and screenshot: Sankey diagram and banner generated with chat, multi-metric card with CSS tabs, narrative summary, and the status board moved from the main page. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
docs-builder's callout regex times out on a single multi-thousand-character line inside a code block. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…s page (#7627) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…dJS syntax (#7627) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… points (#7627) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ion (#7627) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
stratoula
left a comment
There was a problem hiding this comment.
I think it is very well written and I really like the examples! My comments are just fyi for the future of this feature. @teresaalvarezsoler will def have some input too
| - For text without data, use a [Markdown text panel](text-panels.md). | ||
| - For any other layout that HTML and CSS can express, use a custom panel. For example: | ||
| - Chart types that aren't available in Visualizations and are complex to build as Vega visualizations, such as flowcharts, Sankey diagrams, or Gantt charts. | ||
| - Tables with conditional formatting, where a cell or row changes color when a value crosses a threshold. |
There was a problem hiding this comment.
You can do the conditional rendering of cells with Lens (but not as powerful as this)
| {{kib}} injects the following CSS custom properties into every custom panel. Use them instead of hard-coded colors so the panel follows the light or dark theme without reloading its data. | ||
|
|
||
| | Property | Use for | | ||
| | --- | --- | | ||
| | `--cc-color-text` | Text | | ||
| | `--cc-color-background` | Panel background | | ||
| | `--cc-color-surface` | Card and container backgrounds | | ||
| | `--cc-color-primary` | Primary accent | | ||
| | `--cc-color-accent` | Secondary accent | | ||
| | `--cc-color-accent-2` | Additional accent | | ||
| | `--cc-color-warning` | Warning states | | ||
| | `--cc-color-danger` | Error and danger states | | ||
| | `--cc-color-border` | Borders | | ||
|
|
There was a problem hiding this comment.
Just fyi, if we move on with this PR elastic/kibana#287778 the list will grow here
| Custom panels render in a sandbox that protects the dashboard and your browser: | ||
|
|
||
| - JavaScript doesn't run. `<script>` tags and inline event handlers have no effect. For interactivity, use CSS only: `:hover` rules for tooltips, or hidden radio inputs with `:checked` rules for tabs. | ||
| - Links are removed from the rendered content. |
There was a problem hiding this comment.
This will change in the future, I just want to see how to make it more secure (just fyi)
There was a problem hiding this comment.
@florent-leborgne let's not include this image, it doesn't look great. I like more the dashboard you created for the main image (with the dark blue colors). Thanks.
|
|
||
| 1. Open your dashboard in **Edit** mode. | ||
| 2. Select **Add** in the application menu and, if required, **New panel**. | ||
| 3. Select **Custom**. |
There was a problem hiding this comment.
Can you add a screenshot here with the Add menu flyout open highlighting where "Custom panels" are found?
| - Enter it in **Template (HTML)**. For the syntax, refer to [Write a template](#custom-panels-write-a-template). | ||
| - Select **Generate with chat** and describe the panel. The flyout closes, the empty panel stays on the dashboard, and a new conversation opens with the panel attached. When the answer completes, the panel shows the generated template and, when the panel needs live data, its query. The remaining steps apply when you enter the template yourself. To adjust a generated panel, refer to [Refine a custom panel with chat](#custom-panels-refine-with-chat). | ||
|
|
||
| 5. Optional: to show live data, expand **Data source (ES|QL)** and enter a query. Select **Preview data** to check the returned columns. The preview shows the first rows of the result. |
There was a problem hiding this comment.
This structure seems that users need to write the query manually but the Agent also generates the ES|QL query when creating the panel...
There was a problem hiding this comment.
I like more the other Sankey from your Sample Logs Opds Center dashboard :)
Summary
This PR addresses #7627 with the following changes:
explore-analyze/visualize/custom-panels.md(new,type: how-to): documents the custom panel type. Covers when to use it, how the template and optional ES|QL query work, creation from the dashboard or from an Agent Builder conversation (one Create a custom panel section with two starting points), editing in the flyout, chat refinement with version cards, Liquid template syntax with a short sample, the theme CSS properties, dashboard interactions, the time filter connection with?_tstartand?_tend, and limitations.explore-analyze/visualize/custom-panel-examples.md(new, child page): five complete examples, each with a screenshot followed by Prompt (when generated with chat), Query, and Template dropdowns. Sankey diagram and logo banner generated with Agent Builder chat, plus a hand-written multi-metric card with CSS-only tabs, a narrative summary, and a status board.explore-analyze/images/custom-panels-*.png(8 new): a dashboard built from custom panels (intro), the Create custom panel flyout, a chat-created Sankey next to its conversation, and one screenshot per example. All captured on amainbuild on 2 September 2026 with the templates as published.explore-analyze/visualize.md: adds a Custom panels row to the panel types table, taggedstack: preview 9.6+andserverless: preview.explore-analyze/ai-features/agent-builder/agent-builder-dashboards-and-visualizations.md: adds a Custom panels row to Supported panel types with a reciprocal link to the new page.explore-analyze/dashboards/create-dashboards-using-ai.md: adds a tagged paragraph stating that agents can also create custom panels.explore-analyze/toc.yml: registers the new page after the Vega page, with the examples page as its child.All UI labels were verified against Kibana
origin/mainon 2 September 2026 (i18ndefaultMessagestrings inx-pack/platform/plugins/shared/custom_content). Behavior claims trace to the plugin README,fetch_esql_data.ts,fill_template.ts,prepare_html.ts,edit_custom_content_flyout.tsx,handle_panel_preview.ts, and theagent_builder_dashboardsgeneration guidance. The export-portability claim for inline SVG relies on the existing image panels page and thefilesaved object being non-exportable.A live test pass on a
mainbuild (2 September 2026) covered the Add menu path, the edit flyout, chat creation and refinement including version cards, dashboard interactions, the limitations list, and every example on the examples page. Findings that changed the text: the edit action is a hover action rather than a panel menu entry, the time filter hint depends on?_tstart/?_tendfirst and@timestampsecond, an invalid query or template shows Failed to render panel, a missing template column renders empty or0, the newest version card's Preview is a no-op by design, and CSS-only tabs with hidden radio inputs work inside a panel.Hold until product confirms
Documented as if fully live, per the docs owner's decision. Not true on
mainyet:dashboard.customContent.enabled(defaultfalse) since [Custom content] Temporarily hide from the UI kibana#287768. The "Start from the dashboard" procedure and the Add row descriptions assume it is visible again. Do not merge before the Presentation team re-enables it or confirms the final entry point.Reviewer-check items
--cc-color-*properties injected at HEAD. Draft [Custom content] Applies basic eui styling, improves guidelines kibana#287778 adds more (spacing, font, radius). Extend the table if that PR merges before release.7.718,718). A retake is planned.Resolves
Closes #7627
Generative AI disclosure
Tool(s) and model(s) used: Claude Code, Claude Fable 5.1. Two example templates were generated by Elastic Agent Builder (Claude Opus 4.8) during testing.