From 2f55911fa3163818308bc4f5cb7002a918da0619 Mon Sep 17 00:00:00 2001 From: Joey <90795735+joey-grafana@users.noreply.github.com> Date: Fri, 10 Mar 2023 13:04:51 +0000 Subject: [PATCH] Fix: Top table rendering and update docs (#64497) Fix flame graph in test data and update docs --- docs/sources/datasources/testdata/_index.md | 2 ++ .../components/TopTable/FlameGraphTopTableContainer.tsx | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/sources/datasources/testdata/_index.md b/docs/sources/datasources/testdata/_index.md index d81f41d6f85..de1e9953e0d 100644 --- a/docs/sources/datasources/testdata/_index.md +++ b/docs/sources/datasources/testdata/_index.md @@ -60,6 +60,7 @@ You can assign an **Alias** to each scenario, and many have their own options th - **CSV Metric Values** - **Datapoints Outside Range** - **Exponential heatmap bucket data** +- **Flame Graph** - **Grafana API** - **Grafana Live** - **Linear heatmap bucket data** @@ -77,6 +78,7 @@ You can assign an **Alias** to each scenario, and many have their own options th - **Slow Query** - **Streaming Client** - **Table Static** +- **Trace** - **USA generated data** ## Import a pre-configured dashboard diff --git a/public/app/plugins/panel/flamegraph/components/TopTable/FlameGraphTopTableContainer.tsx b/public/app/plugins/panel/flamegraph/components/TopTable/FlameGraphTopTableContainer.tsx index 4b75ba35a2a..b3ac0f1cbf8 100644 --- a/public/app/plugins/panel/flamegraph/components/TopTable/FlameGraphTopTableContainer.tsx +++ b/public/app/plugins/panel/flamegraph/components/TopTable/FlameGraphTopTableContainer.tsx @@ -45,7 +45,7 @@ const FlameGraphTopTableContainer = ({ let label, self, value; let table: { [key: string]: TableData } = {}; - if (data.fields.length === 6) { + if (data.fields.length > 3) { const valueValues = data.fields[1].values; const selfValues = data.fields[2].values; const labelValues = data.fields[3].values;