{"action":"created","comment":{"url":"https://api.github.com/repos/apache/couchdb-fauxton/pulls/comments/72035066","id":72035066,"diff_hunk":"@@ -0,0 +1,90 @@\n+// Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\n+// use this file except in compliance with the License. You may obtain a copy of\n+// the License at\n+//\n+//   http://www.apache.org/licenses/LICENSE-2.0\n+//\n+// Unless required by applicable law or agreed to in writing, software\n+// distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n+// License for the specific language governing permissions and limitations under\n+// the License.\n+import app from '../../app';\n+import FauxtonAPI from '../../core/api';\n+import ActionTypes from './actiontypes';\n+import Helpers from './helpers';\n+\n+\n+function initReplicator (sourceDatabase) {\n+  if (sourceDatabase) {\n+    FauxtonAPI.dispatch({\n+      type: ActionTypes.INIT_REPLICATION,\n+      options: {\n+        sourceDatabase: sourceDatabase\n+      }\n+    });\n+  }\n+  $.ajax({\n+    url: app.host + '/_all_dbs',\n+    contentType: 'application/json',\n+    dataType: 'json'\n+  }).then(function (databases) {\n+    FauxtonAPI.dispatch({\n+      type: ActionTypes.REPLICATION_DATABASES_LOADED,\n+      options: {\n+        databases: databases\n+      }\n+    });\n+  });\n+}\n+\n+function replicate (params) {\n+  var promise = $.ajax({\n+    url: window.location.origin + '/_replicator',\n+    contentType: 'application/json',\n+    type: 'POST',\n+    dataType: 'json',\n+    data: JSON.stringify(params)\n+  });\n+\n+  var source = Helpers.getDatabaseLabel(params.source);\n+  var target = Helpers.getDatabaseLabel(params.target);\n+\n+  promise.then(function () {","path":"app/addons/replication/actions.js","position":53,"original_position":53,"commit_id":"b357fd404906f5f672f30e7a7d8c30d54177331a","original_commit_id":"b357fd404906f5f672f30e7a7d8c30d54177331a","user":{"login":"garrensmith","id":179458,"avatar_url":"https://avatars.githubusercontent.com/u/179458?v=3","gravatar_id":"","url":"https://api.github.com/users/garrensmith","html_url":"https://github.com/garrensmith","followers_url":"https://api.github.com/users/garrensmith/followers","following_url":"https://api.github.com/users/garrensmith/following{/other_user}","gists_url":"https://api.github.com/users/garrensmith/gists{/gist_id}","starred_url":"https://api.github.com/users/garrensmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garrensmith/subscriptions","organizations_url":"https://api.github.com/users/garrensmith/orgs","repos_url":"https://api.github.com/users/garrensmith/repos","events_url":"https://api.github.com/users/garrensmith/events{/privacy}","received_events_url":"https://api.github.com/users/garrensmith/received_events","type":"User","site_admin":false},"body":"You can also make these all `() =>` functions","created_at":"2016-07-25T09:38:55Z","updated_at":"2016-07-25T09:38:55Z","html_url":"https://github.com/apache/couchdb-fauxton/pull/669#discussion_r72035066","pull_request_url":"https://api.github.com/repos/apache/couchdb-fauxton/pulls/669","_links":{"self":{"href":"https://api.github.com/repos/apache/couchdb-fauxton/pulls/comments/72035066"},"html":{"href":"https://github.com/apache/couchdb-fauxton/pull/669#discussion_r72035066"},"pull_request":{"href":"https://api.github.com/repos/apache/couchdb-fauxton/pulls/669"}}},"pull_request":{"url":"https://api.github.com/repos/apache/couchdb-fauxton/pulls/669","id":63135989,"html_url":"https://github.com/apache/couchdb-fauxton/pull/669","diff_url":"https://github.com/apache/couchdb-fauxton/pull/669.diff","patch_url":"https://github.com/apache/couchdb-fauxton/pull/669.patch","issue_url":"https://api.github.com/repos/apache/couchdb-fauxton/issues/669","number":669,"state":"open","locked":false,"title":"Replication page update","user":{"login":"benkeen","id":512116,"avatar_url":"https://avatars.githubusercontent.com/u/512116?v=3","gravatar_id":"","url":"https://api.github.com/users/benkeen","html_url":"https://github.com/benkeen","followers_url":"https://api.github.com/users/benkeen/followers","following_url":"https://api.github.com/users/benkeen/following{/other_user}","gists_url":"https://api.github.com/users/benkeen/gists{/gist_id}","starred_url":"https://api.github.com/users/benkeen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benkeen/subscriptions","organizations_url":"https://api.github.com/users/benkeen/orgs","repos_url":"https://api.github.com/users/benkeen/repos","events_url":"https://api.github.com/users/benkeen/events{/privacy}","received_events_url":"https://api.github.com/users/benkeen/received_events","type":"User","site_admin":false},"body":"This PR refactors the replication page for a simpler wizard-like structure. Advanced replication options are coming down the pipe in a different PR.\r\n\r\nReplication scenarios now working:\r\n```\r\nlocal -> new local db \r\nlocal -> existing local db\r\nlocal -> new remote db\r\nlocal -> existing remote db\r\nremote -> remote new DB\r\nremote -> remote existing DB\r\nremote -> new local db\r\nremote -> existing local db\r\n```\r\n\r\nYaaaaaaaayyyyyyyyy.","created_at":"2016-03-16T21:07:00Z","updated_at":"2016-07-25T09:38:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e1aef8dca81048e1cc421649d1f1dc431f439c8f","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/couchdb-fauxton/pulls/669/commits","review_comments_url":"https://api.github.com/repos/apache/couchdb-fauxton/pulls/669/comments","review_comment_url":"https://api.github.com/repos/apache/couchdb-fauxton/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/couchdb-fauxton/issues/669/comments","statuses_url":"https://api.github.com/repos/apache/couchdb-fauxton/statuses/b357fd404906f5f672f30e7a7d8c30d54177331a","head":{"label":"benkeen:replication-page-update","ref":"replication-page-update","sha":"b357fd404906f5f672f30e7a7d8c30d54177331a","user":{"login":"benkeen","id":512116,"avatar_url":"https://avatars.githubusercontent.com/u/512116?v=3","gravatar_id":"","url":"https://api.github.com/users/benkeen","html_url":"https://github.com/benkeen","followers_url":"https://api.github.com/users/benkeen/followers","following_url":"https://api.github.com/users/benkeen/following{/other_user}","gists_url":"https://api.github.com/users/benkeen/gists{/gist_id}","starred_url":"https://api.github.com/users/benkeen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benkeen/subscriptions","organizations_url":"https://api.github.com/users/benkeen/orgs","repos_url":"https://api.github.com/users/benkeen/repos","events_url":"https://api.github.com/users/benkeen/events{/privacy}","received_events_url":"https://api.github.com/users/benkeen/received_events","type":"User","site_admin":false},"repo":{"id":24124373,"name":"couchdb-fauxton","full_name":"benkeen/couchdb-fauxton","owner":{"login":"benkeen","id":512116,"avatar_url":"https://avatars.githubusercontent.com/u/512116?v=3","gravatar_id":"","url":"https://api.github.com/users/benkeen","html_url":"https://github.com/benkeen","followers_url":"https://api.github.com/users/benkeen/followers","following_url":"https://api.github.com/users/benkeen/following{/other_user}","gists_url":"https://api.github.com/users/benkeen/gists{/gist_id}","starred_url":"https://api.github.com/users/benkeen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benkeen/subscriptions","organizations_url":"https://api.github.com/users/benkeen/orgs","repos_url":"https://api.github.com/users/benkeen/repos","events_url":"https://api.github.com/users/benkeen/events{/privacy}","received_events_url":"https://api.github.com/users/benkeen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/benkeen/couchdb-fauxton","description":"Mirror of Apache CouchDB","fork":true,"url":"https://api.github.com/repos/benkeen/couchdb-fauxton","forks_url":"https://api.github.com/repos/benkeen/couchdb-fauxton/forks","keys_url":"https://api.github.com/repos/benkeen/couchdb-fauxton/keys{/key_id}","collaborators_url":"https://api.github.com/repos/benkeen/couchdb-fauxton/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/benkeen/couchdb-fauxton/teams","hooks_url":"https://api.github.com/repos/benkeen/couchdb-fauxton/hooks","issue_events_url":"https://api.github.com/repos/benkeen/couchdb-fauxton/issues/events{/number}","events_url":"https://api.github.com/repos/benkeen/couchdb-fauxton/events","assignees_url":"https://api.github.com/repos/benkeen/couchdb-fauxton/assignees{/user}","branches_url":"https://api.github.com/repos/benkeen/couchdb-fauxton/branches{/branch}","tags_url":"https://api.github.com/repos/benkeen/couchdb-fauxton/tags","blobs_url":"https://api.github.com/repos/benkeen/couchdb-fauxton/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/benkeen/couchdb-fauxton/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/benkeen/couchdb-fauxton/git/refs{/sha}","trees_url":"https://api.github.com/repos/benkeen/couchdb-fauxton/git/trees{/sha}","statuses_url":"https://api.github.com/repos/benkeen/couchdb-fauxton/statuses/{sha}","languages_url":"https://api.github.com/repos/benkeen/couchdb-fauxton/languages","stargazers_url":"https://api.github.com/repos/benkeen/couchdb-fauxton/stargazers","contributors_url":"https://api.github.com/repos/benkeen/couchdb-fauxton/contributors","subscribers_url":"https://api.github.com/repos/benkeen/couchdb-fauxton/subscribers","subscription_url":"https://api.github.com/repos/benkeen/couchdb-fauxton/subscription","commits_url":"https://api.github.com/repos/benkeen/couchdb-fauxton/commits{/sha}","git_commits_url":"https://api.github.com/repos/benkeen/couchdb-fauxton/git/commits{/sha}","comments_url":"https://api.github.com/repos/benkeen/couchdb-fauxton/comments{/number}","issue_comment_url":"https://api.github.com/repos/benkeen/couchdb-fauxton/issues/comments{/number}","contents_url":"https://api.github.com/repos/benkeen/couchdb-fauxton/contents/{+path}","compare_url":"https://api.github.com/repos/benkeen/couchdb-fauxton/compare/{base}...{head}","merges_url":"https://api.github.com/repos/benkeen/couchdb-fauxton/merges","archive_url":"https://api.github.com/repos/benkeen/couchdb-fauxton/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/benkeen/couchdb-fauxton/downloads","issues_url":"https://api.github.com/repos/benkeen/couchdb-fauxton/issues{/number}","pulls_url":"https://api.github.com/repos/benkeen/couchdb-fauxton/pulls{/number}","milestones_url":"https://api.github.com/repos/benkeen/couchdb-fauxton/milestones{/number}","notifications_url":"https://api.github.com/repos/benkeen/couchdb-fauxton/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/benkeen/couchdb-fauxton/labels{/name}","releases_url":"https://api.github.com/repos/benkeen/couchdb-fauxton/releases{/id}","deployments_url":"https://api.github.com/repos/benkeen/couchdb-fauxton/deployments","created_at":"2014-09-17T01:15:34Z","updated_at":"2016-01-14T19:47:17Z","pushed_at":"2016-07-24T03:50:10Z","git_url":"git://github.com/benkeen/couchdb-fauxton.git","ssh_url":"git@github.com:benkeen/couchdb-fauxton.git","clone_url":"https://github.com/benkeen/couchdb-fauxton.git","svn_url":"https://github.com/benkeen/couchdb-fauxton","homepage":null,"size":8965,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"e18a707b508b527ca7f4842e95f16b4b920fe6ca","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":15993612,"name":"couchdb-fauxton","full_name":"apache/couchdb-fauxton","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/couchdb-fauxton","description":"Mirror of Apache CouchDB","fork":false,"url":"https://api.github.com/repos/apache/couchdb-fauxton","forks_url":"https://api.github.com/repos/apache/couchdb-fauxton/forks","keys_url":"https://api.github.com/repos/apache/couchdb-fauxton/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/couchdb-fauxton/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/couchdb-fauxton/teams","hooks_url":"https://api.github.com/repos/apache/couchdb-fauxton/hooks","issue_events_url":"https://api.github.com/repos/apache/couchdb-fauxton/issues/events{/number}","events_url":"https://api.github.com/repos/apache/couchdb-fauxton/events","assignees_url":"https://api.github.com/repos/apache/couchdb-fauxton/assignees{/user}","branches_url":"https://api.github.com/repos/apache/couchdb-fauxton/branches{/branch}","tags_url":"https://api.github.com/repos/apache/couchdb-fauxton/tags","blobs_url":"https://api.github.com/repos/apache/couchdb-fauxton/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/couchdb-fauxton/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/couchdb-fauxton/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/couchdb-fauxton/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/couchdb-fauxton/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/couchdb-fauxton/languages","stargazers_url":"https://api.github.com/repos/apache/couchdb-fauxton/stargazers","contributors_url":"https://api.github.com/repos/apache/couchdb-fauxton/contributors","subscribers_url":"https://api.github.com/repos/apache/couchdb-fauxton/subscribers","subscription_url":"https://api.github.com/repos/apache/couchdb-fauxton/subscription","commits_url":"https://api.github.com/repos/apache/couchdb-fauxton/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/couchdb-fauxton/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/couchdb-fauxton/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/couchdb-fauxton/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/couchdb-fauxton/contents/{+path}","compare_url":"https://api.github.com/repos/apache/couchdb-fauxton/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/couchdb-fauxton/merges","archive_url":"https://api.github.com/repos/apache/couchdb-fauxton/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/couchdb-fauxton/downloads","issues_url":"https://api.github.com/repos/apache/couchdb-fauxton/issues{/number}","pulls_url":"https://api.github.com/repos/apache/couchdb-fauxton/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/couchdb-fauxton/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/couchdb-fauxton/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/couchdb-fauxton/labels{/name}","releases_url":"https://api.github.com/repos/apache/couchdb-fauxton/releases{/id}","deployments_url":"https://api.github.com/repos/apache/couchdb-fauxton/deployments","created_at":"2014-01-17T08:00:08Z","updated_at":"2016-07-20T22:10:58Z","pushed_at":"2016-07-24T12:44:45Z","git_url":"git://github.com/apache/couchdb-fauxton.git","ssh_url":"git@github.com:apache/couchdb-fauxton.git","clone_url":"https://github.com/apache/couchdb-fauxton.git","svn_url":"https://github.com/apache/couchdb-fauxton","homepage":null,"size":10414,"stargazers_count":90,"watchers_count":90,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":96,"mirror_url":"git://git.apache.org/couchdb-fauxton.git","open_issues_count":14,"forks":96,"open_issues":14,"watchers":90,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/couchdb-fauxton/pulls/669"},"html":{"href":"https://github.com/apache/couchdb-fauxton/pull/669"},"issue":{"href":"https://api.github.com/repos/apache/couchdb-fauxton/issues/669"},"comments":{"href":"https://api.github.com/repos/apache/couchdb-fauxton/issues/669/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/couchdb-fauxton/pulls/669/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/couchdb-fauxton/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/couchdb-fauxton/pulls/669/commits"},"statuses":{"href":"https://api.github.com/repos/apache/couchdb-fauxton/statuses/b357fd404906f5f672f30e7a7d8c30d54177331a"}}}}
{"actor":{"display_login":"garrensmith"}}