{"action":"created","issue":{"url":"https://api.github.com/repos/grafana/grafana/issues/4146","repository_url":"https://api.github.com/repos/grafana/grafana","labels_url":"https://api.github.com/repos/grafana/grafana/issues/4146/labels{/name}","comments_url":"https://api.github.com/repos/grafana/grafana/issues/4146/comments","events_url":"https://api.github.com/repos/grafana/grafana/issues/4146/events","html_url":"https://github.com/grafana/grafana/issues/4146","id":136155964,"number":4146,"title":"Feature request: Hidden template variables","user":{"login":"tokudan","id":692610,"avatar_url":"https://avatars.githubusercontent.com/u/692610?v=3","gravatar_id":"","url":"https://api.github.com/users/tokudan","html_url":"https://github.com/tokudan","followers_url":"https://api.github.com/users/tokudan/followers","following_url":"https://api.github.com/users/tokudan/following{/other_user}","gists_url":"https://api.github.com/users/tokudan/gists{/gist_id}","starred_url":"https://api.github.com/users/tokudan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tokudan/subscriptions","organizations_url":"https://api.github.com/users/tokudan/orgs","repos_url":"https://api.github.com/users/tokudan/repos","events_url":"https://api.github.com/users/tokudan/events{/privacy}","received_events_url":"https://api.github.com/users/tokudan/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/grafana/grafana/labels/comp:%20dashboard/templating","name":"comp: dashboard/templating","color":"c7def8"},{"url":"https://api.github.com/repos/grafana/grafana/labels/P4:%20nice%20to%20have","name":"P4: nice to have","color":"fef2c0"},{"url":"https://api.github.com/repos/grafana/grafana/labels/state:%20help%20wanted%20(PR)","name":"state: help wanted (PR)","color":"bfe5bf"},{"url":"https://api.github.com/repos/grafana/grafana/labels/type:%20feature%20request","name":"type: feature request","color":"dddddd"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-02-24T19:05:09Z","updated_at":"2016-02-25T10:01:33Z","closed_at":null,"body":"I would like to hide some template variables from my users, since they are automatically set depending on other variables.\r\n\r\nI'm using InfluxDB as a backend.\r\n\r\nThe background is that I need to change some part of my queries depending on the user selection, for example:\r\n`SELECT non_negative_derivative(mean(\"value\"))/$minterval*8 FROM $retention.traffic_fastd_rx_bytes WHERE ... AND $timeFilter GROUP BY time($minterval) fill(null)`\r\n\r\n$minterval is a fixed value but depends on $retention, for my retention policy \"l1\" $minterval needs to be 60, for \"l2\" it needs to be 300, etc.\r\n\r\nMy current solution is that I populate the value of $minterval through the query\r\n`SHOW TAG VALUES FROM retentionlevels WITH KEY = \"time\" WHERE \"level\" =~ /^$retention/`\r\n\r\nThe downside is that this appears as a variable at the top of the dashboard, but there will never be more than one value that the user could select, so the best option would be to hide it from the user."},"comment":{"url":"https://api.github.com/repos/grafana/grafana/issues/comments/188700909","html_url":"https://github.com/grafana/grafana/issues/4146#issuecomment-188700909","issue_url":"https://api.github.com/repos/grafana/grafana/issues/4146","id":188700909,"user":{"login":"nik-petrov","id":2014051,"avatar_url":"https://avatars.githubusercontent.com/u/2014051?v=3","gravatar_id":"","url":"https://api.github.com/users/nik-petrov","html_url":"https://github.com/nik-petrov","followers_url":"https://api.github.com/users/nik-petrov/followers","following_url":"https://api.github.com/users/nik-petrov/following{/other_user}","gists_url":"https://api.github.com/users/nik-petrov/gists{/gist_id}","starred_url":"https://api.github.com/users/nik-petrov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nik-petrov/subscriptions","organizations_url":"https://api.github.com/users/nik-petrov/orgs","repos_url":"https://api.github.com/users/nik-petrov/repos","events_url":"https://api.github.com/users/nik-petrov/events{/privacy}","received_events_url":"https://api.github.com/users/nik-petrov/received_events","type":"User","site_admin":false},"created_at":"2016-02-25T10:01:33Z","updated_at":"2016-02-25T10:01:33Z","body":"Could be that the suggested change by @jbergler in #2665 still works?\r\nhttps://github.com/jbergler/grafana/commit/d4337d6b8f92113ad986a0c7fc59d63921a4a7a6"}}