{"action":"created","comment":{"url":"https://api.github.com/repos/theforeman/foreman/pulls/comments/135719113","pull_request_review_id":59159541,"id":135719113,"diff_hunk":"@@ -31,3 +31,97 @@ export function getAttributesToPost(componentType) {\n   }\n   return _.uniq(attrsToPost);\n }\n+\n+class PXECompatibilityCheck {\n+  constructor(regexp, compatibleLoadersFunc) {\n+    this.__regexp = regexp;\n+    this.__compatibleLoadersFunc = compatibleLoadersFunc;\n+  }\n+\n+  isCompatible(osTitle, pxeLoader) {\n+    let os, supportedLoaders;\n+\n+    os = this.__regexp.exec(osTitle);\n+    if (os == null) {\n+      return null;\n+    }\n+\n+    supportedLoaders = this.__compatibleLoadersFunc(os);\n+    if (supportedLoaders != null) {\n+      return (supportedLoaders.indexOf(pxeLoader) > -1);\n+    }\n+    return null;\n+  }\n+}\n+\n+const PXE_BIOS = 'PXELinux BIOS';\n+const PXE_UEFI = 'PXELinux UEFI';\n+const GRUB_UEFI = 'Grub UEFI';\n+const GRUB2_UEFI = 'Grub2 UEFI';\n+const GRUB2_UEFI_SB = 'Grub2 UEFI SecureBoot';\n+\n+export let pxeCompatibility = new Map();\n+\n+// Ubuntu 10.x or older and Grub1\n+// Ubuntu 11.x or newer and Grub2\n+pxeCompatibility.set('ubuntu',\n+  new PXECompatibilityCheck(\n+    /ubuntu[^\\d]*(\\d+)(?:[.]\\d+)?/,\n+    function (os) {\n+      if (os[1] <= '10') {\n+        return [PXE_BIOS, PXE_UEFI, GRUB_UEFI];\n+      } else if (os[1] > '10') {\n+        return [PXE_BIOS, PXE_UEFI, GRUB2_UEFI, GRUB2_UEFI_SB];\n+      }\n+      return null;\n+    }\n+  )\n+);\n+\n+// RHEL 6.x and Grub1\n+// RHEL 7.x and Grub2\n+pxeCompatibility.set('rhel',\n+  new PXECompatibilityCheck(\n+    /(?:red[ ]*hat|rhel|cent[ ]*os)[^\\d]*(\\d+)(?:[.]\\d+)?/,","path":"webpack/assets/javascripts/foreman_hosts.js","position":55,"original_position":55,"commit_id":"4ff88036df00e6ebd8d710d6223c3c8802ec5e6c","original_commit_id":"4ff88036df00e6ebd8d710d6223c3c8802ec5e6c","user":{"login":"lzap","id":49752,"avatar_url":"https://avatars0.githubusercontent.com/u/49752?v=4","gravatar_id":"","url":"https://api.github.com/users/lzap","html_url":"https://github.com/lzap","followers_url":"https://api.github.com/users/lzap/followers","following_url":"https://api.github.com/users/lzap/following{/other_user}","gists_url":"https://api.github.com/users/lzap/gists{/gist_id}","starred_url":"https://api.github.com/users/lzap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lzap/subscriptions","organizations_url":"https://api.github.com/users/lzap/orgs","repos_url":"https://api.github.com/users/lzap/repos","events_url":"https://api.github.com/users/lzap/events{/privacy}","received_events_url":"https://api.github.com/users/lzap/received_events","type":"User","site_admin":false},"body":"It is worth including \"scientific\" and \"oracle\".","created_at":"2017-08-29T08:00:07Z","updated_at":"2017-08-29T08:06:17Z","html_url":"https://github.com/theforeman/foreman/pull/4792#discussion_r135719113","pull_request_url":"https://api.github.com/repos/theforeman/foreman/pulls/4792","_links":{"self":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/comments/135719113"},"html":{"href":"https://github.com/theforeman/foreman/pull/4792#discussion_r135719113"},"pull_request":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/4792"}}},"pull_request":{"url":"https://api.github.com/repos/theforeman/foreman/pulls/4792","id":137979051,"html_url":"https://github.com/theforeman/foreman/pull/4792","diff_url":"https://github.com/theforeman/foreman/pull/4792.diff","patch_url":"https://github.com/theforeman/foreman/pull/4792.patch","issue_url":"https://api.github.com/repos/theforeman/foreman/issues/4792","number":4792,"state":"open","locked":false,"title":"Fixes #19554 - Provide warning for unsupported PXE loader combinations","user":{"login":"tstrachota","id":1186631,"avatar_url":"https://avatars2.githubusercontent.com/u/1186631?v=4","gravatar_id":"","url":"https://api.github.com/users/tstrachota","html_url":"https://github.com/tstrachota","followers_url":"https://api.github.com/users/tstrachota/followers","following_url":"https://api.github.com/users/tstrachota/following{/other_user}","gists_url":"https://api.github.com/users/tstrachota/gists{/gist_id}","starred_url":"https://api.github.com/users/tstrachota/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tstrachota/subscriptions","organizations_url":"https://api.github.com/users/tstrachota/orgs","repos_url":"https://api.github.com/users/tstrachota/repos","events_url":"https://api.github.com/users/tstrachota/events{/privacy}","received_events_url":"https://api.github.com/users/tstrachota/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-08-28T15:55:16Z","updated_at":"2017-08-29T08:06:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c6aaa405c7a3ea50df1a1d658538c3ac8a050932","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/theforeman/foreman/pulls/4792/commits","review_comments_url":"https://api.github.com/repos/theforeman/foreman/pulls/4792/comments","review_comment_url":"https://api.github.com/repos/theforeman/foreman/pulls/comments{/number}","comments_url":"https://api.github.com/repos/theforeman/foreman/issues/4792/comments","statuses_url":"https://api.github.com/repos/theforeman/foreman/statuses/4ff88036df00e6ebd8d710d6223c3c8802ec5e6c","head":{"label":"tstrachota:pxe_compatibility_warning","ref":"pxe_compatibility_warning","sha":"4ff88036df00e6ebd8d710d6223c3c8802ec5e6c","user":{"login":"tstrachota","id":1186631,"avatar_url":"https://avatars2.githubusercontent.com/u/1186631?v=4","gravatar_id":"","url":"https://api.github.com/users/tstrachota","html_url":"https://github.com/tstrachota","followers_url":"https://api.github.com/users/tstrachota/followers","following_url":"https://api.github.com/users/tstrachota/following{/other_user}","gists_url":"https://api.github.com/users/tstrachota/gists{/gist_id}","starred_url":"https://api.github.com/users/tstrachota/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tstrachota/subscriptions","organizations_url":"https://api.github.com/users/tstrachota/orgs","repos_url":"https://api.github.com/users/tstrachota/repos","events_url":"https://api.github.com/users/tstrachota/events{/privacy}","received_events_url":"https://api.github.com/users/tstrachota/received_events","type":"User","site_admin":false},"repo":{"id":4674201,"name":"foreman","full_name":"tstrachota/foreman","owner":{"login":"tstrachota","id":1186631,"avatar_url":"https://avatars2.githubusercontent.com/u/1186631?v=4","gravatar_id":"","url":"https://api.github.com/users/tstrachota","html_url":"https://github.com/tstrachota","followers_url":"https://api.github.com/users/tstrachota/followers","following_url":"https://api.github.com/users/tstrachota/following{/other_user}","gists_url":"https://api.github.com/users/tstrachota/gists{/gist_id}","starred_url":"https://api.github.com/users/tstrachota/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tstrachota/subscriptions","organizations_url":"https://api.github.com/users/tstrachota/orgs","repos_url":"https://api.github.com/users/tstrachota/repos","events_url":"https://api.github.com/users/tstrachota/events{/privacy}","received_events_url":"https://api.github.com/users/tstrachota/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tstrachota/foreman","description":"an application that automates the lifecycle of servers ","fork":true,"url":"https://api.github.com/repos/tstrachota/foreman","forks_url":"https://api.github.com/repos/tstrachota/foreman/forks","keys_url":"https://api.github.com/repos/tstrachota/foreman/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tstrachota/foreman/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tstrachota/foreman/teams","hooks_url":"https://api.github.com/repos/tstrachota/foreman/hooks","issue_events_url":"https://api.github.com/repos/tstrachota/foreman/issues/events{/number}","events_url":"https://api.github.com/repos/tstrachota/foreman/events","assignees_url":"https://api.github.com/repos/tstrachota/foreman/assignees{/user}","branches_url":"https://api.github.com/repos/tstrachota/foreman/branches{/branch}","tags_url":"https://api.github.com/repos/tstrachota/foreman/tags","blobs_url":"https://api.github.com/repos/tstrachota/foreman/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tstrachota/foreman/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tstrachota/foreman/git/refs{/sha}","trees_url":"https://api.github.com/repos/tstrachota/foreman/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tstrachota/foreman/statuses/{sha}","languages_url":"https://api.github.com/repos/tstrachota/foreman/languages","stargazers_url":"https://api.github.com/repos/tstrachota/foreman/stargazers","contributors_url":"https://api.github.com/repos/tstrachota/foreman/contributors","subscribers_url":"https://api.github.com/repos/tstrachota/foreman/subscribers","subscription_url":"https://api.github.com/repos/tstrachota/foreman/subscription","commits_url":"https://api.github.com/repos/tstrachota/foreman/commits{/sha}","git_commits_url":"https://api.github.com/repos/tstrachota/foreman/git/commits{/sha}","comments_url":"https://api.github.com/repos/tstrachota/foreman/comments{/number}","issue_comment_url":"https://api.github.com/repos/tstrachota/foreman/issues/comments{/number}","contents_url":"https://api.github.com/repos/tstrachota/foreman/contents/{+path}","compare_url":"https://api.github.com/repos/tstrachota/foreman/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tstrachota/foreman/merges","archive_url":"https://api.github.com/repos/tstrachota/foreman/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tstrachota/foreman/downloads","issues_url":"https://api.github.com/repos/tstrachota/foreman/issues{/number}","pulls_url":"https://api.github.com/repos/tstrachota/foreman/pulls{/number}","milestones_url":"https://api.github.com/repos/tstrachota/foreman/milestones{/number}","notifications_url":"https://api.github.com/repos/tstrachota/foreman/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tstrachota/foreman/labels{/name}","releases_url":"https://api.github.com/repos/tstrachota/foreman/releases{/id}","deployments_url":"https://api.github.com/repos/tstrachota/foreman/deployments","created_at":"2012-06-15T11:11:21Z","updated_at":"2016-10-24T10:41:06Z","pushed_at":"2017-08-28T17:25:02Z","git_url":"git://github.com/tstrachota/foreman.git","ssh_url":"git@github.com:tstrachota/foreman.git","clone_url":"https://github.com/tstrachota/foreman.git","svn_url":"https://github.com/tstrachota/foreman","homepage":"http://theforeman.org","size":41667,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":false,"has_projects":true,"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":2,"default_branch":"develop"}},"base":{"label":"theforeman:develop","ref":"develop","sha":"ee4aa64c3112e3255294ab4031fe2cf96ed3960b","user":{"login":"theforeman","id":1439844,"avatar_url":"https://avatars2.githubusercontent.com/u/1439844?v=4","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://avatars2.githubusercontent.com/u/1439844?v=4","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}","deployments_url":"https://api.github.com/repos/theforeman/foreman/deployments","created_at":"2009-07-23T15:07:00Z","updated_at":"2017-08-28T18:09:45Z","pushed_at":"2017-08-28T17:25:05Z","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":59540,"stargazers_count":1277,"watchers_count":1277,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":631,"mirror_url":null,"open_issues_count":101,"forks":631,"open_issues":101,"watchers":1277,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/4792"},"html":{"href":"https://github.com/theforeman/foreman/pull/4792"},"issue":{"href":"https://api.github.com/repos/theforeman/foreman/issues/4792"},"comments":{"href":"https://api.github.com/repos/theforeman/foreman/issues/4792/comments"},"review_comments":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/4792/comments"},"review_comment":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/4792/commits"},"statuses":{"href":"https://api.github.com/repos/theforeman/foreman/statuses/4ff88036df00e6ebd8d710d6223c3c8802ec5e6c"}}}}
{"actor":{"display_login":"lzap"}}