From f59ce8baed9611e29e256c76523a497b0806a2cd Mon Sep 17 00:00:00 2001 From: "grafana-delivery-bot[bot]" <132647405+grafana-delivery-bot[bot]@users.noreply.github.com> Date: Thu, 28 Sep 2023 11:46:02 -0400 Subject: [PATCH] [v10.1.x] Docs: state data source queried upon time range change (#75667) Docs: state data source queried upon time range change (#75639) * docs changes on time range option * Removed unneeded sentence, typo fix, and added emphasis * Fixed prettier linting errors * Removed emphasis --------- Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com> Co-authored-by: Isabel Matwawana (cherry picked from commit 8a46f9fd0291d09702f4b954c209eb07a60369af) Co-authored-by: Krishna Dhakal <7krishna7dhakal7@gmail.com> --- .../dashboards/variables/add-template-variables/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/sources/dashboards/variables/add-template-variables/index.md b/docs/sources/dashboards/variables/add-template-variables/index.md index f87e13e3378..dd3482a7bc7 100644 --- a/docs/sources/dashboards/variables/add-template-variables/index.md +++ b/docs/sources/dashboards/variables/add-template-variables/index.md @@ -66,7 +66,7 @@ The following table lists the types of variables shipped with Grafana. You must enter general options for any type of variable that you create. 1. Navigate to the dashboard you want to make a variable for and click the **Dashboard settings** (gear) icon at the top of the page. -1. On the **Variables** tab, click **New**. +1. On the **Variables** tab, click **New variable**. 1. Enter a **Name** for the variable. 1. In the **Type** list, select **Query**. 1. (Optional) In **Label**, enter the display name of the variable dropdown. @@ -94,7 +94,7 @@ Query expressions are different for each data source. For more information, refe 1. In the **Data source** list, select the target data source for the query. For more information about data sources, refer to [Add a data source]({{< relref "../../../administration/data-source-management#add-a-data-source" >}}). 1. In the **Refresh** list, select when the variable should update options. - **On Dashboard Load:** Queries the data source every time the dashboard loads. This slows down dashboard loading, because the variable query needs to be completed before dashboard can be initialized. - - **On Time Range Change:** Queries the data source when the dashboard time range changes. Only use this option if your variable options query contains a time range filter or is dependent on the dashboard time range. + - **On Time Range Change:** Queries the data source every time the dashboard loads and when the dashboard time range changes. Use this option if your variable options query contains a time range filter or is dependent on the dashboard time range. 1. In the **Query** field, enter a query. - The query field varies according to your data source. Some data sources have custom query editors. - Make sure that the query returns values named `__text` and `__value` as appropriate in your query syntax. For example, in SQL, you can use a query such as `SELECT hostname AS __text, id AS __value FROM MyTable`. Queries for other languages will vary depending on syntax.