From 9f4459bab9dcb7e86b74b25a4610491dd060c236 Mon Sep 17 00:00:00 2001 From: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com> Date: Thu, 29 Sep 2022 13:22:32 -0700 Subject: [PATCH] Docs/refactors configure panels (#53485) (#55954) * updates prose * updates prose and relrefs * incorporates feedback * moves repeating rows to add and organize panels; fixes relrefs Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com> --- .../add-organize-panels/index.md | 30 ++++++++++++++++--- .../panels/add-panels-dynamically/_index.md | 18 ----------- .../about-repeating-panels-rows.md | 18 ----------- .../configure-repeating-panels.md | 30 ------------------- .../configure-repeating-rows.md | 28 ----------------- .../add-title-and-description.md | 29 ------------------ .../working-with-panels/view-json-model.md | 21 ------------- 7 files changed, 26 insertions(+), 148 deletions(-) delete mode 100644 docs/sources/panels/add-panels-dynamically/_index.md delete mode 100644 docs/sources/panels/add-panels-dynamically/about-repeating-panels-rows.md delete mode 100644 docs/sources/panels/add-panels-dynamically/configure-repeating-panels.md delete mode 100644 docs/sources/panels/add-panels-dynamically/configure-repeating-rows.md delete mode 100644 docs/sources/panels/working-with-panels/add-title-and-description.md delete mode 100644 docs/sources/panels/working-with-panels/view-json-model.md diff --git a/docs/sources/dashboards/build-dashboards/add-organize-panels/index.md b/docs/sources/dashboards/build-dashboards/add-organize-panels/index.md index 1a3fd37cd3a..7ab2674df4f 100644 --- a/docs/sources/dashboards/build-dashboards/add-organize-panels/index.md +++ b/docs/sources/dashboards/build-dashboards/add-organize-panels/index.md @@ -27,10 +27,10 @@ This section describes the areas of the Grafana panel editor. 1. Panel header: The header section lists the dashboard in which the panel appears and the following controls: - - **Dashboard settings (gear) icon -** Click to access the dashboard settings. - - **Discard -** Discards changes you have made to the panel since you last saved the dashboard. - - **Save -** Saves changes you made to the panel. - - **Apply -** Applies changes you made and closes the panel editor, returning you to the dashboard. You will have to save the dashboard to persist the applied changes. + - **Dashboard settings (gear) icon:** Click to access the dashboard settings. + - **Discard:** Discards changes you have made to the panel since you last saved the dashboard. + - **Save:** Saves changes you made to the panel. + - **Apply:** Applies changes you made and closes the panel editor, returning you to the dashboard. You will have to save the dashboard to persist the applied changes. 1. Visualization preview: The visualization preview section contains the following options: @@ -112,3 +112,25 @@ Dashboards and panels allow you to show your data in visual form. Each panel nee 1. Add a note to describe the visualization (or describe your changes) and then click **Save** in the upper-right corner of the page. Notes can be helpful if you need to revert the dashboard to a previous version. + +## Configure repeating rows + +You can configure Grafana to dynamically add panels or rows to a dashboard based on the value of a variable. Variables dynamically change your queries across all rows in a dashboard. For more information about repeating panels, refer to [Configure repeating panels](../../panels/configure-panel-options/#configure-repeating-panels). + +To see an example of repeating rows, refer to [Dashboard with repeating rows](https://play.grafana.org/d/000000153/repeat-rows). The example shows that you can also repeat rows if you have variables set with `Multi-value` or `Include all values` selected. + +**Before you begin:** + +- Ensure that the query includes a multi-value variable. + +**To configure repeating rows:** + +1. On the dashboard home page, click **Add panel**. + +1. On the **Add a panel** dialog box, click **Add a new row**. + +1. Hover over the row title and click the cog icon. + +1. On the **Row Options** dialog box, add a title and select the variable for which you want to add repeating rows. + +> **Note:** To provide context to dashboard users, add the variable to the row title. diff --git a/docs/sources/panels/add-panels-dynamically/_index.md b/docs/sources/panels/add-panels-dynamically/_index.md deleted file mode 100644 index d7c20e7ce19..00000000000 --- a/docs/sources/panels/add-panels-dynamically/_index.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -aliases: - - /docs/grafana/latest/panels/add-panels-dynamically/ - - /docs/grafana/latest/panels/repeat-panels-or-rows/ - - /docs/sources/panels/add-panels-dynamically/ -keywords: - - dynamic - - variable - - panel -title: Enable template variables to add panels dynamically -weight: 800 ---- - -# Enable template variables to add panels dynamically - -Harness the power of Grafana by configuring the system to automatically and dynamically add panels based on criteria that you define. - -{{< section >}} diff --git a/docs/sources/panels/add-panels-dynamically/about-repeating-panels-rows.md b/docs/sources/panels/add-panels-dynamically/about-repeating-panels-rows.md deleted file mode 100644 index c2f8ff94ca4..00000000000 --- a/docs/sources/panels/add-panels-dynamically/about-repeating-panels-rows.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -aliases: - - /docs/grafana/latest/panels/add-panels-dynamically/about-repeating-panels-rows/ - - /docs/sources/panels/add-panels-dynamically/about-repeating-panels-rows/ -title: About repeating panels or rows -weight: 10 ---- - -# About repeating panels and rows - -You can configure Grafana to dynamically add panels or rows to a dashboard. A dynamic panel (or row) is a panel that the system creates based on the value of a variable. Variables dynamically change your queries across all panels in a dashboard. - -## Grafana Play examples - -You can see examples in the following dashboards: - -- [Prometheus repeat](https://play.grafana.org/d/000000036/prometheus-repeat) -- [Repeated Rows Dashboard](https://play.grafana.org/d/000000153/repeat-rows). diff --git a/docs/sources/panels/add-panels-dynamically/configure-repeating-panels.md b/docs/sources/panels/add-panels-dynamically/configure-repeating-panels.md deleted file mode 100644 index bf326fe56cc..00000000000 --- a/docs/sources/panels/add-panels-dynamically/configure-repeating-panels.md +++ /dev/null @@ -1,30 +0,0 @@ ---- -aliases: - - /docs/grafana/latest/panels/add-panels-dynamically/configure-repeating-panels/ - - /docs/sources/panels/add-panels-dynamically/configure-repeating-panels/ -title: Configure repeating panels -weight: 20 ---- - -# Configure repeating panels - -For queries that return multiple values for a variable, you can configure Grafana to dynamically add panels based on those values. - -> **Note:** Repeating panels require variables to have one or more items selected; you cannot repeat a panel zero times to hide it. - -## Before you begin - -- Ensure that the query includes a multi-value variable. - -**To configure repeating panels**: - -1. Edit the panel you want to repeat. - -1. On the display options pane, expand **Panel options > Repeat options**. - -1. Select a `direction`. - - - Choose `horizontal` to arrange panels side-by-side. Grafana adjusts the width of a repeated panel. Currently, you cannot mix other panels on a row with a repeated panel. - - Choose `vertical` to arrange panels in a column. The width of repeated panels is the same as the original, repeated panel. - -1. To propagate changes to all panels, reload the dashboard. diff --git a/docs/sources/panels/add-panels-dynamically/configure-repeating-rows.md b/docs/sources/panels/add-panels-dynamically/configure-repeating-rows.md deleted file mode 100644 index 0032abb5942..00000000000 --- a/docs/sources/panels/add-panels-dynamically/configure-repeating-rows.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -aliases: - - /docs/grafana/latest/panels/add-panels-dynamically/configure-repeating-rows/ - - /docs/sources/panels/add-panels-dynamically/configure-repeating-rows/ -title: Configure repeating rows -weight: 30 ---- - -# Configure repeating rows - -As seen above with the panels you can also repeat rows if you have variables set with `Multi-value` or -`Include all value` selection option. - -## Before you begin - -- Ensure that the query includes a multi-value variable. - -**To configure repeating rows**: - -1. On the dashboard home page, click **Add panel**. - -1. On the **Add a panel** dialog box, click **Add a new row**. - -1. Hover over the row title and click the cog icon. - -1. On the `Row Options` configuration panel, select the variable for which you want to add repeating rows. - -> To help provide context to dashboard users, add the variable to the row title. diff --git a/docs/sources/panels/working-with-panels/add-title-and-description.md b/docs/sources/panels/working-with-panels/add-title-and-description.md deleted file mode 100644 index e08e2010362..00000000000 --- a/docs/sources/panels/working-with-panels/add-title-and-description.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -aliases: - - /docs/grafana/latest/panels/working-with-panels/add-title-and-description/ - - /docs/sources/panels/working-with-panels/add-title-and-description/ -title: Add a title and description to a panel -weight: 30 ---- - -# Add a title and description to a panel - -Add a title and description to a panel to share with users any important information about the visualization. For example, use the description to document the purpose of the visualization. - -1. Open a panel. - -1. In the panel display options pane, locate the **Panel options** section. - -1. Enter a **Title**. - - Text entered in this field is displayed at the top of your panel in the panel editor and in the dashboard. - - You can use [variables you have defined]({{< relref "../../variables/" >}}) in either field, but not [global variables]({{< relref "../../variables/variable-types/global-variables/" >}}). - -1. Write a description of the panel and the data you are displaying. - - Text entered in this field is displayed in a tooltip in the upper left corner of the panel. - - You can use [variables you have defined]({{< relref "../../variables/" >}}) in either field, but not [global variables]({{< relref "../../variables/variable-types/global-variables/" >}}). - - ![](/static/img/docs/panels/panel-options-8-0.png) diff --git a/docs/sources/panels/working-with-panels/view-json-model.md b/docs/sources/panels/working-with-panels/view-json-model.md deleted file mode 100644 index 9220c684720..00000000000 --- a/docs/sources/panels/working-with-panels/view-json-model.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -aliases: - - /docs/grafana/latest/panels/working-with-panels/view-json-model/ - - /docs/sources/panels/working-with-panels/view-json-model/ -title: View a panel JSON model -weight: 100 ---- - -# View a panel JSON model - -Explore and export panel, panel data, and data frame JSON models. - -1. Open the panel inspector and then click the **JSON** tab or in the panel menu click **Inspect > Panel JSON**. - -1. In Select source, choose one of the following options: - - - **Panel JSON -** Displays a JSON object representing the panel. - - **Panel data -** Displays a JSON object representing the data that was passed to the panel. - - **DataFrame structure -** Displays the raw result set with transformations, field configuration, and overrides configuration applied. - -1. You can expand or collapse portions of the JSON to explore it, or you can click **Copy to clipboard** and paste the JSON in another application.