{"action":"created","comment":{"url":"https://api.github.com/repos/dcos/dcos-ui/pulls/comments/60673711","id":60673711,"diff_hunk":"@@ -0,0 +1,131 @@\n+import {Dropdown, Modal} from 'reactjs-components';\n+import React from 'react';\n+\n+const METHODS_TO_BIND = ['handleUpgradeStart', 'handleVersionSelection'];\n+\n+class UpgradePackageModal extends React.Component {\n+  constructor() {\n+    super(...arguments);\n+\n+    this.state = {\n+      upgradeVersion: null\n+    };\n+\n+    METHODS_TO_BIND.forEach((method) => {\n+      this[method] = this[method].bind(this);\n+    });\n+  }\n+\n+  handleUpgradeStart() {\n+    let upgradeVersion = this.state.upgradeVersion;\n+    if (!upgradeVersion) {\n+      upgradeVersion = this.getLatestVersion(this.props.cosmosPackage);\n+    }\n+\n+    console.log(`starting upgrade to ${upgradeVersion}`);\n+  }\n+\n+  handleVersionSelection(version) {\n+    this.setState({upgradeVersion: version.id});\n+  }\n+\n+  getLatestVersion(cosmosPackage) {\n+    let availableVersions = cosmosPackage.getUpgradeVersions();\n+    return availableVersions[availableVersions.length - 1];\n+  }\n+\n+  getVersionDropdownItems(availableVersions) {\n+    return availableVersions.map(function (version) {\n+      return {id: version, html: `Version ${version}`};\n+    });\n+  }\n+\n+  getModalContents() {\n+    let {cosmosPackage, packageName, packageVersion} = this.props;\n+\n+    return (\n+      <div>","path":"src/js/components/modals/UpgradePackageModal.js","position":47,"original_position":47,"commit_id":"ae7717817a25c864ad3023770f919dd72c7c0fba","original_commit_id":"ae7717817a25c864ad3023770f919dd72c7c0fba","user":{"login":"kennyt","id":2662037,"avatar_url":"https://avatars.githubusercontent.com/u/2662037?v=3","gravatar_id":"","url":"https://api.github.com/users/kennyt","html_url":"https://github.com/kennyt","followers_url":"https://api.github.com/users/kennyt/followers","following_url":"https://api.github.com/users/kennyt/following{/other_user}","gists_url":"https://api.github.com/users/kennyt/gists{/gist_id}","starred_url":"https://api.github.com/users/kennyt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kennyt/subscriptions","organizations_url":"https://api.github.com/users/kennyt/orgs","repos_url":"https://api.github.com/users/kennyt/repos","events_url":"https://api.github.com/users/kennyt/events{/privacy}","received_events_url":"https://api.github.com/users/kennyt/received_events","type":"User","site_admin":false},"body":"can we remove this div?","created_at":"2016-04-21T23:59:20Z","updated_at":"2016-04-21T23:59:20Z","html_url":"https://github.com/dcos/dcos-ui/pull/21#discussion_r60673711","pull_request_url":"https://api.github.com/repos/dcos/dcos-ui/pulls/21","_links":{"self":{"href":"https://api.github.com/repos/dcos/dcos-ui/pulls/comments/60673711"},"html":{"href":"https://github.com/dcos/dcos-ui/pull/21#discussion_r60673711"},"pull_request":{"href":"https://api.github.com/repos/dcos/dcos-ui/pulls/21"}}},"pull_request":{"url":"https://api.github.com/repos/dcos/dcos-ui/pulls/21","id":67084227,"html_url":"https://github.com/dcos/dcos-ui/pull/21","diff_url":"https://github.com/dcos/dcos-ui/pull/21.diff","patch_url":"https://github.com/dcos/dcos-ui/pull/21.patch","issue_url":"https://api.github.com/repos/dcos/dcos-ui/issues/21","number":21,"state":"open","locked":false,"title":"DCOS-5673: Upgrade package confirmation","user":{"login":"jfurrow","id":1134755,"avatar_url":"https://avatars.githubusercontent.com/u/1134755?v=3","gravatar_id":"","url":"https://api.github.com/users/jfurrow","html_url":"https://github.com/jfurrow","followers_url":"https://api.github.com/users/jfurrow/followers","following_url":"https://api.github.com/users/jfurrow/following{/other_user}","gists_url":"https://api.github.com/users/jfurrow/gists{/gist_id}","starred_url":"https://api.github.com/users/jfurrow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfurrow/subscriptions","organizations_url":"https://api.github.com/users/jfurrow/orgs","repos_url":"https://api.github.com/users/jfurrow/repos","events_url":"https://api.github.com/users/jfurrow/events{/privacy}","received_events_url":"https://api.github.com/users/jfurrow/received_events","type":"User","site_admin":false},"body":"![](http://cl.ly/1z1t2g333O36/Screen%20Shot%202016-04-19%20at%201.28.19%20PM.png)","created_at":"2016-04-19T20:29:19Z","updated_at":"2016-04-21T23:59:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0a70962f370e99cdbfe09b59a835c73ffc643c48","assignee":{"login":"mlunoe","id":1097941,"avatar_url":"https://avatars.githubusercontent.com/u/1097941?v=3","gravatar_id":"","url":"https://api.github.com/users/mlunoe","html_url":"https://github.com/mlunoe","followers_url":"https://api.github.com/users/mlunoe/followers","following_url":"https://api.github.com/users/mlunoe/following{/other_user}","gists_url":"https://api.github.com/users/mlunoe/gists{/gist_id}","starred_url":"https://api.github.com/users/mlunoe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlunoe/subscriptions","organizations_url":"https://api.github.com/users/mlunoe/orgs","repos_url":"https://api.github.com/users/mlunoe/repos","events_url":"https://api.github.com/users/mlunoe/events{/privacy}","received_events_url":"https://api.github.com/users/mlunoe/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/dcos/dcos-ui/pulls/21/commits","review_comments_url":"https://api.github.com/repos/dcos/dcos-ui/pulls/21/comments","review_comment_url":"https://api.github.com/repos/dcos/dcos-ui/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dcos/dcos-ui/issues/21/comments","statuses_url":"https://api.github.com/repos/dcos/dcos-ui/statuses/ae7717817a25c864ad3023770f919dd72c7c0fba","head":{"label":"dcos:feature/DCOS-5673-upgrade-package-confirmation-v2","ref":"feature/DCOS-5673-upgrade-package-confirmation-v2","sha":"ae7717817a25c864ad3023770f919dd72c7c0fba","user":{"login":"dcos","id":17648048,"avatar_url":"https://avatars.githubusercontent.com/u/17648048?v=3","gravatar_id":"","url":"https://api.github.com/users/dcos","html_url":"https://github.com/dcos","followers_url":"https://api.github.com/users/dcos/followers","following_url":"https://api.github.com/users/dcos/following{/other_user}","gists_url":"https://api.github.com/users/dcos/gists{/gist_id}","starred_url":"https://api.github.com/users/dcos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcos/subscriptions","organizations_url":"https://api.github.com/users/dcos/orgs","repos_url":"https://api.github.com/users/dcos/repos","events_url":"https://api.github.com/users/dcos/events{/privacy}","received_events_url":"https://api.github.com/users/dcos/received_events","type":"Organization","site_admin":false},"repo":{"id":56547504,"name":"dcos-ui","full_name":"dcos/dcos-ui","owner":{"login":"dcos","id":17648048,"avatar_url":"https://avatars.githubusercontent.com/u/17648048?v=3","gravatar_id":"","url":"https://api.github.com/users/dcos","html_url":"https://github.com/dcos","followers_url":"https://api.github.com/users/dcos/followers","following_url":"https://api.github.com/users/dcos/following{/other_user}","gists_url":"https://api.github.com/users/dcos/gists{/gist_id}","starred_url":"https://api.github.com/users/dcos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcos/subscriptions","organizations_url":"https://api.github.com/users/dcos/orgs","repos_url":"https://api.github.com/users/dcos/repos","events_url":"https://api.github.com/users/dcos/events{/privacy}","received_events_url":"https://api.github.com/users/dcos/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dcos/dcos-ui","description":"The UI for The Datacenter Operating System","fork":false,"url":"https://api.github.com/repos/dcos/dcos-ui","forks_url":"https://api.github.com/repos/dcos/dcos-ui/forks","keys_url":"https://api.github.com/repos/dcos/dcos-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dcos/dcos-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dcos/dcos-ui/teams","hooks_url":"https://api.github.com/repos/dcos/dcos-ui/hooks","issue_events_url":"https://api.github.com/repos/dcos/dcos-ui/issues/events{/number}","events_url":"https://api.github.com/repos/dcos/dcos-ui/events","assignees_url":"https://api.github.com/repos/dcos/dcos-ui/assignees{/user}","branches_url":"https://api.github.com/repos/dcos/dcos-ui/branches{/branch}","tags_url":"https://api.github.com/repos/dcos/dcos-ui/tags","blobs_url":"https://api.github.com/repos/dcos/dcos-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dcos/dcos-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dcos/dcos-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/dcos/dcos-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dcos/dcos-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/dcos/dcos-ui/languages","stargazers_url":"https://api.github.com/repos/dcos/dcos-ui/stargazers","contributors_url":"https://api.github.com/repos/dcos/dcos-ui/contributors","subscribers_url":"https://api.github.com/repos/dcos/dcos-ui/subscribers","subscription_url":"https://api.github.com/repos/dcos/dcos-ui/subscription","commits_url":"https://api.github.com/repos/dcos/dcos-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/dcos/dcos-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/dcos/dcos-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/dcos/dcos-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/dcos/dcos-ui/contents/{+path}","compare_url":"https://api.github.com/repos/dcos/dcos-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dcos/dcos-ui/merges","archive_url":"https://api.github.com/repos/dcos/dcos-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dcos/dcos-ui/downloads","issues_url":"https://api.github.com/repos/dcos/dcos-ui/issues{/number}","pulls_url":"https://api.github.com/repos/dcos/dcos-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/dcos/dcos-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/dcos/dcos-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dcos/dcos-ui/labels{/name}","releases_url":"https://api.github.com/repos/dcos/dcos-ui/releases{/id}","deployments_url":"https://api.github.com/repos/dcos/dcos-ui/deployments","created_at":"2016-04-18T22:48:06Z","updated_at":"2016-04-21T21:31:07Z","pushed_at":"2016-04-21T22:53:34Z","git_url":"git://github.com/dcos/dcos-ui.git","ssh_url":"git@github.com:dcos/dcos-ui.git","clone_url":"https://github.com/dcos/dcos-ui.git","svn_url":"https://github.com/dcos/dcos-ui","homepage":null,"size":11406,"stargazers_count":49,"watchers_count":49,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":14,"forks":5,"open_issues":14,"watchers":49,"default_branch":"master"}},"base":{"label":"dcos:master","ref":"master","sha":"a519e0fb6fada4861046af3d8dc15ba55d6c5eb4","user":{"login":"dcos","id":17648048,"avatar_url":"https://avatars.githubusercontent.com/u/17648048?v=3","gravatar_id":"","url":"https://api.github.com/users/dcos","html_url":"https://github.com/dcos","followers_url":"https://api.github.com/users/dcos/followers","following_url":"https://api.github.com/users/dcos/following{/other_user}","gists_url":"https://api.github.com/users/dcos/gists{/gist_id}","starred_url":"https://api.github.com/users/dcos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcos/subscriptions","organizations_url":"https://api.github.com/users/dcos/orgs","repos_url":"https://api.github.com/users/dcos/repos","events_url":"https://api.github.com/users/dcos/events{/privacy}","received_events_url":"https://api.github.com/users/dcos/received_events","type":"Organization","site_admin":false},"repo":{"id":56547504,"name":"dcos-ui","full_name":"dcos/dcos-ui","owner":{"login":"dcos","id":17648048,"avatar_url":"https://avatars.githubusercontent.com/u/17648048?v=3","gravatar_id":"","url":"https://api.github.com/users/dcos","html_url":"https://github.com/dcos","followers_url":"https://api.github.com/users/dcos/followers","following_url":"https://api.github.com/users/dcos/following{/other_user}","gists_url":"https://api.github.com/users/dcos/gists{/gist_id}","starred_url":"https://api.github.com/users/dcos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcos/subscriptions","organizations_url":"https://api.github.com/users/dcos/orgs","repos_url":"https://api.github.com/users/dcos/repos","events_url":"https://api.github.com/users/dcos/events{/privacy}","received_events_url":"https://api.github.com/users/dcos/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dcos/dcos-ui","description":"The UI for The Datacenter Operating System","fork":false,"url":"https://api.github.com/repos/dcos/dcos-ui","forks_url":"https://api.github.com/repos/dcos/dcos-ui/forks","keys_url":"https://api.github.com/repos/dcos/dcos-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dcos/dcos-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dcos/dcos-ui/teams","hooks_url":"https://api.github.com/repos/dcos/dcos-ui/hooks","issue_events_url":"https://api.github.com/repos/dcos/dcos-ui/issues/events{/number}","events_url":"https://api.github.com/repos/dcos/dcos-ui/events","assignees_url":"https://api.github.com/repos/dcos/dcos-ui/assignees{/user}","branches_url":"https://api.github.com/repos/dcos/dcos-ui/branches{/branch}","tags_url":"https://api.github.com/repos/dcos/dcos-ui/tags","blobs_url":"https://api.github.com/repos/dcos/dcos-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dcos/dcos-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dcos/dcos-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/dcos/dcos-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dcos/dcos-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/dcos/dcos-ui/languages","stargazers_url":"https://api.github.com/repos/dcos/dcos-ui/stargazers","contributors_url":"https://api.github.com/repos/dcos/dcos-ui/contributors","subscribers_url":"https://api.github.com/repos/dcos/dcos-ui/subscribers","subscription_url":"https://api.github.com/repos/dcos/dcos-ui/subscription","commits_url":"https://api.github.com/repos/dcos/dcos-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/dcos/dcos-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/dcos/dcos-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/dcos/dcos-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/dcos/dcos-ui/contents/{+path}","compare_url":"https://api.github.com/repos/dcos/dcos-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dcos/dcos-ui/merges","archive_url":"https://api.github.com/repos/dcos/dcos-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dcos/dcos-ui/downloads","issues_url":"https://api.github.com/repos/dcos/dcos-ui/issues{/number}","pulls_url":"https://api.github.com/repos/dcos/dcos-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/dcos/dcos-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/dcos/dcos-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dcos/dcos-ui/labels{/name}","releases_url":"https://api.github.com/repos/dcos/dcos-ui/releases{/id}","deployments_url":"https://api.github.com/repos/dcos/dcos-ui/deployments","created_at":"2016-04-18T22:48:06Z","updated_at":"2016-04-21T21:31:07Z","pushed_at":"2016-04-21T22:53:34Z","git_url":"git://github.com/dcos/dcos-ui.git","ssh_url":"git@github.com:dcos/dcos-ui.git","clone_url":"https://github.com/dcos/dcos-ui.git","svn_url":"https://github.com/dcos/dcos-ui","homepage":null,"size":11406,"stargazers_count":49,"watchers_count":49,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":14,"forks":5,"open_issues":14,"watchers":49,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dcos/dcos-ui/pulls/21"},"html":{"href":"https://github.com/dcos/dcos-ui/pull/21"},"issue":{"href":"https://api.github.com/repos/dcos/dcos-ui/issues/21"},"comments":{"href":"https://api.github.com/repos/dcos/dcos-ui/issues/21/comments"},"review_comments":{"href":"https://api.github.com/repos/dcos/dcos-ui/pulls/21/comments"},"review_comment":{"href":"https://api.github.com/repos/dcos/dcos-ui/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dcos/dcos-ui/pulls/21/commits"},"statuses":{"href":"https://api.github.com/repos/dcos/dcos-ui/statuses/ae7717817a25c864ad3023770f919dd72c7c0fba"}}}}