{"action":"created","comment":{"url":"https://api.github.com/repos/superdesk/superdesk-analytics/pulls/comments/121893762","pull_request_review_id":43957480,"id":121893762,"diff_hunk":"@@ -0,0 +1,75 @@\n+ContentQuotaReportView.$inject = ['contentQuotaReport', 'contentQuotaChart', '$interval', '$timeout'];\n+\n+/**\n+ * @ngdoc directive\n+ * @module superdesk.apps.analytics.content-quota-report\n+ * @name sdContentQuotaReportView\n+ * @requires contentQuotaReport\n+ * @requires contentQuotaChart\n+ * @requires $interval\n+ * @requires $timeout\n+ * @description A directive that displays the generated content quota report\n+ */\n+export function ContentQuotaReportView(contentQuotaReport, contentQuotaChart, $interval, $timeout) {\n+    return {\n+        template: require('../views/content-quota-report-view.html'),\n+        scope: {},\n+        link: function(scope, element, attrs, controller) {\n+            var regenerateInterval = 60000,\n+                interval = null,\n+                chart = null;\n+\n+            /**\n+             * @ngdoc method\n+             * @name sdContentQuotaReportView#regenerateReport\n+             * @description Regenerate the report and the chart\n+             */\n+            var regenerateReport = function() {\n+                if (scope.contentQuotaReport) {\n+                    contentQuotaReport.generate(scope.contentQuotaReport)\n+                    .then((report) => {\n+                        scope.contentQuotaReport = report;\n+                        chart = contentQuotaChart.createChart(scope.contentQuotaReport, 'containerq', null);","path":"client/content_quota_report/directives/ContentQuotaReportView.js","position":32,"original_position":32,"commit_id":"6bb4604aed2aa7bdb8717f6258333e677b845f69","original_commit_id":"6bb4604aed2aa7bdb8717f6258333e677b845f69","user":{"login":"petrjasek","id":179249,"avatar_url":"https://avatars2.githubusercontent.com/u/179249?v=3","gravatar_id":"","url":"https://api.github.com/users/petrjasek","html_url":"https://github.com/petrjasek","followers_url":"https://api.github.com/users/petrjasek/followers","following_url":"https://api.github.com/users/petrjasek/following{/other_user}","gists_url":"https://api.github.com/users/petrjasek/gists{/gist_id}","starred_url":"https://api.github.com/users/petrjasek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petrjasek/subscriptions","organizations_url":"https://api.github.com/users/petrjasek/orgs","repos_url":"https://api.github.com/users/petrjasek/repos","events_url":"https://api.github.com/users/petrjasek/events{/privacy}","received_events_url":"https://api.github.com/users/petrjasek/received_events","type":"User","site_admin":false},"body":"I think here it should call `chart.destroy()` first if `chart` was set already.","created_at":"2017-06-14T09:07:03Z","updated_at":"2017-06-14T09:07:03Z","html_url":"https://github.com/superdesk/superdesk-analytics/pull/26#discussion_r121893762","pull_request_url":"https://api.github.com/repos/superdesk/superdesk-analytics/pulls/26","_links":{"self":{"href":"https://api.github.com/repos/superdesk/superdesk-analytics/pulls/comments/121893762"},"html":{"href":"https://github.com/superdesk/superdesk-analytics/pull/26#discussion_r121893762"},"pull_request":{"href":"https://api.github.com/repos/superdesk/superdesk-analytics/pulls/26"}}},"pull_request":{"url":"https://api.github.com/repos/superdesk/superdesk-analytics/pulls/26","id":125487174,"html_url":"https://github.com/superdesk/superdesk-analytics/pull/26","diff_url":"https://github.com/superdesk/superdesk-analytics/pull/26.diff","patch_url":"https://github.com/superdesk/superdesk-analytics/pull/26.patch","issue_url":"https://api.github.com/repos/superdesk/superdesk-analytics/issues/26","number":26,"state":"open","locked":false,"title":"SDESK-901 As a producer, I want to configure widgets to display content output v quotas","user":{"login":"mugurrus","id":481905,"avatar_url":"https://avatars3.githubusercontent.com/u/481905?v=3","gravatar_id":"","url":"https://api.github.com/users/mugurrus","html_url":"https://github.com/mugurrus","followers_url":"https://api.github.com/users/mugurrus/followers","following_url":"https://api.github.com/users/mugurrus/following{/other_user}","gists_url":"https://api.github.com/users/mugurrus/gists{/gist_id}","starred_url":"https://api.github.com/users/mugurrus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mugurrus/subscriptions","organizations_url":"https://api.github.com/users/mugurrus/orgs","repos_url":"https://api.github.com/users/mugurrus/repos","events_url":"https://api.github.com/users/mugurrus/events{/privacy}","received_events_url":"https://api.github.com/users/mugurrus/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-06-14T00:08:42Z","updated_at":"2017-06-14T09:07:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"857c2760f75f251b77e9c4167601436fc45badde","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/superdesk/superdesk-analytics/pulls/26/commits","review_comments_url":"https://api.github.com/repos/superdesk/superdesk-analytics/pulls/26/comments","review_comment_url":"https://api.github.com/repos/superdesk/superdesk-analytics/pulls/comments{/number}","comments_url":"https://api.github.com/repos/superdesk/superdesk-analytics/issues/26/comments","statuses_url":"https://api.github.com/repos/superdesk/superdesk-analytics/statuses/6bb4604aed2aa7bdb8717f6258333e677b845f69","head":{"label":"mugurrus:quota-rebase","ref":"quota-rebase","sha":"6bb4604aed2aa7bdb8717f6258333e677b845f69","user":{"login":"mugurrus","id":481905,"avatar_url":"https://avatars3.githubusercontent.com/u/481905?v=3","gravatar_id":"","url":"https://api.github.com/users/mugurrus","html_url":"https://github.com/mugurrus","followers_url":"https://api.github.com/users/mugurrus/followers","following_url":"https://api.github.com/users/mugurrus/following{/other_user}","gists_url":"https://api.github.com/users/mugurrus/gists{/gist_id}","starred_url":"https://api.github.com/users/mugurrus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mugurrus/subscriptions","organizations_url":"https://api.github.com/users/mugurrus/orgs","repos_url":"https://api.github.com/users/mugurrus/repos","events_url":"https://api.github.com/users/mugurrus/events{/privacy}","received_events_url":"https://api.github.com/users/mugurrus/received_events","type":"User","site_admin":false},"repo":{"id":78770973,"name":"superdesk-analytics","full_name":"mugurrus/superdesk-analytics","owner":{"login":"mugurrus","id":481905,"avatar_url":"https://avatars3.githubusercontent.com/u/481905?v=3","gravatar_id":"","url":"https://api.github.com/users/mugurrus","html_url":"https://github.com/mugurrus","followers_url":"https://api.github.com/users/mugurrus/followers","following_url":"https://api.github.com/users/mugurrus/following{/other_user}","gists_url":"https://api.github.com/users/mugurrus/gists{/gist_id}","starred_url":"https://api.github.com/users/mugurrus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mugurrus/subscriptions","organizations_url":"https://api.github.com/users/mugurrus/orgs","repos_url":"https://api.github.com/users/mugurrus/repos","events_url":"https://api.github.com/users/mugurrus/events{/privacy}","received_events_url":"https://api.github.com/users/mugurrus/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mugurrus/superdesk-analytics","description":null,"fork":true,"url":"https://api.github.com/repos/mugurrus/superdesk-analytics","forks_url":"https://api.github.com/repos/mugurrus/superdesk-analytics/forks","keys_url":"https://api.github.com/repos/mugurrus/superdesk-analytics/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mugurrus/superdesk-analytics/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mugurrus/superdesk-analytics/teams","hooks_url":"https://api.github.com/repos/mugurrus/superdesk-analytics/hooks","issue_events_url":"https://api.github.com/repos/mugurrus/superdesk-analytics/issues/events{/number}","events_url":"https://api.github.com/repos/mugurrus/superdesk-analytics/events","assignees_url":"https://api.github.com/repos/mugurrus/superdesk-analytics/assignees{/user}","branches_url":"https://api.github.com/repos/mugurrus/superdesk-analytics/branches{/branch}","tags_url":"https://api.github.com/repos/mugurrus/superdesk-analytics/tags","blobs_url":"https://api.github.com/repos/mugurrus/superdesk-analytics/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mugurrus/superdesk-analytics/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mugurrus/superdesk-analytics/git/refs{/sha}","trees_url":"https://api.github.com/repos/mugurrus/superdesk-analytics/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mugurrus/superdesk-analytics/statuses/{sha}","languages_url":"https://api.github.com/repos/mugurrus/superdesk-analytics/languages","stargazers_url":"https://api.github.com/repos/mugurrus/superdesk-analytics/stargazers","contributors_url":"https://api.github.com/repos/mugurrus/superdesk-analytics/contributors","subscribers_url":"https://api.github.com/repos/mugurrus/superdesk-analytics/subscribers","subscription_url":"https://api.github.com/repos/mugurrus/superdesk-analytics/subscription","commits_url":"https://api.github.com/repos/mugurrus/superdesk-analytics/commits{/sha}","git_commits_url":"https://api.github.com/repos/mugurrus/superdesk-analytics/git/commits{/sha}","comments_url":"https://api.github.com/repos/mugurrus/superdesk-analytics/comments{/number}","issue_comment_url":"https://api.github.com/repos/mugurrus/superdesk-analytics/issues/comments{/number}","contents_url":"https://api.github.com/repos/mugurrus/superdesk-analytics/contents/{+path}","compare_url":"https://api.github.com/repos/mugurrus/superdesk-analytics/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mugurrus/superdesk-analytics/merges","archive_url":"https://api.github.com/repos/mugurrus/superdesk-analytics/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mugurrus/superdesk-analytics/downloads","issues_url":"https://api.github.com/repos/mugurrus/superdesk-analytics/issues{/number}","pulls_url":"https://api.github.com/repos/mugurrus/superdesk-analytics/pulls{/number}","milestones_url":"https://api.github.com/repos/mugurrus/superdesk-analytics/milestones{/number}","notifications_url":"https://api.github.com/repos/mugurrus/superdesk-analytics/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mugurrus/superdesk-analytics/labels{/name}","releases_url":"https://api.github.com/repos/mugurrus/superdesk-analytics/releases{/id}","deployments_url":"https://api.github.com/repos/mugurrus/superdesk-analytics/deployments","created_at":"2017-01-12T17:46:35Z","updated_at":"2017-05-26T16:45:34Z","pushed_at":"2017-06-14T09:00:23Z","git_url":"git://github.com/mugurrus/superdesk-analytics.git","ssh_url":"git@github.com:mugurrus/superdesk-analytics.git","clone_url":"https://github.com/mugurrus/superdesk-analytics.git","svn_url":"https://github.com/mugurrus/superdesk-analytics","homepage":null,"size":242,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"superdesk:master","ref":"master","sha":"d8ede246e30b39d5c4e9623c27d07620485542e7","user":{"login":"superdesk","id":5527298,"avatar_url":"https://avatars1.githubusercontent.com/u/5527298?v=3","gravatar_id":"","url":"https://api.github.com/users/superdesk","html_url":"https://github.com/superdesk","followers_url":"https://api.github.com/users/superdesk/followers","following_url":"https://api.github.com/users/superdesk/following{/other_user}","gists_url":"https://api.github.com/users/superdesk/gists{/gist_id}","starred_url":"https://api.github.com/users/superdesk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/superdesk/subscriptions","organizations_url":"https://api.github.com/users/superdesk/orgs","repos_url":"https://api.github.com/users/superdesk/repos","events_url":"https://api.github.com/users/superdesk/events{/privacy}","received_events_url":"https://api.github.com/users/superdesk/received_events","type":"Organization","site_admin":false},"repo":{"id":78770170,"name":"superdesk-analytics","full_name":"superdesk/superdesk-analytics","owner":{"login":"superdesk","id":5527298,"avatar_url":"https://avatars1.githubusercontent.com/u/5527298?v=3","gravatar_id":"","url":"https://api.github.com/users/superdesk","html_url":"https://github.com/superdesk","followers_url":"https://api.github.com/users/superdesk/followers","following_url":"https://api.github.com/users/superdesk/following{/other_user}","gists_url":"https://api.github.com/users/superdesk/gists{/gist_id}","starred_url":"https://api.github.com/users/superdesk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/superdesk/subscriptions","organizations_url":"https://api.github.com/users/superdesk/orgs","repos_url":"https://api.github.com/users/superdesk/repos","events_url":"https://api.github.com/users/superdesk/events{/privacy}","received_events_url":"https://api.github.com/users/superdesk/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/superdesk/superdesk-analytics","description":null,"fork":false,"url":"https://api.github.com/repos/superdesk/superdesk-analytics","forks_url":"https://api.github.com/repos/superdesk/superdesk-analytics/forks","keys_url":"https://api.github.com/repos/superdesk/superdesk-analytics/keys{/key_id}","collaborators_url":"https://api.github.com/repos/superdesk/superdesk-analytics/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/superdesk/superdesk-analytics/teams","hooks_url":"https://api.github.com/repos/superdesk/superdesk-analytics/hooks","issue_events_url":"https://api.github.com/repos/superdesk/superdesk-analytics/issues/events{/number}","events_url":"https://api.github.com/repos/superdesk/superdesk-analytics/events","assignees_url":"https://api.github.com/repos/superdesk/superdesk-analytics/assignees{/user}","branches_url":"https://api.github.com/repos/superdesk/superdesk-analytics/branches{/branch}","tags_url":"https://api.github.com/repos/superdesk/superdesk-analytics/tags","blobs_url":"https://api.github.com/repos/superdesk/superdesk-analytics/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/superdesk/superdesk-analytics/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/superdesk/superdesk-analytics/git/refs{/sha}","trees_url":"https://api.github.com/repos/superdesk/superdesk-analytics/git/trees{/sha}","statuses_url":"https://api.github.com/repos/superdesk/superdesk-analytics/statuses/{sha}","languages_url":"https://api.github.com/repos/superdesk/superdesk-analytics/languages","stargazers_url":"https://api.github.com/repos/superdesk/superdesk-analytics/stargazers","contributors_url":"https://api.github.com/repos/superdesk/superdesk-analytics/contributors","subscribers_url":"https://api.github.com/repos/superdesk/superdesk-analytics/subscribers","subscription_url":"https://api.github.com/repos/superdesk/superdesk-analytics/subscription","commits_url":"https://api.github.com/repos/superdesk/superdesk-analytics/commits{/sha}","git_commits_url":"https://api.github.com/repos/superdesk/superdesk-analytics/git/commits{/sha}","comments_url":"https://api.github.com/repos/superdesk/superdesk-analytics/comments{/number}","issue_comment_url":"https://api.github.com/repos/superdesk/superdesk-analytics/issues/comments{/number}","contents_url":"https://api.github.com/repos/superdesk/superdesk-analytics/contents/{+path}","compare_url":"https://api.github.com/repos/superdesk/superdesk-analytics/compare/{base}...{head}","merges_url":"https://api.github.com/repos/superdesk/superdesk-analytics/merges","archive_url":"https://api.github.com/repos/superdesk/superdesk-analytics/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/superdesk/superdesk-analytics/downloads","issues_url":"https://api.github.com/repos/superdesk/superdesk-analytics/issues{/number}","pulls_url":"https://api.github.com/repos/superdesk/superdesk-analytics/pulls{/number}","milestones_url":"https://api.github.com/repos/superdesk/superdesk-analytics/milestones{/number}","notifications_url":"https://api.github.com/repos/superdesk/superdesk-analytics/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/superdesk/superdesk-analytics/labels{/name}","releases_url":"https://api.github.com/repos/superdesk/superdesk-analytics/releases{/id}","deployments_url":"https://api.github.com/repos/superdesk/superdesk-analytics/deployments","created_at":"2017-01-12T17:37:01Z","updated_at":"2017-02-01T23:48:58Z","pushed_at":"2017-06-14T09:00:25Z","git_url":"git://github.com/superdesk/superdesk-analytics.git","ssh_url":"git@github.com:superdesk/superdesk-analytics.git","clone_url":"https://github.com/superdesk/superdesk-analytics.git","svn_url":"https://github.com/superdesk/superdesk-analytics","homepage":null,"size":164,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":2,"forks":4,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/superdesk/superdesk-analytics/pulls/26"},"html":{"href":"https://github.com/superdesk/superdesk-analytics/pull/26"},"issue":{"href":"https://api.github.com/repos/superdesk/superdesk-analytics/issues/26"},"comments":{"href":"https://api.github.com/repos/superdesk/superdesk-analytics/issues/26/comments"},"review_comments":{"href":"https://api.github.com/repos/superdesk/superdesk-analytics/pulls/26/comments"},"review_comment":{"href":"https://api.github.com/repos/superdesk/superdesk-analytics/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/superdesk/superdesk-analytics/pulls/26/commits"},"statuses":{"href":"https://api.github.com/repos/superdesk/superdesk-analytics/statuses/6bb4604aed2aa7bdb8717f6258333e677b845f69"}}}}
{"actor":{"display_login":"petrjasek"}}