{"action":"created","comment":{"url":"https://api.github.com/repos/crowbar/crowbar-ui/pulls/comments/84870262","pull_request_review_id":5619337,"id":84870262,"diff_hunk":"@@ -11,16 +11,92 @@\n     angular.module('crowbarApp')\n         .controller('UpgradeDatabaseConfigurationController', UpgradeDatabaseConfigurationController);\n \n-    UpgradeDatabaseConfigurationController.$inject = [];\n+    UpgradeDatabaseConfigurationController.$inject = ['upgradeFactory'];\n     // @ngInject\n-    function UpgradeDatabaseConfigurationController() {\n+    function UpgradeDatabaseConfigurationController(upgradeFactory) {\n         var vm = this;\n         vm.databaseForm = {\n             username: '',\n             password: '',\n             server: '',\n-            port: 5432,\n-            tablePrefix: ''\n+            port: 5432\n+        };\n+\n+        vm.running = false;\n+        vm.spinnerVisible = false;\n+        vm.completed = false;\n+        vm.errors = [];\n+\n+        vm.createServer = createServer;\n+        vm.connectServer = connectServer;\n+\n+        // functions\n+\n+        function createServer() {\n+            var emptyFields = _.some(\n+              [vm.databaseForm.username, vm.databaseForm.password], function (x) {\n+                  return x == '' || angular.isUndefined(x)\n+              });\n+\n+            if (emptyFields) {\n+                return\n+            }\n+\n+            vm.errors = [];\n+            vm.running = true;\n+            vm.spinnerVisible = true;\n+            upgradeFactory.createNewDatabaseServer(vm.databaseForm)\n+                .then(\n+                    // success\n+                    function (/*response*/) {\n+                        vm.completed = true;\n+                    },\n+                    // error\n+                    function (errorResponse) {\n+                        vm.errors = getErrorFromResponse(errorResponse);\n+                    }\n+                )\n+                .finally(function () {\n+                    vm.running = false;\n+                })","path":"assets/app/features/upgrade/controllers/upgrade-database-configuration.controller.js","position":55,"original_position":55,"commit_id":"c24901a713077cbc5e42e8edcb83c4f374ced727","original_commit_id":"c24901a713077cbc5e42e8edcb83c4f374ced727","user":{"login":"Itxaka","id":1447686,"avatar_url":"https://avatars.githubusercontent.com/u/1447686?v=3","gravatar_id":"","url":"https://api.github.com/users/Itxaka","html_url":"https://github.com/Itxaka","followers_url":"https://api.github.com/users/Itxaka/followers","following_url":"https://api.github.com/users/Itxaka/following{/other_user}","gists_url":"https://api.github.com/users/Itxaka/gists{/gist_id}","starred_url":"https://api.github.com/users/Itxaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Itxaka/subscriptions","organizations_url":"https://api.github.com/users/Itxaka/orgs","repos_url":"https://api.github.com/users/Itxaka/repos","events_url":"https://api.github.com/users/Itxaka/events{/privacy}","received_events_url":"https://api.github.com/users/Itxaka/received_events","type":"User","site_admin":false},"body":"done","created_at":"2016-10-25T10:10:13Z","updated_at":"2016-10-25T10:10:13Z","html_url":"https://github.com/crowbar/crowbar-ui/pull/79#discussion_r84870262","pull_request_url":"https://api.github.com/repos/crowbar/crowbar-ui/pulls/79","_links":{"self":{"href":"https://api.github.com/repos/crowbar/crowbar-ui/pulls/comments/84870262"},"html":{"href":"https://github.com/crowbar/crowbar-ui/pull/79#discussion_r84870262"},"pull_request":{"href":"https://api.github.com/repos/crowbar/crowbar-ui/pulls/79"}}},"pull_request":{"url":"https://api.github.com/repos/crowbar/crowbar-ui/pulls/79","id":90415011,"html_url":"https://github.com/crowbar/crowbar-ui/pull/79","diff_url":"https://github.com/crowbar/crowbar-ui/pull/79.diff","patch_url":"https://github.com/crowbar/crowbar-ui/pull/79.patch","issue_url":"https://api.github.com/repos/crowbar/crowbar-ui/issues/79","number":79,"state":"open","locked":false,"title":"[WIP] Database service integration","user":{"login":"Itxaka","id":1447686,"avatar_url":"https://avatars.githubusercontent.com/u/1447686?v=3","gravatar_id":"","url":"https://api.github.com/users/Itxaka","html_url":"https://github.com/Itxaka","followers_url":"https://api.github.com/users/Itxaka/followers","following_url":"https://api.github.com/users/Itxaka/following{/other_user}","gists_url":"https://api.github.com/users/Itxaka/gists{/gist_id}","starred_url":"https://api.github.com/users/Itxaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Itxaka/subscriptions","organizations_url":"https://api.github.com/users/Itxaka/orgs","repos_url":"https://api.github.com/users/Itxaka/repos","events_url":"https://api.github.com/users/Itxaka/events{/privacy}","received_events_url":"https://api.github.com/users/Itxaka/received_events","type":"User","site_admin":false},"body":"Missing:\r\n\r\n - [ ] Spinner\r\n - [ ] Tests\r\n - [ ] Error handling\r\n - [ ] Running/complete states set\r\n - [ ] Long running function to check database upgrade status after start\r\n - [ ] Button disable on start","created_at":"2016-10-21T16:48:39Z","updated_at":"2016-10-25T10:10:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e30c3a5082a9efead1a1867c16df4a47a24ad3ef","assignee":{"login":"santiph","id":747646,"avatar_url":"https://avatars.githubusercontent.com/u/747646?v=3","gravatar_id":"","url":"https://api.github.com/users/santiph","html_url":"https://github.com/santiph","followers_url":"https://api.github.com/users/santiph/followers","following_url":"https://api.github.com/users/santiph/following{/other_user}","gists_url":"https://api.github.com/users/santiph/gists{/gist_id}","starred_url":"https://api.github.com/users/santiph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/santiph/subscriptions","organizations_url":"https://api.github.com/users/santiph/orgs","repos_url":"https://api.github.com/users/santiph/repos","events_url":"https://api.github.com/users/santiph/events{/privacy}","received_events_url":"https://api.github.com/users/santiph/received_events","type":"User","site_admin":false},"assignees":[{"login":"santiph","id":747646,"avatar_url":"https://avatars.githubusercontent.com/u/747646?v=3","gravatar_id":"","url":"https://api.github.com/users/santiph","html_url":"https://github.com/santiph","followers_url":"https://api.github.com/users/santiph/followers","following_url":"https://api.github.com/users/santiph/following{/other_user}","gists_url":"https://api.github.com/users/santiph/gists{/gist_id}","starred_url":"https://api.github.com/users/santiph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/santiph/subscriptions","organizations_url":"https://api.github.com/users/santiph/orgs","repos_url":"https://api.github.com/users/santiph/repos","events_url":"https://api.github.com/users/santiph/events{/privacy}","received_events_url":"https://api.github.com/users/santiph/received_events","type":"User","site_admin":false},{"login":"skazi0","id":2458112,"avatar_url":"https://avatars.githubusercontent.com/u/2458112?v=3","gravatar_id":"","url":"https://api.github.com/users/skazi0","html_url":"https://github.com/skazi0","followers_url":"https://api.github.com/users/skazi0/followers","following_url":"https://api.github.com/users/skazi0/following{/other_user}","gists_url":"https://api.github.com/users/skazi0/gists{/gist_id}","starred_url":"https://api.github.com/users/skazi0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skazi0/subscriptions","organizations_url":"https://api.github.com/users/skazi0/orgs","repos_url":"https://api.github.com/users/skazi0/repos","events_url":"https://api.github.com/users/skazi0/events{/privacy}","received_events_url":"https://api.github.com/users/skazi0/received_events","type":"User","site_admin":false},{"login":"bisht-richa","id":18264463,"avatar_url":"https://avatars.githubusercontent.com/u/18264463?v=3","gravatar_id":"","url":"https://api.github.com/users/bisht-richa","html_url":"https://github.com/bisht-richa","followers_url":"https://api.github.com/users/bisht-richa/followers","following_url":"https://api.github.com/users/bisht-richa/following{/other_user}","gists_url":"https://api.github.com/users/bisht-richa/gists{/gist_id}","starred_url":"https://api.github.com/users/bisht-richa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bisht-richa/subscriptions","organizations_url":"https://api.github.com/users/bisht-richa/orgs","repos_url":"https://api.github.com/users/bisht-richa/repos","events_url":"https://api.github.com/users/bisht-richa/events{/privacy}","received_events_url":"https://api.github.com/users/bisht-richa/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/crowbar/crowbar-ui/pulls/79/commits","review_comments_url":"https://api.github.com/repos/crowbar/crowbar-ui/pulls/79/comments","review_comment_url":"https://api.github.com/repos/crowbar/crowbar-ui/pulls/comments{/number}","comments_url":"https://api.github.com/repos/crowbar/crowbar-ui/issues/79/comments","statuses_url":"https://api.github.com/repos/crowbar/crowbar-ui/statuses/c24901a713077cbc5e42e8edcb83c4f374ced727","head":{"label":"Itxaka:db","ref":"db","sha":"c24901a713077cbc5e42e8edcb83c4f374ced727","user":{"login":"Itxaka","id":1447686,"avatar_url":"https://avatars.githubusercontent.com/u/1447686?v=3","gravatar_id":"","url":"https://api.github.com/users/Itxaka","html_url":"https://github.com/Itxaka","followers_url":"https://api.github.com/users/Itxaka/followers","following_url":"https://api.github.com/users/Itxaka/following{/other_user}","gists_url":"https://api.github.com/users/Itxaka/gists{/gist_id}","starred_url":"https://api.github.com/users/Itxaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Itxaka/subscriptions","organizations_url":"https://api.github.com/users/Itxaka/orgs","repos_url":"https://api.github.com/users/Itxaka/repos","events_url":"https://api.github.com/users/Itxaka/events{/privacy}","received_events_url":"https://api.github.com/users/Itxaka/received_events","type":"User","site_admin":false},"repo":{"id":70711756,"name":"crowbar-ui","full_name":"Itxaka/crowbar-ui","owner":{"login":"Itxaka","id":1447686,"avatar_url":"https://avatars.githubusercontent.com/u/1447686?v=3","gravatar_id":"","url":"https://api.github.com/users/Itxaka","html_url":"https://github.com/Itxaka","followers_url":"https://api.github.com/users/Itxaka/followers","following_url":"https://api.github.com/users/Itxaka/following{/other_user}","gists_url":"https://api.github.com/users/Itxaka/gists{/gist_id}","starred_url":"https://api.github.com/users/Itxaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Itxaka/subscriptions","organizations_url":"https://api.github.com/users/Itxaka/orgs","repos_url":"https://api.github.com/users/Itxaka/repos","events_url":"https://api.github.com/users/Itxaka/events{/privacy}","received_events_url":"https://api.github.com/users/Itxaka/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Itxaka/crowbar-ui","description":"Crowbar Web UI based on Angular","fork":true,"url":"https://api.github.com/repos/Itxaka/crowbar-ui","forks_url":"https://api.github.com/repos/Itxaka/crowbar-ui/forks","keys_url":"https://api.github.com/repos/Itxaka/crowbar-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Itxaka/crowbar-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Itxaka/crowbar-ui/teams","hooks_url":"https://api.github.com/repos/Itxaka/crowbar-ui/hooks","issue_events_url":"https://api.github.com/repos/Itxaka/crowbar-ui/issues/events{/number}","events_url":"https://api.github.com/repos/Itxaka/crowbar-ui/events","assignees_url":"https://api.github.com/repos/Itxaka/crowbar-ui/assignees{/user}","branches_url":"https://api.github.com/repos/Itxaka/crowbar-ui/branches{/branch}","tags_url":"https://api.github.com/repos/Itxaka/crowbar-ui/tags","blobs_url":"https://api.github.com/repos/Itxaka/crowbar-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Itxaka/crowbar-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Itxaka/crowbar-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/Itxaka/crowbar-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Itxaka/crowbar-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/Itxaka/crowbar-ui/languages","stargazers_url":"https://api.github.com/repos/Itxaka/crowbar-ui/stargazers","contributors_url":"https://api.github.com/repos/Itxaka/crowbar-ui/contributors","subscribers_url":"https://api.github.com/repos/Itxaka/crowbar-ui/subscribers","subscription_url":"https://api.github.com/repos/Itxaka/crowbar-ui/subscription","commits_url":"https://api.github.com/repos/Itxaka/crowbar-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/Itxaka/crowbar-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/Itxaka/crowbar-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/Itxaka/crowbar-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/Itxaka/crowbar-ui/contents/{+path}","compare_url":"https://api.github.com/repos/Itxaka/crowbar-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Itxaka/crowbar-ui/merges","archive_url":"https://api.github.com/repos/Itxaka/crowbar-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Itxaka/crowbar-ui/downloads","issues_url":"https://api.github.com/repos/Itxaka/crowbar-ui/issues{/number}","pulls_url":"https://api.github.com/repos/Itxaka/crowbar-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/Itxaka/crowbar-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/Itxaka/crowbar-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Itxaka/crowbar-ui/labels{/name}","releases_url":"https://api.github.com/repos/Itxaka/crowbar-ui/releases{/id}","deployments_url":"https://api.github.com/repos/Itxaka/crowbar-ui/deployments","created_at":"2016-10-12T15:06:40Z","updated_at":"2016-10-12T15:06:42Z","pushed_at":"2016-10-24T14:07:43Z","git_url":"git://github.com/Itxaka/crowbar-ui.git","ssh_url":"git@github.com:Itxaka/crowbar-ui.git","clone_url":"https://github.com/Itxaka/crowbar-ui.git","svn_url":"https://github.com/Itxaka/crowbar-ui","homepage":"","size":21290,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"crowbar:master","ref":"master","sha":"e45ecebf934887675a752079536adb88ca1c4007","user":{"login":"crowbar","id":2910205,"avatar_url":"https://avatars.githubusercontent.com/u/2910205?v=3","gravatar_id":"","url":"https://api.github.com/users/crowbar","html_url":"https://github.com/crowbar","followers_url":"https://api.github.com/users/crowbar/followers","following_url":"https://api.github.com/users/crowbar/following{/other_user}","gists_url":"https://api.github.com/users/crowbar/gists{/gist_id}","starred_url":"https://api.github.com/users/crowbar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crowbar/subscriptions","organizations_url":"https://api.github.com/users/crowbar/orgs","repos_url":"https://api.github.com/users/crowbar/repos","events_url":"https://api.github.com/users/crowbar/events{/privacy}","received_events_url":"https://api.github.com/users/crowbar/received_events","type":"Organization","site_admin":false},"repo":{"id":63954363,"name":"crowbar-ui","full_name":"crowbar/crowbar-ui","owner":{"login":"crowbar","id":2910205,"avatar_url":"https://avatars.githubusercontent.com/u/2910205?v=3","gravatar_id":"","url":"https://api.github.com/users/crowbar","html_url":"https://github.com/crowbar","followers_url":"https://api.github.com/users/crowbar/followers","following_url":"https://api.github.com/users/crowbar/following{/other_user}","gists_url":"https://api.github.com/users/crowbar/gists{/gist_id}","starred_url":"https://api.github.com/users/crowbar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crowbar/subscriptions","organizations_url":"https://api.github.com/users/crowbar/orgs","repos_url":"https://api.github.com/users/crowbar/repos","events_url":"https://api.github.com/users/crowbar/events{/privacy}","received_events_url":"https://api.github.com/users/crowbar/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/crowbar/crowbar-ui","description":"Crowbar Web UI based on Angular","fork":false,"url":"https://api.github.com/repos/crowbar/crowbar-ui","forks_url":"https://api.github.com/repos/crowbar/crowbar-ui/forks","keys_url":"https://api.github.com/repos/crowbar/crowbar-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/crowbar/crowbar-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/crowbar/crowbar-ui/teams","hooks_url":"https://api.github.com/repos/crowbar/crowbar-ui/hooks","issue_events_url":"https://api.github.com/repos/crowbar/crowbar-ui/issues/events{/number}","events_url":"https://api.github.com/repos/crowbar/crowbar-ui/events","assignees_url":"https://api.github.com/repos/crowbar/crowbar-ui/assignees{/user}","branches_url":"https://api.github.com/repos/crowbar/crowbar-ui/branches{/branch}","tags_url":"https://api.github.com/repos/crowbar/crowbar-ui/tags","blobs_url":"https://api.github.com/repos/crowbar/crowbar-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/crowbar/crowbar-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/crowbar/crowbar-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/crowbar/crowbar-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/crowbar/crowbar-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/crowbar/crowbar-ui/languages","stargazers_url":"https://api.github.com/repos/crowbar/crowbar-ui/stargazers","contributors_url":"https://api.github.com/repos/crowbar/crowbar-ui/contributors","subscribers_url":"https://api.github.com/repos/crowbar/crowbar-ui/subscribers","subscription_url":"https://api.github.com/repos/crowbar/crowbar-ui/subscription","commits_url":"https://api.github.com/repos/crowbar/crowbar-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/crowbar/crowbar-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/crowbar/crowbar-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/crowbar/crowbar-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/crowbar/crowbar-ui/contents/{+path}","compare_url":"https://api.github.com/repos/crowbar/crowbar-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/crowbar/crowbar-ui/merges","archive_url":"https://api.github.com/repos/crowbar/crowbar-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/crowbar/crowbar-ui/downloads","issues_url":"https://api.github.com/repos/crowbar/crowbar-ui/issues{/number}","pulls_url":"https://api.github.com/repos/crowbar/crowbar-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/crowbar/crowbar-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/crowbar/crowbar-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/crowbar/crowbar-ui/labels{/name}","releases_url":"https://api.github.com/repos/crowbar/crowbar-ui/releases{/id}","deployments_url":"https://api.github.com/repos/crowbar/crowbar-ui/deployments","created_at":"2016-07-22T13:11:54Z","updated_at":"2016-10-24T09:45:42Z","pushed_at":"2016-10-25T08:31:55Z","git_url":"git://github.com/crowbar/crowbar-ui.git","ssh_url":"git@github.com:crowbar/crowbar-ui.git","clone_url":"https://github.com/crowbar/crowbar-ui.git","svn_url":"https://github.com/crowbar/crowbar-ui","homepage":"","size":61886,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":12,"forks":4,"open_issues":12,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/crowbar/crowbar-ui/pulls/79"},"html":{"href":"https://github.com/crowbar/crowbar-ui/pull/79"},"issue":{"href":"https://api.github.com/repos/crowbar/crowbar-ui/issues/79"},"comments":{"href":"https://api.github.com/repos/crowbar/crowbar-ui/issues/79/comments"},"review_comments":{"href":"https://api.github.com/repos/crowbar/crowbar-ui/pulls/79/comments"},"review_comment":{"href":"https://api.github.com/repos/crowbar/crowbar-ui/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/crowbar/crowbar-ui/pulls/79/commits"},"statuses":{"href":"https://api.github.com/repos/crowbar/crowbar-ui/statuses/c24901a713077cbc5e42e8edcb83c4f374ced727"}}}}
{"actor":{"display_login":"Itxaka"}}