{"action":"created","comment":{"url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/comments/68022156","id":68022156,"diff_hunk":"@@ -17,4 +28,48 @@ def show\n     show_container(@record, controller_name, display_name)\n   end\n \n+  def button\n+    selected_operation = params[:pressed].to_sym\n+    if OPERATIONS.key?(selected_operation)","path":"app/controllers/middleware_deployment_controller.rb","position":24,"original_position":24,"commit_id":"eab38f9dd8e0302eb24c8eed0b8006803fc736cf","original_commit_id":"145809328858ab9a1678adc293f42b25ada220bf","user":{"login":"martinpovolny","id":51095,"avatar_url":"https://avatars.githubusercontent.com/u/51095?v=3","gravatar_id":"","url":"https://api.github.com/users/martinpovolny","html_url":"https://github.com/martinpovolny","followers_url":"https://api.github.com/users/martinpovolny/followers","following_url":"https://api.github.com/users/martinpovolny/following{/other_user}","gists_url":"https://api.github.com/users/martinpovolny/gists{/gist_id}","starred_url":"https://api.github.com/users/martinpovolny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinpovolny/subscriptions","organizations_url":"https://api.github.com/users/martinpovolny/orgs","repos_url":"https://api.github.com/users/martinpovolny/repos","events_url":"https://api.github.com/users/martinpovolny/events{/privacy}","received_events_url":"https://api.github.com/users/martinpovolny/received_events","type":"User","site_admin":false},"body":"Reading below I think that you can create a class under `app/services/`. You have logic that deals with the various operations that you can put there. But you use `params` and `flash` in that so that would be better left in the controller.\r\n\r\nAnyway you can work on that in a separate PR.","created_at":"2016-06-22T09:32:48Z","updated_at":"2016-06-22T09:32:48Z","html_url":"https://github.com/ManageIQ/manageiq/pull/9175#discussion_r68022156","pull_request_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/9175","_links":{"self":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/comments/68022156"},"html":{"href":"https://github.com/ManageIQ/manageiq/pull/9175#discussion_r68022156"},"pull_request":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/9175"}}},"pull_request":{"url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/9175","id":73359608,"html_url":"https://github.com/ManageIQ/manageiq/pull/9175","diff_url":"https://github.com/ManageIQ/manageiq/pull/9175.diff","patch_url":"https://github.com/ManageIQ/manageiq/pull/9175.patch","issue_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/9175","number":9175,"state":"open","locked":false,"title":"Add support for Undeploy and Redeploy operations in Middleware Deployments","user":{"login":"ammendonca","id":1737954,"avatar_url":"https://avatars.githubusercontent.com/u/1737954?v=3","gravatar_id":"","url":"https://api.github.com/users/ammendonca","html_url":"https://github.com/ammendonca","followers_url":"https://api.github.com/users/ammendonca/followers","following_url":"https://api.github.com/users/ammendonca/following{/other_user}","gists_url":"https://api.github.com/users/ammendonca/gists{/gist_id}","starred_url":"https://api.github.com/users/ammendonca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ammendonca/subscriptions","organizations_url":"https://api.github.com/users/ammendonca/orgs","repos_url":"https://api.github.com/users/ammendonca/repos","events_url":"https://api.github.com/users/ammendonca/events{/privacy}","received_events_url":"https://api.github.com/users/ammendonca/received_events","type":"User","site_admin":false},"body":"![image](https://cloud.githubusercontent.com/assets/1737954/15962960/8b95fe90-2f06-11e6-8fa9-c5afcea005e2.png)\r\n\r\n@miq-bot add_label ui, providers/hawkular","created_at":"2016-06-10T11:31:46Z","updated_at":"2016-06-22T09:32:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cf18acd8fbd91c2000dcddd5999e7146c8254c9b","assignee":{"login":"abonas","id":6277245,"avatar_url":"https://avatars.githubusercontent.com/u/6277245?v=3","gravatar_id":"","url":"https://api.github.com/users/abonas","html_url":"https://github.com/abonas","followers_url":"https://api.github.com/users/abonas/followers","following_url":"https://api.github.com/users/abonas/following{/other_user}","gists_url":"https://api.github.com/users/abonas/gists{/gist_id}","starred_url":"https://api.github.com/users/abonas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abonas/subscriptions","organizations_url":"https://api.github.com/users/abonas/orgs","repos_url":"https://api.github.com/users/abonas/repos","events_url":"https://api.github.com/users/abonas/events{/privacy}","received_events_url":"https://api.github.com/users/abonas/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/9175/commits","review_comments_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/9175/comments","review_comment_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/9175/comments","statuses_url":"https://api.github.com/repos/ManageIQ/manageiq/statuses/eab38f9dd8e0302eb24c8eed0b8006803fc736cf","head":{"label":"ammendonca:MIQ-MW-UNDEPLOY-REDEPLOY","ref":"MIQ-MW-UNDEPLOY-REDEPLOY","sha":"eab38f9dd8e0302eb24c8eed0b8006803fc736cf","user":{"login":"ammendonca","id":1737954,"avatar_url":"https://avatars.githubusercontent.com/u/1737954?v=3","gravatar_id":"","url":"https://api.github.com/users/ammendonca","html_url":"https://github.com/ammendonca","followers_url":"https://api.github.com/users/ammendonca/followers","following_url":"https://api.github.com/users/ammendonca/following{/other_user}","gists_url":"https://api.github.com/users/ammendonca/gists{/gist_id}","starred_url":"https://api.github.com/users/ammendonca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ammendonca/subscriptions","organizations_url":"https://api.github.com/users/ammendonca/orgs","repos_url":"https://api.github.com/users/ammendonca/repos","events_url":"https://api.github.com/users/ammendonca/events{/privacy}","received_events_url":"https://api.github.com/users/ammendonca/received_events","type":"User","site_admin":false},"repo":{"id":56145003,"name":"manageiq","full_name":"ammendonca/manageiq","owner":{"login":"ammendonca","id":1737954,"avatar_url":"https://avatars.githubusercontent.com/u/1737954?v=3","gravatar_id":"","url":"https://api.github.com/users/ammendonca","html_url":"https://github.com/ammendonca","followers_url":"https://api.github.com/users/ammendonca/followers","following_url":"https://api.github.com/users/ammendonca/following{/other_user}","gists_url":"https://api.github.com/users/ammendonca/gists{/gist_id}","starred_url":"https://api.github.com/users/ammendonca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ammendonca/subscriptions","organizations_url":"https://api.github.com/users/ammendonca/orgs","repos_url":"https://api.github.com/users/ammendonca/repos","events_url":"https://api.github.com/users/ammendonca/events{/privacy}","received_events_url":"https://api.github.com/users/ammendonca/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ammendonca/manageiq","description":"ManageIQ Cloud Management Platform","fork":true,"url":"https://api.github.com/repos/ammendonca/manageiq","forks_url":"https://api.github.com/repos/ammendonca/manageiq/forks","keys_url":"https://api.github.com/repos/ammendonca/manageiq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ammendonca/manageiq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ammendonca/manageiq/teams","hooks_url":"https://api.github.com/repos/ammendonca/manageiq/hooks","issue_events_url":"https://api.github.com/repos/ammendonca/manageiq/issues/events{/number}","events_url":"https://api.github.com/repos/ammendonca/manageiq/events","assignees_url":"https://api.github.com/repos/ammendonca/manageiq/assignees{/user}","branches_url":"https://api.github.com/repos/ammendonca/manageiq/branches{/branch}","tags_url":"https://api.github.com/repos/ammendonca/manageiq/tags","blobs_url":"https://api.github.com/repos/ammendonca/manageiq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ammendonca/manageiq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ammendonca/manageiq/git/refs{/sha}","trees_url":"https://api.github.com/repos/ammendonca/manageiq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ammendonca/manageiq/statuses/{sha}","languages_url":"https://api.github.com/repos/ammendonca/manageiq/languages","stargazers_url":"https://api.github.com/repos/ammendonca/manageiq/stargazers","contributors_url":"https://api.github.com/repos/ammendonca/manageiq/contributors","subscribers_url":"https://api.github.com/repos/ammendonca/manageiq/subscribers","subscription_url":"https://api.github.com/repos/ammendonca/manageiq/subscription","commits_url":"https://api.github.com/repos/ammendonca/manageiq/commits{/sha}","git_commits_url":"https://api.github.com/repos/ammendonca/manageiq/git/commits{/sha}","comments_url":"https://api.github.com/repos/ammendonca/manageiq/comments{/number}","issue_comment_url":"https://api.github.com/repos/ammendonca/manageiq/issues/comments{/number}","contents_url":"https://api.github.com/repos/ammendonca/manageiq/contents/{+path}","compare_url":"https://api.github.com/repos/ammendonca/manageiq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ammendonca/manageiq/merges","archive_url":"https://api.github.com/repos/ammendonca/manageiq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ammendonca/manageiq/downloads","issues_url":"https://api.github.com/repos/ammendonca/manageiq/issues{/number}","pulls_url":"https://api.github.com/repos/ammendonca/manageiq/pulls{/number}","milestones_url":"https://api.github.com/repos/ammendonca/manageiq/milestones{/number}","notifications_url":"https://api.github.com/repos/ammendonca/manageiq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ammendonca/manageiq/labels{/name}","releases_url":"https://api.github.com/repos/ammendonca/manageiq/releases{/id}","deployments_url":"https://api.github.com/repos/ammendonca/manageiq/deployments","created_at":"2016-04-13T11:10:29Z","updated_at":"2016-04-13T11:10:49Z","pushed_at":"2016-06-22T07:32:59Z","git_url":"git://github.com/ammendonca/manageiq.git","ssh_url":"git@github.com:ammendonca/manageiq.git","clone_url":"https://github.com/ammendonca/manageiq.git","svn_url":"https://github.com/ammendonca/manageiq","homepage":"manageiq.org","size":130789,"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":"ad1033372356725b93aa533e3b1bd1ccead32b74","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-06-22T04:30:29Z","pushed_at":"2016-06-22T09:26: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":171955,"stargazers_count":285,"watchers_count":285,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":311,"mirror_url":null,"open_issues_count":698,"forks":311,"open_issues":698,"watchers":285,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/9175"},"html":{"href":"https://github.com/ManageIQ/manageiq/pull/9175"},"issue":{"href":"https://api.github.com/repos/ManageIQ/manageiq/issues/9175"},"comments":{"href":"https://api.github.com/repos/ManageIQ/manageiq/issues/9175/comments"},"review_comments":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/9175/comments"},"review_comment":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/9175/commits"},"statuses":{"href":"https://api.github.com/repos/ManageIQ/manageiq/statuses/eab38f9dd8e0302eb24c8eed0b8006803fc736cf"}}}}
{"actor":{"display_login":"martinpovolny"}}