{"action":"created","comment":{"url":"https://api.github.com/repos/caskdata/cdap/pulls/comments/75135465","id":75135465,"diff_hunk":"@@ -268,45 +287,137 @@ function link (scope, element) {\n \n   scope.updateSlider = updateSlider;\n \n-  var generateEventCircles = function (){\n-    let circleClass;\n+  const generateEventCircles = () => {\n+\n+    //Clears the tooltip regularly\n+    d3.selectAll('.circle-tooltip').remove();\n+\n+    circleTooltip = d3.select('body').append('div')\n+      .attr('class', 'circle-tooltip')\n+      .style('opacity', 0);\n+\n+    timelineStack = {};\n+    let errorMap = {};\n+    let warningMap = {};\n+    timelineData = scope.metadata;\n+\n+    //Subroutine\n+    const mapEvents = (type, data) => {\n+      let typeMap;\n+      if(type === 'warn'){\n+        typeMap = warningMap;\n+      } else if(type === 'error'){\n+        typeMap = errorMap;\n+      }\n+\n+      for(let k = 0; k < data.length; k++){\n+        let currentItem = data[k];\n+        let xVal = Math.floor(xScale(currentItem.time * 1000));\n+        typeMap[xVal] = currentItem.value;\n+      }\n+      return typeMap;\n+    };\n \n     if(timelineData.qid.series.length > 0){\n       for(let i = 0; i < timelineData.qid.series.length; i++){\n-\n         switch(timelineData.qid.series[i].metricName){\n           case 'system.app.log.error':\n-            circleClass = 'red-circle';\n+            errorMap = mapEvents('error', timelineData.qid.series[i].data);\n             break;\n           case 'system.app.log.warn':\n-            circleClass = 'yellow-circle';\n+            warningMap = mapEvents('warn', timelineData.qid.series[i].data);\n             break;\n           default:\n-            circleClass = 'other-circle';\n             break;\n         }\n+      }\n+    }\n \n-        for(let j = 0; j < timelineData.qid.series[i].data.length; j++){\n-          let currentItem = timelineData.qid.series[i].data[j];\n-          let xVal = Math.floor(xScale(currentItem.time));\n-          let numEvents = currentItem.value;\n-\n-          if(timelineStack[xVal] === undefined) {\n-            timelineStack[xVal] = 0;\n-          }\n+    const circleTooltipHoverOn = function(position, errors, warnings) {\n+      let date = xScale.invert(position).toString();\n+      date = date.substring(0, date.length - 14);","path":"cdap-ui/app/directives/timeline/timeline.js","position":145,"original_position":145,"commit_id":"6bfbb797943e7dacad067836cdfb85fcf7a9703a","original_commit_id":"6bfbb797943e7dacad067836cdfb85fcf7a9703a","user":{"login":"PGuimarais","id":7697583,"avatar_url":"https://avatars.githubusercontent.com/u/7697583?v=3","gravatar_id":"","url":"https://api.github.com/users/PGuimarais","html_url":"https://github.com/PGuimarais","followers_url":"https://api.github.com/users/PGuimarais/followers","following_url":"https://api.github.com/users/PGuimarais/following{/other_user}","gists_url":"https://api.github.com/users/PGuimarais/gists{/gist_id}","starred_url":"https://api.github.com/users/PGuimarais/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PGuimarais/subscriptions","organizations_url":"https://api.github.com/users/PGuimarais/orgs","repos_url":"https://api.github.com/users/PGuimarais/repos","events_url":"https://api.github.com/users/PGuimarais/events{/privacy}","received_events_url":"https://api.github.com/users/PGuimarais/received_events","type":"User","site_admin":false},"body":"It strips away timezone information from being displayed in the tooltip","created_at":"2016-08-17T14:37:27Z","updated_at":"2016-08-17T14:37:27Z","html_url":"https://github.com/caskdata/cdap/pull/6389#discussion_r75135465","pull_request_url":"https://api.github.com/repos/caskdata/cdap/pulls/6389","_links":{"self":{"href":"https://api.github.com/repos/caskdata/cdap/pulls/comments/75135465"},"html":{"href":"https://github.com/caskdata/cdap/pull/6389#discussion_r75135465"},"pull_request":{"href":"https://api.github.com/repos/caskdata/cdap/pulls/6389"}}},"pull_request":{"url":"https://api.github.com/repos/caskdata/cdap/pulls/6389","id":80897192,"html_url":"https://github.com/caskdata/cdap/pull/6389","diff_url":"https://github.com/caskdata/cdap/pull/6389.diff","patch_url":"https://github.com/caskdata/cdap/pull/6389.patch","issue_url":"https://api.github.com/repos/caskdata/cdap/issues/6389","number":6389,"state":"open","locked":false,"title":"[CDAP-6902] Feature/ui log viewer circles","user":{"login":"PGuimarais","id":7697583,"avatar_url":"https://avatars.githubusercontent.com/u/7697583?v=3","gravatar_id":"","url":"https://api.github.com/users/PGuimarais","html_url":"https://github.com/PGuimarais","followers_url":"https://api.github.com/users/PGuimarais/followers","following_url":"https://api.github.com/users/PGuimarais/following{/other_user}","gists_url":"https://api.github.com/users/PGuimarais/gists{/gist_id}","starred_url":"https://api.github.com/users/PGuimarais/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PGuimarais/subscriptions","organizations_url":"https://api.github.com/users/PGuimarais/orgs","repos_url":"https://api.github.com/users/PGuimarais/repos","events_url":"https://api.github.com/users/PGuimarais/events{/privacy}","received_events_url":"https://api.github.com/users/PGuimarais/received_events","type":"User","site_admin":false},"body":"![logviewer search and circles](https://cloud.githubusercontent.com/assets/7697583/17577419/57ec9ba6-5f32-11e6-9a7d-aa1fd08cf916.png)\r\n\r\n- Adds logic for rendering notable events (errors/warnings)\r\n- Reveals tooltip when hovering over stack of 5 circles ; reveals how many events have occurred at that point in time\r\n- Search now renders blue circles across the timeline to visualize when search results occurred\r\n\r\nhttps://issues.cask.co/browse/CDAP-6902\r\n\r\nBamboo Build:\r\nhttp://builds.cask.co/browse/CDAP-DRC4237","created_at":"2016-08-11T02:33:30Z","updated_at":"2016-08-17T14:37:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"76cd16046c96a38127adbeecde7859a09e9e1c85","assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/caskdata/cdap/milestones/25","html_url":"https://github.com/caskdata/cdap/milestones/3.5","labels_url":"https://api.github.com/repos/caskdata/cdap/milestones/25/labels","id":1745860,"number":25,"title":"3.5","description":null,"creator":{"login":"rohitsinha54","id":1472867,"avatar_url":"https://avatars.githubusercontent.com/u/1472867?v=3","gravatar_id":"","url":"https://api.github.com/users/rohitsinha54","html_url":"https://github.com/rohitsinha54","followers_url":"https://api.github.com/users/rohitsinha54/followers","following_url":"https://api.github.com/users/rohitsinha54/following{/other_user}","gists_url":"https://api.github.com/users/rohitsinha54/gists{/gist_id}","starred_url":"https://api.github.com/users/rohitsinha54/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rohitsinha54/subscriptions","organizations_url":"https://api.github.com/users/rohitsinha54/orgs","repos_url":"https://api.github.com/users/rohitsinha54/repos","events_url":"https://api.github.com/users/rohitsinha54/events{/privacy}","received_events_url":"https://api.github.com/users/rohitsinha54/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":130,"state":"open","created_at":"2016-05-03T18:02:56Z","updated_at":"2016-08-17T14:33:21Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/caskdata/cdap/pulls/6389/commits","review_comments_url":"https://api.github.com/repos/caskdata/cdap/pulls/6389/comments","review_comment_url":"https://api.github.com/repos/caskdata/cdap/pulls/comments{/number}","comments_url":"https://api.github.com/repos/caskdata/cdap/issues/6389/comments","statuses_url":"https://api.github.com/repos/caskdata/cdap/statuses/6bfbb797943e7dacad067836cdfb85fcf7a9703a","head":{"label":"caskdata:feature/ui-log-viewer-circles","ref":"feature/ui-log-viewer-circles","sha":"6bfbb797943e7dacad067836cdfb85fcf7a9703a","user":{"login":"caskdata","id":8123023,"avatar_url":"https://avatars.githubusercontent.com/u/8123023?v=3","gravatar_id":"","url":"https://api.github.com/users/caskdata","html_url":"https://github.com/caskdata","followers_url":"https://api.github.com/users/caskdata/followers","following_url":"https://api.github.com/users/caskdata/following{/other_user}","gists_url":"https://api.github.com/users/caskdata/gists{/gist_id}","starred_url":"https://api.github.com/users/caskdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caskdata/subscriptions","organizations_url":"https://api.github.com/users/caskdata/orgs","repos_url":"https://api.github.com/users/caskdata/repos","events_url":"https://api.github.com/users/caskdata/events{/privacy}","received_events_url":"https://api.github.com/users/caskdata/received_events","type":"Organization","site_admin":false},"repo":{"id":22542759,"name":"cdap","full_name":"caskdata/cdap","owner":{"login":"caskdata","id":8123023,"avatar_url":"https://avatars.githubusercontent.com/u/8123023?v=3","gravatar_id":"","url":"https://api.github.com/users/caskdata","html_url":"https://github.com/caskdata","followers_url":"https://api.github.com/users/caskdata/followers","following_url":"https://api.github.com/users/caskdata/following{/other_user}","gists_url":"https://api.github.com/users/caskdata/gists{/gist_id}","starred_url":"https://api.github.com/users/caskdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caskdata/subscriptions","organizations_url":"https://api.github.com/users/caskdata/orgs","repos_url":"https://api.github.com/users/caskdata/repos","events_url":"https://api.github.com/users/caskdata/events{/privacy}","received_events_url":"https://api.github.com/users/caskdata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/caskdata/cdap","description":"Cask Data Application Platform (CDAP)","fork":false,"url":"https://api.github.com/repos/caskdata/cdap","forks_url":"https://api.github.com/repos/caskdata/cdap/forks","keys_url":"https://api.github.com/repos/caskdata/cdap/keys{/key_id}","collaborators_url":"https://api.github.com/repos/caskdata/cdap/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/caskdata/cdap/teams","hooks_url":"https://api.github.com/repos/caskdata/cdap/hooks","issue_events_url":"https://api.github.com/repos/caskdata/cdap/issues/events{/number}","events_url":"https://api.github.com/repos/caskdata/cdap/events","assignees_url":"https://api.github.com/repos/caskdata/cdap/assignees{/user}","branches_url":"https://api.github.com/repos/caskdata/cdap/branches{/branch}","tags_url":"https://api.github.com/repos/caskdata/cdap/tags","blobs_url":"https://api.github.com/repos/caskdata/cdap/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/caskdata/cdap/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/caskdata/cdap/git/refs{/sha}","trees_url":"https://api.github.com/repos/caskdata/cdap/git/trees{/sha}","statuses_url":"https://api.github.com/repos/caskdata/cdap/statuses/{sha}","languages_url":"https://api.github.com/repos/caskdata/cdap/languages","stargazers_url":"https://api.github.com/repos/caskdata/cdap/stargazers","contributors_url":"https://api.github.com/repos/caskdata/cdap/contributors","subscribers_url":"https://api.github.com/repos/caskdata/cdap/subscribers","subscription_url":"https://api.github.com/repos/caskdata/cdap/subscription","commits_url":"https://api.github.com/repos/caskdata/cdap/commits{/sha}","git_commits_url":"https://api.github.com/repos/caskdata/cdap/git/commits{/sha}","comments_url":"https://api.github.com/repos/caskdata/cdap/comments{/number}","issue_comment_url":"https://api.github.com/repos/caskdata/cdap/issues/comments{/number}","contents_url":"https://api.github.com/repos/caskdata/cdap/contents/{+path}","compare_url":"https://api.github.com/repos/caskdata/cdap/compare/{base}...{head}","merges_url":"https://api.github.com/repos/caskdata/cdap/merges","archive_url":"https://api.github.com/repos/caskdata/cdap/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/caskdata/cdap/downloads","issues_url":"https://api.github.com/repos/caskdata/cdap/issues{/number}","pulls_url":"https://api.github.com/repos/caskdata/cdap/pulls{/number}","milestones_url":"https://api.github.com/repos/caskdata/cdap/milestones{/number}","notifications_url":"https://api.github.com/repos/caskdata/cdap/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/caskdata/cdap/labels{/name}","releases_url":"https://api.github.com/repos/caskdata/cdap/releases{/id}","deployments_url":"https://api.github.com/repos/caskdata/cdap/deployments","created_at":"2014-08-02T09:00:10Z","updated_at":"2016-07-29T12:19:53Z","pushed_at":"2016-08-17T14:33:21Z","git_url":"git://github.com/caskdata/cdap.git","ssh_url":"git@github.com:caskdata/cdap.git","clone_url":"https://github.com/caskdata/cdap.git","svn_url":"https://github.com/caskdata/cdap","homepage":"http://cdap.io","size":630740,"stargazers_count":137,"watchers_count":137,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":53,"mirror_url":null,"open_issues_count":39,"forks":53,"open_issues":39,"watchers":137,"default_branch":"release/3.5"}},"base":{"label":"caskdata:release/3.5","ref":"release/3.5","sha":"23d941cbeb49b49b68caf7c7918be57f192b4b8c","user":{"login":"caskdata","id":8123023,"avatar_url":"https://avatars.githubusercontent.com/u/8123023?v=3","gravatar_id":"","url":"https://api.github.com/users/caskdata","html_url":"https://github.com/caskdata","followers_url":"https://api.github.com/users/caskdata/followers","following_url":"https://api.github.com/users/caskdata/following{/other_user}","gists_url":"https://api.github.com/users/caskdata/gists{/gist_id}","starred_url":"https://api.github.com/users/caskdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caskdata/subscriptions","organizations_url":"https://api.github.com/users/caskdata/orgs","repos_url":"https://api.github.com/users/caskdata/repos","events_url":"https://api.github.com/users/caskdata/events{/privacy}","received_events_url":"https://api.github.com/users/caskdata/received_events","type":"Organization","site_admin":false},"repo":{"id":22542759,"name":"cdap","full_name":"caskdata/cdap","owner":{"login":"caskdata","id":8123023,"avatar_url":"https://avatars.githubusercontent.com/u/8123023?v=3","gravatar_id":"","url":"https://api.github.com/users/caskdata","html_url":"https://github.com/caskdata","followers_url":"https://api.github.com/users/caskdata/followers","following_url":"https://api.github.com/users/caskdata/following{/other_user}","gists_url":"https://api.github.com/users/caskdata/gists{/gist_id}","starred_url":"https://api.github.com/users/caskdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caskdata/subscriptions","organizations_url":"https://api.github.com/users/caskdata/orgs","repos_url":"https://api.github.com/users/caskdata/repos","events_url":"https://api.github.com/users/caskdata/events{/privacy}","received_events_url":"https://api.github.com/users/caskdata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/caskdata/cdap","description":"Cask Data Application Platform (CDAP)","fork":false,"url":"https://api.github.com/repos/caskdata/cdap","forks_url":"https://api.github.com/repos/caskdata/cdap/forks","keys_url":"https://api.github.com/repos/caskdata/cdap/keys{/key_id}","collaborators_url":"https://api.github.com/repos/caskdata/cdap/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/caskdata/cdap/teams","hooks_url":"https://api.github.com/repos/caskdata/cdap/hooks","issue_events_url":"https://api.github.com/repos/caskdata/cdap/issues/events{/number}","events_url":"https://api.github.com/repos/caskdata/cdap/events","assignees_url":"https://api.github.com/repos/caskdata/cdap/assignees{/user}","branches_url":"https://api.github.com/repos/caskdata/cdap/branches{/branch}","tags_url":"https://api.github.com/repos/caskdata/cdap/tags","blobs_url":"https://api.github.com/repos/caskdata/cdap/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/caskdata/cdap/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/caskdata/cdap/git/refs{/sha}","trees_url":"https://api.github.com/repos/caskdata/cdap/git/trees{/sha}","statuses_url":"https://api.github.com/repos/caskdata/cdap/statuses/{sha}","languages_url":"https://api.github.com/repos/caskdata/cdap/languages","stargazers_url":"https://api.github.com/repos/caskdata/cdap/stargazers","contributors_url":"https://api.github.com/repos/caskdata/cdap/contributors","subscribers_url":"https://api.github.com/repos/caskdata/cdap/subscribers","subscription_url":"https://api.github.com/repos/caskdata/cdap/subscription","commits_url":"https://api.github.com/repos/caskdata/cdap/commits{/sha}","git_commits_url":"https://api.github.com/repos/caskdata/cdap/git/commits{/sha}","comments_url":"https://api.github.com/repos/caskdata/cdap/comments{/number}","issue_comment_url":"https://api.github.com/repos/caskdata/cdap/issues/comments{/number}","contents_url":"https://api.github.com/repos/caskdata/cdap/contents/{+path}","compare_url":"https://api.github.com/repos/caskdata/cdap/compare/{base}...{head}","merges_url":"https://api.github.com/repos/caskdata/cdap/merges","archive_url":"https://api.github.com/repos/caskdata/cdap/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/caskdata/cdap/downloads","issues_url":"https://api.github.com/repos/caskdata/cdap/issues{/number}","pulls_url":"https://api.github.com/repos/caskdata/cdap/pulls{/number}","milestones_url":"https://api.github.com/repos/caskdata/cdap/milestones{/number}","notifications_url":"https://api.github.com/repos/caskdata/cdap/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/caskdata/cdap/labels{/name}","releases_url":"https://api.github.com/repos/caskdata/cdap/releases{/id}","deployments_url":"https://api.github.com/repos/caskdata/cdap/deployments","created_at":"2014-08-02T09:00:10Z","updated_at":"2016-07-29T12:19:53Z","pushed_at":"2016-08-17T14:33:21Z","git_url":"git://github.com/caskdata/cdap.git","ssh_url":"git@github.com:caskdata/cdap.git","clone_url":"https://github.com/caskdata/cdap.git","svn_url":"https://github.com/caskdata/cdap","homepage":"http://cdap.io","size":630740,"stargazers_count":137,"watchers_count":137,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":53,"mirror_url":null,"open_issues_count":39,"forks":53,"open_issues":39,"watchers":137,"default_branch":"release/3.5"}},"_links":{"self":{"href":"https://api.github.com/repos/caskdata/cdap/pulls/6389"},"html":{"href":"https://github.com/caskdata/cdap/pull/6389"},"issue":{"href":"https://api.github.com/repos/caskdata/cdap/issues/6389"},"comments":{"href":"https://api.github.com/repos/caskdata/cdap/issues/6389/comments"},"review_comments":{"href":"https://api.github.com/repos/caskdata/cdap/pulls/6389/comments"},"review_comment":{"href":"https://api.github.com/repos/caskdata/cdap/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/caskdata/cdap/pulls/6389/commits"},"statuses":{"href":"https://api.github.com/repos/caskdata/cdap/statuses/6bfbb797943e7dacad067836cdfb85fcf7a9703a"}}}}
{"actor":{"display_login":"PGuimarais"}}