{"action":"created","comment":{"url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/comments/62524860","id":62524860,"diff_hunk":"@@ -0,0 +1,159 @@\n+miqHttpInject(angular.module('miq.containers.providersModule', ['ui.bootstrap', 'patternfly', 'miq.dialogs', 'miq.wizard'])).controller('containers.deployProviderController',\n+  ['$rootScope', '$scope', '$timeout', '$http',\n+  function($rootScope, $scope, $timeout, $http) {\n+    'use strict';\n+\n+    $scope.showDeploymentWizard = false;\n+    ManageIQ.angular.scope = $scope;\n+    $scope.data = {};\n+\n+    var initializeDeploymentWizard = function () {\n+      $scope.deployProviderReady = false;\n+      $scope.deployComplete = false;\n+      $scope.deployInProgress = false;\n+      $scope.deploySuccess = false;\n+      $scope.deployFailed = false;\n+      $scope.data.authentication = {};\n+\n+      $scope.data = {\n+        providerName: '',\n+        providerType: 'openshiftOrigin',\n+        provisionOn: 'existingVms',\n+        masterCount: 0,\n+        nodeCount: 0,\n+        infraNodeCount: 0,\n+        cdnConfigType: 'satellite',\n+        authentication: {\n+          mode: 'all'\n+        }\n+      };\n+\n+      $timeout(function() {\n+        $scope.data.providers = [\n+          {\n+            id: 1,\n+            name: 'Existing Provider 1'\n+          },\n+          {\n+            id: 2,\n+            name: 'Existing Provider 2'\n+          },\n+          {\n+            id: 3,\n+            name: 'Existing Provider 3'\n+          },\n+          {\n+            id: 4,\n+            name: 'Existing Provider 4'\n+          }\n+        ];\n+\n+        $scope.data.nodeCreationTemplates = [\n+          {\n+            id: 1,\n+            name: 'Existing template 1'\n+          },\n+          {\n+            id: 2,\n+            name: 'Existing template 2'\n+          },\n+          {\n+            id: 3,\n+            name: 'Existing template 3'\n+          },\n+          {\n+            id: 4,\n+            name: 'Existing template 4'\n+          }\n+        ];\n+\n+        $scope.deployProviderReady = true;\n+      }, 5000);\n+\n+      $scope.deploymentDetailsGeneralComplete = false;\n+      $scope.deployComplete = false;\n+      $scope.deployInProgress = false;\n+      $scope.nextButtonTitle = \"Next >\";\n+    };\n+\n+    $scope.ready = false;\n+    var url = '/api/container_deployments';\n+    $http.post(url, {\"action\" : \"collect_data\", \"resource\" : \"none\"}).success(function (response) {\n+      'use strict';\n+\n+      $scope.deploymentData = response.results[0].data;\n+      initializeDeploymentWizard();\n+      $scope.ready = true;\n+    });\n+\n+    $scope.data = {};\n+    $scope.deployComplete = false;\n+    $scope.deployInProgress = false;\n+\n+    var startDeploy = function () {\n+      $scope.deployInProgress = true;\n+      $timeout(function () {\n+        var url = '/api/container_deployments';\n+        $http.post(url, {\"action\" : \"start\", \"resource\" :  $scope.data}).success(function (response) {\n+          'use strict';\n+          $scope.deployInProgress = true;\n+        });\n+\n+        if ($scope.deployInProgress) {\n+          $scope.deployInProgress = false;\n+          $scope.deployComplete = true;\n+\n+          $scope.deployComplete = true;\n+          $scope.deploySuccess = true;\n+          $scope.deployFailed = false;\n+          $scope.deployFailureMessage = \"An unknown error has occurred.\";\n+        }\n+      }, 5000);\n+    };\n+\n+    $scope.nextCallback = function(step) {\n+      if (step.stepId === 'review-summary') {\n+        startDeploy();\n+      }\n+      return true;\n+    };\n+    $scope.backCallback = function(step) {\n+      return true;\n+    };\n+\n+    $scope.$on(\"wizard:stepChanged\", function(e, parameters) {\n+      if (parameters.step.stepId == 'review-summary') {\n+        $scope.nextButtonTitle = \"Deploy\";\n+      } else if (parameters.step.stepId == 'review-progress') {\n+        $scope.nextButtonTitle = \"Close\";\n+      } else {\n+        $scope.nextButtonTitle = \"Next >\";\n+      }\n+    });","path":"app/assets/javascripts/controllers/deployment/deploy-provider-controller.js","position":132,"original_position":132,"commit_id":"254ad8a7518c7ff6048a6b61a2fdc585529757ce","original_commit_id":"254ad8a7518c7ff6048a6b61a2fdc585529757ce","user":{"login":"zeari","id":11256940,"avatar_url":"https://avatars.githubusercontent.com/u/11256940?v=3","gravatar_id":"","url":"https://api.github.com/users/zeari","html_url":"https://github.com/zeari","followers_url":"https://api.github.com/users/zeari/followers","following_url":"https://api.github.com/users/zeari/following{/other_user}","gists_url":"https://api.github.com/users/zeari/gists{/gist_id}","starred_url":"https://api.github.com/users/zeari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zeari/subscriptions","organizations_url":"https://api.github.com/users/zeari/orgs","repos_url":"https://api.github.com/users/zeari/repos","events_url":"https://api.github.com/users/zeari/events{/privacy}","received_events_url":"https://api.github.com/users/zeari/received_events","type":"User","site_admin":false},"body":"Might be nicer to have `\"Next >\"` and the like as constants in another file","created_at":"2016-05-09T16:01:35Z","updated_at":"2016-05-09T16:01:35Z","html_url":"https://github.com/ManageIQ/manageiq/pull/7620#discussion_r62524860","pull_request_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/7620","_links":{"self":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/comments/62524860"},"html":{"href":"https://github.com/ManageIQ/manageiq/pull/7620#discussion_r62524860"},"pull_request":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/7620"}}},"pull_request":{"url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/7620","id":64797870,"html_url":"https://github.com/ManageIQ/manageiq/pull/7620","diff_url":"https://github.com/ManageIQ/manageiq/pull/7620.diff","patch_url":"https://github.com/ManageIQ/manageiq/pull/7620.patch","issue_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/7620","number":7620,"state":"open","locked":false,"title":"[WIP] OpenShift Deployment Wizard","user":{"login":"dkorn","id":6347577,"avatar_url":"https://avatars.githubusercontent.com/u/6347577?v=3","gravatar_id":"","url":"https://api.github.com/users/dkorn","html_url":"https://github.com/dkorn","followers_url":"https://api.github.com/users/dkorn/followers","following_url":"https://api.github.com/users/dkorn/following{/other_user}","gists_url":"https://api.github.com/users/dkorn/gists{/gist_id}","starred_url":"https://api.github.com/users/dkorn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkorn/subscriptions","organizations_url":"https://api.github.com/users/dkorn/orgs","repos_url":"https://api.github.com/users/dkorn/repos","events_url":"https://api.github.com/users/dkorn/events{/privacy}","received_events_url":"https://api.github.com/users/dkorn/received_events","type":"User","site_admin":false},"body":"This commit introduces the new OpenShift Deployment wizard UI.\r\ndepends on #7517 and #8079 \r\n\r\nTo show the Deployment Wizard:\r\n![manageiq button](https://cloud.githubusercontent.com/assets/6347577/15115993/314e0334-160a-11e6-8c38-92208398e1cd.png)\r\n\r\nDeployment Wizard first step ('General')\r\n![manageiq containers providers](https://cloud.githubusercontent.com/assets/6347577/15115994/316817e2-160a-11e6-9d91-1e462c5b3d03.png)\r\n\r\n","created_at":"2016-03-31T14:19:46Z","updated_at":"2016-05-09T16:01:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"18762b9efa184c5ec90aba30fc9f7e05658536ee","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/7620/commits","review_comments_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/7620/comments","review_comment_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/7620/comments","statuses_url":"https://api.github.com/repos/ManageIQ/manageiq/statuses/254ad8a7518c7ff6048a6b61a2fdc585529757ce","head":{"label":"dkorn:openshift_deployment_wizard","ref":"openshift_deployment_wizard","sha":"254ad8a7518c7ff6048a6b61a2fdc585529757ce","user":{"login":"dkorn","id":6347577,"avatar_url":"https://avatars.githubusercontent.com/u/6347577?v=3","gravatar_id":"","url":"https://api.github.com/users/dkorn","html_url":"https://github.com/dkorn","followers_url":"https://api.github.com/users/dkorn/followers","following_url":"https://api.github.com/users/dkorn/following{/other_user}","gists_url":"https://api.github.com/users/dkorn/gists{/gist_id}","starred_url":"https://api.github.com/users/dkorn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkorn/subscriptions","organizations_url":"https://api.github.com/users/dkorn/orgs","repos_url":"https://api.github.com/users/dkorn/repos","events_url":"https://api.github.com/users/dkorn/events{/privacy}","received_events_url":"https://api.github.com/users/dkorn/received_events","type":"User","site_admin":false},"repo":{"id":34788331,"name":"manageiq","full_name":"dkorn/manageiq","owner":{"login":"dkorn","id":6347577,"avatar_url":"https://avatars.githubusercontent.com/u/6347577?v=3","gravatar_id":"","url":"https://api.github.com/users/dkorn","html_url":"https://github.com/dkorn","followers_url":"https://api.github.com/users/dkorn/followers","following_url":"https://api.github.com/users/dkorn/following{/other_user}","gists_url":"https://api.github.com/users/dkorn/gists{/gist_id}","starred_url":"https://api.github.com/users/dkorn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkorn/subscriptions","organizations_url":"https://api.github.com/users/dkorn/orgs","repos_url":"https://api.github.com/users/dkorn/repos","events_url":"https://api.github.com/users/dkorn/events{/privacy}","received_events_url":"https://api.github.com/users/dkorn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dkorn/manageiq","description":"ManageIQ Cloud Management Platform","fork":true,"url":"https://api.github.com/repos/dkorn/manageiq","forks_url":"https://api.github.com/repos/dkorn/manageiq/forks","keys_url":"https://api.github.com/repos/dkorn/manageiq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dkorn/manageiq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dkorn/manageiq/teams","hooks_url":"https://api.github.com/repos/dkorn/manageiq/hooks","issue_events_url":"https://api.github.com/repos/dkorn/manageiq/issues/events{/number}","events_url":"https://api.github.com/repos/dkorn/manageiq/events","assignees_url":"https://api.github.com/repos/dkorn/manageiq/assignees{/user}","branches_url":"https://api.github.com/repos/dkorn/manageiq/branches{/branch}","tags_url":"https://api.github.com/repos/dkorn/manageiq/tags","blobs_url":"https://api.github.com/repos/dkorn/manageiq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dkorn/manageiq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dkorn/manageiq/git/refs{/sha}","trees_url":"https://api.github.com/repos/dkorn/manageiq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dkorn/manageiq/statuses/{sha}","languages_url":"https://api.github.com/repos/dkorn/manageiq/languages","stargazers_url":"https://api.github.com/repos/dkorn/manageiq/stargazers","contributors_url":"https://api.github.com/repos/dkorn/manageiq/contributors","subscribers_url":"https://api.github.com/repos/dkorn/manageiq/subscribers","subscription_url":"https://api.github.com/repos/dkorn/manageiq/subscription","commits_url":"https://api.github.com/repos/dkorn/manageiq/commits{/sha}","git_commits_url":"https://api.github.com/repos/dkorn/manageiq/git/commits{/sha}","comments_url":"https://api.github.com/repos/dkorn/manageiq/comments{/number}","issue_comment_url":"https://api.github.com/repos/dkorn/manageiq/issues/comments{/number}","contents_url":"https://api.github.com/repos/dkorn/manageiq/contents/{+path}","compare_url":"https://api.github.com/repos/dkorn/manageiq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dkorn/manageiq/merges","archive_url":"https://api.github.com/repos/dkorn/manageiq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dkorn/manageiq/downloads","issues_url":"https://api.github.com/repos/dkorn/manageiq/issues{/number}","pulls_url":"https://api.github.com/repos/dkorn/manageiq/pulls{/number}","milestones_url":"https://api.github.com/repos/dkorn/manageiq/milestones{/number}","notifications_url":"https://api.github.com/repos/dkorn/manageiq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dkorn/manageiq/labels{/name}","releases_url":"https://api.github.com/repos/dkorn/manageiq/releases{/id}","deployments_url":"https://api.github.com/repos/dkorn/manageiq/deployments","created_at":"2015-04-29T10:45:27Z","updated_at":"2015-04-29T10:45:45Z","pushed_at":"2016-05-09T14:16:27Z","git_url":"git://github.com/dkorn/manageiq.git","ssh_url":"git@github.com:dkorn/manageiq.git","clone_url":"https://github.com/dkorn/manageiq.git","svn_url":"https://github.com/dkorn/manageiq","homepage":"manageiq.org","size":122116,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":"ManageIQ:master","ref":"master","sha":"c0582f21fb0c3e0a6339412beb0c0afdbf37908a","user":{"login":"ManageIQ","id":1125575,"avatar_url":"https://avatars.githubusercontent.com/u/1125575?v=3","gravatar_id":"","url":"https://api.github.com/users/ManageIQ","html_url":"https://github.com/ManageIQ","followers_url":"https://api.github.com/users/ManageIQ/followers","following_url":"https://api.github.com/users/ManageIQ/following{/other_user}","gists_url":"https://api.github.com/users/ManageIQ/gists{/gist_id}","starred_url":"https://api.github.com/users/ManageIQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ManageIQ/subscriptions","organizations_url":"https://api.github.com/users/ManageIQ/orgs","repos_url":"https://api.github.com/users/ManageIQ/repos","events_url":"https://api.github.com/users/ManageIQ/events{/privacy}","received_events_url":"https://api.github.com/users/ManageIQ/received_events","type":"Organization","site_admin":false},"repo":{"id":20789757,"name":"manageiq","full_name":"ManageIQ/manageiq","owner":{"login":"ManageIQ","id":1125575,"avatar_url":"https://avatars.githubusercontent.com/u/1125575?v=3","gravatar_id":"","url":"https://api.github.com/users/ManageIQ","html_url":"https://github.com/ManageIQ","followers_url":"https://api.github.com/users/ManageIQ/followers","following_url":"https://api.github.com/users/ManageIQ/following{/other_user}","gists_url":"https://api.github.com/users/ManageIQ/gists{/gist_id}","starred_url":"https://api.github.com/users/ManageIQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ManageIQ/subscriptions","organizations_url":"https://api.github.com/users/ManageIQ/orgs","repos_url":"https://api.github.com/users/ManageIQ/repos","events_url":"https://api.github.com/users/ManageIQ/events{/privacy}","received_events_url":"https://api.github.com/users/ManageIQ/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ManageIQ/manageiq","description":"ManageIQ Cloud Management Platform","fork":false,"url":"https://api.github.com/repos/ManageIQ/manageiq","forks_url":"https://api.github.com/repos/ManageIQ/manageiq/forks","keys_url":"https://api.github.com/repos/ManageIQ/manageiq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ManageIQ/manageiq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ManageIQ/manageiq/teams","hooks_url":"https://api.github.com/repos/ManageIQ/manageiq/hooks","issue_events_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/events{/number}","events_url":"https://api.github.com/repos/ManageIQ/manageiq/events","assignees_url":"https://api.github.com/repos/ManageIQ/manageiq/assignees{/user}","branches_url":"https://api.github.com/repos/ManageIQ/manageiq/branches{/branch}","tags_url":"https://api.github.com/repos/ManageIQ/manageiq/tags","blobs_url":"https://api.github.com/repos/ManageIQ/manageiq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ManageIQ/manageiq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ManageIQ/manageiq/git/refs{/sha}","trees_url":"https://api.github.com/repos/ManageIQ/manageiq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ManageIQ/manageiq/statuses/{sha}","languages_url":"https://api.github.com/repos/ManageIQ/manageiq/languages","stargazers_url":"https://api.github.com/repos/ManageIQ/manageiq/stargazers","contributors_url":"https://api.github.com/repos/ManageIQ/manageiq/contributors","subscribers_url":"https://api.github.com/repos/ManageIQ/manageiq/subscribers","subscription_url":"https://api.github.com/repos/ManageIQ/manageiq/subscription","commits_url":"https://api.github.com/repos/ManageIQ/manageiq/commits{/sha}","git_commits_url":"https://api.github.com/repos/ManageIQ/manageiq/git/commits{/sha}","comments_url":"https://api.github.com/repos/ManageIQ/manageiq/comments{/number}","issue_comment_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/comments{/number}","contents_url":"https://api.github.com/repos/ManageIQ/manageiq/contents/{+path}","compare_url":"https://api.github.com/repos/ManageIQ/manageiq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ManageIQ/manageiq/merges","archive_url":"https://api.github.com/repos/ManageIQ/manageiq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ManageIQ/manageiq/downloads","issues_url":"https://api.github.com/repos/ManageIQ/manageiq/issues{/number}","pulls_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls{/number}","milestones_url":"https://api.github.com/repos/ManageIQ/manageiq/milestones{/number}","notifications_url":"https://api.github.com/repos/ManageIQ/manageiq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ManageIQ/manageiq/labels{/name}","releases_url":"https://api.github.com/repos/ManageIQ/manageiq/releases{/id}","deployments_url":"https://api.github.com/repos/ManageIQ/manageiq/deployments","created_at":"2014-06-13T02:31:26Z","updated_at":"2016-05-09T05:03:26Z","pushed_at":"2016-05-09T15:31:07Z","git_url":"git://github.com/ManageIQ/manageiq.git","ssh_url":"git@github.com:ManageIQ/manageiq.git","clone_url":"https://github.com/ManageIQ/manageiq.git","svn_url":"https://github.com/ManageIQ/manageiq","homepage":"manageiq.org","size":162512,"stargazers_count":264,"watchers_count":264,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":277,"mirror_url":null,"open_issues_count":628,"forks":277,"open_issues":628,"watchers":264,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/7620"},"html":{"href":"https://github.com/ManageIQ/manageiq/pull/7620"},"issue":{"href":"https://api.github.com/repos/ManageIQ/manageiq/issues/7620"},"comments":{"href":"https://api.github.com/repos/ManageIQ/manageiq/issues/7620/comments"},"review_comments":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/7620/comments"},"review_comment":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/7620/commits"},"statuses":{"href":"https://api.github.com/repos/ManageIQ/manageiq/statuses/254ad8a7518c7ff6048a6b61a2fdc585529757ce"}}}}