{"action":"created","comment":{"url":"https://api.github.com/repos/grafana/grafana/pulls/comments/80902005","pull_request_review_id":1921621,"id":80902005,"diff_hunk":"@@ -154,6 +154,13 @@ function (angular, _, kbn) {\n           }\n         }\n \n+        var adhocVar = _.find(self._adhocVariables, function(v) {","path":"public/app/features/templating/templateSrv.js","position":null,"original_position":4,"commit_id":"5919558f241ab6e79e06b105d73753857c57861c","original_commit_id":"6968f3b18a3db1bbb0f066f01c0b2d2d9ac58138","user":{"login":"mtanda","id":224552,"avatar_url":"https://avatars.githubusercontent.com/u/224552?v=3","gravatar_id":"","url":"https://api.github.com/users/mtanda","html_url":"https://github.com/mtanda","followers_url":"https://api.github.com/users/mtanda/followers","following_url":"https://api.github.com/users/mtanda/following{/other_user}","gists_url":"https://api.github.com/users/mtanda/gists{/gist_id}","starred_url":"https://api.github.com/users/mtanda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtanda/subscriptions","organizations_url":"https://api.github.com/users/mtanda/orgs","repos_url":"https://api.github.com/users/mtanda/repos","events_url":"https://api.github.com/users/mtanda/events{/privacy}","received_events_url":"https://api.github.com/users/mtanda/received_events","type":"User","site_admin":false},"body":"Fixed this.","created_at":"2016-09-28T12:18:58Z","updated_at":"2016-09-28T12:18:59Z","html_url":"https://github.com/grafana/grafana/pull/6138#discussion_r80902005","pull_request_url":"https://api.github.com/repos/grafana/grafana/pulls/6138","_links":{"self":{"href":"https://api.github.com/repos/grafana/grafana/pulls/comments/80902005"},"html":{"href":"https://github.com/grafana/grafana/pull/6138#discussion_r80902005"},"pull_request":{"href":"https://api.github.com/repos/grafana/grafana/pulls/6138"}}},"pull_request":{"url":"https://api.github.com/repos/grafana/grafana/pulls/6138","id":87092940,"html_url":"https://github.com/grafana/grafana/pull/6138","diff_url":"https://github.com/grafana/grafana/pull/6138.diff","patch_url":"https://github.com/grafana/grafana/pull/6138.patch","issue_url":"https://api.github.com/repos/grafana/grafana/issues/6138","number":6138,"state":"open","locked":false,"title":"(prometheus) adhoc filter support","user":{"login":"mtanda","id":224552,"avatar_url":"https://avatars.githubusercontent.com/u/224552?v=3","gravatar_id":"","url":"https://api.github.com/users/mtanda","html_url":"https://github.com/mtanda","followers_url":"https://api.github.com/users/mtanda/followers","following_url":"https://api.github.com/users/mtanda/following{/other_user}","gists_url":"https://api.github.com/users/mtanda/gists{/gist_id}","starred_url":"https://api.github.com/users/mtanda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtanda/subscriptions","organizations_url":"https://api.github.com/users/mtanda/orgs","repos_url":"https://api.github.com/users/mtanda/repos","events_url":"https://api.github.com/users/mtanda/events{/privacy}","received_events_url":"https://api.github.com/users/mtanda/received_events","type":"User","site_admin":false},"body":"Currently, Prometheus doesn't provide API to get all label keys.\r\nI add label key input box to datasource setting page.\r\n\r\nI'm not sure \"expanding adhoc variable in replace function\" is correct.\r\n(the code is here, https://github.com/grafana/grafana/pull/6138/files#diff-ece81ff260bfcb9f65df22b3275da7aeR157)\r\n\r\nIf there is more appropriate way, I'll change the implementation.\r\n\r\nhttps://github.com/grafana/grafana/issues/6038","created_at":"2016-09-28T10:26:56Z","updated_at":"2016-09-28T12:18:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"161960b27508e232b6de3036f3817f6e346b1076","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/grafana/grafana/pulls/6138/commits","review_comments_url":"https://api.github.com/repos/grafana/grafana/pulls/6138/comments","review_comment_url":"https://api.github.com/repos/grafana/grafana/pulls/comments{/number}","comments_url":"https://api.github.com/repos/grafana/grafana/issues/6138/comments","statuses_url":"https://api.github.com/repos/grafana/grafana/statuses/5919558f241ab6e79e06b105d73753857c57861c","head":{"label":"mtanda:prometheus_templating_adhoc","ref":"prometheus_templating_adhoc","sha":"5919558f241ab6e79e06b105d73753857c57861c","user":{"login":"mtanda","id":224552,"avatar_url":"https://avatars.githubusercontent.com/u/224552?v=3","gravatar_id":"","url":"https://api.github.com/users/mtanda","html_url":"https://github.com/mtanda","followers_url":"https://api.github.com/users/mtanda/followers","following_url":"https://api.github.com/users/mtanda/following{/other_user}","gists_url":"https://api.github.com/users/mtanda/gists{/gist_id}","starred_url":"https://api.github.com/users/mtanda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtanda/subscriptions","organizations_url":"https://api.github.com/users/mtanda/orgs","repos_url":"https://api.github.com/users/mtanda/repos","events_url":"https://api.github.com/users/mtanda/events{/privacy}","received_events_url":"https://api.github.com/users/mtanda/received_events","type":"User","site_admin":false},"repo":{"id":33287971,"name":"grafana","full_name":"mtanda/grafana","owner":{"login":"mtanda","id":224552,"avatar_url":"https://avatars.githubusercontent.com/u/224552?v=3","gravatar_id":"","url":"https://api.github.com/users/mtanda","html_url":"https://github.com/mtanda","followers_url":"https://api.github.com/users/mtanda/followers","following_url":"https://api.github.com/users/mtanda/following{/other_user}","gists_url":"https://api.github.com/users/mtanda/gists{/gist_id}","starred_url":"https://api.github.com/users/mtanda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtanda/subscriptions","organizations_url":"https://api.github.com/users/mtanda/orgs","repos_url":"https://api.github.com/users/mtanda/repos","events_url":"https://api.github.com/users/mtanda/events{/privacy}","received_events_url":"https://api.github.com/users/mtanda/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mtanda/grafana","description":"Grafana - A Graphite & InfluxDB Dashboard and Graph Editor","fork":true,"url":"https://api.github.com/repos/mtanda/grafana","forks_url":"https://api.github.com/repos/mtanda/grafana/forks","keys_url":"https://api.github.com/repos/mtanda/grafana/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mtanda/grafana/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mtanda/grafana/teams","hooks_url":"https://api.github.com/repos/mtanda/grafana/hooks","issue_events_url":"https://api.github.com/repos/mtanda/grafana/issues/events{/number}","events_url":"https://api.github.com/repos/mtanda/grafana/events","assignees_url":"https://api.github.com/repos/mtanda/grafana/assignees{/user}","branches_url":"https://api.github.com/repos/mtanda/grafana/branches{/branch}","tags_url":"https://api.github.com/repos/mtanda/grafana/tags","blobs_url":"https://api.github.com/repos/mtanda/grafana/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mtanda/grafana/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mtanda/grafana/git/refs{/sha}","trees_url":"https://api.github.com/repos/mtanda/grafana/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mtanda/grafana/statuses/{sha}","languages_url":"https://api.github.com/repos/mtanda/grafana/languages","stargazers_url":"https://api.github.com/repos/mtanda/grafana/stargazers","contributors_url":"https://api.github.com/repos/mtanda/grafana/contributors","subscribers_url":"https://api.github.com/repos/mtanda/grafana/subscribers","subscription_url":"https://api.github.com/repos/mtanda/grafana/subscription","commits_url":"https://api.github.com/repos/mtanda/grafana/commits{/sha}","git_commits_url":"https://api.github.com/repos/mtanda/grafana/git/commits{/sha}","comments_url":"https://api.github.com/repos/mtanda/grafana/comments{/number}","issue_comment_url":"https://api.github.com/repos/mtanda/grafana/issues/comments{/number}","contents_url":"https://api.github.com/repos/mtanda/grafana/contents/{+path}","compare_url":"https://api.github.com/repos/mtanda/grafana/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mtanda/grafana/merges","archive_url":"https://api.github.com/repos/mtanda/grafana/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mtanda/grafana/downloads","issues_url":"https://api.github.com/repos/mtanda/grafana/issues{/number}","pulls_url":"https://api.github.com/repos/mtanda/grafana/pulls{/number}","milestones_url":"https://api.github.com/repos/mtanda/grafana/milestones{/number}","notifications_url":"https://api.github.com/repos/mtanda/grafana/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mtanda/grafana/labels{/name}","releases_url":"https://api.github.com/repos/mtanda/grafana/releases{/id}","deployments_url":"https://api.github.com/repos/mtanda/grafana/deployments","created_at":"2015-04-02T03:49:53Z","updated_at":"2016-05-09T04:47:46Z","pushed_at":"2016-09-28T12:16:23Z","git_url":"git://github.com/mtanda/grafana.git","ssh_url":"git@github.com:mtanda/grafana.git","clone_url":"https://github.com/mtanda/grafana.git","svn_url":"https://github.com/mtanda/grafana","homepage":"http://grafana.org","size":100988,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"grafana:master","ref":"master","sha":"7a6501640f44007823d1b54651050165525c9913","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-09-28T10:52:16Z","pushed_at":"2016-09-28T12:16:24Z","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":146623,"stargazers_count":11995,"watchers_count":11995,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1832,"mirror_url":null,"open_issues_count":734,"forks":1832,"open_issues":734,"watchers":11995,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/grafana/grafana/pulls/6138"},"html":{"href":"https://github.com/grafana/grafana/pull/6138"},"issue":{"href":"https://api.github.com/repos/grafana/grafana/issues/6138"},"comments":{"href":"https://api.github.com/repos/grafana/grafana/issues/6138/comments"},"review_comments":{"href":"https://api.github.com/repos/grafana/grafana/pulls/6138/comments"},"review_comment":{"href":"https://api.github.com/repos/grafana/grafana/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/grafana/grafana/pulls/6138/commits"},"statuses":{"href":"https://api.github.com/repos/grafana/grafana/statuses/5919558f241ab6e79e06b105d73753857c57861c"}}}}
{"actor":{"display_login":"mtanda"}}