{"action":"created","comment":{"url":"https://api.github.com/repos/theforeman/foreman/pulls/comments/48103607","id":48103607,"diff_hunk":"@@ -1,19 +1,61 @@\n module SmartProxiesHelper\n   def proxy_actions(proxy, authorizer)\n-    [if proxy.has_feature?('Puppet CA')\n-       [display_link_if_authorized(_(\"Certificates\"), hash_for_smart_proxy_puppetca_index_path(:smart_proxy_id => proxy).\n-                                merge(:auth_object => proxy, :permission => 'view_smart_proxies_puppetca', :authorizer => authorizer)),\n-        display_link_if_authorized(_(\"Autosign\"), hash_for_smart_proxy_autosign_index_path(:smart_proxy_id => proxy).\n-                                merge(:auth_object => proxy, :permission => 'view_smart_proxies_autosign', :authorizer => authorizer))]\n-     end,\n+    [ display_link_if_authorized(_(\"Edit\"), hash_for_edit_smart_proxy_path(:id => proxy), :class => 'edit_two_pane'),\n+      display_delete_if_authorized(hash_for_smart_proxy_path(:id => proxy).merge(:auth_object => proxy, :authorizer => authorizer),\n+                                  :data => {:confirm => _(\"Delete %s?\") % proxy.name}, :class => 'delete') ]\n+  end\n+\n+  def smart_proxy_title_actions(proxy, authorizer)\n+    actions = [display_link_if_authorized(_(\"Refresh features\"), hash_for_refresh_smart_proxy_path(:id => proxy).\n+                                                                 merge(:auth_object => proxy, :permission => 'edit_smart_proxies', :authorizer => authorizer), :method => :put)]\n+    if proxy.has_feature?('Puppet CA')\n+      actions << [display_link_if_authorized(_(\"Certificates\"), hash_for_smart_proxy_puppetca_index_path(:smart_proxy_id => proxy).\n+                                                                merge(:auth_object => proxy, :permission => 'view_smart_proxies_puppetca', :authorizer => authorizer))]\n+      actions << [display_link_if_authorized(_(\"Autosign\"), hash_for_smart_proxy_autosign_index_path(:smart_proxy_id => proxy).\n+                                                            merge(:auth_object => proxy, :permission => 'view_smart_proxies_autosign', :authorizer => authorizer))]\n+    end\n+    if SETTINGS[:unattended] and proxy.has_feature?('DHCP')\n+      actions << display_link_if_authorized(_(\"Import subnets\"), hash_for_import_subnets_path(:smart_proxy_id => proxy))\n+    end\n+\n+    title_actions(\n+      button_group(\n+        link_to(_(\"Back\"), smart_proxies_path)\n+      ),\n+      select_action_button(_(\"Select Action\"), {}, actions),\n+      button_group(\n+        display_link_if_authorized(_(\"Edit\"), hash_for_edit_smart_proxy_path(:id => proxy))\n+      ),\n+      button_group(\n+        display_delete_if_authorized(hash_for_smart_proxy_path(:id => proxy).merge(:auth_object => proxy, :authorizer => authorizer),\n+                                     :data => {:confirm => _(\"Delete %s?\") % proxy.name}, :class => 'btn-danger')\n+      )\n+    )\n+  end\n \n-     if SETTINGS[:unattended] and proxy.has_feature?('DHCP')\n-       display_link_if_authorized(_(\"Import subnets\"), hash_for_import_subnets_path(:smart_proxy_id => proxy))\n-     end,\n+  def render_plugin_version(proxy, feature)","path":"app/helpers/smart_proxies_helper.rb","position":45,"original_position":45,"commit_id":"57bad87dda8724fb34e11a279e8362a27c46b5b0","original_commit_id":"57bad87dda8724fb34e11a279e8362a27c46b5b0","user":{"login":"ohadlevy","id":20167,"avatar_url":"https://avatars.githubusercontent.com/u/20167?v=3","gravatar_id":"","url":"https://api.github.com/users/ohadlevy","html_url":"https://github.com/ohadlevy","followers_url":"https://api.github.com/users/ohadlevy/followers","following_url":"https://api.github.com/users/ohadlevy/following{/other_user}","gists_url":"https://api.github.com/users/ohadlevy/gists{/gist_id}","starred_url":"https://api.github.com/users/ohadlevy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ohadlevy/subscriptions","organizations_url":"https://api.github.com/users/ohadlevy/orgs","repos_url":"https://api.github.com/users/ohadlevy/repos","events_url":"https://api.github.com/users/ohadlevy/events{/privacy}","received_events_url":"https://api.github.com/users/ohadlevy/received_events","type":"User","site_admin":false},"body":"yes, but can't this be a partial?","created_at":"2015-12-20T13:55:01Z","updated_at":"2015-12-20T13:55:01Z","html_url":"https://github.com/theforeman/foreman/pull/2971#discussion_r48103607","pull_request_url":"https://api.github.com/repos/theforeman/foreman/pulls/2971","_links":{"self":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/comments/48103607"},"html":{"href":"https://github.com/theforeman/foreman/pull/2971#discussion_r48103607"},"pull_request":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/2971"}}},"pull_request":{"url":"https://api.github.com/repos/theforeman/foreman/pulls/2971","id":53500209,"html_url":"https://github.com/theforeman/foreman/pull/2971","diff_url":"https://github.com/theforeman/foreman/pull/2971.diff","patch_url":"https://github.com/theforeman/foreman/pull/2971.patch","issue_url":"https://api.github.com/repos/theforeman/foreman/issues/2971","number":2971,"state":"open","locked":false,"title":"fixes #12714 - Show proxy status in index, create a show page for proxy","user":{"login":"shlomizadok","id":433583,"avatar_url":"https://avatars.githubusercontent.com/u/433583?v=3","gravatar_id":"","url":"https://api.github.com/users/shlomizadok","html_url":"https://github.com/shlomizadok","followers_url":"https://api.github.com/users/shlomizadok/followers","following_url":"https://api.github.com/users/shlomizadok/following{/other_user}","gists_url":"https://api.github.com/users/shlomizadok/gists{/gist_id}","starred_url":"https://api.github.com/users/shlomizadok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shlomizadok/subscriptions","organizations_url":"https://api.github.com/users/shlomizadok/orgs","repos_url":"https://api.github.com/users/shlomizadok/repos","events_url":"https://api.github.com/users/shlomizadok/events{/privacy}","received_events_url":"https://api.github.com/users/shlomizadok/received_events","type":"User","site_admin":false},"body":"This PR is part of groups of features which will add more content and visibility to the smart proxy.\r\nIn this PR:\r\n* A show page for the proxy, with some data on the smart proxy\r\n* Removal of action buttons from the proxies index and add them to the proxy show page\r\n* Addition of each proxy's status to the proxies index (please note that change of style here affects also the style in the about page","created_at":"2015-12-13T13:46:43Z","updated_at":"2015-12-20T13:55:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4f06915926b637cca5eb42a52e4c86098486e439","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/theforeman/foreman/pulls/2971/commits","review_comments_url":"https://api.github.com/repos/theforeman/foreman/pulls/2971/comments","review_comment_url":"https://api.github.com/repos/theforeman/foreman/pulls/comments{/number}","comments_url":"https://api.github.com/repos/theforeman/foreman/issues/2971/comments","statuses_url":"https://api.github.com/repos/theforeman/foreman/statuses/57bad87dda8724fb34e11a279e8362a27c46b5b0","head":{"label":"shlomizadok:fix_12714","ref":"fix_12714","sha":"57bad87dda8724fb34e11a279e8362a27c46b5b0","user":{"login":"shlomizadok","id":433583,"avatar_url":"https://avatars.githubusercontent.com/u/433583?v=3","gravatar_id":"","url":"https://api.github.com/users/shlomizadok","html_url":"https://github.com/shlomizadok","followers_url":"https://api.github.com/users/shlomizadok/followers","following_url":"https://api.github.com/users/shlomizadok/following{/other_user}","gists_url":"https://api.github.com/users/shlomizadok/gists{/gist_id}","starred_url":"https://api.github.com/users/shlomizadok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shlomizadok/subscriptions","organizations_url":"https://api.github.com/users/shlomizadok/orgs","repos_url":"https://api.github.com/users/shlomizadok/repos","events_url":"https://api.github.com/users/shlomizadok/events{/privacy}","received_events_url":"https://api.github.com/users/shlomizadok/received_events","type":"User","site_admin":false},"repo":{"id":23541704,"name":"foreman","full_name":"shlomizadok/foreman","owner":{"login":"shlomizadok","id":433583,"avatar_url":"https://avatars.githubusercontent.com/u/433583?v=3","gravatar_id":"","url":"https://api.github.com/users/shlomizadok","html_url":"https://github.com/shlomizadok","followers_url":"https://api.github.com/users/shlomizadok/followers","following_url":"https://api.github.com/users/shlomizadok/following{/other_user}","gists_url":"https://api.github.com/users/shlomizadok/gists{/gist_id}","starred_url":"https://api.github.com/users/shlomizadok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shlomizadok/subscriptions","organizations_url":"https://api.github.com/users/shlomizadok/orgs","repos_url":"https://api.github.com/users/shlomizadok/repos","events_url":"https://api.github.com/users/shlomizadok/events{/privacy}","received_events_url":"https://api.github.com/users/shlomizadok/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/shlomizadok/foreman","description":"an application that automates the lifecycle of servers ","fork":true,"url":"https://api.github.com/repos/shlomizadok/foreman","forks_url":"https://api.github.com/repos/shlomizadok/foreman/forks","keys_url":"https://api.github.com/repos/shlomizadok/foreman/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shlomizadok/foreman/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shlomizadok/foreman/teams","hooks_url":"https://api.github.com/repos/shlomizadok/foreman/hooks","issue_events_url":"https://api.github.com/repos/shlomizadok/foreman/issues/events{/number}","events_url":"https://api.github.com/repos/shlomizadok/foreman/events","assignees_url":"https://api.github.com/repos/shlomizadok/foreman/assignees{/user}","branches_url":"https://api.github.com/repos/shlomizadok/foreman/branches{/branch}","tags_url":"https://api.github.com/repos/shlomizadok/foreman/tags","blobs_url":"https://api.github.com/repos/shlomizadok/foreman/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shlomizadok/foreman/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shlomizadok/foreman/git/refs{/sha}","trees_url":"https://api.github.com/repos/shlomizadok/foreman/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shlomizadok/foreman/statuses/{sha}","languages_url":"https://api.github.com/repos/shlomizadok/foreman/languages","stargazers_url":"https://api.github.com/repos/shlomizadok/foreman/stargazers","contributors_url":"https://api.github.com/repos/shlomizadok/foreman/contributors","subscribers_url":"https://api.github.com/repos/shlomizadok/foreman/subscribers","subscription_url":"https://api.github.com/repos/shlomizadok/foreman/subscription","commits_url":"https://api.github.com/repos/shlomizadok/foreman/commits{/sha}","git_commits_url":"https://api.github.com/repos/shlomizadok/foreman/git/commits{/sha}","comments_url":"https://api.github.com/repos/shlomizadok/foreman/comments{/number}","issue_comment_url":"https://api.github.com/repos/shlomizadok/foreman/issues/comments{/number}","contents_url":"https://api.github.com/repos/shlomizadok/foreman/contents/{+path}","compare_url":"https://api.github.com/repos/shlomizadok/foreman/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shlomizadok/foreman/merges","archive_url":"https://api.github.com/repos/shlomizadok/foreman/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shlomizadok/foreman/downloads","issues_url":"https://api.github.com/repos/shlomizadok/foreman/issues{/number}","pulls_url":"https://api.github.com/repos/shlomizadok/foreman/pulls{/number}","milestones_url":"https://api.github.com/repos/shlomizadok/foreman/milestones{/number}","notifications_url":"https://api.github.com/repos/shlomizadok/foreman/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shlomizadok/foreman/labels{/name}","releases_url":"https://api.github.com/repos/shlomizadok/foreman/releases{/id}","created_at":"2014-09-01T12:29:20Z","updated_at":"2015-05-03T08:08:15Z","pushed_at":"2015-12-20T10:39:59Z","git_url":"git://github.com/shlomizadok/foreman.git","ssh_url":"git@github.com:shlomizadok/foreman.git","clone_url":"https://github.com/shlomizadok/foreman.git","svn_url":"https://github.com/shlomizadok/foreman","homepage":"http://theforeman.org","size":30553,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":false,"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":"develop"}},"base":{"label":"theforeman:develop","ref":"develop","sha":"fb9f45e819fbd15946084cd7cacd737dca5aa32e","user":{"login":"theforeman","id":1439844,"avatar_url":"https://avatars.githubusercontent.com/u/1439844?v=3","gravatar_id":"","url":"https://api.github.com/users/theforeman","html_url":"https://github.com/theforeman","followers_url":"https://api.github.com/users/theforeman/followers","following_url":"https://api.github.com/users/theforeman/following{/other_user}","gists_url":"https://api.github.com/users/theforeman/gists{/gist_id}","starred_url":"https://api.github.com/users/theforeman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theforeman/subscriptions","organizations_url":"https://api.github.com/users/theforeman/orgs","repos_url":"https://api.github.com/users/theforeman/repos","events_url":"https://api.github.com/users/theforeman/events{/privacy}","received_events_url":"https://api.github.com/users/theforeman/received_events","type":"Organization","site_admin":false},"repo":{"id":258750,"name":"foreman","full_name":"theforeman/foreman","owner":{"login":"theforeman","id":1439844,"avatar_url":"https://avatars.githubusercontent.com/u/1439844?v=3","gravatar_id":"","url":"https://api.github.com/users/theforeman","html_url":"https://github.com/theforeman","followers_url":"https://api.github.com/users/theforeman/followers","following_url":"https://api.github.com/users/theforeman/following{/other_user}","gists_url":"https://api.github.com/users/theforeman/gists{/gist_id}","starred_url":"https://api.github.com/users/theforeman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theforeman/subscriptions","organizations_url":"https://api.github.com/users/theforeman/orgs","repos_url":"https://api.github.com/users/theforeman/repos","events_url":"https://api.github.com/users/theforeman/events{/privacy}","received_events_url":"https://api.github.com/users/theforeman/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/theforeman/foreman","description":"an application that automates the lifecycle of servers ","fork":false,"url":"https://api.github.com/repos/theforeman/foreman","forks_url":"https://api.github.com/repos/theforeman/foreman/forks","keys_url":"https://api.github.com/repos/theforeman/foreman/keys{/key_id}","collaborators_url":"https://api.github.com/repos/theforeman/foreman/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/theforeman/foreman/teams","hooks_url":"https://api.github.com/repos/theforeman/foreman/hooks","issue_events_url":"https://api.github.com/repos/theforeman/foreman/issues/events{/number}","events_url":"https://api.github.com/repos/theforeman/foreman/events","assignees_url":"https://api.github.com/repos/theforeman/foreman/assignees{/user}","branches_url":"https://api.github.com/repos/theforeman/foreman/branches{/branch}","tags_url":"https://api.github.com/repos/theforeman/foreman/tags","blobs_url":"https://api.github.com/repos/theforeman/foreman/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/theforeman/foreman/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/theforeman/foreman/git/refs{/sha}","trees_url":"https://api.github.com/repos/theforeman/foreman/git/trees{/sha}","statuses_url":"https://api.github.com/repos/theforeman/foreman/statuses/{sha}","languages_url":"https://api.github.com/repos/theforeman/foreman/languages","stargazers_url":"https://api.github.com/repos/theforeman/foreman/stargazers","contributors_url":"https://api.github.com/repos/theforeman/foreman/contributors","subscribers_url":"https://api.github.com/repos/theforeman/foreman/subscribers","subscription_url":"https://api.github.com/repos/theforeman/foreman/subscription","commits_url":"https://api.github.com/repos/theforeman/foreman/commits{/sha}","git_commits_url":"https://api.github.com/repos/theforeman/foreman/git/commits{/sha}","comments_url":"https://api.github.com/repos/theforeman/foreman/comments{/number}","issue_comment_url":"https://api.github.com/repos/theforeman/foreman/issues/comments{/number}","contents_url":"https://api.github.com/repos/theforeman/foreman/contents/{+path}","compare_url":"https://api.github.com/repos/theforeman/foreman/compare/{base}...{head}","merges_url":"https://api.github.com/repos/theforeman/foreman/merges","archive_url":"https://api.github.com/repos/theforeman/foreman/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/theforeman/foreman/downloads","issues_url":"https://api.github.com/repos/theforeman/foreman/issues{/number}","pulls_url":"https://api.github.com/repos/theforeman/foreman/pulls{/number}","milestones_url":"https://api.github.com/repos/theforeman/foreman/milestones{/number}","notifications_url":"https://api.github.com/repos/theforeman/foreman/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/theforeman/foreman/labels{/name}","releases_url":"https://api.github.com/repos/theforeman/foreman/releases{/id}","created_at":"2009-07-23T15:07:00Z","updated_at":"2015-12-19T20:59:05Z","pushed_at":"2015-12-20T10:40:00Z","git_url":"git://github.com/theforeman/foreman.git","ssh_url":"git@github.com:theforeman/foreman.git","clone_url":"https://github.com/theforeman/foreman.git","svn_url":"https://github.com/theforeman/foreman","homepage":"http://theforeman.org","size":54683,"stargazers_count":916,"watchers_count":916,"language":"Ruby","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":457,"mirror_url":null,"open_issues_count":88,"forks":457,"open_issues":88,"watchers":916,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/2971"},"html":{"href":"https://github.com/theforeman/foreman/pull/2971"},"issue":{"href":"https://api.github.com/repos/theforeman/foreman/issues/2971"},"comments":{"href":"https://api.github.com/repos/theforeman/foreman/issues/2971/comments"},"review_comments":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/2971/comments"},"review_comment":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/2971/commits"},"statuses":{"href":"https://api.github.com/repos/theforeman/foreman/statuses/57bad87dda8724fb34e11a279e8362a27c46b5b0"}}}}