{"action":"created","comment":{"url":"https://api.github.com/repos/elastic/kibana/pulls/comments/34289799","id":34289799,"diff_hunk":"@@ -0,0 +1,36 @@\n+define(function (require) {\n+  return function AggTypeMetricMaxProvider(Private) {\n+    var _ = require('lodash');\n+    var MetricAggType = Private(require('components/agg_types/metrics/_metric_agg_type'));\n+    var getResponseAggConfig = Private(require('components/agg_types/metrics/_get_response_agg_config'));\n+\n+    return new MetricAggType({\n+      name: 'median',\n+      dslName: 'percentiles',\n+      title: 'Median',\n+      makeLabel: function (aggConfig) {\n+        return 'Median ' + aggConfig.params.field.displayName;\n+      },\n+      params: [\n+        {\n+          name: 'field',\n+          filterFieldTypes: 'number'\n+        }, {\n+          name: 'percents',\n+          default: [50]\n+        }\n+      ],\n+      getResponseAggs: function (agg) {","path":"src/kibana/components/agg_types/metrics/median.js","position":null,"original_position":23,"commit_id":"e9479b1d5682a4d47c9f56c79e306d385f97a8da","original_commit_id":"4909c0ae48a921ea7c87e1086bd31a913e42cc69","user":{"login":"jbudz","id":3143860,"avatar_url":"https://avatars.githubusercontent.com/u/3143860?v=3","gravatar_id":"","url":"https://api.github.com/users/jbudz","html_url":"https://github.com/jbudz","followers_url":"https://api.github.com/users/jbudz/followers","following_url":"https://api.github.com/users/jbudz/following{/other_user}","gists_url":"https://api.github.com/users/jbudz/gists{/gist_id}","starred_url":"https://api.github.com/users/jbudz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbudz/subscriptions","organizations_url":"https://api.github.com/users/jbudz/orgs","repos_url":"https://api.github.com/users/jbudz/repos","events_url":"https://api.github.com/users/jbudz/events{/privacy}","received_events_url":"https://api.github.com/users/jbudz/received_events","type":"User","site_admin":false},"body":"Added, it works.","created_at":"2015-07-09T18:51:58Z","updated_at":"2015-07-09T18:51:58Z","html_url":"https://github.com/elastic/kibana/pull/4359#discussion_r34289799","pull_request_url":"https://api.github.com/repos/elastic/kibana/pulls/4359","_links":{"self":{"href":"https://api.github.com/repos/elastic/kibana/pulls/comments/34289799"},"html":{"href":"https://github.com/elastic/kibana/pull/4359#discussion_r34289799"},"pull_request":{"href":"https://api.github.com/repos/elastic/kibana/pulls/4359"}}},"pull_request":{"url":"https://api.github.com/repos/elastic/kibana/pulls/4359","id":38899488,"html_url":"https://github.com/elastic/kibana/pull/4359","diff_url":"https://github.com/elastic/kibana/pull/4359.diff","patch_url":"https://github.com/elastic/kibana/pull/4359.patch","issue_url":"https://api.github.com/repos/elastic/kibana/issues/4359","number":4359,"state":"open","locked":false,"title":"Add median aggregation.  Closes #3687","user":{"login":"jbudz","id":3143860,"avatar_url":"https://avatars.githubusercontent.com/u/3143860?v=3","gravatar_id":"","url":"https://api.github.com/users/jbudz","html_url":"https://github.com/jbudz","followers_url":"https://api.github.com/users/jbudz/followers","following_url":"https://api.github.com/users/jbudz/following{/other_user}","gists_url":"https://api.github.com/users/jbudz/gists{/gist_id}","starred_url":"https://api.github.com/users/jbudz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbudz/subscriptions","organizations_url":"https://api.github.com/users/jbudz/orgs","repos_url":"https://api.github.com/users/jbudz/repos","events_url":"https://api.github.com/users/jbudz/events{/privacy}","received_events_url":"https://api.github.com/users/jbudz/received_events","type":"User","site_admin":false},"body":"Adds a median aggregation on the Y-Axis. Closes #3687","created_at":"2015-06-30T16:48:10Z","updated_at":"2015-07-09T18:51:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"90f65e8f3cd1c2960949d5b55fa42f4b17506c70","assignee":{"login":"jbudz","id":3143860,"avatar_url":"https://avatars.githubusercontent.com/u/3143860?v=3","gravatar_id":"","url":"https://api.github.com/users/jbudz","html_url":"https://github.com/jbudz","followers_url":"https://api.github.com/users/jbudz/followers","following_url":"https://api.github.com/users/jbudz/following{/other_user}","gists_url":"https://api.github.com/users/jbudz/gists{/gist_id}","starred_url":"https://api.github.com/users/jbudz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbudz/subscriptions","organizations_url":"https://api.github.com/users/jbudz/orgs","repos_url":"https://api.github.com/users/jbudz/repos","events_url":"https://api.github.com/users/jbudz/events{/privacy}","received_events_url":"https://api.github.com/users/jbudz/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/elastic/kibana/pulls/4359/commits","review_comments_url":"https://api.github.com/repos/elastic/kibana/pulls/4359/comments","review_comment_url":"https://api.github.com/repos/elastic/kibana/pulls/comments{/number}","comments_url":"https://api.github.com/repos/elastic/kibana/issues/4359/comments","statuses_url":"https://api.github.com/repos/elastic/kibana/statuses/e9479b1d5682a4d47c9f56c79e306d385f97a8da","head":{"label":"jbudz:issues/3687","ref":"issues/3687","sha":"e9479b1d5682a4d47c9f56c79e306d385f97a8da","user":{"login":"jbudz","id":3143860,"avatar_url":"https://avatars.githubusercontent.com/u/3143860?v=3","gravatar_id":"","url":"https://api.github.com/users/jbudz","html_url":"https://github.com/jbudz","followers_url":"https://api.github.com/users/jbudz/followers","following_url":"https://api.github.com/users/jbudz/following{/other_user}","gists_url":"https://api.github.com/users/jbudz/gists{/gist_id}","starred_url":"https://api.github.com/users/jbudz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbudz/subscriptions","organizations_url":"https://api.github.com/users/jbudz/orgs","repos_url":"https://api.github.com/users/jbudz/repos","events_url":"https://api.github.com/users/jbudz/events{/privacy}","received_events_url":"https://api.github.com/users/jbudz/received_events","type":"User","site_admin":false},"repo":{"id":38205995,"name":"kibana","full_name":"jbudz/kibana","owner":{"login":"jbudz","id":3143860,"avatar_url":"https://avatars.githubusercontent.com/u/3143860?v=3","gravatar_id":"","url":"https://api.github.com/users/jbudz","html_url":"https://github.com/jbudz","followers_url":"https://api.github.com/users/jbudz/followers","following_url":"https://api.github.com/users/jbudz/following{/other_user}","gists_url":"https://api.github.com/users/jbudz/gists{/gist_id}","starred_url":"https://api.github.com/users/jbudz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbudz/subscriptions","organizations_url":"https://api.github.com/users/jbudz/orgs","repos_url":"https://api.github.com/users/jbudz/repos","events_url":"https://api.github.com/users/jbudz/events{/privacy}","received_events_url":"https://api.github.com/users/jbudz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jbudz/kibana","description":"Kibana","fork":true,"url":"https://api.github.com/repos/jbudz/kibana","forks_url":"https://api.github.com/repos/jbudz/kibana/forks","keys_url":"https://api.github.com/repos/jbudz/kibana/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jbudz/kibana/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jbudz/kibana/teams","hooks_url":"https://api.github.com/repos/jbudz/kibana/hooks","issue_events_url":"https://api.github.com/repos/jbudz/kibana/issues/events{/number}","events_url":"https://api.github.com/repos/jbudz/kibana/events","assignees_url":"https://api.github.com/repos/jbudz/kibana/assignees{/user}","branches_url":"https://api.github.com/repos/jbudz/kibana/branches{/branch}","tags_url":"https://api.github.com/repos/jbudz/kibana/tags","blobs_url":"https://api.github.com/repos/jbudz/kibana/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jbudz/kibana/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jbudz/kibana/git/refs{/sha}","trees_url":"https://api.github.com/repos/jbudz/kibana/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jbudz/kibana/statuses/{sha}","languages_url":"https://api.github.com/repos/jbudz/kibana/languages","stargazers_url":"https://api.github.com/repos/jbudz/kibana/stargazers","contributors_url":"https://api.github.com/repos/jbudz/kibana/contributors","subscribers_url":"https://api.github.com/repos/jbudz/kibana/subscribers","subscription_url":"https://api.github.com/repos/jbudz/kibana/subscription","commits_url":"https://api.github.com/repos/jbudz/kibana/commits{/sha}","git_commits_url":"https://api.github.com/repos/jbudz/kibana/git/commits{/sha}","comments_url":"https://api.github.com/repos/jbudz/kibana/comments{/number}","issue_comment_url":"https://api.github.com/repos/jbudz/kibana/issues/comments{/number}","contents_url":"https://api.github.com/repos/jbudz/kibana/contents/{+path}","compare_url":"https://api.github.com/repos/jbudz/kibana/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jbudz/kibana/merges","archive_url":"https://api.github.com/repos/jbudz/kibana/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jbudz/kibana/downloads","issues_url":"https://api.github.com/repos/jbudz/kibana/issues{/number}","pulls_url":"https://api.github.com/repos/jbudz/kibana/pulls{/number}","milestones_url":"https://api.github.com/repos/jbudz/kibana/milestones{/number}","notifications_url":"https://api.github.com/repos/jbudz/kibana/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jbudz/kibana/labels{/name}","releases_url":"https://api.github.com/repos/jbudz/kibana/releases{/id}","created_at":"2015-06-28T16:35:41Z","updated_at":"2015-06-28T16:35:44Z","pushed_at":"2015-07-09T18:03:08Z","git_url":"git://github.com/jbudz/kibana.git","ssh_url":"git@github.com:jbudz/kibana.git","clone_url":"https://github.com/jbudz/kibana.git","svn_url":"https://github.com/jbudz/kibana","homepage":"https://www.elastic.co/products/kibana","size":57117,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"elastic:master","ref":"master","sha":"fa35ba868590791123b80eb324f3cf9ace0614f5","user":{"login":"elastic","id":6764390,"avatar_url":"https://avatars.githubusercontent.com/u/6764390?v=3","gravatar_id":"","url":"https://api.github.com/users/elastic","html_url":"https://github.com/elastic","followers_url":"https://api.github.com/users/elastic/followers","following_url":"https://api.github.com/users/elastic/following{/other_user}","gists_url":"https://api.github.com/users/elastic/gists{/gist_id}","starred_url":"https://api.github.com/users/elastic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elastic/subscriptions","organizations_url":"https://api.github.com/users/elastic/orgs","repos_url":"https://api.github.com/users/elastic/repos","events_url":"https://api.github.com/users/elastic/events{/privacy}","received_events_url":"https://api.github.com/users/elastic/received_events","type":"Organization","site_admin":false},"repo":{"id":7833168,"name":"kibana","full_name":"elastic/kibana","owner":{"login":"elastic","id":6764390,"avatar_url":"https://avatars.githubusercontent.com/u/6764390?v=3","gravatar_id":"","url":"https://api.github.com/users/elastic","html_url":"https://github.com/elastic","followers_url":"https://api.github.com/users/elastic/followers","following_url":"https://api.github.com/users/elastic/following{/other_user}","gists_url":"https://api.github.com/users/elastic/gists{/gist_id}","starred_url":"https://api.github.com/users/elastic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elastic/subscriptions","organizations_url":"https://api.github.com/users/elastic/orgs","repos_url":"https://api.github.com/users/elastic/repos","events_url":"https://api.github.com/users/elastic/events{/privacy}","received_events_url":"https://api.github.com/users/elastic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/elastic/kibana","description":"Kibana","fork":false,"url":"https://api.github.com/repos/elastic/kibana","forks_url":"https://api.github.com/repos/elastic/kibana/forks","keys_url":"https://api.github.com/repos/elastic/kibana/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elastic/kibana/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elastic/kibana/teams","hooks_url":"https://api.github.com/repos/elastic/kibana/hooks","issue_events_url":"https://api.github.com/repos/elastic/kibana/issues/events{/number}","events_url":"https://api.github.com/repos/elastic/kibana/events","assignees_url":"https://api.github.com/repos/elastic/kibana/assignees{/user}","branches_url":"https://api.github.com/repos/elastic/kibana/branches{/branch}","tags_url":"https://api.github.com/repos/elastic/kibana/tags","blobs_url":"https://api.github.com/repos/elastic/kibana/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elastic/kibana/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elastic/kibana/git/refs{/sha}","trees_url":"https://api.github.com/repos/elastic/kibana/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elastic/kibana/statuses/{sha}","languages_url":"https://api.github.com/repos/elastic/kibana/languages","stargazers_url":"https://api.github.com/repos/elastic/kibana/stargazers","contributors_url":"https://api.github.com/repos/elastic/kibana/contributors","subscribers_url":"https://api.github.com/repos/elastic/kibana/subscribers","subscription_url":"https://api.github.com/repos/elastic/kibana/subscription","commits_url":"https://api.github.com/repos/elastic/kibana/commits{/sha}","git_commits_url":"https://api.github.com/repos/elastic/kibana/git/commits{/sha}","comments_url":"https://api.github.com/repos/elastic/kibana/comments{/number}","issue_comment_url":"https://api.github.com/repos/elastic/kibana/issues/comments{/number}","contents_url":"https://api.github.com/repos/elastic/kibana/contents/{+path}","compare_url":"https://api.github.com/repos/elastic/kibana/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elastic/kibana/merges","archive_url":"https://api.github.com/repos/elastic/kibana/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elastic/kibana/downloads","issues_url":"https://api.github.com/repos/elastic/kibana/issues{/number}","pulls_url":"https://api.github.com/repos/elastic/kibana/pulls{/number}","milestones_url":"https://api.github.com/repos/elastic/kibana/milestones{/number}","notifications_url":"https://api.github.com/repos/elastic/kibana/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elastic/kibana/labels{/name}","releases_url":"https://api.github.com/repos/elastic/kibana/releases{/id}","created_at":"2013-01-26T04:00:59Z","updated_at":"2015-07-09T11:52:59Z","pushed_at":"2015-07-09T18:09:28Z","git_url":"git://github.com/elastic/kibana.git","ssh_url":"git@github.com:elastic/kibana.git","clone_url":"https://github.com/elastic/kibana.git","svn_url":"https://github.com/elastic/kibana","homepage":"https://www.elastic.co/products/kibana","size":94141,"stargazers_count":3799,"watchers_count":3799,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1403,"mirror_url":null,"open_issues_count":568,"forks":1403,"open_issues":568,"watchers":3799,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/elastic/kibana/pulls/4359"},"html":{"href":"https://github.com/elastic/kibana/pull/4359"},"issue":{"href":"https://api.github.com/repos/elastic/kibana/issues/4359"},"comments":{"href":"https://api.github.com/repos/elastic/kibana/issues/4359/comments"},"review_comments":{"href":"https://api.github.com/repos/elastic/kibana/pulls/4359/comments"},"review_comment":{"href":"https://api.github.com/repos/elastic/kibana/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/elastic/kibana/pulls/4359/commits"},"statuses":{"href":"https://api.github.com/repos/elastic/kibana/statuses/e9479b1d5682a4d47c9f56c79e306d385f97a8da"}}}}