{"action":"created","comment":{"url":"https://api.github.com/repos/mher/flower/pulls/comments/138707370","pull_request_review_id":62539584,"id":138707370,"diff_hunk":"@@ -83,6 +83,40 @@ def key(item):\n                         recordsTotal=len(sorted_tasks),\n                         recordsFiltered=len(sorted_tasks)))\n \n+    @web.authenticated\n+    def post(self):\n+        app = self.application\n+        draw = self.get_argument('draw', type=int)\n+        start = self.get_argument('start', type=int)\n+        length = self.get_argument('length', type=int)\n+        search = self.get_argument('search[value]', type=str)\n+\n+        column = self.get_argument('order[0][column]', type=int)\n+        sort_by = self.get_argument('columns[%s][data]' % column, type=str)\n+        sort_order = self.get_argument('order[0][dir]', type=str) == 'desc'\n+\n+        def key(item):\n+            return Comparable(getattr(item[1], sort_by))\n+\n+        sorted_tasks = sorted(\n+            iter_tasks(app.events, search=search),\n+            key=key,\n+            reverse=sort_order\n+        )\n+\n+        filtered_tasks = []\n+\n+        for task in sorted_tasks[start:start + length]:\n+            task_dict = as_dict(self.format_task(task)[1])\n+            if task_dict.get('worker'):\n+                task_dict['worker'] = task_dict['worker'].hostname\n+\n+            filtered_tasks.append(task_dict)\n+\n+        self.write(dict(draw=draw, data=filtered_tasks,\n+                        recordsTotal=len(sorted_tasks),\n+                        recordsFiltered=len(sorted_tasks)))\n+","path":"flower/views/tasks.py","position":37,"original_position":37,"commit_id":"5911edc07f4beae6f6adc275a0e6962cf6f89c9f","original_commit_id":"5911edc07f4beae6f6adc275a0e6962cf6f89c9f","user":{"login":"johnarnold","id":1329084,"avatar_url":"https://avatars0.githubusercontent.com/u/1329084?v=4","gravatar_id":"","url":"https://api.github.com/users/johnarnold","html_url":"https://github.com/johnarnold","followers_url":"https://api.github.com/users/johnarnold/followers","following_url":"https://api.github.com/users/johnarnold/following{/other_user}","gists_url":"https://api.github.com/users/johnarnold/gists{/gist_id}","starred_url":"https://api.github.com/users/johnarnold/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnarnold/subscriptions","organizations_url":"https://api.github.com/users/johnarnold/orgs","repos_url":"https://api.github.com/users/johnarnold/repos","events_url":"https://api.github.com/users/johnarnold/events{/privacy}","received_events_url":"https://api.github.com/users/johnarnold/received_events","type":"User","site_admin":false},"body":"Will do. thanks.","created_at":"2017-09-13T18:50:06Z","updated_at":"2017-09-13T18:50:06Z","html_url":"https://github.com/mher/flower/pull/734#discussion_r138707370","pull_request_url":"https://api.github.com/repos/mher/flower/pulls/734","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/mher/flower/pulls/comments/138707370"},"html":{"href":"https://github.com/mher/flower/pull/734#discussion_r138707370"},"pull_request":{"href":"https://api.github.com/repos/mher/flower/pulls/734"}},"in_reply_to_id":138501944},"pull_request":{"url":"https://api.github.com/repos/mher/flower/pulls/734","id":140689916,"html_url":"https://github.com/mher/flower/pull/734","diff_url":"https://github.com/mher/flower/pull/734.diff","patch_url":"https://github.com/mher/flower/pull/734.patch","issue_url":"https://api.github.com/repos/mher/flower/issues/734","number":734,"state":"open","locked":false,"title":"Update tasks datatable to use POST method","user":{"login":"johnarnold","id":1329084,"avatar_url":"https://avatars0.githubusercontent.com/u/1329084?v=4","gravatar_id":"","url":"https://api.github.com/users/johnarnold","html_url":"https://github.com/johnarnold","followers_url":"https://api.github.com/users/johnarnold/followers","following_url":"https://api.github.com/users/johnarnold/following{/other_user}","gists_url":"https://api.github.com/users/johnarnold/gists{/gist_id}","starred_url":"https://api.github.com/users/johnarnold/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnarnold/subscriptions","organizations_url":"https://api.github.com/users/johnarnold/orgs","repos_url":"https://api.github.com/users/johnarnold/repos","events_url":"https://api.github.com/users/johnarnold/events{/privacy}","received_events_url":"https://api.github.com/users/johnarnold/received_events","type":"User","site_admin":false},"body":"This PR is to resolve https://github.com/mher/flower/issues/733\r\n\r\n\"flower can generate URLs which are too big for proxies \"","created_at":"2017-09-12T21:42:48Z","updated_at":"2017-09-13T18:50:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"103705948eecf71c505cd75459d8d79e0c5fe81d","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/mher/flower/pulls/734/commits","review_comments_url":"https://api.github.com/repos/mher/flower/pulls/734/comments","review_comment_url":"https://api.github.com/repos/mher/flower/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mher/flower/issues/734/comments","statuses_url":"https://api.github.com/repos/mher/flower/statuses/5911edc07f4beae6f6adc275a0e6962cf6f89c9f","head":{"label":"johnarnold:johnar/task_post","ref":"johnar/task_post","sha":"5911edc07f4beae6f6adc275a0e6962cf6f89c9f","user":{"login":"johnarnold","id":1329084,"avatar_url":"https://avatars0.githubusercontent.com/u/1329084?v=4","gravatar_id":"","url":"https://api.github.com/users/johnarnold","html_url":"https://github.com/johnarnold","followers_url":"https://api.github.com/users/johnarnold/followers","following_url":"https://api.github.com/users/johnarnold/following{/other_user}","gists_url":"https://api.github.com/users/johnarnold/gists{/gist_id}","starred_url":"https://api.github.com/users/johnarnold/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnarnold/subscriptions","organizations_url":"https://api.github.com/users/johnarnold/orgs","repos_url":"https://api.github.com/users/johnarnold/repos","events_url":"https://api.github.com/users/johnarnold/events{/privacy}","received_events_url":"https://api.github.com/users/johnarnold/received_events","type":"User","site_admin":false},"repo":{"id":92201996,"name":"flower","full_name":"johnarnold/flower","owner":{"login":"johnarnold","id":1329084,"avatar_url":"https://avatars0.githubusercontent.com/u/1329084?v=4","gravatar_id":"","url":"https://api.github.com/users/johnarnold","html_url":"https://github.com/johnarnold","followers_url":"https://api.github.com/users/johnarnold/followers","following_url":"https://api.github.com/users/johnarnold/following{/other_user}","gists_url":"https://api.github.com/users/johnarnold/gists{/gist_id}","starred_url":"https://api.github.com/users/johnarnold/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnarnold/subscriptions","organizations_url":"https://api.github.com/users/johnarnold/orgs","repos_url":"https://api.github.com/users/johnarnold/repos","events_url":"https://api.github.com/users/johnarnold/events{/privacy}","received_events_url":"https://api.github.com/users/johnarnold/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/johnarnold/flower","description":"Real-time monitor and web admin for Celery distributed task queue","fork":true,"url":"https://api.github.com/repos/johnarnold/flower","forks_url":"https://api.github.com/repos/johnarnold/flower/forks","keys_url":"https://api.github.com/repos/johnarnold/flower/keys{/key_id}","collaborators_url":"https://api.github.com/repos/johnarnold/flower/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/johnarnold/flower/teams","hooks_url":"https://api.github.com/repos/johnarnold/flower/hooks","issue_events_url":"https://api.github.com/repos/johnarnold/flower/issues/events{/number}","events_url":"https://api.github.com/repos/johnarnold/flower/events","assignees_url":"https://api.github.com/repos/johnarnold/flower/assignees{/user}","branches_url":"https://api.github.com/repos/johnarnold/flower/branches{/branch}","tags_url":"https://api.github.com/repos/johnarnold/flower/tags","blobs_url":"https://api.github.com/repos/johnarnold/flower/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/johnarnold/flower/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/johnarnold/flower/git/refs{/sha}","trees_url":"https://api.github.com/repos/johnarnold/flower/git/trees{/sha}","statuses_url":"https://api.github.com/repos/johnarnold/flower/statuses/{sha}","languages_url":"https://api.github.com/repos/johnarnold/flower/languages","stargazers_url":"https://api.github.com/repos/johnarnold/flower/stargazers","contributors_url":"https://api.github.com/repos/johnarnold/flower/contributors","subscribers_url":"https://api.github.com/repos/johnarnold/flower/subscribers","subscription_url":"https://api.github.com/repos/johnarnold/flower/subscription","commits_url":"https://api.github.com/repos/johnarnold/flower/commits{/sha}","git_commits_url":"https://api.github.com/repos/johnarnold/flower/git/commits{/sha}","comments_url":"https://api.github.com/repos/johnarnold/flower/comments{/number}","issue_comment_url":"https://api.github.com/repos/johnarnold/flower/issues/comments{/number}","contents_url":"https://api.github.com/repos/johnarnold/flower/contents/{+path}","compare_url":"https://api.github.com/repos/johnarnold/flower/compare/{base}...{head}","merges_url":"https://api.github.com/repos/johnarnold/flower/merges","archive_url":"https://api.github.com/repos/johnarnold/flower/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/johnarnold/flower/downloads","issues_url":"https://api.github.com/repos/johnarnold/flower/issues{/number}","pulls_url":"https://api.github.com/repos/johnarnold/flower/pulls{/number}","milestones_url":"https://api.github.com/repos/johnarnold/flower/milestones{/number}","notifications_url":"https://api.github.com/repos/johnarnold/flower/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/johnarnold/flower/labels{/name}","releases_url":"https://api.github.com/repos/johnarnold/flower/releases{/id}","deployments_url":"https://api.github.com/repos/johnarnold/flower/deployments","created_at":"2017-05-23T17:41:23Z","updated_at":"2017-05-23T17:41:25Z","pushed_at":"2017-09-12T21:41:34Z","git_url":"git://github.com/johnarnold/flower.git","ssh_url":"git@github.com:johnarnold/flower.git","clone_url":"https://github.com/johnarnold/flower.git","svn_url":"https://github.com/johnarnold/flower","homepage":"https://flower.readthedocs.io","size":3053,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"mher:master","ref":"master","sha":"6794ffd6a99852f560cf7405596bedfbc877db19","user":{"login":"mher","id":691049,"avatar_url":"https://avatars2.githubusercontent.com/u/691049?v=4","gravatar_id":"","url":"https://api.github.com/users/mher","html_url":"https://github.com/mher","followers_url":"https://api.github.com/users/mher/followers","following_url":"https://api.github.com/users/mher/following{/other_user}","gists_url":"https://api.github.com/users/mher/gists{/gist_id}","starred_url":"https://api.github.com/users/mher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mher/subscriptions","organizations_url":"https://api.github.com/users/mher/orgs","repos_url":"https://api.github.com/users/mher/repos","events_url":"https://api.github.com/users/mher/events{/privacy}","received_events_url":"https://api.github.com/users/mher/received_events","type":"User","site_admin":false},"repo":{"id":4946406,"name":"flower","full_name":"mher/flower","owner":{"login":"mher","id":691049,"avatar_url":"https://avatars2.githubusercontent.com/u/691049?v=4","gravatar_id":"","url":"https://api.github.com/users/mher","html_url":"https://github.com/mher","followers_url":"https://api.github.com/users/mher/followers","following_url":"https://api.github.com/users/mher/following{/other_user}","gists_url":"https://api.github.com/users/mher/gists{/gist_id}","starred_url":"https://api.github.com/users/mher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mher/subscriptions","organizations_url":"https://api.github.com/users/mher/orgs","repos_url":"https://api.github.com/users/mher/repos","events_url":"https://api.github.com/users/mher/events{/privacy}","received_events_url":"https://api.github.com/users/mher/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mher/flower","description":"Real-time monitor and web admin for Celery distributed task queue","fork":false,"url":"https://api.github.com/repos/mher/flower","forks_url":"https://api.github.com/repos/mher/flower/forks","keys_url":"https://api.github.com/repos/mher/flower/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mher/flower/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mher/flower/teams","hooks_url":"https://api.github.com/repos/mher/flower/hooks","issue_events_url":"https://api.github.com/repos/mher/flower/issues/events{/number}","events_url":"https://api.github.com/repos/mher/flower/events","assignees_url":"https://api.github.com/repos/mher/flower/assignees{/user}","branches_url":"https://api.github.com/repos/mher/flower/branches{/branch}","tags_url":"https://api.github.com/repos/mher/flower/tags","blobs_url":"https://api.github.com/repos/mher/flower/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mher/flower/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mher/flower/git/refs{/sha}","trees_url":"https://api.github.com/repos/mher/flower/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mher/flower/statuses/{sha}","languages_url":"https://api.github.com/repos/mher/flower/languages","stargazers_url":"https://api.github.com/repos/mher/flower/stargazers","contributors_url":"https://api.github.com/repos/mher/flower/contributors","subscribers_url":"https://api.github.com/repos/mher/flower/subscribers","subscription_url":"https://api.github.com/repos/mher/flower/subscription","commits_url":"https://api.github.com/repos/mher/flower/commits{/sha}","git_commits_url":"https://api.github.com/repos/mher/flower/git/commits{/sha}","comments_url":"https://api.github.com/repos/mher/flower/comments{/number}","issue_comment_url":"https://api.github.com/repos/mher/flower/issues/comments{/number}","contents_url":"https://api.github.com/repos/mher/flower/contents/{+path}","compare_url":"https://api.github.com/repos/mher/flower/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mher/flower/merges","archive_url":"https://api.github.com/repos/mher/flower/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mher/flower/downloads","issues_url":"https://api.github.com/repos/mher/flower/issues{/number}","pulls_url":"https://api.github.com/repos/mher/flower/pulls{/number}","milestones_url":"https://api.github.com/repos/mher/flower/milestones{/number}","notifications_url":"https://api.github.com/repos/mher/flower/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mher/flower/labels{/name}","releases_url":"https://api.github.com/repos/mher/flower/releases{/id}","deployments_url":"https://api.github.com/repos/mher/flower/deployments","created_at":"2012-07-08T13:35:09Z","updated_at":"2017-09-13T10:06:46Z","pushed_at":"2017-09-12T21:42:49Z","git_url":"git://github.com/mher/flower.git","ssh_url":"git@github.com:mher/flower.git","clone_url":"https://github.com/mher/flower.git","svn_url":"https://github.com/mher/flower","homepage":"https://flower.readthedocs.io","size":3035,"stargazers_count":2492,"watchers_count":2492,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":441,"mirror_url":null,"open_issues_count":88,"forks":441,"open_issues":88,"watchers":2492,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mher/flower/pulls/734"},"html":{"href":"https://github.com/mher/flower/pull/734"},"issue":{"href":"https://api.github.com/repos/mher/flower/issues/734"},"comments":{"href":"https://api.github.com/repos/mher/flower/issues/734/comments"},"review_comments":{"href":"https://api.github.com/repos/mher/flower/pulls/734/comments"},"review_comment":{"href":"https://api.github.com/repos/mher/flower/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mher/flower/pulls/734/commits"},"statuses":{"href":"https://api.github.com/repos/mher/flower/statuses/5911edc07f4beae6f6adc275a0e6962cf6f89c9f"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"johnarnold"}}