{"action":"created","comment":{"url":"https://api.github.com/repos/theforeman/foreman_discovery/pulls/comments/22931580","id":22931580,"diff_hunk":"@@ -1,3 +1,3 @@\n <% title_actions multiple_discovered_hosts_actions_select -%>\n-<% title_actions display_link_if_authorized(_(\"Auto Provision All\"), hash_for_auto_provision_all_discovered_hosts_path, :method => :post) %>\n+<% title_actions display_link_if_authorized(_(\"Auto Provision All\"), hash_for_auto_provision_all_discovered_hosts_path, {:method => :post, :disabled => @hosts.empty?}) %>","path":"app/views/discovered_hosts/index.html.erb","position":3,"original_position":3,"commit_id":"12c8fecd919c813125df82ad6217f54630de1084","original_commit_id":"12c8fecd919c813125df82ad6217f54630de1084","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":"looks good, I would consider adding another check in the controller (e.g. when you click on auto provision) that there are no 0 hosts. (I assume the same is relevant for the API once it exists)","created_at":"2015-01-14T11:44:21Z","updated_at":"2015-01-14T11:44:21Z","html_url":"https://github.com/theforeman/foreman_discovery/pull/119#discussion_r22931580","pull_request_url":"https://api.github.com/repos/theforeman/foreman_discovery/pulls/119","_links":{"self":{"href":"https://api.github.com/repos/theforeman/foreman_discovery/pulls/comments/22931580"},"html":{"href":"https://github.com/theforeman/foreman_discovery/pull/119#discussion_r22931580"},"pull_request":{"href":"https://api.github.com/repos/theforeman/foreman_discovery/pulls/119"}}},"pull_request":{"url":"https://api.github.com/repos/theforeman/foreman_discovery/pulls/119","id":27339941,"html_url":"https://github.com/theforeman/foreman_discovery/pull/119","diff_url":"https://github.com/theforeman/foreman_discovery/pull/119.diff","patch_url":"https://github.com/theforeman/foreman_discovery/pull/119.patch","issue_url":"https://api.github.com/repos/theforeman/foreman_discovery/issues/119","number":119,"state":"open","locked":false,"title":"Fixes #8937 - Auto provision all hidden when there are no hosts","user":{"login":"orrabin","id":7894647,"avatar_url":"https://avatars.githubusercontent.com/u/7894647?v=3","gravatar_id":"","url":"https://api.github.com/users/orrabin","html_url":"https://github.com/orrabin","followers_url":"https://api.github.com/users/orrabin/followers","following_url":"https://api.github.com/users/orrabin/following{/other_user}","gists_url":"https://api.github.com/users/orrabin/gists{/gist_id}","starred_url":"https://api.github.com/users/orrabin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orrabin/subscriptions","organizations_url":"https://api.github.com/users/orrabin/orgs","repos_url":"https://api.github.com/users/orrabin/repos","events_url":"https://api.github.com/users/orrabin/events{/privacy}","received_events_url":"https://api.github.com/users/orrabin/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-01-14T10:31:45Z","updated_at":"2015-01-14T11:44:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"27ab2ee743f3fa644776438c9bb71245ec156b54","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/theforeman/foreman_discovery/pulls/119/commits","review_comments_url":"https://api.github.com/repos/theforeman/foreman_discovery/pulls/119/comments","review_comment_url":"https://api.github.com/repos/theforeman/foreman_discovery/pulls/comments/{number}","comments_url":"https://api.github.com/repos/theforeman/foreman_discovery/issues/119/comments","statuses_url":"https://api.github.com/repos/theforeman/foreman_discovery/statuses/12c8fecd919c813125df82ad6217f54630de1084","head":{"label":"orrabin:8937","ref":"8937","sha":"12c8fecd919c813125df82ad6217f54630de1084","user":{"login":"orrabin","id":7894647,"avatar_url":"https://avatars.githubusercontent.com/u/7894647?v=3","gravatar_id":"","url":"https://api.github.com/users/orrabin","html_url":"https://github.com/orrabin","followers_url":"https://api.github.com/users/orrabin/followers","following_url":"https://api.github.com/users/orrabin/following{/other_user}","gists_url":"https://api.github.com/users/orrabin/gists{/gist_id}","starred_url":"https://api.github.com/users/orrabin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orrabin/subscriptions","organizations_url":"https://api.github.com/users/orrabin/orgs","repos_url":"https://api.github.com/users/orrabin/repos","events_url":"https://api.github.com/users/orrabin/events{/privacy}","received_events_url":"https://api.github.com/users/orrabin/received_events","type":"User","site_admin":false},"repo":{"id":25861383,"name":"foreman_discovery","full_name":"orrabin/foreman_discovery","owner":{"login":"orrabin","id":7894647,"avatar_url":"https://avatars.githubusercontent.com/u/7894647?v=3","gravatar_id":"","url":"https://api.github.com/users/orrabin","html_url":"https://github.com/orrabin","followers_url":"https://api.github.com/users/orrabin/followers","following_url":"https://api.github.com/users/orrabin/following{/other_user}","gists_url":"https://api.github.com/users/orrabin/gists{/gist_id}","starred_url":"https://api.github.com/users/orrabin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orrabin/subscriptions","organizations_url":"https://api.github.com/users/orrabin/orgs","repos_url":"https://api.github.com/users/orrabin/repos","events_url":"https://api.github.com/users/orrabin/events{/privacy}","received_events_url":"https://api.github.com/users/orrabin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/orrabin/foreman_discovery","description":"A plugin to enable Metal-as-a-Service discovery functionality in foreman","fork":true,"url":"https://api.github.com/repos/orrabin/foreman_discovery","forks_url":"https://api.github.com/repos/orrabin/foreman_discovery/forks","keys_url":"https://api.github.com/repos/orrabin/foreman_discovery/keys{/key_id}","collaborators_url":"https://api.github.com/repos/orrabin/foreman_discovery/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/orrabin/foreman_discovery/teams","hooks_url":"https://api.github.com/repos/orrabin/foreman_discovery/hooks","issue_events_url":"https://api.github.com/repos/orrabin/foreman_discovery/issues/events{/number}","events_url":"https://api.github.com/repos/orrabin/foreman_discovery/events","assignees_url":"https://api.github.com/repos/orrabin/foreman_discovery/assignees{/user}","branches_url":"https://api.github.com/repos/orrabin/foreman_discovery/branches{/branch}","tags_url":"https://api.github.com/repos/orrabin/foreman_discovery/tags","blobs_url":"https://api.github.com/repos/orrabin/foreman_discovery/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/orrabin/foreman_discovery/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/orrabin/foreman_discovery/git/refs{/sha}","trees_url":"https://api.github.com/repos/orrabin/foreman_discovery/git/trees{/sha}","statuses_url":"https://api.github.com/repos/orrabin/foreman_discovery/statuses/{sha}","languages_url":"https://api.github.com/repos/orrabin/foreman_discovery/languages","stargazers_url":"https://api.github.com/repos/orrabin/foreman_discovery/stargazers","contributors_url":"https://api.github.com/repos/orrabin/foreman_discovery/contributors","subscribers_url":"https://api.github.com/repos/orrabin/foreman_discovery/subscribers","subscription_url":"https://api.github.com/repos/orrabin/foreman_discovery/subscription","commits_url":"https://api.github.com/repos/orrabin/foreman_discovery/commits{/sha}","git_commits_url":"https://api.github.com/repos/orrabin/foreman_discovery/git/commits{/sha}","comments_url":"https://api.github.com/repos/orrabin/foreman_discovery/comments{/number}","issue_comment_url":"https://api.github.com/repos/orrabin/foreman_discovery/issues/comments/{number}","contents_url":"https://api.github.com/repos/orrabin/foreman_discovery/contents/{+path}","compare_url":"https://api.github.com/repos/orrabin/foreman_discovery/compare/{base}...{head}","merges_url":"https://api.github.com/repos/orrabin/foreman_discovery/merges","archive_url":"https://api.github.com/repos/orrabin/foreman_discovery/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/orrabin/foreman_discovery/downloads","issues_url":"https://api.github.com/repos/orrabin/foreman_discovery/issues{/number}","pulls_url":"https://api.github.com/repos/orrabin/foreman_discovery/pulls{/number}","milestones_url":"https://api.github.com/repos/orrabin/foreman_discovery/milestones{/number}","notifications_url":"https://api.github.com/repos/orrabin/foreman_discovery/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/orrabin/foreman_discovery/labels{/name}","releases_url":"https://api.github.com/repos/orrabin/foreman_discovery/releases{/id}","created_at":"2014-10-28T09:15:55Z","updated_at":"2014-09-18T09:17:01Z","pushed_at":"2015-01-14T10:31:27Z","git_url":"git://github.com/orrabin/foreman_discovery.git","ssh_url":"git@github.com:orrabin/foreman_discovery.git","clone_url":"https://github.com/orrabin/foreman_discovery.git","svn_url":"https://github.com/orrabin/foreman_discovery","homepage":null,"size":908,"stargazers_count":0,"watchers_count":0,"language":null,"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":"develop"}},"base":{"label":"theforeman:develop","ref":"develop","sha":"067a64a8ce856dae85a2d5f20312c2a67d808433","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":8454019,"name":"foreman_discovery","full_name":"theforeman/foreman_discovery","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_discovery","description":"A plugin to enable Metal-as-a-Service discovery functionality in foreman","fork":false,"url":"https://api.github.com/repos/theforeman/foreman_discovery","forks_url":"https://api.github.com/repos/theforeman/foreman_discovery/forks","keys_url":"https://api.github.com/repos/theforeman/foreman_discovery/keys{/key_id}","collaborators_url":"https://api.github.com/repos/theforeman/foreman_discovery/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/theforeman/foreman_discovery/teams","hooks_url":"https://api.github.com/repos/theforeman/foreman_discovery/hooks","issue_events_url":"https://api.github.com/repos/theforeman/foreman_discovery/issues/events{/number}","events_url":"https://api.github.com/repos/theforeman/foreman_discovery/events","assignees_url":"https://api.github.com/repos/theforeman/foreman_discovery/assignees{/user}","branches_url":"https://api.github.com/repos/theforeman/foreman_discovery/branches{/branch}","tags_url":"https://api.github.com/repos/theforeman/foreman_discovery/tags","blobs_url":"https://api.github.com/repos/theforeman/foreman_discovery/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/theforeman/foreman_discovery/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/theforeman/foreman_discovery/git/refs{/sha}","trees_url":"https://api.github.com/repos/theforeman/foreman_discovery/git/trees{/sha}","statuses_url":"https://api.github.com/repos/theforeman/foreman_discovery/statuses/{sha}","languages_url":"https://api.github.com/repos/theforeman/foreman_discovery/languages","stargazers_url":"https://api.github.com/repos/theforeman/foreman_discovery/stargazers","contributors_url":"https://api.github.com/repos/theforeman/foreman_discovery/contributors","subscribers_url":"https://api.github.com/repos/theforeman/foreman_discovery/subscribers","subscription_url":"https://api.github.com/repos/theforeman/foreman_discovery/subscription","commits_url":"https://api.github.com/repos/theforeman/foreman_discovery/commits{/sha}","git_commits_url":"https://api.github.com/repos/theforeman/foreman_discovery/git/commits{/sha}","comments_url":"https://api.github.com/repos/theforeman/foreman_discovery/comments{/number}","issue_comment_url":"https://api.github.com/repos/theforeman/foreman_discovery/issues/comments/{number}","contents_url":"https://api.github.com/repos/theforeman/foreman_discovery/contents/{+path}","compare_url":"https://api.github.com/repos/theforeman/foreman_discovery/compare/{base}...{head}","merges_url":"https://api.github.com/repos/theforeman/foreman_discovery/merges","archive_url":"https://api.github.com/repos/theforeman/foreman_discovery/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/theforeman/foreman_discovery/downloads","issues_url":"https://api.github.com/repos/theforeman/foreman_discovery/issues{/number}","pulls_url":"https://api.github.com/repos/theforeman/foreman_discovery/pulls{/number}","milestones_url":"https://api.github.com/repos/theforeman/foreman_discovery/milestones{/number}","notifications_url":"https://api.github.com/repos/theforeman/foreman_discovery/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/theforeman/foreman_discovery/labels{/name}","releases_url":"https://api.github.com/repos/theforeman/foreman_discovery/releases{/id}","created_at":"2013-02-27T10:45:55Z","updated_at":"2015-01-12T11:10:21Z","pushed_at":"2015-01-12T11:10:20Z","git_url":"git://github.com/theforeman/foreman_discovery.git","ssh_url":"git@github.com:theforeman/foreman_discovery.git","clone_url":"https://github.com/theforeman/foreman_discovery.git","svn_url":"https://github.com/theforeman/foreman_discovery","homepage":null,"size":1810,"stargazers_count":20,"watchers_count":20,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":29,"mirror_url":null,"open_issues_count":6,"forks":29,"open_issues":6,"watchers":20,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/theforeman/foreman_discovery/pulls/119"},"html":{"href":"https://github.com/theforeman/foreman_discovery/pull/119"},"issue":{"href":"https://api.github.com/repos/theforeman/foreman_discovery/issues/119"},"comments":{"href":"https://api.github.com/repos/theforeman/foreman_discovery/issues/119/comments"},"review_comments":{"href":"https://api.github.com/repos/theforeman/foreman_discovery/pulls/119/comments"},"review_comment":{"href":"https://api.github.com/repos/theforeman/foreman_discovery/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/theforeman/foreman_discovery/pulls/119/commits"},"statuses":{"href":"https://api.github.com/repos/theforeman/foreman_discovery/statuses/12c8fecd919c813125df82ad6217f54630de1084"}}}}