{"action":"created","comment":{"url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/pulls/comments/192430964","pull_request_review_id":125211507,"id":192430964,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5MjQzMDk2NA==","diff_hunk":"@@ -0,0 +1,131 @@\n+import React from 'react';\n+import PropTypes from 'prop-types';\n+import { connect } from 'react-redux';\n+import Idle from 'react-idle';\n+import moment from 'moment';\n+// Phoenix Components\n+import PhoenixDialog from '../phoenix-dialog';\n+import Dictionary from '../../../conf/dictionary/es';\n+import DictionaryVars from '../../../conf/dictionary/dictionary-vars';\n+import Subdomain from '../../utils/subdomain';\n+import Session, {CURRENT_USER_LAST_ACTIVITY} from '../../utils/session';\n+\n+// Time until user changes to idle status after last action: 30 seconds\n+const ACTIVE_STATUS_DURATION = 30000;\n+// Duration of session while idle: 2 hours\n+const LOGOUT_TIME = 7200000;\n+// Countdown for being logged out: 30 seconds\n+const LOGOUT_COUNTDOWN = 30;\n+\n+class PhoenixIdle extends React.Component {\n+  constructor (props){\n+    super(props);\n+    this.state = {\n+      logoutInterval: null,\n+      timeout: null,\n+      logoutCountdown: LOGOUT_COUNTDOWN,\n+      showDialog: false\n+    };\n+\n+    this._clearLogoutInterval = this._clearLogoutInterval.bind(this);\n+    this._clearTimeout = this._clearTimeout.bind(this);\n+    this.logOut = this.logOut.bind(this);\n+    this.handleLogoutIdleChange = this.handleLogoutIdleChange.bind(this);\n+    this.handleStatusIdleChange = this.handleStatusIdleChange.bind(this);\n+    this.hideIdleDialog = this.hideIdleDialog.bind(this);\n+    this.resetCoountdown = this.resetCoountdown.bind(this);","path":"javascript/components/phoenix-idle/index.js","position":36,"original_position":36,"commit_id":"44a854d75c626b724da9f47fdb0a04e2a047ed20","original_commit_id":"44a854d75c626b724da9f47fdb0a04e2a047ed20","user":{"login":"gegianno","id":4052653,"node_id":"MDQ6VXNlcjQwNTI2NTM=","avatar_url":"https://avatars2.githubusercontent.com/u/4052653?v=4","gravatar_id":"","url":"https://api.github.com/users/gegianno","html_url":"https://github.com/gegianno","followers_url":"https://api.github.com/users/gegianno/followers","following_url":"https://api.github.com/users/gegianno/following{/other_user}","gists_url":"https://api.github.com/users/gegianno/gists{/gist_id}","starred_url":"https://api.github.com/users/gegianno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gegianno/subscriptions","organizations_url":"https://api.github.com/users/gegianno/orgs","repos_url":"https://api.github.com/users/gegianno/repos","events_url":"https://api.github.com/users/gegianno/events{/privacy}","received_events_url":"https://api.github.com/users/gegianno/received_events","type":"User","site_admin":false},"body":"`resetCoountdown ` no falla porque está escrito así en todas partes jaja","created_at":"2018-06-01T15:24:14Z","updated_at":"2018-06-01T15:26:55Z","html_url":"https://github.com/Papinotas-Desarrollo/phoenix-shared/pull/60#discussion_r192430964","pull_request_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/pulls/60","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/pulls/comments/192430964"},"html":{"href":"https://github.com/Papinotas-Desarrollo/phoenix-shared/pull/60#discussion_r192430964"},"pull_request":{"href":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/pulls/60"}}},"pull_request":{"url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/pulls/60","id":192064235,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkyMDY0MjM1","html_url":"https://github.com/Papinotas-Desarrollo/phoenix-shared/pull/60","diff_url":"https://github.com/Papinotas-Desarrollo/phoenix-shared/pull/60.diff","patch_url":"https://github.com/Papinotas-Desarrollo/phoenix-shared/pull/60.patch","issue_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/issues/60","number":60,"state":"open","locked":false,"title":"Feature/migration/291 phoenix idle","user":{"login":"RaimundoCar","id":7012377,"node_id":"MDQ6VXNlcjcwMTIzNzc=","avatar_url":"https://avatars3.githubusercontent.com/u/7012377?v=4","gravatar_id":"","url":"https://api.github.com/users/RaimundoCar","html_url":"https://github.com/RaimundoCar","followers_url":"https://api.github.com/users/RaimundoCar/followers","following_url":"https://api.github.com/users/RaimundoCar/following{/other_user}","gists_url":"https://api.github.com/users/RaimundoCar/gists{/gist_id}","starred_url":"https://api.github.com/users/RaimundoCar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RaimundoCar/subscriptions","organizations_url":"https://api.github.com/users/RaimundoCar/orgs","repos_url":"https://api.github.com/users/RaimundoCar/repos","events_url":"https://api.github.com/users/RaimundoCar/events{/privacy}","received_events_url":"https://api.github.com/users/RaimundoCar/received_events","type":"User","site_admin":false},"body":"- Add phoenix idle component:\r\n-- 1) It uses one Idle to write last activity timestamp to local storage. If component is mounted and 2 hours has passed since last activity written in local storage, then it logouts current session\r\n-- 2) It uses another Idle to time idle status. If 2 hours has passed with no activity, a dialog is shown. This dialog shows a timer of 30 seconds. If those 30 seconds run out, then it logouts current session \r\n","created_at":"2018-06-01T15:13:32Z","updated_at":"2018-06-01T15:26:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2c4b4f840aeff1a03a03e530df175598c0177c40","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/pulls/60/commits","review_comments_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/pulls/60/comments","review_comment_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/issues/60/comments","statuses_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/statuses/44a854d75c626b724da9f47fdb0a04e2a047ed20","head":{"label":"Papinotas-Desarrollo:feature/migration/291-phoenix-idle","ref":"feature/migration/291-phoenix-idle","sha":"44a854d75c626b724da9f47fdb0a04e2a047ed20","user":{"login":"Papinotas-Desarrollo","id":25645995,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1NjQ1OTk1","avatar_url":"https://avatars1.githubusercontent.com/u/25645995?v=4","gravatar_id":"","url":"https://api.github.com/users/Papinotas-Desarrollo","html_url":"https://github.com/Papinotas-Desarrollo","followers_url":"https://api.github.com/users/Papinotas-Desarrollo/followers","following_url":"https://api.github.com/users/Papinotas-Desarrollo/following{/other_user}","gists_url":"https://api.github.com/users/Papinotas-Desarrollo/gists{/gist_id}","starred_url":"https://api.github.com/users/Papinotas-Desarrollo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Papinotas-Desarrollo/subscriptions","organizations_url":"https://api.github.com/users/Papinotas-Desarrollo/orgs","repos_url":"https://api.github.com/users/Papinotas-Desarrollo/repos","events_url":"https://api.github.com/users/Papinotas-Desarrollo/events{/privacy}","received_events_url":"https://api.github.com/users/Papinotas-Desarrollo/received_events","type":"Organization","site_admin":false},"repo":{"id":129742493,"node_id":"MDEwOlJlcG9zaXRvcnkxMjk3NDI0OTM=","name":"phoenix-shared","full_name":"Papinotas-Desarrollo/phoenix-shared","owner":{"login":"Papinotas-Desarrollo","id":25645995,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1NjQ1OTk1","avatar_url":"https://avatars1.githubusercontent.com/u/25645995?v=4","gravatar_id":"","url":"https://api.github.com/users/Papinotas-Desarrollo","html_url":"https://github.com/Papinotas-Desarrollo","followers_url":"https://api.github.com/users/Papinotas-Desarrollo/followers","following_url":"https://api.github.com/users/Papinotas-Desarrollo/following{/other_user}","gists_url":"https://api.github.com/users/Papinotas-Desarrollo/gists{/gist_id}","starred_url":"https://api.github.com/users/Papinotas-Desarrollo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Papinotas-Desarrollo/subscriptions","organizations_url":"https://api.github.com/users/Papinotas-Desarrollo/orgs","repos_url":"https://api.github.com/users/Papinotas-Desarrollo/repos","events_url":"https://api.github.com/users/Papinotas-Desarrollo/events{/privacy}","received_events_url":"https://api.github.com/users/Papinotas-Desarrollo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Papinotas-Desarrollo/phoenix-shared","description":"Shared components and utils for Phoenix Frontend App","fork":false,"url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared","forks_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/forks","keys_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/teams","hooks_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/hooks","issue_events_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/issues/events{/number}","events_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/events","assignees_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/assignees{/user}","branches_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/branches{/branch}","tags_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/tags","blobs_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/git/refs{/sha}","trees_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/statuses/{sha}","languages_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/languages","stargazers_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/stargazers","contributors_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/contributors","subscribers_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/subscribers","subscription_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/subscription","commits_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/commits{/sha}","git_commits_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/git/commits{/sha}","comments_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/comments{/number}","issue_comment_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/issues/comments{/number}","contents_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/contents/{+path}","compare_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/merges","archive_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/downloads","issues_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/issues{/number}","pulls_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/pulls{/number}","milestones_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/milestones{/number}","notifications_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/labels{/name}","releases_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/releases{/id}","deployments_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/deployments","created_at":"2018-04-16T12:48:06Z","updated_at":"2018-06-01T13:54:28Z","pushed_at":"2018-06-01T15:13:32Z","git_url":"git://github.com/Papinotas-Desarrollo/phoenix-shared.git","ssh_url":"git@github.com:Papinotas-Desarrollo/phoenix-shared.git","clone_url":"https://github.com/Papinotas-Desarrollo/phoenix-shared.git","svn_url":"https://github.com/Papinotas-Desarrollo/phoenix-shared","homepage":null,"size":741,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":3,"license":null,"forks":2,"open_issues":3,"watchers":2,"default_branch":"master"}},"base":{"label":"Papinotas-Desarrollo:develop","ref":"develop","sha":"3452806a36ce689b18bc51e8bc8ec2b8924699d8","user":{"login":"Papinotas-Desarrollo","id":25645995,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1NjQ1OTk1","avatar_url":"https://avatars1.githubusercontent.com/u/25645995?v=4","gravatar_id":"","url":"https://api.github.com/users/Papinotas-Desarrollo","html_url":"https://github.com/Papinotas-Desarrollo","followers_url":"https://api.github.com/users/Papinotas-Desarrollo/followers","following_url":"https://api.github.com/users/Papinotas-Desarrollo/following{/other_user}","gists_url":"https://api.github.com/users/Papinotas-Desarrollo/gists{/gist_id}","starred_url":"https://api.github.com/users/Papinotas-Desarrollo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Papinotas-Desarrollo/subscriptions","organizations_url":"https://api.github.com/users/Papinotas-Desarrollo/orgs","repos_url":"https://api.github.com/users/Papinotas-Desarrollo/repos","events_url":"https://api.github.com/users/Papinotas-Desarrollo/events{/privacy}","received_events_url":"https://api.github.com/users/Papinotas-Desarrollo/received_events","type":"Organization","site_admin":false},"repo":{"id":129742493,"node_id":"MDEwOlJlcG9zaXRvcnkxMjk3NDI0OTM=","name":"phoenix-shared","full_name":"Papinotas-Desarrollo/phoenix-shared","owner":{"login":"Papinotas-Desarrollo","id":25645995,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1NjQ1OTk1","avatar_url":"https://avatars1.githubusercontent.com/u/25645995?v=4","gravatar_id":"","url":"https://api.github.com/users/Papinotas-Desarrollo","html_url":"https://github.com/Papinotas-Desarrollo","followers_url":"https://api.github.com/users/Papinotas-Desarrollo/followers","following_url":"https://api.github.com/users/Papinotas-Desarrollo/following{/other_user}","gists_url":"https://api.github.com/users/Papinotas-Desarrollo/gists{/gist_id}","starred_url":"https://api.github.com/users/Papinotas-Desarrollo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Papinotas-Desarrollo/subscriptions","organizations_url":"https://api.github.com/users/Papinotas-Desarrollo/orgs","repos_url":"https://api.github.com/users/Papinotas-Desarrollo/repos","events_url":"https://api.github.com/users/Papinotas-Desarrollo/events{/privacy}","received_events_url":"https://api.github.com/users/Papinotas-Desarrollo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Papinotas-Desarrollo/phoenix-shared","description":"Shared components and utils for Phoenix Frontend App","fork":false,"url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared","forks_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/forks","keys_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/teams","hooks_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/hooks","issue_events_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/issues/events{/number}","events_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/events","assignees_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/assignees{/user}","branches_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/branches{/branch}","tags_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/tags","blobs_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/git/refs{/sha}","trees_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/statuses/{sha}","languages_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/languages","stargazers_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/stargazers","contributors_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/contributors","subscribers_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/subscribers","subscription_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/subscription","commits_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/commits{/sha}","git_commits_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/git/commits{/sha}","comments_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/comments{/number}","issue_comment_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/issues/comments{/number}","contents_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/contents/{+path}","compare_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/merges","archive_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/downloads","issues_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/issues{/number}","pulls_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/pulls{/number}","milestones_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/milestones{/number}","notifications_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/labels{/name}","releases_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/releases{/id}","deployments_url":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/deployments","created_at":"2018-04-16T12:48:06Z","updated_at":"2018-06-01T13:54:28Z","pushed_at":"2018-06-01T15:13:32Z","git_url":"git://github.com/Papinotas-Desarrollo/phoenix-shared.git","ssh_url":"git@github.com:Papinotas-Desarrollo/phoenix-shared.git","clone_url":"https://github.com/Papinotas-Desarrollo/phoenix-shared.git","svn_url":"https://github.com/Papinotas-Desarrollo/phoenix-shared","homepage":null,"size":741,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":3,"license":null,"forks":2,"open_issues":3,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/pulls/60"},"html":{"href":"https://github.com/Papinotas-Desarrollo/phoenix-shared/pull/60"},"issue":{"href":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/issues/60"},"comments":{"href":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/issues/60/comments"},"review_comments":{"href":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/pulls/60/comments"},"review_comment":{"href":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/pulls/60/commits"},"statuses":{"href":"https://api.github.com/repos/Papinotas-Desarrollo/phoenix-shared/statuses/44a854d75c626b724da9f47fdb0a04e2a047ed20"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"gegianno"}}