{"action":"created","comment":{"url":"https://api.github.com/repos/slugiot/slugiot-server/pulls/comments/60283998","id":60283998,"diff_hunk":"@@ -0,0 +1,78 @@\n+\n+# -*- coding: utf-8 -*-\n+# this file is used to test the editor\n+\n+\n+from datetime import datetime\n+\n+def edit_procedure():\n+    \"\"\"\n+    return json data to show the editor content\n+    \"\"\"\n+    preferences={'theme':'web2py', 'editor': 'default', 'closetag': 'true', 'codefolding': 'false', 'tabwidth':'4', 'indentwithtabs':'false', 'linenumbers':'true', 'highlightline':'true'}\n+    code_id = request.vars.procedure_id\n+\n+    #the final edition will use Team 2 API \"get_procedure_data(procedure_id, stable)\"  to get the data\n+    #we debug with temporary table to validate the function of editor\n+    data =  db(db.coding.id == code_id).select(db.coding.procedures).first().procedures\n+\n+    file_details = dict(\n+                    editor_settings=preferences,\n+                    id=code_id,\n+                    data=data,\n+                    )\n+    plain_html = response.render('editor/edit_js.html', file_details)\n+    file_details['plain_html'] = plain_html\n+    return response.json(file_details)\n+\n+def save_procedure():\n+    \"\"\"\n+    return the save result for the saving procedure\n+    \"\"\"\n+    code_id = request.vars.procedure_id\n+    data = request.vars.procedure\n+    stable = request.vars.stable\n+    print(data)","path":"applications/server/controllers/editor.py","position":35,"original_position":35,"commit_id":"be813cf70166a6acc42762d24536e178465c540b","original_commit_id":"be813cf70166a6acc42762d24536e178465c540b","user":{"login":"lxlxok","id":9567513,"avatar_url":"https://avatars.githubusercontent.com/u/9567513?v=3","gravatar_id":"","url":"https://api.github.com/users/lxlxok","html_url":"https://github.com/lxlxok","followers_url":"https://api.github.com/users/lxlxok/followers","following_url":"https://api.github.com/users/lxlxok/following{/other_user}","gists_url":"https://api.github.com/users/lxlxok/gists{/gist_id}","starred_url":"https://api.github.com/users/lxlxok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lxlxok/subscriptions","organizations_url":"https://api.github.com/users/lxlxok/orgs","repos_url":"https://api.github.com/users/lxlxok/repos","events_url":"https://api.github.com/users/lxlxok/events{/privacy}","received_events_url":"https://api.github.com/users/lxlxok/received_events","type":"User","site_admin":false},"body":"sorry, I forget to delete this debug code. I will use logging in the future.","created_at":"2016-04-19T18:23:35Z","updated_at":"2016-04-19T18:23:35Z","html_url":"https://github.com/slugiot/slugiot-server/pull/7#discussion_r60283998","pull_request_url":"https://api.github.com/repos/slugiot/slugiot-server/pulls/7","_links":{"self":{"href":"https://api.github.com/repos/slugiot/slugiot-server/pulls/comments/60283998"},"html":{"href":"https://github.com/slugiot/slugiot-server/pull/7#discussion_r60283998"},"pull_request":{"href":"https://api.github.com/repos/slugiot/slugiot-server/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/slugiot/slugiot-server/pulls/7","id":66733036,"html_url":"https://github.com/slugiot/slugiot-server/pull/7","diff_url":"https://github.com/slugiot/slugiot-server/pull/7.diff","patch_url":"https://github.com/slugiot/slugiot-server/pull/7.patch","issue_url":"https://api.github.com/repos/slugiot/slugiot-server/issues/7","number":7,"state":"open","locked":false,"title":"Editor team","user":{"login":"lxlxok","id":9567513,"avatar_url":"https://avatars.githubusercontent.com/u/9567513?v=3","gravatar_id":"","url":"https://api.github.com/users/lxlxok","html_url":"https://github.com/lxlxok","followers_url":"https://api.github.com/users/lxlxok/followers","following_url":"https://api.github.com/users/lxlxok/following{/other_user}","gists_url":"https://api.github.com/users/lxlxok/gists{/gist_id}","starred_url":"https://api.github.com/users/lxlxok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lxlxok/subscriptions","organizations_url":"https://api.github.com/users/lxlxok/orgs","repos_url":"https://api.github.com/users/lxlxok/repos","events_url":"https://api.github.com/users/lxlxok/events{/privacy}","received_events_url":"https://api.github.com/users/lxlxok/received_events","type":"User","site_admin":false},"body":"the prototype edition for editor is ready for merge, we can test the editor by 3 step\r\nstep 1: \r\nhttp://127.0.0.1:8000/server/editor/create\r\nstep 2:\r\nhttp://127.0.0.1:8000/server/editor/select\r\nstep 3:\r\nhttp://127.0.0.1:8000/server/editor/test_edit","created_at":"2016-04-16T09:25:22Z","updated_at":"2016-04-19T18:23:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d1e7fc85dc9a64cf269bc2e8652ae7a57bfca7b2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/slugiot/slugiot-server/pulls/7/commits","review_comments_url":"https://api.github.com/repos/slugiot/slugiot-server/pulls/7/comments","review_comment_url":"https://api.github.com/repos/slugiot/slugiot-server/pulls/comments{/number}","comments_url":"https://api.github.com/repos/slugiot/slugiot-server/issues/7/comments","statuses_url":"https://api.github.com/repos/slugiot/slugiot-server/statuses/be813cf70166a6acc42762d24536e178465c540b","head":{"label":"slugiot:editor_team","ref":"editor_team","sha":"be813cf70166a6acc42762d24536e178465c540b","user":{"login":"slugiot","id":18412481,"avatar_url":"https://avatars.githubusercontent.com/u/18412481?v=3","gravatar_id":"","url":"https://api.github.com/users/slugiot","html_url":"https://github.com/slugiot","followers_url":"https://api.github.com/users/slugiot/followers","following_url":"https://api.github.com/users/slugiot/following{/other_user}","gists_url":"https://api.github.com/users/slugiot/gists{/gist_id}","starred_url":"https://api.github.com/users/slugiot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slugiot/subscriptions","organizations_url":"https://api.github.com/users/slugiot/orgs","repos_url":"https://api.github.com/users/slugiot/repos","events_url":"https://api.github.com/users/slugiot/events{/privacy}","received_events_url":"https://api.github.com/users/slugiot/received_events","type":"Organization","site_admin":false},"repo":{"id":56093310,"name":"slugiot-server","full_name":"slugiot/slugiot-server","owner":{"login":"slugiot","id":18412481,"avatar_url":"https://avatars.githubusercontent.com/u/18412481?v=3","gravatar_id":"","url":"https://api.github.com/users/slugiot","html_url":"https://github.com/slugiot","followers_url":"https://api.github.com/users/slugiot/followers","following_url":"https://api.github.com/users/slugiot/following{/other_user}","gists_url":"https://api.github.com/users/slugiot/gists{/gist_id}","starred_url":"https://api.github.com/users/slugiot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slugiot/subscriptions","organizations_url":"https://api.github.com/users/slugiot/orgs","repos_url":"https://api.github.com/users/slugiot/repos","events_url":"https://api.github.com/users/slugiot/events{/privacy}","received_events_url":"https://api.github.com/users/slugiot/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/slugiot/slugiot-server","description":"","fork":false,"url":"https://api.github.com/repos/slugiot/slugiot-server","forks_url":"https://api.github.com/repos/slugiot/slugiot-server/forks","keys_url":"https://api.github.com/repos/slugiot/slugiot-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/slugiot/slugiot-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/slugiot/slugiot-server/teams","hooks_url":"https://api.github.com/repos/slugiot/slugiot-server/hooks","issue_events_url":"https://api.github.com/repos/slugiot/slugiot-server/issues/events{/number}","events_url":"https://api.github.com/repos/slugiot/slugiot-server/events","assignees_url":"https://api.github.com/repos/slugiot/slugiot-server/assignees{/user}","branches_url":"https://api.github.com/repos/slugiot/slugiot-server/branches{/branch}","tags_url":"https://api.github.com/repos/slugiot/slugiot-server/tags","blobs_url":"https://api.github.com/repos/slugiot/slugiot-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/slugiot/slugiot-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/slugiot/slugiot-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/slugiot/slugiot-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/slugiot/slugiot-server/statuses/{sha}","languages_url":"https://api.github.com/repos/slugiot/slugiot-server/languages","stargazers_url":"https://api.github.com/repos/slugiot/slugiot-server/stargazers","contributors_url":"https://api.github.com/repos/slugiot/slugiot-server/contributors","subscribers_url":"https://api.github.com/repos/slugiot/slugiot-server/subscribers","subscription_url":"https://api.github.com/repos/slugiot/slugiot-server/subscription","commits_url":"https://api.github.com/repos/slugiot/slugiot-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/slugiot/slugiot-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/slugiot/slugiot-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/slugiot/slugiot-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/slugiot/slugiot-server/contents/{+path}","compare_url":"https://api.github.com/repos/slugiot/slugiot-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/slugiot/slugiot-server/merges","archive_url":"https://api.github.com/repos/slugiot/slugiot-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/slugiot/slugiot-server/downloads","issues_url":"https://api.github.com/repos/slugiot/slugiot-server/issues{/number}","pulls_url":"https://api.github.com/repos/slugiot/slugiot-server/pulls{/number}","milestones_url":"https://api.github.com/repos/slugiot/slugiot-server/milestones{/number}","notifications_url":"https://api.github.com/repos/slugiot/slugiot-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/slugiot/slugiot-server/labels{/name}","releases_url":"https://api.github.com/repos/slugiot/slugiot-server/releases{/id}","deployments_url":"https://api.github.com/repos/slugiot/slugiot-server/deployments","created_at":"2016-04-12T19:53:50Z","updated_at":"2016-04-19T16:55:27Z","pushed_at":"2016-04-19T18:19:58Z","git_url":"git://github.com/slugiot/slugiot-server.git","ssh_url":"git@github.com:slugiot/slugiot-server.git","clone_url":"https://github.com/slugiot/slugiot-server.git","svn_url":"https://github.com/slugiot/slugiot-server","homepage":null,"size":34577,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":5,"forks":2,"open_issues":5,"watchers":3,"default_branch":"master_slugiot"}},"base":{"label":"slugiot:master_slugiot","ref":"master_slugiot","sha":"cc4f123ef86a05ec9e844f82e5030a54c4f193f9","user":{"login":"slugiot","id":18412481,"avatar_url":"https://avatars.githubusercontent.com/u/18412481?v=3","gravatar_id":"","url":"https://api.github.com/users/slugiot","html_url":"https://github.com/slugiot","followers_url":"https://api.github.com/users/slugiot/followers","following_url":"https://api.github.com/users/slugiot/following{/other_user}","gists_url":"https://api.github.com/users/slugiot/gists{/gist_id}","starred_url":"https://api.github.com/users/slugiot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slugiot/subscriptions","organizations_url":"https://api.github.com/users/slugiot/orgs","repos_url":"https://api.github.com/users/slugiot/repos","events_url":"https://api.github.com/users/slugiot/events{/privacy}","received_events_url":"https://api.github.com/users/slugiot/received_events","type":"Organization","site_admin":false},"repo":{"id":56093310,"name":"slugiot-server","full_name":"slugiot/slugiot-server","owner":{"login":"slugiot","id":18412481,"avatar_url":"https://avatars.githubusercontent.com/u/18412481?v=3","gravatar_id":"","url":"https://api.github.com/users/slugiot","html_url":"https://github.com/slugiot","followers_url":"https://api.github.com/users/slugiot/followers","following_url":"https://api.github.com/users/slugiot/following{/other_user}","gists_url":"https://api.github.com/users/slugiot/gists{/gist_id}","starred_url":"https://api.github.com/users/slugiot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slugiot/subscriptions","organizations_url":"https://api.github.com/users/slugiot/orgs","repos_url":"https://api.github.com/users/slugiot/repos","events_url":"https://api.github.com/users/slugiot/events{/privacy}","received_events_url":"https://api.github.com/users/slugiot/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/slugiot/slugiot-server","description":"","fork":false,"url":"https://api.github.com/repos/slugiot/slugiot-server","forks_url":"https://api.github.com/repos/slugiot/slugiot-server/forks","keys_url":"https://api.github.com/repos/slugiot/slugiot-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/slugiot/slugiot-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/slugiot/slugiot-server/teams","hooks_url":"https://api.github.com/repos/slugiot/slugiot-server/hooks","issue_events_url":"https://api.github.com/repos/slugiot/slugiot-server/issues/events{/number}","events_url":"https://api.github.com/repos/slugiot/slugiot-server/events","assignees_url":"https://api.github.com/repos/slugiot/slugiot-server/assignees{/user}","branches_url":"https://api.github.com/repos/slugiot/slugiot-server/branches{/branch}","tags_url":"https://api.github.com/repos/slugiot/slugiot-server/tags","blobs_url":"https://api.github.com/repos/slugiot/slugiot-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/slugiot/slugiot-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/slugiot/slugiot-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/slugiot/slugiot-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/slugiot/slugiot-server/statuses/{sha}","languages_url":"https://api.github.com/repos/slugiot/slugiot-server/languages","stargazers_url":"https://api.github.com/repos/slugiot/slugiot-server/stargazers","contributors_url":"https://api.github.com/repos/slugiot/slugiot-server/contributors","subscribers_url":"https://api.github.com/repos/slugiot/slugiot-server/subscribers","subscription_url":"https://api.github.com/repos/slugiot/slugiot-server/subscription","commits_url":"https://api.github.com/repos/slugiot/slugiot-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/slugiot/slugiot-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/slugiot/slugiot-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/slugiot/slugiot-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/slugiot/slugiot-server/contents/{+path}","compare_url":"https://api.github.com/repos/slugiot/slugiot-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/slugiot/slugiot-server/merges","archive_url":"https://api.github.com/repos/slugiot/slugiot-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/slugiot/slugiot-server/downloads","issues_url":"https://api.github.com/repos/slugiot/slugiot-server/issues{/number}","pulls_url":"https://api.github.com/repos/slugiot/slugiot-server/pulls{/number}","milestones_url":"https://api.github.com/repos/slugiot/slugiot-server/milestones{/number}","notifications_url":"https://api.github.com/repos/slugiot/slugiot-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/slugiot/slugiot-server/labels{/name}","releases_url":"https://api.github.com/repos/slugiot/slugiot-server/releases{/id}","deployments_url":"https://api.github.com/repos/slugiot/slugiot-server/deployments","created_at":"2016-04-12T19:53:50Z","updated_at":"2016-04-19T16:55:27Z","pushed_at":"2016-04-19T18:19:58Z","git_url":"git://github.com/slugiot/slugiot-server.git","ssh_url":"git@github.com:slugiot/slugiot-server.git","clone_url":"https://github.com/slugiot/slugiot-server.git","svn_url":"https://github.com/slugiot/slugiot-server","homepage":null,"size":34577,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":5,"forks":2,"open_issues":5,"watchers":3,"default_branch":"master_slugiot"}},"_links":{"self":{"href":"https://api.github.com/repos/slugiot/slugiot-server/pulls/7"},"html":{"href":"https://github.com/slugiot/slugiot-server/pull/7"},"issue":{"href":"https://api.github.com/repos/slugiot/slugiot-server/issues/7"},"comments":{"href":"https://api.github.com/repos/slugiot/slugiot-server/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/slugiot/slugiot-server/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/slugiot/slugiot-server/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/slugiot/slugiot-server/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/slugiot/slugiot-server/statuses/be813cf70166a6acc42762d24536e178465c540b"}}}}