{"action":"created","comment":{"url":"https://api.github.com/repos/RocketChat/Rocket.Chat/pulls/comments/210903672","pull_request_review_id":147218442,"id":210903672,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMDkwMzY3Mg==","diff_hunk":"@@ -0,0 +1,210 @@\n+/* globals popover */\n+\n+import {drawLineChart} from '../../../lib/chartHandler';\n+import {setDateRange, updateDateRange} from '../../../lib/dateHandler';\n+\n+let templateInstance;\t\t// current template instance/context\n+let chartContext;\t\t\t// stores context of current chart, used to clean when redrawing\n+\n+const analyticsAllOptions = () => {\n+\treturn [{\n+\t\tname: 'Conversations',\n+\t\tvalue: 'conversations',\n+\t\tchartOptions: [{\n+\t\t\tname: 'Total_conversations',\n+\t\t\tvalue: 'total-conversations'\n+\t\t}, {\n+\t\t\tname: 'Avg_chat_duration',\n+\t\t\tvalue: 'avg-chat-duration'\n+\t\t}, {\n+\t\t\tname: 'Total_messages',\n+\t\t\tvalue: 'total-messages'\n+\t\t}]","path":"packages/rocketchat-livechat/client/views/app/analytics/livechatAnalytics.js","position":22,"original_position":22,"commit_id":"47ecb6a0b6f581bf75cbbf2bbae66861d2a784eb","original_commit_id":"47ecb6a0b6f581bf75cbbf2bbae66861d2a784eb","user":{"login":"codacy-bot","id":19940114,"node_id":"MDQ6VXNlcjE5OTQwMTE0","avatar_url":"https://avatars1.githubusercontent.com/u/19940114?v=4","gravatar_id":"","url":"https://api.github.com/users/codacy-bot","html_url":"https://github.com/codacy-bot","followers_url":"https://api.github.com/users/codacy-bot/followers","following_url":"https://api.github.com/users/codacy-bot/following{/other_user}","gists_url":"https://api.github.com/users/codacy-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/codacy-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codacy-bot/subscriptions","organizations_url":"https://api.github.com/users/codacy-bot/orgs","repos_url":"https://api.github.com/users/codacy-bot/repos","events_url":"https://api.github.com/users/codacy-bot/events{/privacy}","received_events_url":"https://api.github.com/users/codacy-bot/received_events","type":"User","site_admin":false},"body":"![Codacy](https://app.codacy.com/assets/images/favicon.png) Issue found: [Missing trailing comma. (comma-dangle)](https://app.codacy.com/app/RocketChat/Rocket-Chat/pullRequest?prid=1818100)","created_at":"2018-08-17T13:10:14Z","updated_at":"2018-08-17T13:10:14Z","html_url":"https://github.com/RocketChat/Rocket.Chat/pull/11238#discussion_r210903672","pull_request_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/pulls/11238","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/RocketChat/Rocket.Chat/pulls/comments/210903672"},"html":{"href":"https://github.com/RocketChat/Rocket.Chat/pull/11238#discussion_r210903672"},"pull_request":{"href":"https://api.github.com/repos/RocketChat/Rocket.Chat/pulls/11238"}}},"pull_request":{"url":"https://api.github.com/repos/RocketChat/Rocket.Chat/pulls/11238","id":196898823,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk2ODk4ODIz","html_url":"https://github.com/RocketChat/Rocket.Chat/pull/11238","diff_url":"https://github.com/RocketChat/Rocket.Chat/pull/11238.diff","patch_url":"https://github.com/RocketChat/Rocket.Chat/pull/11238.patch","issue_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/issues/11238","number":11238,"state":"open","locked":false,"title":"[WIP] Livechat Analytics and Reports","user":{"login":"pkgodara","id":16938349,"node_id":"MDQ6VXNlcjE2OTM4MzQ5","avatar_url":"https://avatars0.githubusercontent.com/u/16938349?v=4","gravatar_id":"","url":"https://api.github.com/users/pkgodara","html_url":"https://github.com/pkgodara","followers_url":"https://api.github.com/users/pkgodara/followers","following_url":"https://api.github.com/users/pkgodara/following{/other_user}","gists_url":"https://api.github.com/users/pkgodara/gists{/gist_id}","starred_url":"https://api.github.com/users/pkgodara/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pkgodara/subscriptions","organizations_url":"https://api.github.com/users/pkgodara/orgs","repos_url":"https://api.github.com/users/pkgodara/repos","events_url":"https://api.github.com/users/pkgodara/events{/privacy}","received_events_url":"https://api.github.com/users/pkgodara/received_events","type":"User","site_admin":false},"body":"### Livechat Analytics and Reports project\r\n\r\n#### Info we wish to show:\r\n1. Avg. chat duration (day/week/month)\r\n2. Avg. response time (day/week/month)\r\n3. Avg. first response time (day/week/month)\r\n4. Top reaction time (day/week/month)\r\n5. Avg. chat wait time (day/week/month)\r\n6. Total Chats\r\n7. Avg. no of chats par day\r\n8. Busiest day\r\n9. Busiest time\r\n10. Total visitors\r\n... and some more planned! Stay tuned.\r\n\r\nDependent on #11733 .\r\n\r\n#### Planned:\r\n\r\n- [x] Analytics - containing chart\r\n\r\n- [x] Real-time monitoring - Real-time analytics\r\n\r\n- [ ] Migration for older live chats\r\n\r\n@renatobecker ","created_at":"2018-06-23T12:08:37Z","updated_at":"2018-08-17T13:10:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8909437e8b31f5172c9e94a687e79819137b5182","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/pulls/11238/commits","review_comments_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/pulls/11238/comments","review_comment_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/pulls/comments{/number}","comments_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/issues/11238/comments","statuses_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/statuses/47ecb6a0b6f581bf75cbbf2bbae66861d2a784eb","head":{"label":"pkgodara:livechat-analytics","ref":"livechat-analytics","sha":"47ecb6a0b6f581bf75cbbf2bbae66861d2a784eb","user":{"login":"pkgodara","id":16938349,"node_id":"MDQ6VXNlcjE2OTM4MzQ5","avatar_url":"https://avatars0.githubusercontent.com/u/16938349?v=4","gravatar_id":"","url":"https://api.github.com/users/pkgodara","html_url":"https://github.com/pkgodara","followers_url":"https://api.github.com/users/pkgodara/followers","following_url":"https://api.github.com/users/pkgodara/following{/other_user}","gists_url":"https://api.github.com/users/pkgodara/gists{/gist_id}","starred_url":"https://api.github.com/users/pkgodara/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pkgodara/subscriptions","organizations_url":"https://api.github.com/users/pkgodara/orgs","repos_url":"https://api.github.com/users/pkgodara/repos","events_url":"https://api.github.com/users/pkgodara/events{/privacy}","received_events_url":"https://api.github.com/users/pkgodara/received_events","type":"User","site_admin":false},"repo":{"id":91765126,"node_id":"MDEwOlJlcG9zaXRvcnk5MTc2NTEyNg==","name":"Rocket.Chat","full_name":"pkgodara/Rocket.Chat","owner":{"login":"pkgodara","id":16938349,"node_id":"MDQ6VXNlcjE2OTM4MzQ5","avatar_url":"https://avatars0.githubusercontent.com/u/16938349?v=4","gravatar_id":"","url":"https://api.github.com/users/pkgodara","html_url":"https://github.com/pkgodara","followers_url":"https://api.github.com/users/pkgodara/followers","following_url":"https://api.github.com/users/pkgodara/following{/other_user}","gists_url":"https://api.github.com/users/pkgodara/gists{/gist_id}","starred_url":"https://api.github.com/users/pkgodara/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pkgodara/subscriptions","organizations_url":"https://api.github.com/users/pkgodara/orgs","repos_url":"https://api.github.com/users/pkgodara/repos","events_url":"https://api.github.com/users/pkgodara/events{/privacy}","received_events_url":"https://api.github.com/users/pkgodara/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pkgodara/Rocket.Chat","description":"Have your own Slack like online chat, built with Meteor.","fork":true,"url":"https://api.github.com/repos/pkgodara/Rocket.Chat","forks_url":"https://api.github.com/repos/pkgodara/Rocket.Chat/forks","keys_url":"https://api.github.com/repos/pkgodara/Rocket.Chat/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pkgodara/Rocket.Chat/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pkgodara/Rocket.Chat/teams","hooks_url":"https://api.github.com/repos/pkgodara/Rocket.Chat/hooks","issue_events_url":"https://api.github.com/repos/pkgodara/Rocket.Chat/issues/events{/number}","events_url":"https://api.github.com/repos/pkgodara/Rocket.Chat/events","assignees_url":"https://api.github.com/repos/pkgodara/Rocket.Chat/assignees{/user}","branches_url":"https://api.github.com/repos/pkgodara/Rocket.Chat/branches{/branch}","tags_url":"https://api.github.com/repos/pkgodara/Rocket.Chat/tags","blobs_url":"https://api.github.com/repos/pkgodara/Rocket.Chat/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pkgodara/Rocket.Chat/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pkgodara/Rocket.Chat/git/refs{/sha}","trees_url":"https://api.github.com/repos/pkgodara/Rocket.Chat/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pkgodara/Rocket.Chat/statuses/{sha}","languages_url":"https://api.github.com/repos/pkgodara/Rocket.Chat/languages","stargazers_url":"https://api.github.com/repos/pkgodara/Rocket.Chat/stargazers","contributors_url":"https://api.github.com/repos/pkgodara/Rocket.Chat/contributors","subscribers_url":"https://api.github.com/repos/pkgodara/Rocket.Chat/subscribers","subscription_url":"https://api.github.com/repos/pkgodara/Rocket.Chat/subscription","commits_url":"https://api.github.com/repos/pkgodara/Rocket.Chat/commits{/sha}","git_commits_url":"https://api.github.com/repos/pkgodara/Rocket.Chat/git/commits{/sha}","comments_url":"https://api.github.com/repos/pkgodara/Rocket.Chat/comments{/number}","issue_comment_url":"https://api.github.com/repos/pkgodara/Rocket.Chat/issues/comments{/number}","contents_url":"https://api.github.com/repos/pkgodara/Rocket.Chat/contents/{+path}","compare_url":"https://api.github.com/repos/pkgodara/Rocket.Chat/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pkgodara/Rocket.Chat/merges","archive_url":"https://api.github.com/repos/pkgodara/Rocket.Chat/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pkgodara/Rocket.Chat/downloads","issues_url":"https://api.github.com/repos/pkgodara/Rocket.Chat/issues{/number}","pulls_url":"https://api.github.com/repos/pkgodara/Rocket.Chat/pulls{/number}","milestones_url":"https://api.github.com/repos/pkgodara/Rocket.Chat/milestones{/number}","notifications_url":"https://api.github.com/repos/pkgodara/Rocket.Chat/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pkgodara/Rocket.Chat/labels{/name}","releases_url":"https://api.github.com/repos/pkgodara/Rocket.Chat/releases{/id}","deployments_url":"https://api.github.com/repos/pkgodara/Rocket.Chat/deployments","created_at":"2017-05-19T04:21:59Z","updated_at":"2018-05-01T04:29:39Z","pushed_at":"2018-08-17T13:04:41Z","git_url":"git://github.com/pkgodara/Rocket.Chat.git","ssh_url":"git@github.com:pkgodara/Rocket.Chat.git","clone_url":"https://github.com/pkgodara/Rocket.Chat.git","svn_url":"https://github.com/pkgodara/Rocket.Chat","homepage":"https://rocket.chat/","size":73222,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"RocketChat:develop","ref":"develop","sha":"767b3c9437be5d8009c3b20fbbb501e24f5572f1","user":{"login":"RocketChat","id":12508788,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNTA4Nzg4","avatar_url":"https://avatars1.githubusercontent.com/u/12508788?v=4","gravatar_id":"","url":"https://api.github.com/users/RocketChat","html_url":"https://github.com/RocketChat","followers_url":"https://api.github.com/users/RocketChat/followers","following_url":"https://api.github.com/users/RocketChat/following{/other_user}","gists_url":"https://api.github.com/users/RocketChat/gists{/gist_id}","starred_url":"https://api.github.com/users/RocketChat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RocketChat/subscriptions","organizations_url":"https://api.github.com/users/RocketChat/orgs","repos_url":"https://api.github.com/users/RocketChat/repos","events_url":"https://api.github.com/users/RocketChat/events{/privacy}","received_events_url":"https://api.github.com/users/RocketChat/received_events","type":"Organization","site_admin":false},"repo":{"id":35866694,"node_id":"MDEwOlJlcG9zaXRvcnkzNTg2NjY5NA==","name":"Rocket.Chat","full_name":"RocketChat/Rocket.Chat","owner":{"login":"RocketChat","id":12508788,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNTA4Nzg4","avatar_url":"https://avatars1.githubusercontent.com/u/12508788?v=4","gravatar_id":"","url":"https://api.github.com/users/RocketChat","html_url":"https://github.com/RocketChat","followers_url":"https://api.github.com/users/RocketChat/followers","following_url":"https://api.github.com/users/RocketChat/following{/other_user}","gists_url":"https://api.github.com/users/RocketChat/gists{/gist_id}","starred_url":"https://api.github.com/users/RocketChat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RocketChat/subscriptions","organizations_url":"https://api.github.com/users/RocketChat/orgs","repos_url":"https://api.github.com/users/RocketChat/repos","events_url":"https://api.github.com/users/RocketChat/events{/privacy}","received_events_url":"https://api.github.com/users/RocketChat/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/RocketChat/Rocket.Chat","description":"Have your own Slack like online chat, built with Meteor.","fork":false,"url":"https://api.github.com/repos/RocketChat/Rocket.Chat","forks_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/forks","keys_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/teams","hooks_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/hooks","issue_events_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/issues/events{/number}","events_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/events","assignees_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/assignees{/user}","branches_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/branches{/branch}","tags_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/tags","blobs_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/git/refs{/sha}","trees_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/statuses/{sha}","languages_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/languages","stargazers_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/stargazers","contributors_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/contributors","subscribers_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/subscribers","subscription_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/subscription","commits_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/commits{/sha}","git_commits_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/git/commits{/sha}","comments_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/comments{/number}","issue_comment_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/issues/comments{/number}","contents_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/contents/{+path}","compare_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/merges","archive_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/downloads","issues_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/issues{/number}","pulls_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/pulls{/number}","milestones_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/milestones{/number}","notifications_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/labels{/name}","releases_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/releases{/id}","deployments_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/deployments","created_at":"2015-05-19T07:36:09Z","updated_at":"2018-08-17T13:09:50Z","pushed_at":"2018-08-17T13:09:19Z","git_url":"git://github.com/RocketChat/Rocket.Chat.git","ssh_url":"git@github.com:RocketChat/Rocket.Chat.git","clone_url":"https://github.com/RocketChat/Rocket.Chat.git","svn_url":"https://github.com/RocketChat/Rocket.Chat","homepage":"https://rocket.chat/","size":76617,"stargazers_count":19444,"watchers_count":19444,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4117,"mirror_url":null,"archived":false,"open_issues_count":2090,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":4117,"open_issues":2090,"watchers":19444,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/RocketChat/Rocket.Chat/pulls/11238"},"html":{"href":"https://github.com/RocketChat/Rocket.Chat/pull/11238"},"issue":{"href":"https://api.github.com/repos/RocketChat/Rocket.Chat/issues/11238"},"comments":{"href":"https://api.github.com/repos/RocketChat/Rocket.Chat/issues/11238/comments"},"review_comments":{"href":"https://api.github.com/repos/RocketChat/Rocket.Chat/pulls/11238/comments"},"review_comment":{"href":"https://api.github.com/repos/RocketChat/Rocket.Chat/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/RocketChat/Rocket.Chat/pulls/11238/commits"},"statuses":{"href":"https://api.github.com/repos/RocketChat/Rocket.Chat/statuses/47ecb6a0b6f581bf75cbbf2bbae66861d2a784eb"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"codacy-bot"}}