Using Links in Tables

Hi,

I recently started using the feature to add a link to an entry of a table panel to be forwarded to another dashboard (Grafana 4.2 + Graphite Backend).

But curently I’m facing the following issue:

I have some tables (time series aggregration) where the Colum 0 contains that alias of the metric.
This alias is created by aliasByNode using mutiple elements ( aliasByNode(3, 4, 6, 7) ).
Now I want to know whether there is an option to use these elements as individual elements for the URL since in some other dashboards I have these elements as template variables.

So a small example:
A dashboard shows as table the top 5 ports of a networking infrastructure where the alias is like network.switchname.slotname.portname. I want to add a drilldown link to the table line that goes to a dashboard showing the time series data as chart where the defined template variales are $Network, $Switch, $Slot and $Port.

So anyone an idea whether this is possible or how this could be achieved?
Currently it looks like it is only possible to use the entire value of a table file as a single http variable in the link ($__cell_0 / 1).

Thanks in advance

Regards

Timo

1 Like

You can use a table cell value as a parameter to another dashboard

1 Like

Hello,

thanks for you quick response.
I understood that I can use the cell values as parameters in the URL pointing to another dashboard.

My “problem” is that in a timeseries aggregation table the $__cell_0 does contain the following text:

main.sw01.0.1

where main is the building, sw01 is the switch, 0 is the slot of the switch and 1 is the actual port on the slot.
The content of the cell comes from a graphite query using aliasbynode(3,4,6,7).

The dashboard I want to point to is using templating variables to allow the user to select the building, switch, porttype, slot, port using the dropdowns. So the link need to look like:

https://192.168.2.147:8443/dashboard/db/port-performance-details?orgId=1&var-building=“buildinname”&var-switch=“switchname”&var-porttype=“network”&var-slot=“slotnumber”&var-port=“portnumber”

So it would be necessary to split the content of the cell 0 into multiple variable where the . is the separator.
And I don’t think this is currently possible, or?

Anther option would be that in a timeseries aggregation table I could have multiple columns.
Currently there is only one column for the “label” and other columns for max, avg, min, etc…
If I could have the content of cell 0 split into multiple columns I would be able to address the in the URL.

Not sure whether there is currently a solution.

Regards

Timo

1 Like

hey torkel,
is it possible to use a table cell value as a parameter to the cell value itself?

my cell value contains URL path, but right now when i set the URL value in column style as ${__cell} it appends the hosted link of grafana along with the cell value :frowning:

1 Like

Try: ${__cell:raw}

1 Like

but in firefox it still appends “https:” before my URL :roll_eyes:

1 Like

@jangaraj - Thanks for${__cell:raw}. Fixed my issue after that last upgrade; however, $__cell was working and should have worked as before but this fixed it.

1 Like

HI!
I have a column, where i use value mapping is there any chance to get the value of variable “before mapping”, because $__cell gives me value “after mapping”

1 Like

hi,

I am using the grafana 6.7.2.
I have added a link to a cell in a table panel (dashboard-1), which when clicked goes to a different dashboard (dashboard-2).

Now, in dashboard-2, we have a drop-down (same as cell value in dashboard-1). In the drop-down in dashboard-2 i want it should select the same value same as the cell value clicked in dashboard-1.

But currently as i have not sure how this can be achieved. But i have seen we can specify something as {__cell} , didn’t get how can be achieved.

Any one help me on this.

Regards,
Kushal

1 Like

Create variable in dashboard-2. (cell_val)
The url in cell of dashboard-1 must be like /d/asdfvfdg/dash-name-example?orgId=1&var-cell_val=${__cell}

1 Like

Hi!
Today I update Grafana to 7 version.
How use cell value for hiden field?

In previus version I do like this:

  1. Set Type = Hidden for some field
  2. Get cell value of hidden field like ${__cell_hiddenFieldId}

Affter update i can’t get cell value of hidden field.
Overides option data link ${__data.fields[0]}, show first VISIBLE field. But I want to get value from first field of query request.

And another problem is to use values in url title. {__data.fields[header]} Tooltip worked fine with {__cell} in Grafana 6.

1 Like

Hello, I’ve met same issue. Do you have any solution?

This has been reported as a bug/feature request in the Github issue log (see below). Currently saying it may be fixed in 7.2

It’s a regression from the old table panel and there are also many other features of the old table panel now missing from the new table panel. I am just using the old table panel as it meets my needs much better than the new one. If you want to do the same then you can either cut/paste old table panels to create new ones or manually change the panel JSON and change type so it’s:

"type": "table-old"

https://www.google.com/sorry/index?continue=https://www.youtube.com/watch%3Fv%3DgxZe140qRfw%26feature%3Dyoutu.be&q=EgSLsc5gGIbZ0YYGIhA3BhJFVoIVUn34t9PKne92MgFy[spoiler]This text will be blurred[/spoiler]https://www.google.com/sorry/index?continue=https://www.youtube.com/watch%3Fv%3DgxZe140qRfw%26feature%3Dyoutu.be&q=EgSLsc5gGIbZ0YYGIhA3BhJFVoIVUn34t9PKne92MgFy

This is possible, I am using 9.1.7 and originally used the old table; however, after migrating noticed the same issue. That said, I found a way to make this work:

  1. Add the ID column that you want to hide; example simID
  2. If the column is the first column, say 0; then use: var-whatever=${__data.fields[0]}
  3. Now, override the column, field with name: simID
  4. Add option ‘Hide in Table’ and turn on
  5. I also had to format the number, e.g. remove decimals & set unit to standard

Hope that helps someone… took me a good 2 hours to figure.

Btw, it also works on graphs and you do not have to hide; aka reference your original query in the datasource and add a data link with the same options. :slight_smile: