From 3cf47b24d356a51c8518bf525c78c60ee0a6797e Mon Sep 17 00:00:00 2001 From: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com> Date: Wed, 20 Jan 2021 09:37:27 -0500 Subject: [PATCH] Added doc content for variables inspector code change by Hugo (#30408) * Created the Inspect variables topic. * Check in changes. * Added relrefs. * Added Hugh's suggestion. --- docs/sources/variables/inspect-variable.md | 22 ++++++++++++++++++++++ docs/sources/variables/manage-variable.md | 22 ++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 docs/sources/variables/inspect-variable.md create mode 100644 docs/sources/variables/manage-variable.md diff --git a/docs/sources/variables/inspect-variable.md b/docs/sources/variables/inspect-variable.md new file mode 100644 index 00000000000..ab421d7b33b --- /dev/null +++ b/docs/sources/variables/inspect-variable.md @@ -0,0 +1,22 @@ ++++ +title = "Inspect variables" +keywords = ["grafana", "templating", "documentation", "guide", "template", "variable"] +aliases = ["/docs/grafana/latest/reference/templating"] +weight = 125 ++++ + +# Inspect variables and their dependencies + +The variables page lets you easily identify whether a variable is being referenced (or used) in other variables or dashboard. In addition, you can also [add]({{< relref "variable-types/_index.md" >}}) variables and [manage]({{< relref "manage-variable.md" >}}) existing variables from this page. + +> **Note:** This feature is available in Grafana 7.4 and later versions. + +![Variables list](/img/docs/variables-templates/variables-list-7-4.png) + +Any variable that is referenced or used has a green check mark next to it, while unreferenced variables have a orange caution icon next to them. + +![Variables list](/img/docs/variables-templates/variable-not-referenced-7-4.png) + +In addition, all referenced variables have a dependency icon next to the green check mark. You can click on the icon to view the dependency map. The dependency map can be moved. You can zoom in out with mouse wheel or track pad equivalent. + +![Variables list](/img/docs/variables-templates/dependancy-map-7-4.png) diff --git a/docs/sources/variables/manage-variable.md b/docs/sources/variables/manage-variable.md new file mode 100644 index 00000000000..b25c3a0a0b6 --- /dev/null +++ b/docs/sources/variables/manage-variable.md @@ -0,0 +1,22 @@ ++++ +title = "Manage variables" +keywords = ["grafana", "templating", "documentation", "guide", "template", "variable"] +aliases = ["/docs/grafana/latest/reference/templating"] +weight = 120 ++++ + +# Manage variables + +The variables page lets you [add]({{< relref "variable-types/_index.md" >}}) variables and manage existing variables. It also allows you to [inspect]({{< relref "inspect-variable.md" >}}) variables and identify whether a variable is being referenced (or used) in other variables or dashboard. + +## Move + +You can move a variable up or down the list using the up and down arrows respectively. + +## Clone + +To clone a variable, click the clone icon from the set of icons on the right. This creates a copy of the variable with the name of the original variable prefixed with `copy_of_`. + +## Delete + +To delete a variable, click the trash icon from the set of icons on the right.