{"action":"created","comment":{"url":"https://api.github.com/repos/tananaev/traccar-web/pulls/comments/90589823","pull_request_review_id":11109051,"id":90589823,"diff_hunk":"@@ -208,15 +210,45 @@ Ext.define('Traccar.view.ReportController', {\n                 params: {\n                     id: positionIds\n                 },\n+                scope: this,\n                 callback: function (records, operation, success) {\n                     if (success) {\n                         Ext.getStore('ReportRoute').add(records);\n+                        if (this.singleEvent && records.length > 0) {","path":"web/app/view/ReportController.js","position":null,"original_position":26,"commit_id":"ea09b2e85e014d438084a454fae7c0cce57d9773","original_commit_id":"1aae9dee5ecd797c3c2d2a6e985f605d783620ee","user":{"login":"tananaev","id":1161863,"avatar_url":"https://avatars.githubusercontent.com/u/1161863?v=3","gravatar_id":"","url":"https://api.github.com/users/tananaev","html_url":"https://github.com/tananaev","followers_url":"https://api.github.com/users/tananaev/followers","following_url":"https://api.github.com/users/tananaev/following{/other_user}","gists_url":"https://api.github.com/users/tananaev/gists{/gist_id}","starred_url":"https://api.github.com/users/tananaev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tananaev/subscriptions","organizations_url":"https://api.github.com/users/tananaev/orgs","repos_url":"https://api.github.com/users/tananaev/repos","events_url":"https://api.github.com/users/tananaev/events{/privacy}","received_events_url":"https://api.github.com/users/tananaev/received_events","type":"User","site_admin":false},"body":"OK, then your option of auto-selecting if a single sounds better.","created_at":"2016-12-02T05:42:07Z","updated_at":"2016-12-02T05:42:07Z","html_url":"https://github.com/tananaev/traccar-web/pull/347#discussion_r90589823","pull_request_url":"https://api.github.com/repos/tananaev/traccar-web/pulls/347","_links":{"self":{"href":"https://api.github.com/repos/tananaev/traccar-web/pulls/comments/90589823"},"html":{"href":"https://github.com/tananaev/traccar-web/pull/347#discussion_r90589823"},"pull_request":{"href":"https://api.github.com/repos/tananaev/traccar-web/pulls/347"}}},"pull_request":{"url":"https://api.github.com/repos/tananaev/traccar-web/pulls/347","id":96039842,"html_url":"https://github.com/tananaev/traccar-web/pull/347","diff_url":"https://github.com/tananaev/traccar-web/pull/347.diff","patch_url":"https://github.com/tananaev/traccar-web/pull/347.patch","issue_url":"https://api.github.com/repos/tananaev/traccar-web/issues/347","number":347,"state":"open","locked":false,"title":"Handle eventId url parameter","user":{"login":"Abyss777","id":5688080,"avatar_url":"https://avatars.githubusercontent.com/u/5688080?v=3","gravatar_id":"","url":"https://api.github.com/users/Abyss777","html_url":"https://github.com/Abyss777","followers_url":"https://api.github.com/users/Abyss777/followers","following_url":"https://api.github.com/users/Abyss777/following{/other_user}","gists_url":"https://api.github.com/users/Abyss777/gists{/gist_id}","starred_url":"https://api.github.com/users/Abyss777/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Abyss777/subscriptions","organizations_url":"https://api.github.com/users/Abyss777/orgs","repos_url":"https://api.github.com/users/Abyss777/repos","events_url":"https://api.github.com/users/Abyss777/events{/privacy}","received_events_url":"https://api.github.com/users/Abyss777/received_events","type":"User","site_admin":false},"body":"Also fit map view to all markers not only first route.\r\n\r\nThe logic is not obvious because of asynchronous. I'll try to explain.\r\n\r\n- `Application` add function to remove parameter from url and global variable.\r\n- `ReportController.init` check if url has `eventId` parameter and initiate event load process.\r\nRemove `eventId` from url\r\n- `MapMarkerController.loadReport` removed map view fit\r\n- `MapMarkerController.addReportMarkers` calculate `ol.Extent` to fit map view.\r\nFire 'selectreport' event in case we come here with `eventId` parameter\r\n\r\nAfter this changes if we pass parameter, event will be loaded, position will be loaded and showed on map.\r\n\r\nI was thinking, if event does not have linked position, user won't understand what's happen.\r\n\r\n- `ReportController.loadEvents` open report panel and highlight event in case we do not have linked position.","created_at":"2016-12-01T07:40:19Z","updated_at":"2016-12-02T05:42:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b9fa6943d12dee293e240c2c3584ec99a5bdba77","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/tananaev/traccar-web/pulls/347/commits","review_comments_url":"https://api.github.com/repos/tananaev/traccar-web/pulls/347/comments","review_comment_url":"https://api.github.com/repos/tananaev/traccar-web/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tananaev/traccar-web/issues/347/comments","statuses_url":"https://api.github.com/repos/tananaev/traccar-web/statuses/ea09b2e85e014d438084a454fae7c0cce57d9773","head":{"label":"Abyss777:handle_eventid","ref":"handle_eventid","sha":"ea09b2e85e014d438084a454fae7c0cce57d9773","user":{"login":"Abyss777","id":5688080,"avatar_url":"https://avatars.githubusercontent.com/u/5688080?v=3","gravatar_id":"","url":"https://api.github.com/users/Abyss777","html_url":"https://github.com/Abyss777","followers_url":"https://api.github.com/users/Abyss777/followers","following_url":"https://api.github.com/users/Abyss777/following{/other_user}","gists_url":"https://api.github.com/users/Abyss777/gists{/gist_id}","starred_url":"https://api.github.com/users/Abyss777/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Abyss777/subscriptions","organizations_url":"https://api.github.com/users/Abyss777/orgs","repos_url":"https://api.github.com/users/Abyss777/repos","events_url":"https://api.github.com/users/Abyss777/events{/privacy}","received_events_url":"https://api.github.com/users/Abyss777/received_events","type":"User","site_admin":false},"repo":{"id":68573189,"name":"traccar-web","full_name":"Abyss777/traccar-web","owner":{"login":"Abyss777","id":5688080,"avatar_url":"https://avatars.githubusercontent.com/u/5688080?v=3","gravatar_id":"","url":"https://api.github.com/users/Abyss777","html_url":"https://github.com/Abyss777","followers_url":"https://api.github.com/users/Abyss777/followers","following_url":"https://api.github.com/users/Abyss777/following{/other_user}","gists_url":"https://api.github.com/users/Abyss777/gists{/gist_id}","starred_url":"https://api.github.com/users/Abyss777/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Abyss777/subscriptions","organizations_url":"https://api.github.com/users/Abyss777/orgs","repos_url":"https://api.github.com/users/Abyss777/repos","events_url":"https://api.github.com/users/Abyss777/events{/privacy}","received_events_url":"https://api.github.com/users/Abyss777/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Abyss777/traccar-web","description":"Traccar GPS Tracking System","fork":true,"url":"https://api.github.com/repos/Abyss777/traccar-web","forks_url":"https://api.github.com/repos/Abyss777/traccar-web/forks","keys_url":"https://api.github.com/repos/Abyss777/traccar-web/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Abyss777/traccar-web/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Abyss777/traccar-web/teams","hooks_url":"https://api.github.com/repos/Abyss777/traccar-web/hooks","issue_events_url":"https://api.github.com/repos/Abyss777/traccar-web/issues/events{/number}","events_url":"https://api.github.com/repos/Abyss777/traccar-web/events","assignees_url":"https://api.github.com/repos/Abyss777/traccar-web/assignees{/user}","branches_url":"https://api.github.com/repos/Abyss777/traccar-web/branches{/branch}","tags_url":"https://api.github.com/repos/Abyss777/traccar-web/tags","blobs_url":"https://api.github.com/repos/Abyss777/traccar-web/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Abyss777/traccar-web/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Abyss777/traccar-web/git/refs{/sha}","trees_url":"https://api.github.com/repos/Abyss777/traccar-web/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Abyss777/traccar-web/statuses/{sha}","languages_url":"https://api.github.com/repos/Abyss777/traccar-web/languages","stargazers_url":"https://api.github.com/repos/Abyss777/traccar-web/stargazers","contributors_url":"https://api.github.com/repos/Abyss777/traccar-web/contributors","subscribers_url":"https://api.github.com/repos/Abyss777/traccar-web/subscribers","subscription_url":"https://api.github.com/repos/Abyss777/traccar-web/subscription","commits_url":"https://api.github.com/repos/Abyss777/traccar-web/commits{/sha}","git_commits_url":"https://api.github.com/repos/Abyss777/traccar-web/git/commits{/sha}","comments_url":"https://api.github.com/repos/Abyss777/traccar-web/comments{/number}","issue_comment_url":"https://api.github.com/repos/Abyss777/traccar-web/issues/comments{/number}","contents_url":"https://api.github.com/repos/Abyss777/traccar-web/contents/{+path}","compare_url":"https://api.github.com/repos/Abyss777/traccar-web/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Abyss777/traccar-web/merges","archive_url":"https://api.github.com/repos/Abyss777/traccar-web/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Abyss777/traccar-web/downloads","issues_url":"https://api.github.com/repos/Abyss777/traccar-web/issues{/number}","pulls_url":"https://api.github.com/repos/Abyss777/traccar-web/pulls{/number}","milestones_url":"https://api.github.com/repos/Abyss777/traccar-web/milestones{/number}","notifications_url":"https://api.github.com/repos/Abyss777/traccar-web/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Abyss777/traccar-web/labels{/name}","releases_url":"https://api.github.com/repos/Abyss777/traccar-web/releases{/id}","deployments_url":"https://api.github.com/repos/Abyss777/traccar-web/deployments","created_at":"2016-09-19T05:48:08Z","updated_at":"2016-09-19T05:48:09Z","pushed_at":"2016-12-02T02:29:29Z","git_url":"git://github.com/Abyss777/traccar-web.git","ssh_url":"git@github.com:Abyss777/traccar-web.git","clone_url":"https://github.com/Abyss777/traccar-web.git","svn_url":"https://github.com/Abyss777/traccar-web","homepage":"https://www.traccar.org","size":632,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"tananaev:master","ref":"master","sha":"38b3a3e6df91b7c2135cfcca855826ce8f1b1e63","user":{"login":"tananaev","id":1161863,"avatar_url":"https://avatars.githubusercontent.com/u/1161863?v=3","gravatar_id":"","url":"https://api.github.com/users/tananaev","html_url":"https://github.com/tananaev","followers_url":"https://api.github.com/users/tananaev/followers","following_url":"https://api.github.com/users/tananaev/following{/other_user}","gists_url":"https://api.github.com/users/tananaev/gists{/gist_id}","starred_url":"https://api.github.com/users/tananaev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tananaev/subscriptions","organizations_url":"https://api.github.com/users/tananaev/orgs","repos_url":"https://api.github.com/users/tananaev/repos","events_url":"https://api.github.com/users/tananaev/events{/privacy}","received_events_url":"https://api.github.com/users/tananaev/received_events","type":"User","site_admin":false},"repo":{"id":6512913,"name":"traccar-web","full_name":"tananaev/traccar-web","owner":{"login":"tananaev","id":1161863,"avatar_url":"https://avatars.githubusercontent.com/u/1161863?v=3","gravatar_id":"","url":"https://api.github.com/users/tananaev","html_url":"https://github.com/tananaev","followers_url":"https://api.github.com/users/tananaev/followers","following_url":"https://api.github.com/users/tananaev/following{/other_user}","gists_url":"https://api.github.com/users/tananaev/gists{/gist_id}","starred_url":"https://api.github.com/users/tananaev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tananaev/subscriptions","organizations_url":"https://api.github.com/users/tananaev/orgs","repos_url":"https://api.github.com/users/tananaev/repos","events_url":"https://api.github.com/users/tananaev/events{/privacy}","received_events_url":"https://api.github.com/users/tananaev/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tananaev/traccar-web","description":"Traccar GPS Tracking System","fork":false,"url":"https://api.github.com/repos/tananaev/traccar-web","forks_url":"https://api.github.com/repos/tananaev/traccar-web/forks","keys_url":"https://api.github.com/repos/tananaev/traccar-web/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tananaev/traccar-web/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tananaev/traccar-web/teams","hooks_url":"https://api.github.com/repos/tananaev/traccar-web/hooks","issue_events_url":"https://api.github.com/repos/tananaev/traccar-web/issues/events{/number}","events_url":"https://api.github.com/repos/tananaev/traccar-web/events","assignees_url":"https://api.github.com/repos/tananaev/traccar-web/assignees{/user}","branches_url":"https://api.github.com/repos/tananaev/traccar-web/branches{/branch}","tags_url":"https://api.github.com/repos/tananaev/traccar-web/tags","blobs_url":"https://api.github.com/repos/tananaev/traccar-web/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tananaev/traccar-web/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tananaev/traccar-web/git/refs{/sha}","trees_url":"https://api.github.com/repos/tananaev/traccar-web/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tananaev/traccar-web/statuses/{sha}","languages_url":"https://api.github.com/repos/tananaev/traccar-web/languages","stargazers_url":"https://api.github.com/repos/tananaev/traccar-web/stargazers","contributors_url":"https://api.github.com/repos/tananaev/traccar-web/contributors","subscribers_url":"https://api.github.com/repos/tananaev/traccar-web/subscribers","subscription_url":"https://api.github.com/repos/tananaev/traccar-web/subscription","commits_url":"https://api.github.com/repos/tananaev/traccar-web/commits{/sha}","git_commits_url":"https://api.github.com/repos/tananaev/traccar-web/git/commits{/sha}","comments_url":"https://api.github.com/repos/tananaev/traccar-web/comments{/number}","issue_comment_url":"https://api.github.com/repos/tananaev/traccar-web/issues/comments{/number}","contents_url":"https://api.github.com/repos/tananaev/traccar-web/contents/{+path}","compare_url":"https://api.github.com/repos/tananaev/traccar-web/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tananaev/traccar-web/merges","archive_url":"https://api.github.com/repos/tananaev/traccar-web/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tananaev/traccar-web/downloads","issues_url":"https://api.github.com/repos/tananaev/traccar-web/issues{/number}","pulls_url":"https://api.github.com/repos/tananaev/traccar-web/pulls{/number}","milestones_url":"https://api.github.com/repos/tananaev/traccar-web/milestones{/number}","notifications_url":"https://api.github.com/repos/tananaev/traccar-web/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tananaev/traccar-web/labels{/name}","releases_url":"https://api.github.com/repos/tananaev/traccar-web/releases{/id}","deployments_url":"https://api.github.com/repos/tananaev/traccar-web/deployments","created_at":"2012-11-02T21:31:50Z","updated_at":"2016-11-24T20:28:00Z","pushed_at":"2016-12-02T02:29:30Z","git_url":"git://github.com/tananaev/traccar-web.git","ssh_url":"git@github.com:tananaev/traccar-web.git","clone_url":"https://github.com/tananaev/traccar-web.git","svn_url":"https://github.com/tananaev/traccar-web","homepage":"https://www.traccar.org","size":40448,"stargazers_count":77,"watchers_count":77,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":135,"mirror_url":null,"open_issues_count":35,"forks":135,"open_issues":35,"watchers":77,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tananaev/traccar-web/pulls/347"},"html":{"href":"https://github.com/tananaev/traccar-web/pull/347"},"issue":{"href":"https://api.github.com/repos/tananaev/traccar-web/issues/347"},"comments":{"href":"https://api.github.com/repos/tananaev/traccar-web/issues/347/comments"},"review_comments":{"href":"https://api.github.com/repos/tananaev/traccar-web/pulls/347/comments"},"review_comment":{"href":"https://api.github.com/repos/tananaev/traccar-web/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tananaev/traccar-web/pulls/347/commits"},"statuses":{"href":"https://api.github.com/repos/tananaev/traccar-web/statuses/ea09b2e85e014d438084a454fae7c0cce57d9773"}}}}
{"actor":{"display_login":"tananaev"}}