{"action":"opened","number":5313,"pull_request":{"url":"https://api.github.com/repos/grafana/grafana/pulls/5313","id":73061624,"html_url":"https://github.com/grafana/grafana/pull/5313","diff_url":"https://github.com/grafana/grafana/pull/5313.diff","patch_url":"https://github.com/grafana/grafana/pull/5313.patch","issue_url":"https://api.github.com/repos/grafana/grafana/issues/5313","number":5313,"state":"open","locked":false,"title":"Interpolate the query in an annotation","user":{"login":"stuartnelson3","id":1398104,"avatar_url":"https://avatars.githubusercontent.com/u/1398104?v=3","gravatar_id":"","url":"https://api.github.com/users/stuartnelson3","html_url":"https://github.com/stuartnelson3","followers_url":"https://api.github.com/users/stuartnelson3/followers","following_url":"https://api.github.com/users/stuartnelson3/following{/other_user}","gists_url":"https://api.github.com/users/stuartnelson3/gists{/gist_id}","starred_url":"https://api.github.com/users/stuartnelson3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stuartnelson3/subscriptions","organizations_url":"https://api.github.com/users/stuartnelson3/orgs","repos_url":"https://api.github.com/users/stuartnelson3/repos","events_url":"https://api.github.com/users/stuartnelson3/events{/privacy}","received_events_url":"https://api.github.com/users/stuartnelson3/received_events","type":"User","site_admin":false},"body":"Many of our users would like to interpolate variables into the annotations query. There are many different variable options, and two extra arguments to `templateSrv.replace()`, but this seems to cover our basic use case.\r\n\r\nIf there's a better option to do this please let me know, I'm happy to fix it.","created_at":"2016-06-08T14:54:34Z","updated_at":"2016-06-08T14:54:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/grafana/grafana/pulls/5313/commits","review_comments_url":"https://api.github.com/repos/grafana/grafana/pulls/5313/comments","review_comment_url":"https://api.github.com/repos/grafana/grafana/pulls/comments{/number}","comments_url":"https://api.github.com/repos/grafana/grafana/issues/5313/comments","statuses_url":"https://api.github.com/repos/grafana/grafana/statuses/e9d66fce3bd98bc9fe6447c90179f3f288ae578e","head":{"label":"stuartnelson3:interpolate-annotations","ref":"interpolate-annotations","sha":"e9d66fce3bd98bc9fe6447c90179f3f288ae578e","user":{"login":"stuartnelson3","id":1398104,"avatar_url":"https://avatars.githubusercontent.com/u/1398104?v=3","gravatar_id":"","url":"https://api.github.com/users/stuartnelson3","html_url":"https://github.com/stuartnelson3","followers_url":"https://api.github.com/users/stuartnelson3/followers","following_url":"https://api.github.com/users/stuartnelson3/following{/other_user}","gists_url":"https://api.github.com/users/stuartnelson3/gists{/gist_id}","starred_url":"https://api.github.com/users/stuartnelson3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stuartnelson3/subscriptions","organizations_url":"https://api.github.com/users/stuartnelson3/orgs","repos_url":"https://api.github.com/users/stuartnelson3/repos","events_url":"https://api.github.com/users/stuartnelson3/events{/privacy}","received_events_url":"https://api.github.com/users/stuartnelson3/received_events","type":"User","site_admin":false},"repo":{"id":60705658,"name":"grafana","full_name":"stuartnelson3/grafana","owner":{"login":"stuartnelson3","id":1398104,"avatar_url":"https://avatars.githubusercontent.com/u/1398104?v=3","gravatar_id":"","url":"https://api.github.com/users/stuartnelson3","html_url":"https://github.com/stuartnelson3","followers_url":"https://api.github.com/users/stuartnelson3/followers","following_url":"https://api.github.com/users/stuartnelson3/following{/other_user}","gists_url":"https://api.github.com/users/stuartnelson3/gists{/gist_id}","starred_url":"https://api.github.com/users/stuartnelson3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stuartnelson3/subscriptions","organizations_url":"https://api.github.com/users/stuartnelson3/orgs","repos_url":"https://api.github.com/users/stuartnelson3/repos","events_url":"https://api.github.com/users/stuartnelson3/events{/privacy}","received_events_url":"https://api.github.com/users/stuartnelson3/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/stuartnelson3/grafana","description":"Gorgeous metric viz, dashboards & editors for Graphite, InfluxDB & OpenTSDB","fork":true,"url":"https://api.github.com/repos/stuartnelson3/grafana","forks_url":"https://api.github.com/repos/stuartnelson3/grafana/forks","keys_url":"https://api.github.com/repos/stuartnelson3/grafana/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stuartnelson3/grafana/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stuartnelson3/grafana/teams","hooks_url":"https://api.github.com/repos/stuartnelson3/grafana/hooks","issue_events_url":"https://api.github.com/repos/stuartnelson3/grafana/issues/events{/number}","events_url":"https://api.github.com/repos/stuartnelson3/grafana/events","assignees_url":"https://api.github.com/repos/stuartnelson3/grafana/assignees{/user}","branches_url":"https://api.github.com/repos/stuartnelson3/grafana/branches{/branch}","tags_url":"https://api.github.com/repos/stuartnelson3/grafana/tags","blobs_url":"https://api.github.com/repos/stuartnelson3/grafana/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stuartnelson3/grafana/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stuartnelson3/grafana/git/refs{/sha}","trees_url":"https://api.github.com/repos/stuartnelson3/grafana/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stuartnelson3/grafana/statuses/{sha}","languages_url":"https://api.github.com/repos/stuartnelson3/grafana/languages","stargazers_url":"https://api.github.com/repos/stuartnelson3/grafana/stargazers","contributors_url":"https://api.github.com/repos/stuartnelson3/grafana/contributors","subscribers_url":"https://api.github.com/repos/stuartnelson3/grafana/subscribers","subscription_url":"https://api.github.com/repos/stuartnelson3/grafana/subscription","commits_url":"https://api.github.com/repos/stuartnelson3/grafana/commits{/sha}","git_commits_url":"https://api.github.com/repos/stuartnelson3/grafana/git/commits{/sha}","comments_url":"https://api.github.com/repos/stuartnelson3/grafana/comments{/number}","issue_comment_url":"https://api.github.com/repos/stuartnelson3/grafana/issues/comments{/number}","contents_url":"https://api.github.com/repos/stuartnelson3/grafana/contents/{+path}","compare_url":"https://api.github.com/repos/stuartnelson3/grafana/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stuartnelson3/grafana/merges","archive_url":"https://api.github.com/repos/stuartnelson3/grafana/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stuartnelson3/grafana/downloads","issues_url":"https://api.github.com/repos/stuartnelson3/grafana/issues{/number}","pulls_url":"https://api.github.com/repos/stuartnelson3/grafana/pulls{/number}","milestones_url":"https://api.github.com/repos/stuartnelson3/grafana/milestones{/number}","notifications_url":"https://api.github.com/repos/stuartnelson3/grafana/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stuartnelson3/grafana/labels{/name}","releases_url":"https://api.github.com/repos/stuartnelson3/grafana/releases{/id}","deployments_url":"https://api.github.com/repos/stuartnelson3/grafana/deployments","created_at":"2016-06-08T14:48:47Z","updated_at":"2016-06-08T14:48:51Z","pushed_at":"2016-06-08T14:50:20Z","git_url":"git://github.com/stuartnelson3/grafana.git","ssh_url":"git@github.com:stuartnelson3/grafana.git","clone_url":"https://github.com/stuartnelson3/grafana.git","svn_url":"https://github.com/stuartnelson3/grafana","homepage":"http://grafana.org","size":93827,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"grafana:master","ref":"master","sha":"ffac5c12999eca55dbbed36a24cc8f6588dff8fa","user":{"login":"grafana","id":7195757,"avatar_url":"https://avatars.githubusercontent.com/u/7195757?v=3","gravatar_id":"","url":"https://api.github.com/users/grafana","html_url":"https://github.com/grafana","followers_url":"https://api.github.com/users/grafana/followers","following_url":"https://api.github.com/users/grafana/following{/other_user}","gists_url":"https://api.github.com/users/grafana/gists{/gist_id}","starred_url":"https://api.github.com/users/grafana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grafana/subscriptions","organizations_url":"https://api.github.com/users/grafana/orgs","repos_url":"https://api.github.com/users/grafana/repos","events_url":"https://api.github.com/users/grafana/events{/privacy}","received_events_url":"https://api.github.com/users/grafana/received_events","type":"Organization","site_admin":false},"repo":{"id":15111821,"name":"grafana","full_name":"grafana/grafana","owner":{"login":"grafana","id":7195757,"avatar_url":"https://avatars.githubusercontent.com/u/7195757?v=3","gravatar_id":"","url":"https://api.github.com/users/grafana","html_url":"https://github.com/grafana","followers_url":"https://api.github.com/users/grafana/followers","following_url":"https://api.github.com/users/grafana/following{/other_user}","gists_url":"https://api.github.com/users/grafana/gists{/gist_id}","starred_url":"https://api.github.com/users/grafana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grafana/subscriptions","organizations_url":"https://api.github.com/users/grafana/orgs","repos_url":"https://api.github.com/users/grafana/repos","events_url":"https://api.github.com/users/grafana/events{/privacy}","received_events_url":"https://api.github.com/users/grafana/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/grafana/grafana","description":"Gorgeous metric viz, dashboards & editors for Graphite, InfluxDB & OpenTSDB","fork":false,"url":"https://api.github.com/repos/grafana/grafana","forks_url":"https://api.github.com/repos/grafana/grafana/forks","keys_url":"https://api.github.com/repos/grafana/grafana/keys{/key_id}","collaborators_url":"https://api.github.com/repos/grafana/grafana/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/grafana/grafana/teams","hooks_url":"https://api.github.com/repos/grafana/grafana/hooks","issue_events_url":"https://api.github.com/repos/grafana/grafana/issues/events{/number}","events_url":"https://api.github.com/repos/grafana/grafana/events","assignees_url":"https://api.github.com/repos/grafana/grafana/assignees{/user}","branches_url":"https://api.github.com/repos/grafana/grafana/branches{/branch}","tags_url":"https://api.github.com/repos/grafana/grafana/tags","blobs_url":"https://api.github.com/repos/grafana/grafana/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/grafana/grafana/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/grafana/grafana/git/refs{/sha}","trees_url":"https://api.github.com/repos/grafana/grafana/git/trees{/sha}","statuses_url":"https://api.github.com/repos/grafana/grafana/statuses/{sha}","languages_url":"https://api.github.com/repos/grafana/grafana/languages","stargazers_url":"https://api.github.com/repos/grafana/grafana/stargazers","contributors_url":"https://api.github.com/repos/grafana/grafana/contributors","subscribers_url":"https://api.github.com/repos/grafana/grafana/subscribers","subscription_url":"https://api.github.com/repos/grafana/grafana/subscription","commits_url":"https://api.github.com/repos/grafana/grafana/commits{/sha}","git_commits_url":"https://api.github.com/repos/grafana/grafana/git/commits{/sha}","comments_url":"https://api.github.com/repos/grafana/grafana/comments{/number}","issue_comment_url":"https://api.github.com/repos/grafana/grafana/issues/comments{/number}","contents_url":"https://api.github.com/repos/grafana/grafana/contents/{+path}","compare_url":"https://api.github.com/repos/grafana/grafana/compare/{base}...{head}","merges_url":"https://api.github.com/repos/grafana/grafana/merges","archive_url":"https://api.github.com/repos/grafana/grafana/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/grafana/grafana/downloads","issues_url":"https://api.github.com/repos/grafana/grafana/issues{/number}","pulls_url":"https://api.github.com/repos/grafana/grafana/pulls{/number}","milestones_url":"https://api.github.com/repos/grafana/grafana/milestones{/number}","notifications_url":"https://api.github.com/repos/grafana/grafana/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/grafana/grafana/labels{/name}","releases_url":"https://api.github.com/repos/grafana/grafana/releases{/id}","deployments_url":"https://api.github.com/repos/grafana/grafana/deployments","created_at":"2013-12-11T15:59:56Z","updated_at":"2016-06-08T14:41:40Z","pushed_at":"2016-06-08T14:54:34Z","git_url":"git://github.com/grafana/grafana.git","ssh_url":"git@github.com:grafana/grafana.git","clone_url":"https://github.com/grafana/grafana.git","svn_url":"https://github.com/grafana/grafana","homepage":"http://grafana.org","size":136416,"stargazers_count":10301,"watchers_count":10301,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1520,"mirror_url":null,"open_issues_count":624,"forks":1520,"open_issues":624,"watchers":10301,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/grafana/grafana/pulls/5313"},"html":{"href":"https://github.com/grafana/grafana/pull/5313"},"issue":{"href":"https://api.github.com/repos/grafana/grafana/issues/5313"},"comments":{"href":"https://api.github.com/repos/grafana/grafana/issues/5313/comments"},"review_comments":{"href":"https://api.github.com/repos/grafana/grafana/pulls/5313/comments"},"review_comment":{"href":"https://api.github.com/repos/grafana/grafana/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/grafana/grafana/pulls/5313/commits"},"statuses":{"href":"https://api.github.com/repos/grafana/grafana/statuses/e9d66fce3bd98bc9fe6447c90179f3f288ae578e"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":2,"deletions":1,"changed_files":1}}
{"actor":{"display_login":"stuartnelson3"}}