From 94175a801a27023d57af2faf496399feda378eda Mon Sep 17 00:00:00 2001 From: Christopher Moyer <35463610+chri2547@users.noreply.github.com> Date: Mon, 11 Jul 2022 07:35:19 -0500 Subject: [PATCH] refactors all dashboard and linking content (#52005) --- .../best-practices-for-managing-dashboards.md | 4 +- .../dashboard-management-maturity-levels.md | 2 +- .../manage-dashboard-links/index.md} | 88 ++++++++++++-- docs/sources/linking/_index.md | 31 ----- docs/sources/linking/data-link-variables.md | 62 ---------- docs/sources/linking/data-links.md | 54 --------- docs/sources/linking/linking-overview.md | 39 ------ docs/sources/linking/panel-links.md | 52 -------- .../panels/configure-data-links/index.md | 114 ++++++++++++++++++ .../panels/standard-field-definitions.md | 2 +- .../working-with-panels/add-link-to-panel.md | 13 -- docs/sources/whatsnew/whats-new-in-v8-0.md | 2 +- docs/sources/whatsnew/whats-new-in-v8-1.md | 2 +- 13 files changed, 199 insertions(+), 266 deletions(-) rename docs/sources/{linking/dashboard-links.md => dashboards/manage-dashboard-links/index.md} (52%) delete mode 100644 docs/sources/linking/_index.md delete mode 100644 docs/sources/linking/data-link-variables.md delete mode 100644 docs/sources/linking/data-links.md delete mode 100644 docs/sources/linking/linking-overview.md delete mode 100644 docs/sources/linking/panel-links.md create mode 100644 docs/sources/panels/configure-data-links/index.md delete mode 100644 docs/sources/panels/working-with-panels/add-link-to-panel.md diff --git a/docs/sources/best-practices/best-practices-for-managing-dashboards.md b/docs/sources/best-practices/best-practices-for-managing-dashboards.md index cc7c3e29881..bf9ffe8a48b 100644 --- a/docs/sources/best-practices/best-practices-for-managing-dashboards.md +++ b/docs/sources/best-practices/best-practices-for-managing-dashboards.md @@ -31,9 +31,9 @@ What is your dashboard maturity level? Analyze your current dashboard setup and - If you create a temporary dashboard, perhaps to test something, prefix the name with `TEST: `. Delete the dashboard when you are finished. - Copying dashboards with no significant changes is not a good idea. - You miss out on updates to the original dashboard, such as documentation changes, bug fixes, or additions to metrics. - - In many cases copies are being made to simply customize the view by setting template parameters. This should instead be done by maintaining a link to the master dashboard and customizing the view with [URL parameters]({{< relref "../linking/data-link-variables/" >}}). + - In many cases copies are being made to simply customize the view by setting template parameters. This should instead be done by maintaining a link to the master dashboard and customizing the view with [URL parameters]({{< relref "../panels/configure-data-links/#data-link-variables" >}}). - When you must copy a dashboard, clearly rename it and _do not_ copy the dashboard tags. Tags are important metadata for dashboards that are used during search. Copying tags can result in false matches. - Maintain a dashboard of dashboards or cross-reference dashboards. This can be done in several ways: - - Create dashboard links, panel, or data links. Links can go to other dashboards or to external systems. For more information, refer to [Linking]({{< relref "../linking/" >}}). + - Create dashboard links, panel, or data links. Links can go to other dashboards or to external systems. For more information, refer to [Manage dashboard links]({{< relref "../dashboards/manage-dashboard-links/" >}}). - Add a [Dashboard list panel]({{< relref "../visualizations/dashboard-list-panel/" >}}). You can then customize what you see by doing tag or folder searches. - Add a [Text panel]({{< relref "../visualizations/text-panel/" >}}) and use markdown to customize the display. diff --git a/docs/sources/best-practices/dashboard-management-maturity-levels.md b/docs/sources/best-practices/dashboard-management-maturity-levels.md index 4f9c59b4288..ec7d735a1f8 100644 --- a/docs/sources/best-practices/dashboard-management-maturity-levels.md +++ b/docs/sources/best-practices/dashboard-management-maturity-levels.md @@ -53,7 +53,7 @@ How can you tell you are here? - Directed browsing cuts down on "guessing." - Template variables make it harder to “just browse” randomly or aimlessly. - Most dashboards should be linked to by alerts. - - Browsing is directed with links. For more information, refer to [Linking]({{< relref "../linking/" >}}). + - Browsing is directed with links. For more information, refer to [Manage dashboard links]({{< relref "../dashboards/manage-dashboard-links/" >}}). - Version-controlled dashboard JSON. ## High - optimized use diff --git a/docs/sources/linking/dashboard-links.md b/docs/sources/dashboards/manage-dashboard-links/index.md similarity index 52% rename from docs/sources/linking/dashboard-links.md rename to docs/sources/dashboards/manage-dashboard-links/index.md index 6024b854d11..e641d9179c6 100644 --- a/docs/sources/linking/dashboard-links.md +++ b/docs/sources/dashboards/manage-dashboard-links/index.md @@ -1,20 +1,53 @@ --- aliases: + - /docs/grafana/latest/linking/ + - /docs/grafana/latest/features/navigation-links/ + - /docs/grafana/latest/linking/linking-overview/ - /docs/grafana/latest/linking/dashboard-links/ -description: '' + - /docs/grafana/latest/dashboards/manage-dashboard-links/ + - /docs/grafana/latest/panels/working-with-panels/add-link-to-panel/ +description: How to link Grafana dashboards. keywords: + - link + - dashboard - grafana - linking - create links - link dashboards - navigate -title: Dashboard links -weight: 200 +title: Manage dashboard links +menuTitle: Manage dashboard links +weight: 400 --- -# Dashboard links +# Manage dasboard links -When you create a dashboard link, you can include the time range and current template variables to directly jump to the same context in another dashboard. This way, you don’t have to worry whether the person you send the link to is looking at the right data. For other types of links, refer to [Data link variables]({{< relref "data-link-variables/" >}}). +You can use links to navigate between commonly-used dashboards or to connect others to your visualizations. Links let you create shortcuts to other dashboards, panels, and even external websites. + +Grafana supports dashboard links, panel links, and data links. Dashboard links are displayed at the top of the dashboard. Panel links are accessible by clicking an icon on the top left corner of the panel. + +## Which link should you use? + +Start by figuring out how you're currently navigating between dashboards. If you're often jumping between a set of dashboards and struggling to find the same context in each, links can help optimize your workflow. + +The next step is to figure out which link type is right for your workflow. Even though all the link types in Grafana are used to create shortcuts to other dashboards or external websites, they work in different contexts. + +- If the link relates to most if not all of the panels in the dashboard, use [dashboard links]({{< relref "#dashboard-links" >}}). +- If you want to drill down into specific panels, use [panel links]({{< relref "#panel-links" >}}). +- If you want to link to an external site, you can use either a dashboard link or a panel link. +- If you want to drill down into a specific series, or even a single measurement, use [data links]({{< relref "../../panels/configure-data-links/#data-links" >}}). + +## Controlling time range using the URL + +You can control the time range of a panel or dashboard by providing following query parameters in dashboard URL: + +- `from` - defines lower limit of the time range, specified in ms epoch +- `to` - defines upper limit of the time range, specified in ms epoch +- `time` and `time.window` - defines a time range from `time-time.window/2` to `time+time.window/2`. Both params should be specified in ms. For example `?time=1500000000000&time.window=10000` will result in 10s time range from 1499999995000 to 1500000005000 + +## Dashboard links + +When you create a dashboard link, you can include the time range and current template variables to directly jump to the same context in another dashboard. This way, you don’t have to worry whether the person you send the link to is looking at the right data. For other types of links, refer to [Data link variables]({{< relref "../../panels/configure-data-links/#data-link-variables/" >}}). Dashboard links can also be used as shortcuts to external systems, such as submitting [a GitHub issue with the current dashboard name](https://github.com/grafana/grafana/issues/new?title=Dashboard%3A%20HTTP%20Requests). @@ -25,7 +58,7 @@ To see an example of dashboard links in action, check out: Once you've added a dashboard link, it appears in the upper right corner of your dashboard. -## Add links to dashboards +### Add links to dashboards Add links to other dashboards at the top of your current dashboard. @@ -40,7 +73,7 @@ Add links to other dashboards at the top of your current dashboard. - **Open in new tab** – Select this option if you want the dashboard link to open in a new tab or window. 1. Click **Add**. -## Add a URL link to a dashboard +### Add a URL link to a dashboard Add a link to a URL at the top of your current dashboard. You can link to any available URL, including dashboards, panels, or external sites. You can even control the time range to ensure the user is zoomed in on the right data in Grafana. @@ -60,7 +93,7 @@ Add a link to a URL at the top of your current dashboard. You can link to any av - **Open in new tab** – Select this option if you want the dashboard link to open in a new tab or window. 1. Click **Add**. -## Update a dashboard link +### Update a dashboard link To change or update an existing dashboard link, follow this procedure. @@ -71,6 +104,43 @@ To change or update an existing dashboard link, follow this procedure. To duplicate an existing dashboard link, click the duplicate icon next to the existing link that you want to duplicate. -## Delete a dashboard link +### Delete a dashboard link To delete an existing dashboard link, click the trash icon next to the duplicate icon that you want to delete. + +## Panel links + +Each panel can have its own set of links that are shown in the upper left corner of the panel. You can link to any available URL, including dashboards, panels, or external sites. You can even control the time range to ensure the user is zoomed in on the right data in Grafana. + +Click the icon on the top left corner of a panel to see available panel links. + +{{< figure src="/static/img/docs/linking/panel-links.png" width="200px" >}} + +### Add a panel link + +1. Hover your cursor over the panel that you want to add a link to and then press `e`. Or click the dropdown arrow next to the panel title and then click **Edit**. +1. On the Panel tab, scroll down to the Links section. +1. Expand Links and then click **Add link**. +1. Enter a **Title**. **Title** is a human-readable label for the link that will be displayed in the UI. +1. Enter the **URL** you want to link to. + You can even add one of the template variables defined in the dashboard. Press Ctrl+Space or Cmd+Space and click in the **URL** field to see the available variables. By adding template variables to your panel link, the link sends the user to the right context, with the relevant variables already set. You can also use time variables: + - `from` - Defines the lower limit of the time range, specified in ms epoch. + - `to` - Defines the upper limit of the time range, specified in ms epoch. + - `time` and `time.window` - Define a time range from `time-time.window/2` to `time+time.window/2`. Both params should be specified in ms. For example `?time=1500000000000&time.window=10000` will result in 10s time range from 1499999995000 to 1500000005000. +1. If you want the link to open in a new tab, then select **Open in a new tab**. +1. Click **Save** to save changes and close the window. +1. Click **Save** in the upper right to save your changes to the dashboard. + +### Update a panel link + +1. On the Panel tab, find the link that you want to make changes to. +1. Click the Edit (pencil) icon to open the Edit link window. +1. Make any necessary changes. +1. Click **Save** to save changes and close the window. +1. Click **Save** in the upper right to save your changes to the dashboard. + +### Delete a panel link + +1. On the Panel tab, find the link that you want to delete. +1. Click the **X** icon next to the link you want to delete. +1. Click **Save** in the upper right to save your changes to the dashboard. diff --git a/docs/sources/linking/_index.md b/docs/sources/linking/_index.md deleted file mode 100644 index 7dee41357b3..00000000000 --- a/docs/sources/linking/_index.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -aliases: - - /docs/grafana/latest/linking/ -title: Linking -weight: 120 ---- - -# Linking overview - -You can use links to navigate between commonly-used dashboards or to connect others to your visualizations. Links let you create shortcuts to other dashboards, panels, and even external websites. - -Grafana supports dashboard links, panel links, and data links. Dashboard links are displayed at the top of the dashboard. Panel links are accessible by clicking an icon on the top left corner of the panel. - -## Which link should you use? - -Start by figuring out how you're currently navigating between dashboards. If you're often jumping between a set of dashboards and struggling to find the same context in each, links can help optimize your workflow. - -The next step is to figure out which link type is right for your workflow. Even though all the link types in Grafana are used to create shortcuts to other dashboards or external websites, they work in different contexts. - -- If the link relates to most if not all of the panels in the dashboard, use [dashboard links]({{< relref "dashboard-links/" >}}). -- If you want to drill down into specific panels, use [panel links]({{< relref "panel-links/" >}}). -- If you want to link to an external site, you can use either a dashboard link or a panel link. -- If you want to drill down into a specific series, or even a single measurement, use [data links]({{< relref "data-links/" >}}). - -## Controlling time range using the URL - -You can control the time range of a panel or dashboard by providing following query parameters in dashboard URL: - -- `from` - defines lower limit of the time range, specified in ms epoch -- `to` - defines upper limit of the time range, specified in ms epoch -- `time` and `time.window` - defines a time range from `time-time.window/2` to `time+time.window/2`. Both params should be specified in ms. For example `?time=1500000000000&time.window=10000` will result in 10s time range from 1499999995000 to 1500000005000 diff --git a/docs/sources/linking/data-link-variables.md b/docs/sources/linking/data-link-variables.md deleted file mode 100644 index 76faf455886..00000000000 --- a/docs/sources/linking/data-link-variables.md +++ /dev/null @@ -1,62 +0,0 @@ ---- -aliases: - - /docs/grafana/latest/linking/data-link-variables/ - - /docs/grafana/latest/variables/url-variables/ - - /docs/grafana/latest/variables/variable-types/url-variables/ -keywords: - - grafana - - url variables - - documentation - - variables - - data link -title: URL variables -weight: 400 ---- - -# Data link variables - -You can use variables in data links to refer to series fields, labels, and values. For more information about data links, refer to [Data links]({{< relref "data-links/" >}}). - -To see a list of available variables, type `$` in the data link **URL** field to see a list of variables that you can use. - -> **Note:** These variables changed in 6.4 so if you have an older version of Grafana, then use the version picker to select docs for an older version of Grafana. - -You can also use template variables in your data links URLs, refer to [Templates and variables]({{< relref "../variables/" >}}) for more information on template variables. - -## Time range panel variables - -These variables allow you to include the current time range in the data link URL. - -- `__url_time_range` - current dashboard's time range (i.e. `?from=now-6h&to=now`) -- `$__from and $__to` - For more information, refer to [Global variables]({{< relref "../variables/variable-types/global-variables/#__from-and-__to" >}}). - -## Series variables - -Series specific variables are available under `__series` namespace: - -- `__series.name` - series name to the URL - -## Field variables - -Field-specific variables are available under `__field` namespace: - -- `__field.name` - the name of the field -- `__field.labels.