{"action":"closed","number":5903,"pull_request":{"url":"https://api.github.com/repos/grafana/grafana/pulls/5903","id":82713870,"html_url":"https://github.com/grafana/grafana/pull/5903","diff_url":"https://github.com/grafana/grafana/pull/5903.diff","patch_url":"https://github.com/grafana/grafana/pull/5903.patch","issue_url":"https://api.github.com/repos/grafana/grafana/issues/5903","number":5903,"state":"closed","locked":false,"title":"Template service: ease variable extraction from target as objects","user":{"login":"jotak","id":2153442,"avatar_url":"https://avatars.githubusercontent.com/u/2153442?v=3","gravatar_id":"","url":"https://api.github.com/users/jotak","html_url":"https://github.com/jotak","followers_url":"https://api.github.com/users/jotak/followers","following_url":"https://api.github.com/users/jotak/following{/other_user}","gists_url":"https://api.github.com/users/jotak/gists{/gist_id}","starred_url":"https://api.github.com/users/jotak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jotak/subscriptions","organizations_url":"https://api.github.com/users/jotak/orgs","repos_url":"https://api.github.com/users/jotak/repos","events_url":"https://api.github.com/users/jotak/events{/privacy}","received_events_url":"https://api.github.com/users/jotak/received_events","type":"User","site_admin":false},"body":"Related feature request #5532 (although it's closed it was mentioned \"what you are looking for is a new function\", so here it is)\nSee also https://github.com/grafana/kairosdb-datasource/issues/14\n\nSmall refactor to allow plugins to get a list of values per variables and avoid having to run through templateSrv.replace + string parsing when it is not necessary\n\nBasically consists in splitting templateSrv.replace in two functions: templateSrv.getVarValues that does the variable lookup stuff, and templateSrv.replace now just concentrates on string replacement.\n\nAlso add new function \"resolveTemplateTarget\" that returns a list of resolved targets from a single templated target.\n\nFinally, added some unit tests\n","created_at":"2016-08-25T12:52:46Z","updated_at":"2016-11-30T08:07:36Z","closed_at":"2016-11-30T08:07:36Z","merged_at":null,"merge_commit_sha":"5a89887e1cdc7c89953785faf1d48b71e8d85d66","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/grafana/grafana/pulls/5903/commits","review_comments_url":"https://api.github.com/repos/grafana/grafana/pulls/5903/comments","review_comment_url":"https://api.github.com/repos/grafana/grafana/pulls/comments{/number}","comments_url":"https://api.github.com/repos/grafana/grafana/issues/5903/comments","statuses_url":"https://api.github.com/repos/grafana/grafana/statuses/a8ea214262d13f7a8d822ff4c2c91d40ac70a6ab","head":{"label":"jotak:variables","ref":"variables","sha":"a8ea214262d13f7a8d822ff4c2c91d40ac70a6ab","user":{"login":"jotak","id":2153442,"avatar_url":"https://avatars.githubusercontent.com/u/2153442?v=3","gravatar_id":"","url":"https://api.github.com/users/jotak","html_url":"https://github.com/jotak","followers_url":"https://api.github.com/users/jotak/followers","following_url":"https://api.github.com/users/jotak/following{/other_user}","gists_url":"https://api.github.com/users/jotak/gists{/gist_id}","starred_url":"https://api.github.com/users/jotak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jotak/subscriptions","organizations_url":"https://api.github.com/users/jotak/orgs","repos_url":"https://api.github.com/users/jotak/repos","events_url":"https://api.github.com/users/jotak/events{/privacy}","received_events_url":"https://api.github.com/users/jotak/received_events","type":"User","site_admin":false},"repo":{"id":66341520,"name":"grafana","full_name":"jotak/grafana","owner":{"login":"jotak","id":2153442,"avatar_url":"https://avatars.githubusercontent.com/u/2153442?v=3","gravatar_id":"","url":"https://api.github.com/users/jotak","html_url":"https://github.com/jotak","followers_url":"https://api.github.com/users/jotak/followers","following_url":"https://api.github.com/users/jotak/following{/other_user}","gists_url":"https://api.github.com/users/jotak/gists{/gist_id}","starred_url":"https://api.github.com/users/jotak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jotak/subscriptions","organizations_url":"https://api.github.com/users/jotak/orgs","repos_url":"https://api.github.com/users/jotak/repos","events_url":"https://api.github.com/users/jotak/events{/privacy}","received_events_url":"https://api.github.com/users/jotak/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jotak/grafana","description":"Gorgeous metric viz, dashboards & editors for Graphite, InfluxDB & OpenTSDB","fork":true,"url":"https://api.github.com/repos/jotak/grafana","forks_url":"https://api.github.com/repos/jotak/grafana/forks","keys_url":"https://api.github.com/repos/jotak/grafana/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jotak/grafana/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jotak/grafana/teams","hooks_url":"https://api.github.com/repos/jotak/grafana/hooks","issue_events_url":"https://api.github.com/repos/jotak/grafana/issues/events{/number}","events_url":"https://api.github.com/repos/jotak/grafana/events","assignees_url":"https://api.github.com/repos/jotak/grafana/assignees{/user}","branches_url":"https://api.github.com/repos/jotak/grafana/branches{/branch}","tags_url":"https://api.github.com/repos/jotak/grafana/tags","blobs_url":"https://api.github.com/repos/jotak/grafana/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jotak/grafana/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jotak/grafana/git/refs{/sha}","trees_url":"https://api.github.com/repos/jotak/grafana/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jotak/grafana/statuses/{sha}","languages_url":"https://api.github.com/repos/jotak/grafana/languages","stargazers_url":"https://api.github.com/repos/jotak/grafana/stargazers","contributors_url":"https://api.github.com/repos/jotak/grafana/contributors","subscribers_url":"https://api.github.com/repos/jotak/grafana/subscribers","subscription_url":"https://api.github.com/repos/jotak/grafana/subscription","commits_url":"https://api.github.com/repos/jotak/grafana/commits{/sha}","git_commits_url":"https://api.github.com/repos/jotak/grafana/git/commits{/sha}","comments_url":"https://api.github.com/repos/jotak/grafana/comments{/number}","issue_comment_url":"https://api.github.com/repos/jotak/grafana/issues/comments{/number}","contents_url":"https://api.github.com/repos/jotak/grafana/contents/{+path}","compare_url":"https://api.github.com/repos/jotak/grafana/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jotak/grafana/merges","archive_url":"https://api.github.com/repos/jotak/grafana/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jotak/grafana/downloads","issues_url":"https://api.github.com/repos/jotak/grafana/issues{/number}","pulls_url":"https://api.github.com/repos/jotak/grafana/pulls{/number}","milestones_url":"https://api.github.com/repos/jotak/grafana/milestones{/number}","notifications_url":"https://api.github.com/repos/jotak/grafana/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jotak/grafana/labels{/name}","releases_url":"https://api.github.com/repos/jotak/grafana/releases{/id}","deployments_url":"https://api.github.com/repos/jotak/grafana/deployments","created_at":"2016-08-23T06:56:06Z","updated_at":"2016-08-23T06:56:10Z","pushed_at":"2016-08-25T12:49:35Z","git_url":"git://github.com/jotak/grafana.git","ssh_url":"git@github.com:jotak/grafana.git","clone_url":"https://github.com/jotak/grafana.git","svn_url":"https://github.com/jotak/grafana","homepage":"http://grafana.org","size":98900,"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":"5b9366a9c320396e06db52f2f381f361fdd03eca","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 & Prometheus","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-11-30T08:05:08Z","pushed_at":"2016-11-30T05:39:59Z","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":151600,"stargazers_count":13088,"watchers_count":13088,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2035,"mirror_url":null,"open_issues_count":834,"forks":2035,"open_issues":834,"watchers":13088,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/grafana/grafana/pulls/5903"},"html":{"href":"https://github.com/grafana/grafana/pull/5903"},"issue":{"href":"https://api.github.com/repos/grafana/grafana/issues/5903"},"comments":{"href":"https://api.github.com/repos/grafana/grafana/issues/5903/comments"},"review_comments":{"href":"https://api.github.com/repos/grafana/grafana/pulls/5903/comments"},"review_comment":{"href":"https://api.github.com/repos/grafana/grafana/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/grafana/grafana/pulls/5903/commits"},"statuses":{"href":"https://api.github.com/repos/grafana/grafana/statuses/a8ea214262d13f7a8d822ff4c2c91d40ac70a6ab"}},"merged":false,"mergeable":false,"mergeable_state":"dirty","merged_by":null,"comments":1,"review_comments":0,"commits":1,"additions":173,"deletions":28,"changed_files":2}}
{"actor":{"display_login":"jotak"}}