foreman_rh_cloud 2.0.6 → 2.0.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (244) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +27 -2
  3. data/app/controllers/foreman_inventory_upload/accounts_controller.rb +4 -6
  4. data/app/controllers/foreman_inventory_upload/tasks_controller.rb +25 -0
  5. data/app/controllers/foreman_inventory_upload/uploads_controller.rb +22 -3
  6. data/app/controllers/foreman_rh_cloud/react_controller.rb +11 -0
  7. data/app/controllers/insights_cloud/hits_controller.rb +17 -0
  8. data/app/controllers/insights_cloud/settings_controller.rb +24 -0
  9. data/app/controllers/insights_cloud/tasks_controller.rb +7 -0
  10. data/app/helpers/foreman_inventory_upload_host_helper.rb +20 -0
  11. data/app/models/concerns/rh_cloud_host.rb +12 -0
  12. data/app/models/insights_facet.rb +7 -0
  13. data/app/models/insights_hit.rb +6 -0
  14. data/app/models/inventory_sync/inventory_status.rb +30 -0
  15. data/app/models/setting/rh_cloud.rb +4 -1
  16. data/app/overrides/hosts_list.rb +13 -0
  17. data/app/views/foreman_rh_cloud/react/insights_cloud.html.erb +6 -0
  18. data/app/views/foreman_rh_cloud/react/inventory_upload.html.erb +1 -0
  19. data/app/views/hosts/_insights_tab.html.erb +15 -0
  20. data/app/views/{foreman_inventory_upload/layouts/react.html.erb → layouts/foreman_rh_cloud/application.html.erb} +2 -2
  21. data/config/routes.rb +15 -1
  22. data/db/migrate/20191215104806_create_insights_hits.foreman_inventory_upload.rb +14 -0
  23. data/db/migrate/20191216062008_create_insights_facets.foreman_inventory_upload.rb +7 -0
  24. data/db/migrate/20200727111529_add_uuid_column_to_insights_facets.foreman_rh_cloud.rb +5 -0
  25. data/lib/foreman_inventory_upload.rb +4 -0
  26. data/lib/foreman_inventory_upload/async/generate_report_job.rb +1 -1
  27. data/lib/foreman_inventory_upload/async/shell_process.rb +21 -9
  28. data/lib/foreman_inventory_upload/async/upload_report_job.rb +49 -3
  29. data/lib/foreman_inventory_upload/generators/fact_helpers.rb +43 -0
  30. data/lib/foreman_inventory_upload/generators/json_stream.rb +10 -0
  31. data/lib/foreman_inventory_upload/generators/metadata.rb +3 -0
  32. data/lib/foreman_inventory_upload/generators/queries.rb +7 -4
  33. data/lib/foreman_inventory_upload/generators/slice.rb +42 -14
  34. data/lib/foreman_inventory_upload/notifications/manifest_import_success_notification_override.rb +19 -0
  35. data/lib/foreman_inventory_upload/scripts/uploader.sh.erb +1 -1
  36. data/lib/foreman_rh_cloud.rb +13 -0
  37. data/lib/foreman_rh_cloud/engine.rb +44 -5
  38. data/lib/foreman_rh_cloud/version.rb +1 -1
  39. data/lib/insights_cloud.rb +15 -0
  40. data/lib/insights_cloud/async/insights_full_sync.rb +103 -0
  41. data/lib/insights_cloud/async/insights_scheduled_sync.rb +23 -0
  42. data/lib/inventory_sync/async/host_result.rb +50 -0
  43. data/lib/inventory_sync/async/inventory_full_sync.rb +99 -0
  44. data/lib/tasks/insights.rake +15 -0
  45. data/lib/tasks/{generator.rake → rh_cloud_inventory.rake} +7 -1
  46. data/package.json +3 -1
  47. data/test/controllers/insights_sync/settings_controller_test.rb +30 -0
  48. data/test/factories/insights_factories.rb +31 -0
  49. data/test/jobs/insights_full_sync_test.rb +94 -0
  50. data/test/jobs/inventory_full_sync_test.rb +91 -0
  51. data/test/jobs/upload_report_job_test.rb +34 -0
  52. data/test/unit/insights_facet_test.rb +16 -0
  53. data/test/unit/metadata_generator_test.rb +2 -0
  54. data/test/unit/slice_generator_test.rb +199 -9
  55. data/webpack/ForemanInventoryUpload/Components/AccountList/AccountList.fixtures.js +14 -2
  56. data/webpack/ForemanInventoryUpload/Components/AccountList/AccountList.js +13 -10
  57. data/webpack/ForemanInventoryUpload/Components/AccountList/AccountListActions.js +6 -3
  58. data/webpack/ForemanInventoryUpload/Components/AccountList/AccountListHelper.js +10 -0
  59. data/webpack/ForemanInventoryUpload/Components/AccountList/AccountListReducer.js +11 -1
  60. data/webpack/ForemanInventoryUpload/Components/AccountList/AccountListSelectors.js +10 -1
  61. data/webpack/ForemanInventoryUpload/Components/AccountList/Components/EmptyResults/EmptyResults.js +15 -0
  62. data/webpack/ForemanInventoryUpload/Components/AccountList/Components/EmptyResults/__tests__/EmptyResults.test.js +13 -0
  63. data/webpack/ForemanInventoryUpload/Components/AccountList/Components/EmptyResults/__tests__/__snapshots__/EmptyResults.test.js.snap +18 -0
  64. data/webpack/ForemanInventoryUpload/Components/AccountList/Components/EmptyResults/emptyResults.scss +7 -0
  65. data/webpack/ForemanInventoryUpload/Components/AccountList/Components/EmptyResults/index.js +1 -0
  66. data/webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/ListItem.js +1 -4
  67. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountList.test.js +1 -0
  68. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListActions.test.js +8 -1
  69. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListHelper.test.js +12 -0
  70. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListIntegration.test.js +1 -1
  71. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListReducer.test.js +13 -0
  72. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListSelectors.test.js +12 -8
  73. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/__snapshots__/AccountList.test.js.snap +2 -3
  74. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/__snapshots__/AccountListActions.test.js.snap +21 -2
  75. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/__snapshots__/AccountListReducer.test.js.snap +11 -0
  76. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/__snapshots__/AccountListSelectors.test.js.snap +3 -0
  77. data/webpack/ForemanInventoryUpload/Components/AccountList/index.js +2 -0
  78. data/webpack/ForemanInventoryUpload/Components/AutoUploadSwitcher/AutoUploadSwitcher.js +6 -6
  79. data/webpack/ForemanInventoryUpload/Components/AutoUploadSwitcher/AutoUploadSwitcherActions.js +4 -1
  80. data/webpack/ForemanInventoryUpload/Components/AutoUploadSwitcher/__tests__/__snapshots__/AutoUploadSwitcher.test.js.snap +9 -9
  81. data/webpack/ForemanInventoryUpload/Components/AutoUploadSwitcher/autoUploadSwitcher.scss +1 -1
  82. data/webpack/ForemanInventoryUpload/Components/Dashboard/DashboardActions.js +4 -3
  83. data/webpack/ForemanInventoryUpload/Components/Dashboard/DashboardSelectors.js +1 -1
  84. data/webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardActions.test.js +2 -3
  85. data/webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardIntegration.test.js +1 -1
  86. data/webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardSelectors.test.js +3 -2
  87. data/webpack/ForemanInventoryUpload/Components/FullScreenModal/FullScreenModal.js +5 -1
  88. data/webpack/ForemanInventoryUpload/Components/FullScreenModal/__tests__/__snapshots__/FullScreenModal.test.js.snap +1 -0
  89. data/webpack/ForemanInventoryUpload/Components/FullScreenModal/fullScreenModal.scss +15 -13
  90. data/webpack/ForemanInventoryUpload/Components/HostObfuscationSwitcher/HostObfuscationSwitcher.fixtures.js +1 -0
  91. data/webpack/ForemanInventoryUpload/Components/HostObfuscationSwitcher/HostObfuscationSwitcher.js +29 -0
  92. data/webpack/ForemanInventoryUpload/Components/HostObfuscationSwitcher/HostObfuscationSwitcherActions.js +30 -0
  93. data/webpack/ForemanInventoryUpload/Components/HostObfuscationSwitcher/HostObfuscationSwitcherConstants.js +3 -0
  94. data/webpack/ForemanInventoryUpload/Components/HostObfuscationSwitcher/__tests__/HostObfuscationSwitcher.test.js +14 -0
  95. data/webpack/ForemanInventoryUpload/Components/HostObfuscationSwitcher/__tests__/HostObfuscationSwitcherActions.test.js +14 -0
  96. data/webpack/ForemanInventoryUpload/Components/HostObfuscationSwitcher/__tests__/__snapshots__/HostObfuscationSwitcher.test.js.snap +38 -0
  97. data/webpack/ForemanInventoryUpload/Components/HostObfuscationSwitcher/__tests__/__snapshots__/HostObfuscationSwitcherActions.test.js.snap +14 -0
  98. data/webpack/ForemanInventoryUpload/Components/HostObfuscationSwitcher/hostObfuscationSwitcher.scss +0 -0
  99. data/webpack/ForemanInventoryUpload/Components/HostObfuscationSwitcher/index.js +20 -0
  100. data/webpack/ForemanInventoryUpload/Components/InventoryFilter/Components/ClearButton/ClearButton.js +26 -0
  101. data/webpack/ForemanInventoryUpload/Components/InventoryFilter/Components/ClearButton/index.js +1 -0
  102. data/webpack/ForemanInventoryUpload/Components/InventoryFilter/InventoryFilter.fixtures.js +2 -0
  103. data/webpack/ForemanInventoryUpload/Components/InventoryFilter/InventoryFilter.js +39 -0
  104. data/webpack/ForemanInventoryUpload/Components/InventoryFilter/InventoryFilterActions.js +16 -0
  105. data/webpack/ForemanInventoryUpload/Components/InventoryFilter/InventoryFilterConstants.js +3 -0
  106. data/webpack/ForemanInventoryUpload/Components/InventoryFilter/InventoryFilterReducer.js +47 -0
  107. data/webpack/ForemanInventoryUpload/Components/InventoryFilter/InventoryFilterSelectors.js +7 -0
  108. data/webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/InventoryFilter.test.js +14 -0
  109. data/webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/InventoryFilterActions.test.js +14 -0
  110. data/webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/InventoryFilterReducer.test.js +44 -0
  111. data/webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/InventoryFilterSelectors.test.js +21 -0
  112. data/webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/__snapshots__/InventoryFilter.test.js.snap +25 -0
  113. data/webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/__snapshots__/InventoryFilterActions.test.js.snap +17 -0
  114. data/webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/__snapshots__/InventoryFilterReducer.test.js.snap +31 -0
  115. data/webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/__snapshots__/InventoryFilterSelectors.test.js.snap +9 -0
  116. data/webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/__snapshots__/integration.test.js.snap +40 -0
  117. data/webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/integration.test.js +18 -0
  118. data/webpack/ForemanInventoryUpload/Components/InventoryFilter/index.js +17 -0
  119. data/webpack/ForemanInventoryUpload/Components/InventoryFilter/inventoryFilter.scss +28 -0
  120. data/webpack/ForemanInventoryUpload/Components/InventorySettings/InventorySettings.js +15 -0
  121. data/webpack/ForemanInventoryUpload/Components/InventorySettings/__tests__/InventorySettings.test.js +13 -0
  122. data/webpack/ForemanInventoryUpload/Components/InventorySettings/__tests__/__snapshots__/InventorySettings.test.js.snap +13 -0
  123. data/webpack/ForemanInventoryUpload/Components/InventorySettings/index.js +1 -0
  124. data/webpack/ForemanInventoryUpload/Components/InventorySettings/inventorySettings.scss +15 -0
  125. data/webpack/ForemanInventoryUpload/Components/PageHeader/PageHeader.js +25 -6
  126. data/webpack/ForemanInventoryUpload/Components/PageHeader/__tests__/__snapshots__/PageHeader.test.js.snap +33 -5
  127. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/DocsButton/DocsButton.js +18 -0
  128. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/DocsButton/__tests__/DocsButton.test.js +12 -0
  129. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/DocsButton/__tests__/__snapshots__/DocsButton.test.js.snap +21 -0
  130. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/DocsButton/index.js +1 -0
  131. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/HistoryButton/HistoryButton.js +19 -0
  132. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/HistoryButton/__tests__/HistoryButton.test.js +12 -0
  133. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/HistoryButton/__tests__/__snapshots__/HistoryButton.test.js.snap +22 -0
  134. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/HistoryButton/index.js +1 -0
  135. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/PageDescription/PageDescription.js +24 -0
  136. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/PageDescription/__tests__/PageDescription.test.js +11 -0
  137. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/PageDescription/__tests__/__snapshots__/PageDescription.test.js.snap +17 -0
  138. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/PageDescription/index.js +1 -0
  139. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/SyncButton.js +52 -0
  140. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/SyncButtonActions.js +59 -0
  141. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/SyncButtonConstants.js +3 -0
  142. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/SyncButtonReducer.js +36 -0
  143. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/SyncButtonSelectors.js +13 -0
  144. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/__tests__/SyncButton.test.js +13 -0
  145. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/__tests__/SyncButtonActions.test.js +13 -0
  146. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/__tests__/SyncButtonFixtures.js +9 -0
  147. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/__tests__/SyncButtonReducer.test.js +33 -0
  148. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/__tests__/SyncButtonSelectors.test.js +36 -0
  149. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/__tests__/__snapshots__/SyncButton.test.js.snap +26 -0
  150. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/__tests__/__snapshots__/SyncButtonActions.test.js.snap +36 -0
  151. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/__tests__/__snapshots__/SyncButtonReducer.test.js.snap +25 -0
  152. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/__tests__/__snapshots__/SyncButtonSelectors.test.js.snap +18 -0
  153. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/components/Modal.js +63 -0
  154. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/components/Toast.js +41 -0
  155. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/components/modal.scss +20 -0
  156. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/index.js +22 -0
  157. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/ToolbarButtons/ToolbarButtons.js +15 -0
  158. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/ToolbarButtons/__tests__/ToolbarButtons.test.js +12 -0
  159. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/ToolbarButtons/__tests__/__snapshots__/ToolbarButtons.test.js.snap +11 -0
  160. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/ToolbarButtons/index.js +1 -0
  161. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/ToolbarButtons/toolbarButtons.scss +12 -0
  162. data/webpack/ForemanInventoryUpload/Components/PageHeader/pageHeader.scss +3 -0
  163. data/webpack/ForemanInventoryUpload/Components/StatusChart/StatusChart.js +1 -1
  164. data/webpack/ForemanInventoryUpload/Components/StatusChart/__tests__/__snapshots__/StatusChart.test.js.snap +1 -1
  165. data/webpack/ForemanInventoryUpload/Components/TabContainer/tabContainer.scss +1 -1
  166. data/webpack/ForemanInventoryUpload/ForemanInventoryConstants.js +9 -0
  167. data/webpack/ForemanInventoryUpload/ForemanInventoryHelpers.js +17 -0
  168. data/webpack/ForemanInventoryUpload/ForemanInventoryUpload.js +16 -8
  169. data/webpack/ForemanInventoryUpload/ForemanInventoryUploadReducers.js +6 -4
  170. data/webpack/ForemanInventoryUpload/SubscriptionsPageExtension/SubscriptionsPageExtensionActions.js +34 -0
  171. data/webpack/ForemanInventoryUpload/__tests__/ForemanInventoryHelpers.test.js +10 -0
  172. data/webpack/ForemanInventoryUpload/{ForemanInventoryUpload.test.js → __tests__/ForemanInventoryUpload.test.js} +1 -1
  173. data/webpack/ForemanInventoryUpload/__tests__/__snapshots__/ForemanInventoryHelpers.test.js.snap +5 -0
  174. data/webpack/ForemanInventoryUpload/{__snapshots__ → __tests__/__snapshots__}/ForemanInventoryUpload.test.js.snap +0 -0
  175. data/webpack/ForemanRhCloudHelpers.js +6 -0
  176. data/webpack/ForemanRhCloudPages.js +9 -0
  177. data/webpack/ForemanRhCloudReducers.js +12 -0
  178. data/webpack/ForemanRhCloudSelectors.js +10 -0
  179. data/webpack/ForemanRhCloudTestHelpers.js +20 -0
  180. data/webpack/InsightsCloudSync/Components/InsightsSettings/InsightsSettings.js +33 -0
  181. data/webpack/InsightsCloudSync/Components/InsightsSettings/InsightsSettingsActions.js +60 -0
  182. data/webpack/InsightsCloudSync/Components/InsightsSettings/InsightsSettingsConstants.js +10 -0
  183. data/webpack/InsightsCloudSync/Components/InsightsSettings/InsightsSettingsReducer.js +28 -0
  184. data/webpack/InsightsCloudSync/Components/InsightsSettings/InsightsSettingsSelectors.js +6 -0
  185. data/webpack/InsightsCloudSync/Components/InsightsSettings/__tests__/InsightsSettings.test.js +18 -0
  186. data/webpack/InsightsCloudSync/Components/InsightsSettings/__tests__/InsightsSettingsActions.test.js +46 -0
  187. data/webpack/InsightsCloudSync/Components/InsightsSettings/__tests__/InsightsSettingsReducer.test.js +56 -0
  188. data/webpack/InsightsCloudSync/Components/InsightsSettings/__tests__/InsightsSettingsSelectors.test.js +21 -0
  189. data/webpack/InsightsCloudSync/Components/InsightsSettings/__tests__/__snapshots__/InsightsSettings.test.js.snap +15 -0
  190. data/webpack/InsightsCloudSync/Components/InsightsSettings/__tests__/__snapshots__/InsightsSettingsActions.test.js.snap +31 -0
  191. data/webpack/InsightsCloudSync/Components/InsightsSettings/__tests__/__snapshots__/InsightsSettingsReducer.test.js.snap +33 -0
  192. data/webpack/InsightsCloudSync/Components/InsightsSettings/__tests__/__snapshots__/InsightsSettingsSelectors.test.js.snap +9 -0
  193. data/webpack/InsightsCloudSync/Components/InsightsSettings/index.js +21 -0
  194. data/webpack/InsightsCloudSync/Components/InsightsSettings/insightsSettings.scss +16 -0
  195. data/webpack/InsightsCloudSync/Components/InsightsSyncSwitcher/InsightsSyncSwitcher.fixtures.js +1 -0
  196. data/webpack/InsightsCloudSync/Components/InsightsSyncSwitcher/InsightsSyncSwitcher.js +45 -0
  197. data/webpack/InsightsCloudSync/Components/InsightsSyncSwitcher/__tests__/InsightsSyncSwitcher.test.js +17 -0
  198. data/webpack/InsightsCloudSync/Components/InsightsSyncSwitcher/__tests__/__snapshots__/InsightsSyncSwitcher.test.js.snap +38 -0
  199. data/webpack/InsightsCloudSync/Components/InsightsSyncSwitcher/index.js +1 -0
  200. data/webpack/InsightsCloudSync/Components/InsightsSyncSwitcher/insightsSyncSwitcher.scss +3 -0
  201. data/webpack/InsightsCloudSync/InsightsCloudSync.js +59 -0
  202. data/webpack/InsightsCloudSync/InsightsCloudSync.test.js +16 -0
  203. data/webpack/InsightsCloudSync/InsightsCloudSyncActions.js +23 -0
  204. data/webpack/InsightsCloudSync/InsightsCloudSyncConstants.js +6 -0
  205. data/webpack/InsightsCloudSync/InsightsCloudSyncHelpers.js +3 -0
  206. data/webpack/InsightsCloudSync/InsightsCloudSyncReducers.js +8 -0
  207. data/webpack/InsightsCloudSync/__snapshots__/InsightsCloudSync.test.js.snap +67 -0
  208. data/webpack/InsightsCloudSync/__tests__/InsightsCloudSyncHelpers.test.js +9 -0
  209. data/webpack/InsightsCloudSync/__tests__/__snapshots__/InsightsCloudSyncHelpers.test.js.snap +3 -0
  210. data/webpack/InsightsCloudSync/index.js +18 -0
  211. data/webpack/InsightsHostDetailsTab/InsightsTab.js +64 -0
  212. data/webpack/InsightsHostDetailsTab/InsightsTab.scss +86 -0
  213. data/webpack/InsightsHostDetailsTab/InsightsTabActions.js +30 -0
  214. data/webpack/InsightsHostDetailsTab/InsightsTabConstants.js +3 -0
  215. data/webpack/InsightsHostDetailsTab/InsightsTabReducer.js +26 -0
  216. data/webpack/InsightsHostDetailsTab/InsightsTabSelectors.js +3 -0
  217. data/webpack/InsightsHostDetailsTab/__tests__/InsightsTab.fixtures.js +25 -0
  218. data/webpack/InsightsHostDetailsTab/__tests__/InsightsTab.test.js +13 -0
  219. data/webpack/InsightsHostDetailsTab/__tests__/InsightsTabActions.test.js +13 -0
  220. data/webpack/InsightsHostDetailsTab/__tests__/InsightsTabIntegration.test.js +17 -0
  221. data/webpack/InsightsHostDetailsTab/__tests__/InsightsTabReducer.test.js +35 -0
  222. data/webpack/InsightsHostDetailsTab/__tests__/InsightsTabSelectors.test.js +13 -0
  223. data/webpack/InsightsHostDetailsTab/__tests__/__snapshots__/InsightsTab.test.js.snap +30 -0
  224. data/webpack/InsightsHostDetailsTab/__tests__/__snapshots__/InsightsTabActions.test.js.snap +20 -0
  225. data/webpack/InsightsHostDetailsTab/__tests__/__snapshots__/InsightsTabReducer.test.js.snap +41 -0
  226. data/webpack/InsightsHostDetailsTab/__tests__/__snapshots__/InsightsTabSelectors.test.js.snap +20 -0
  227. data/webpack/InsightsHostDetailsTab/components/ListItem/ListItem.js +69 -0
  228. data/webpack/InsightsHostDetailsTab/components/ListItem/index.js +1 -0
  229. data/webpack/InsightsHostDetailsTab/index.js +20 -0
  230. data/webpack/__mocks__/foremanReact/components/Layout/LayoutConstants.js +2 -0
  231. data/webpack/__mocks__/foremanReact/constants.js +5 -0
  232. data/webpack/__mocks__/foremanReact/redux/actions/toasts.js +8 -0
  233. data/webpack/__tests__/ForemanRhCloudHelpers.test.js +11 -0
  234. data/webpack/__tests__/ForemanRhCloudSelectors.test.js +22 -0
  235. data/webpack/__tests__/ForemanRhCloudTestHelpers.test.js +20 -0
  236. data/webpack/__tests__/__snapshots__/ForemanRhCloudHelpers.test.js.snap +3 -0
  237. data/webpack/__tests__/__snapshots__/ForemanRhCloudSelectors.test.js.snap +25 -0
  238. data/webpack/__tests__/__snapshots__/ForemanRhCloudTestHelpers.test.js.snap +39 -0
  239. data/webpack/index.js +3 -6
  240. data/webpack/subscriptions_extension_index.js +8 -0
  241. metadata +196 -17
  242. data/app/controllers/foreman_inventory_upload/react_controller.rb +0 -7
  243. data/test/unit/slice_generator_test.rb.orig +0 -280
  244. data/webpack/ForemanInventoryUpload/ForemanInventoryUploadSelectors.js +0 -4
@@ -0,0 +1,35 @@
1
+ import { testReducerSnapshotWithFixtures } from '@theforeman/test';
2
+ import reducer from '../InsightsTabReducer';
3
+ import { hits } from './InsightsTab.fixtures';
4
+ import {
5
+ INSIGHTS_HITS_REQUEST,
6
+ INSIGHTS_HITS_SUCCESS,
7
+ INSIGHTS_HITS_FAILURE,
8
+ } from '../InsightsTabConstants';
9
+
10
+ const fixtures = {
11
+ 'should return the initial state': {},
12
+ 'should handle INSIGHTS_HITS_REQUEST': {
13
+ action: {
14
+ type: INSIGHTS_HITS_REQUEST,
15
+ payload: {},
16
+ },
17
+ },
18
+ 'should handle INSIGHTS_HITS_SUCCESS': {
19
+ action: {
20
+ type: INSIGHTS_HITS_SUCCESS,
21
+ payload: { hits },
22
+ },
23
+ },
24
+ 'should handle INSIGHTS_HITS_FAILURE': {
25
+ action: {
26
+ type: INSIGHTS_HITS_FAILURE,
27
+ payload: {
28
+ error: 'some-error',
29
+ },
30
+ },
31
+ },
32
+ };
33
+
34
+ describe('AccountList reducer', () =>
35
+ testReducerSnapshotWithFixtures(reducer, fixtures));
@@ -0,0 +1,13 @@
1
+ import { testSelectorsSnapshotWithFixtures } from '@theforeman/test';
2
+ import { hostInsightsStateWrapper } from '../../ForemanRhCloudTestHelpers';
3
+ import { hits } from './InsightsTab.fixtures';
4
+ import { selectHits } from '../InsightsTabSelectors';
5
+
6
+ const state = hostInsightsStateWrapper({ hits });
7
+
8
+ const fixtures = {
9
+ 'should return hits': () => selectHits(state),
10
+ };
11
+
12
+ describe('InsightsTab selectors', () =>
13
+ testSelectorsSnapshotWithFixtures(fixtures));
@@ -0,0 +1,30 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`InsightsTab rendering render with props 1`] = `
4
+ <Row
5
+ bsClass="row"
6
+ componentClass="div"
7
+ >
8
+ <Col
9
+ bsClass="col"
10
+ componentClass="div"
11
+ xs={12}
12
+ >
13
+ <h2>
14
+ Recommendations
15
+ </h2>
16
+ <ListView
17
+ className=""
18
+ id="hits_list"
19
+ >
20
+ <ListItem
21
+ key="0"
22
+ resultsUrl="https://cloud.redhat.com/insights/advisor/recommendations/ansible_deprecated_repo%7CANSIBLE_DEPRECATED_REPO/4739b323-a343-4e89-b71b-81991b8dc656/"
23
+ solutionUrl="https://access.redhat.com/node/3359651"
24
+ title="New Ansible Engine packages are inaccessible when dedicated Ansible repo is not enabled"
25
+ totalRisk={2}
26
+ />
27
+ </ListView>
28
+ </Col>
29
+ </Row>
30
+ `;
@@ -0,0 +1,20 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`InsightsTab actions should fetchHits 1`] = `
4
+ Array [
5
+ Array [
6
+ Object {
7
+ "payload": Object {},
8
+ "type": "INSIGHTS_HITS_REQUEST",
9
+ },
10
+ ],
11
+ Array [
12
+ Object {
13
+ "payload": Object {
14
+ "error": "Cannot read property 'hits' of undefined",
15
+ },
16
+ "type": "INSIGHTS_HITS_FAILURE",
17
+ },
18
+ ],
19
+ ]
20
+ `;
@@ -0,0 +1,41 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`AccountList reducer should handle INSIGHTS_HITS_FAILURE 1`] = `
4
+ Object {
5
+ "error": "some-error",
6
+ "hits": Array [],
7
+ }
8
+ `;
9
+
10
+ exports[`AccountList reducer should handle INSIGHTS_HITS_REQUEST 1`] = `
11
+ Object {
12
+ "hits": Array [],
13
+ }
14
+ `;
15
+
16
+ exports[`AccountList reducer should handle INSIGHTS_HITS_SUCCESS 1`] = `
17
+ Object {
18
+ "hits": Array [
19
+ Object {
20
+ "insights_hit": Object {
21
+ "hostname": "my-host.example.com",
22
+ "last_seen": "2020-08-19T04:43:09.068706Z",
23
+ "likelihood": 2,
24
+ "publish_date": "2018-04-16T10:03:16Z",
25
+ "results_url": "https://cloud.redhat.com/insights/advisor/recommendations/ansible_deprecated_repo%7CANSIBLE_DEPRECATED_REPO/4739b323-a343-4e89-b71b-81991b8dc656/",
26
+ "rhel_version": "7.8",
27
+ "solution_url": "https://access.redhat.com/node/3359651",
28
+ "title": "New Ansible Engine packages are inaccessible when dedicated Ansible repo is not enabled",
29
+ "total_risk": 2,
30
+ "uuid": "4739b323-a343-4e89-b71b-81991b8dc656",
31
+ },
32
+ },
33
+ ],
34
+ }
35
+ `;
36
+
37
+ exports[`AccountList reducer should return the initial state 1`] = `
38
+ Object {
39
+ "hits": Array [],
40
+ }
41
+ `;
@@ -0,0 +1,20 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`InsightsTab selectors should return hits 1`] = `
4
+ Array [
5
+ Object {
6
+ "insights_hit": Object {
7
+ "hostname": "my-host.example.com",
8
+ "last_seen": "2020-08-19T04:43:09.068706Z",
9
+ "likelihood": 2,
10
+ "publish_date": "2018-04-16T10:03:16Z",
11
+ "results_url": "https://cloud.redhat.com/insights/advisor/recommendations/ansible_deprecated_repo%7CANSIBLE_DEPRECATED_REPO/4739b323-a343-4e89-b71b-81991b8dc656/",
12
+ "rhel_version": "7.8",
13
+ "solution_url": "https://access.redhat.com/node/3359651",
14
+ "title": "New Ansible Engine packages are inaccessible when dedicated Ansible repo is not enabled",
15
+ "total_risk": 2,
16
+ "uuid": "4739b323-a343-4e89-b71b-81991b8dc656",
17
+ },
18
+ },
19
+ ]
20
+ `;
@@ -0,0 +1,69 @@
1
+ import React, { Fragment } from 'react';
2
+ import { ListView, Icon } from 'patternfly-react';
3
+ import PropTypes from 'prop-types';
4
+
5
+ const labelMapper = {
6
+ 1: 'Low',
7
+ 2: 'Moderate',
8
+ 3: 'Important',
9
+ 4: 'Critical',
10
+ };
11
+
12
+ const ListItem = ({ title, totalRisk, resultsUrl, solutionUrl }) => {
13
+ const heading = (
14
+ <p className="ellipsis list-item-heading" title={title}>
15
+ {title}
16
+ </p>
17
+ );
18
+
19
+ const riskLabel = labelMapper[totalRisk];
20
+ const additionalInfo = [
21
+ <span key={`risk-info-${title}`} className={`risk-label ${riskLabel}`}>
22
+ <p>{riskLabel}</p>
23
+ </span>,
24
+ ];
25
+
26
+ const knowledgebaseLink = solutionUrl && (
27
+ <p>
28
+ <a href={solutionUrl} target="_blank" rel="noopener noreferrer">
29
+ Knowledgebase article <Icon name="external-link" />
30
+ </a>
31
+ </p>
32
+ );
33
+
34
+ const insightsCloudLink = resultsUrl && (
35
+ <p>
36
+ <a href={resultsUrl} target="_blank" rel="noopener noreferrer">
37
+ Read more about it in RH cloud insights <Icon name="external-link" />
38
+ </a>
39
+ </p>
40
+ );
41
+
42
+ return (
43
+ <ListView.Item
44
+ heading={heading}
45
+ additionalInfo={additionalInfo}
46
+ hideCloseIcon
47
+ >
48
+ <Fragment>
49
+ <p>{title}</p>
50
+ {knowledgebaseLink}
51
+ {insightsCloudLink}
52
+ </Fragment>
53
+ </ListView.Item>
54
+ );
55
+ };
56
+
57
+ ListItem.propTypes = {
58
+ title: PropTypes.string.isRequired,
59
+ totalRisk: PropTypes.number.isRequired,
60
+ resultsUrl: PropTypes.string,
61
+ solutionUrl: PropTypes.string,
62
+ };
63
+
64
+ ListItem.defaultProps = {
65
+ resultsUrl: '',
66
+ solutionUrl: '',
67
+ };
68
+
69
+ export default ListItem;
@@ -0,0 +1 @@
1
+ export { default } from './ListItem';
@@ -0,0 +1,20 @@
1
+ import { bindActionCreators } from 'redux';
2
+ import { connect } from 'react-redux';
3
+ import InsightsTab from './InsightsTab';
4
+ import * as actions from './InsightsTabActions';
5
+ import reducer from './InsightsTabReducer';
6
+ import { selectHits } from './InsightsTabSelectors';
7
+
8
+ // map state to props
9
+ const mapStateToProps = state => ({
10
+ hits: selectHits(state),
11
+ });
12
+
13
+ // map action dispatchers to props
14
+ const mapDispatchToProps = dispatch => bindActionCreators(actions, dispatch);
15
+
16
+ // export reducers
17
+ export const hostInsightsReducers = { hostInsights: reducer };
18
+
19
+ // export connected component
20
+ export default connect(mapStateToProps, mapDispatchToProps)(InsightsTab);
@@ -0,0 +1,2 @@
1
+ export const LAYOUT_CHANGE_ORG = 'LAYOUT_CHANGE_ORG';
2
+ export const LAYOUT_INITIALIZE = 'LAYOUT_INITIALIZE';
@@ -0,0 +1,5 @@
1
+ export const STATUS = {
2
+ PENDING: 'PENDING',
3
+ RESOLVED: 'RESOLVED',
4
+ ERROR: 'ERROR',
5
+ };
@@ -0,0 +1,8 @@
1
+ export const addToast = toast => ({
2
+ type: 'TOASTS_ADD',
3
+ payload: {
4
+ message: toast,
5
+ },
6
+ });
7
+
8
+ export default addToast;
@@ -0,0 +1,11 @@
1
+ import { testSelectorsSnapshotWithFixtures } from '@theforeman/test';
2
+ import { foremanUrl } from '../ForemanRhCloudHelpers';
3
+
4
+ global.URL_PREFIX = 'MY_TEST_URL_PREFIX.example.com';
5
+
6
+ const fixtures = {
7
+ 'should return foreman Url': () => foremanUrl('/test_path'),
8
+ };
9
+
10
+ describe('ForemanRhCloud helpers', () =>
11
+ testSelectorsSnapshotWithFixtures(fixtures));
@@ -0,0 +1,22 @@
1
+ import { testSelectorsSnapshotWithFixtures } from '@theforeman/test';
2
+ import { rhCloudStateWrapper } from '../ForemanRhCloudTestHelpers';
3
+ import {
4
+ selectForemanRhCloud,
5
+ selectForemanInventoryUpload,
6
+ selectInsightsCloudSync,
7
+ } from '../ForemanRhCloudSelectors';
8
+
9
+ const state = rhCloudStateWrapper(
10
+ { inventoryChild: {} },
11
+ { insightsChild: {} }
12
+ );
13
+
14
+ const fixtures = {
15
+ 'should return ForemanRhCloud': () => selectForemanRhCloud(state),
16
+ 'should return ForemanInventoryUpload': () =>
17
+ selectForemanInventoryUpload(state),
18
+ 'should return InsightsCloudSync': () => selectInsightsCloudSync(state),
19
+ };
20
+
21
+ describe('ForemanRhCloud selectors', () =>
22
+ testSelectorsSnapshotWithFixtures(fixtures));
@@ -0,0 +1,20 @@
1
+ import { testSelectorsSnapshotWithFixtures } from '@theforeman/test';
2
+ import {
3
+ rhCloudStateWrapper,
4
+ inventoryStateWrapper,
5
+ insightsStateWrapper,
6
+ } from '../ForemanRhCloudTestHelpers';
7
+
8
+ const fixtures = {
9
+ 'should return rhCloud wrapper': () =>
10
+ rhCloudStateWrapper({ inventoryChild: {} }, { insightsChild: {} }),
11
+
12
+ 'should return inventory wrapper': () =>
13
+ inventoryStateWrapper({ inventoryChild: {} }),
14
+
15
+ 'should return insights wrapper': () =>
16
+ insightsStateWrapper({ insightsChild: {} }),
17
+ };
18
+
19
+ describe('ForemanRhCloud helpers', () =>
20
+ testSelectorsSnapshotWithFixtures(fixtures));
@@ -0,0 +1,3 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`ForemanRhCloud helpers should return foreman Url 1`] = `"MY_TEST_URL_PREFIX.example.com/test_path"`;
@@ -0,0 +1,25 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`ForemanRhCloud selectors should return ForemanInventoryUpload 1`] = `
4
+ Object {
5
+ "inventoryChild": Object {},
6
+ }
7
+ `;
8
+
9
+ exports[`ForemanRhCloud selectors should return ForemanRhCloud 1`] = `
10
+ Object {
11
+ "InsightsCloudSync": Object {
12
+ "insightsChild": Object {},
13
+ },
14
+ "hostInsights": Object {},
15
+ "inventoryUpload": Object {
16
+ "inventoryChild": Object {},
17
+ },
18
+ }
19
+ `;
20
+
21
+ exports[`ForemanRhCloud selectors should return InsightsCloudSync 1`] = `
22
+ Object {
23
+ "insightsChild": Object {},
24
+ }
25
+ `;
@@ -0,0 +1,39 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`ForemanRhCloud helpers should return insights wrapper 1`] = `
4
+ Object {
5
+ "ForemanRhCloud": Object {
6
+ "InsightsCloudSync": Object {
7
+ "insightsChild": Object {},
8
+ },
9
+ "hostInsights": Object {},
10
+ "inventoryUpload": Object {},
11
+ },
12
+ }
13
+ `;
14
+
15
+ exports[`ForemanRhCloud helpers should return inventory wrapper 1`] = `
16
+ Object {
17
+ "ForemanRhCloud": Object {
18
+ "InsightsCloudSync": Object {},
19
+ "hostInsights": Object {},
20
+ "inventoryUpload": Object {
21
+ "inventoryChild": Object {},
22
+ },
23
+ },
24
+ }
25
+ `;
26
+
27
+ exports[`ForemanRhCloud helpers should return rhCloud wrapper 1`] = `
28
+ Object {
29
+ "ForemanRhCloud": Object {
30
+ "InsightsCloudSync": Object {
31
+ "insightsChild": Object {},
32
+ },
33
+ "hostInsights": Object {},
34
+ "inventoryUpload": Object {
35
+ "inventoryChild": Object {},
36
+ },
37
+ },
38
+ }
39
+ `;
@@ -3,8 +3,8 @@
3
3
  /* eslint-disable import/extensions */
4
4
  import componentRegistry from 'foremanReact/components/componentRegistry';
5
5
  import { registerReducer } from 'foremanReact/common/MountingService';
6
- import reducers from './ForemanInventoryUpload/ForemanInventoryUploadReducers';
7
- import ForemanInventoryUpload from './ForemanInventoryUpload';
6
+ import reducers from './ForemanRhCloudReducers';
7
+ import pages from './ForemanRhCloudPages';
8
8
 
9
9
  // register reducers
10
10
  Object.entries(reducers).forEach(([key, reducer]) =>
@@ -12,7 +12,4 @@ Object.entries(reducers).forEach(([key, reducer]) =>
12
12
  );
13
13
 
14
14
  // register components
15
- componentRegistry.register({
16
- name: 'ForemanInventoryUpload',
17
- type: ForemanInventoryUpload,
18
- });
15
+ pages.forEach(page => componentRegistry.register(page));
@@ -0,0 +1,8 @@
1
+ import { subscriptionCountListener } from './ForemanInventoryUpload/SubscriptionsPageExtension/SubscriptionsPageExtensionActions';
2
+
3
+ if (window.location.pathname === '/subscriptions') {
4
+ window.tfm.store.observeStore(
5
+ 'katello.subscriptions.itemCount',
6
+ subscriptionCountListener
7
+ );
8
+ }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_rh_cloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.6
4
+ version: 2.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Foreman Red Hat Cloud team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-22 00:00:00.000000000 Z
11
+ date: 2020-09-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: katello
@@ -105,13 +105,29 @@ files:
105
105
  - README.md
106
106
  - Rakefile
107
107
  - app/controllers/foreman_inventory_upload/accounts_controller.rb
108
- - app/controllers/foreman_inventory_upload/react_controller.rb
109
108
  - app/controllers/foreman_inventory_upload/reports_controller.rb
109
+ - app/controllers/foreman_inventory_upload/tasks_controller.rb
110
110
  - app/controllers/foreman_inventory_upload/uploads_controller.rb
111
+ - app/controllers/foreman_rh_cloud/react_controller.rb
112
+ - app/controllers/insights_cloud/hits_controller.rb
113
+ - app/controllers/insights_cloud/settings_controller.rb
114
+ - app/controllers/insights_cloud/tasks_controller.rb
111
115
  - app/helpers/foreman_inventory_upload_helper.rb
116
+ - app/helpers/foreman_inventory_upload_host_helper.rb
117
+ - app/models/concerns/rh_cloud_host.rb
118
+ - app/models/insights_facet.rb
119
+ - app/models/insights_hit.rb
120
+ - app/models/inventory_sync/inventory_status.rb
112
121
  - app/models/setting/rh_cloud.rb
113
- - app/views/foreman_inventory_upload/layouts/react.html.erb
122
+ - app/overrides/hosts_list.rb
123
+ - app/views/foreman_rh_cloud/react/insights_cloud.html.erb
124
+ - app/views/foreman_rh_cloud/react/inventory_upload.html.erb
125
+ - app/views/hosts/_insights_tab.html.erb
126
+ - app/views/layouts/foreman_rh_cloud/application.html.erb
114
127
  - config/routes.rb
128
+ - db/migrate/20191215104806_create_insights_hits.foreman_inventory_upload.rb
129
+ - db/migrate/20191216062008_create_insights_facets.foreman_inventory_upload.rb
130
+ - db/migrate/20200727111529_add_uuid_column_to_insights_facets.foreman_rh_cloud.rb
115
131
  - lib/foreman_inventory_upload.rb
116
132
  - lib/foreman_inventory_upload/async/async_helpers.rb
117
133
  - lib/foreman_inventory_upload/async/generate_all_reports_job.rb
@@ -126,28 +142,40 @@ files:
126
142
  - lib/foreman_inventory_upload/generators/metadata.rb
127
143
  - lib/foreman_inventory_upload/generators/queries.rb
128
144
  - lib/foreman_inventory_upload/generators/slice.rb
145
+ - lib/foreman_inventory_upload/notifications/manifest_import_success_notification_override.rb
129
146
  - lib/foreman_inventory_upload/scripts/uploader.sh.erb
130
147
  - lib/foreman_rh_cloud.rb
131
148
  - lib/foreman_rh_cloud/engine.rb
132
149
  - lib/foreman_rh_cloud/version.rb
150
+ - lib/insights_cloud.rb
151
+ - lib/insights_cloud/async/insights_full_sync.rb
152
+ - lib/insights_cloud/async/insights_scheduled_sync.rb
153
+ - lib/inventory_sync/async/host_result.rb
154
+ - lib/inventory_sync/async/inventory_full_sync.rb
133
155
  - lib/tasks/foreman_rh_cloud_tasks.rake
134
- - lib/tasks/generator.rake
156
+ - lib/tasks/insights.rake
157
+ - lib/tasks/rh_cloud_inventory.rake
135
158
  - locale/Makefile
136
159
  - locale/en/foreman_rh_cloud.po
137
160
  - locale/foreman_rh_cloud.pot
138
161
  - locale/gemspec.rb
139
162
  - package.json
140
163
  - test/controllers/accounts_controller_test.rb
164
+ - test/controllers/insights_sync/settings_controller_test.rb
141
165
  - test/controllers/reports_controller_test.rb
142
166
  - test/controllers/uploads_controller_test.rb
167
+ - test/factories/insights_factories.rb
143
168
  - test/factories/inventory_upload_factories.rb
169
+ - test/jobs/insights_full_sync_test.rb
170
+ - test/jobs/inventory_full_sync_test.rb
171
+ - test/jobs/upload_report_job_test.rb
144
172
  - test/test_plugin_helper.rb
145
173
  - test/unit/archived_report_generator_test.rb
146
174
  - test/unit/fact_helpers_test.rb
175
+ - test/unit/insights_facet_test.rb
147
176
  - test/unit/metadata_generator_test.rb
148
177
  - test/unit/shell_process_job_test.rb
149
178
  - test/unit/slice_generator_test.rb
150
- - test/unit/slice_generator_test.rb.orig
151
179
  - webpack/ForemanInventoryUpload/Components/AccountList/AccountList.fixtures.js
152
180
  - webpack/ForemanInventoryUpload/Components/AccountList/AccountList.js
153
181
  - webpack/ForemanInventoryUpload/Components/AccountList/AccountList.stories.js
@@ -156,6 +184,11 @@ files:
156
184
  - webpack/ForemanInventoryUpload/Components/AccountList/AccountListHelper.js
157
185
  - webpack/ForemanInventoryUpload/Components/AccountList/AccountListReducer.js
158
186
  - webpack/ForemanInventoryUpload/Components/AccountList/AccountListSelectors.js
187
+ - webpack/ForemanInventoryUpload/Components/AccountList/Components/EmptyResults/EmptyResults.js
188
+ - webpack/ForemanInventoryUpload/Components/AccountList/Components/EmptyResults/__tests__/EmptyResults.test.js
189
+ - webpack/ForemanInventoryUpload/Components/AccountList/Components/EmptyResults/__tests__/__snapshots__/EmptyResults.test.js.snap
190
+ - webpack/ForemanInventoryUpload/Components/AccountList/Components/EmptyResults/emptyResults.scss
191
+ - webpack/ForemanInventoryUpload/Components/AccountList/Components/EmptyResults/index.js
159
192
  - webpack/ForemanInventoryUpload/Components/AccountList/Components/EmptyState/EmptyState.fixtures.js
160
193
  - webpack/ForemanInventoryUpload/Components/AccountList/Components/EmptyState/EmptyState.js
161
194
  - webpack/ForemanInventoryUpload/Components/AccountList/Components/EmptyState/EmptyStateHelper.js
@@ -186,6 +219,7 @@ files:
186
219
  - webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/listItemStatus.scss
187
220
  - webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountList.test.js
188
221
  - webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListActions.test.js
222
+ - webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListHelper.test.js
189
223
  - webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListIntegration.test.js
190
224
  - webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListReducer.test.js
191
225
  - webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListSelectors.test.js
@@ -238,6 +272,41 @@ files:
238
272
  - webpack/ForemanInventoryUpload/Components/FullScreenModal/__tests__/__snapshots__/FullScreenModal.test.js.snap
239
273
  - webpack/ForemanInventoryUpload/Components/FullScreenModal/fullScreenModal.scss
240
274
  - webpack/ForemanInventoryUpload/Components/FullScreenModal/index.js
275
+ - webpack/ForemanInventoryUpload/Components/HostObfuscationSwitcher/HostObfuscationSwitcher.fixtures.js
276
+ - webpack/ForemanInventoryUpload/Components/HostObfuscationSwitcher/HostObfuscationSwitcher.js
277
+ - webpack/ForemanInventoryUpload/Components/HostObfuscationSwitcher/HostObfuscationSwitcherActions.js
278
+ - webpack/ForemanInventoryUpload/Components/HostObfuscationSwitcher/HostObfuscationSwitcherConstants.js
279
+ - webpack/ForemanInventoryUpload/Components/HostObfuscationSwitcher/__tests__/HostObfuscationSwitcher.test.js
280
+ - webpack/ForemanInventoryUpload/Components/HostObfuscationSwitcher/__tests__/HostObfuscationSwitcherActions.test.js
281
+ - webpack/ForemanInventoryUpload/Components/HostObfuscationSwitcher/__tests__/__snapshots__/HostObfuscationSwitcher.test.js.snap
282
+ - webpack/ForemanInventoryUpload/Components/HostObfuscationSwitcher/__tests__/__snapshots__/HostObfuscationSwitcherActions.test.js.snap
283
+ - webpack/ForemanInventoryUpload/Components/HostObfuscationSwitcher/hostObfuscationSwitcher.scss
284
+ - webpack/ForemanInventoryUpload/Components/HostObfuscationSwitcher/index.js
285
+ - webpack/ForemanInventoryUpload/Components/InventoryFilter/Components/ClearButton/ClearButton.js
286
+ - webpack/ForemanInventoryUpload/Components/InventoryFilter/Components/ClearButton/index.js
287
+ - webpack/ForemanInventoryUpload/Components/InventoryFilter/InventoryFilter.fixtures.js
288
+ - webpack/ForemanInventoryUpload/Components/InventoryFilter/InventoryFilter.js
289
+ - webpack/ForemanInventoryUpload/Components/InventoryFilter/InventoryFilterActions.js
290
+ - webpack/ForemanInventoryUpload/Components/InventoryFilter/InventoryFilterConstants.js
291
+ - webpack/ForemanInventoryUpload/Components/InventoryFilter/InventoryFilterReducer.js
292
+ - webpack/ForemanInventoryUpload/Components/InventoryFilter/InventoryFilterSelectors.js
293
+ - webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/InventoryFilter.test.js
294
+ - webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/InventoryFilterActions.test.js
295
+ - webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/InventoryFilterReducer.test.js
296
+ - webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/InventoryFilterSelectors.test.js
297
+ - webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/__snapshots__/InventoryFilter.test.js.snap
298
+ - webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/__snapshots__/InventoryFilterActions.test.js.snap
299
+ - webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/__snapshots__/InventoryFilterReducer.test.js.snap
300
+ - webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/__snapshots__/InventoryFilterSelectors.test.js.snap
301
+ - webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/__snapshots__/integration.test.js.snap
302
+ - webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/integration.test.js
303
+ - webpack/ForemanInventoryUpload/Components/InventoryFilter/index.js
304
+ - webpack/ForemanInventoryUpload/Components/InventoryFilter/inventoryFilter.scss
305
+ - webpack/ForemanInventoryUpload/Components/InventorySettings/InventorySettings.js
306
+ - webpack/ForemanInventoryUpload/Components/InventorySettings/__tests__/InventorySettings.test.js
307
+ - webpack/ForemanInventoryUpload/Components/InventorySettings/__tests__/__snapshots__/InventorySettings.test.js.snap
308
+ - webpack/ForemanInventoryUpload/Components/InventorySettings/index.js
309
+ - webpack/ForemanInventoryUpload/Components/InventorySettings/inventorySettings.scss
241
310
  - webpack/ForemanInventoryUpload/Components/NavContainer/NavContainer.fixtures.js
242
311
  - webpack/ForemanInventoryUpload/Components/NavContainer/NavContainer.js
243
312
  - webpack/ForemanInventoryUpload/Components/NavContainer/NavContainerHelper.js
@@ -248,7 +317,43 @@ files:
248
317
  - webpack/ForemanInventoryUpload/Components/PageHeader/PageHeader.js
249
318
  - webpack/ForemanInventoryUpload/Components/PageHeader/__tests__/PageHeader.test.js
250
319
  - webpack/ForemanInventoryUpload/Components/PageHeader/__tests__/__snapshots__/PageHeader.test.js.snap
320
+ - webpack/ForemanInventoryUpload/Components/PageHeader/components/DocsButton/DocsButton.js
321
+ - webpack/ForemanInventoryUpload/Components/PageHeader/components/DocsButton/__tests__/DocsButton.test.js
322
+ - webpack/ForemanInventoryUpload/Components/PageHeader/components/DocsButton/__tests__/__snapshots__/DocsButton.test.js.snap
323
+ - webpack/ForemanInventoryUpload/Components/PageHeader/components/DocsButton/index.js
324
+ - webpack/ForemanInventoryUpload/Components/PageHeader/components/HistoryButton/HistoryButton.js
325
+ - webpack/ForemanInventoryUpload/Components/PageHeader/components/HistoryButton/__tests__/HistoryButton.test.js
326
+ - webpack/ForemanInventoryUpload/Components/PageHeader/components/HistoryButton/__tests__/__snapshots__/HistoryButton.test.js.snap
327
+ - webpack/ForemanInventoryUpload/Components/PageHeader/components/HistoryButton/index.js
328
+ - webpack/ForemanInventoryUpload/Components/PageHeader/components/PageDescription/PageDescription.js
329
+ - webpack/ForemanInventoryUpload/Components/PageHeader/components/PageDescription/__tests__/PageDescription.test.js
330
+ - webpack/ForemanInventoryUpload/Components/PageHeader/components/PageDescription/__tests__/__snapshots__/PageDescription.test.js.snap
331
+ - webpack/ForemanInventoryUpload/Components/PageHeader/components/PageDescription/index.js
332
+ - webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/SyncButton.js
333
+ - webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/SyncButtonActions.js
334
+ - webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/SyncButtonConstants.js
335
+ - webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/SyncButtonReducer.js
336
+ - webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/SyncButtonSelectors.js
337
+ - webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/__tests__/SyncButton.test.js
338
+ - webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/__tests__/SyncButtonActions.test.js
339
+ - webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/__tests__/SyncButtonFixtures.js
340
+ - webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/__tests__/SyncButtonReducer.test.js
341
+ - webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/__tests__/SyncButtonSelectors.test.js
342
+ - webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/__tests__/__snapshots__/SyncButton.test.js.snap
343
+ - webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/__tests__/__snapshots__/SyncButtonActions.test.js.snap
344
+ - webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/__tests__/__snapshots__/SyncButtonReducer.test.js.snap
345
+ - webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/__tests__/__snapshots__/SyncButtonSelectors.test.js.snap
346
+ - webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/components/Modal.js
347
+ - webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/components/Toast.js
348
+ - webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/components/modal.scss
349
+ - webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/index.js
350
+ - webpack/ForemanInventoryUpload/Components/PageHeader/components/ToolbarButtons/ToolbarButtons.js
351
+ - webpack/ForemanInventoryUpload/Components/PageHeader/components/ToolbarButtons/__tests__/ToolbarButtons.test.js
352
+ - webpack/ForemanInventoryUpload/Components/PageHeader/components/ToolbarButtons/__tests__/__snapshots__/ToolbarButtons.test.js.snap
353
+ - webpack/ForemanInventoryUpload/Components/PageHeader/components/ToolbarButtons/index.js
354
+ - webpack/ForemanInventoryUpload/Components/PageHeader/components/ToolbarButtons/toolbarButtons.scss
251
355
  - webpack/ForemanInventoryUpload/Components/PageHeader/index.js
356
+ - webpack/ForemanInventoryUpload/Components/PageHeader/pageHeader.scss
252
357
  - webpack/ForemanInventoryUpload/Components/ReportGenerate/ReportGenerate.fixtures.js
253
358
  - webpack/ForemanInventoryUpload/Components/ReportGenerate/ReportGenerate.js
254
359
  - webpack/ForemanInventoryUpload/Components/ReportGenerate/ReportGenerateHelper.js
@@ -312,16 +417,85 @@ files:
312
417
  - webpack/ForemanInventoryUpload/Components/Terminal/__tests__/__snapshots__/Terminal.test.js.snap
313
418
  - webpack/ForemanInventoryUpload/Components/Terminal/index.js
314
419
  - webpack/ForemanInventoryUpload/Components/Terminal/terminal.scss
420
+ - webpack/ForemanInventoryUpload/ForemanInventoryConstants.js
421
+ - webpack/ForemanInventoryUpload/ForemanInventoryHelpers.js
315
422
  - webpack/ForemanInventoryUpload/ForemanInventoryUpload.js
316
- - webpack/ForemanInventoryUpload/ForemanInventoryUpload.test.js
317
423
  - webpack/ForemanInventoryUpload/ForemanInventoryUploadReducers.js
318
- - webpack/ForemanInventoryUpload/ForemanInventoryUploadSelectors.js
319
- - webpack/ForemanInventoryUpload/__snapshots__/ForemanInventoryUpload.test.js.snap
424
+ - webpack/ForemanInventoryUpload/SubscriptionsPageExtension/SubscriptionsPageExtensionActions.js
425
+ - webpack/ForemanInventoryUpload/__tests__/ForemanInventoryHelpers.test.js
426
+ - webpack/ForemanInventoryUpload/__tests__/ForemanInventoryUpload.test.js
427
+ - webpack/ForemanInventoryUpload/__tests__/__snapshots__/ForemanInventoryHelpers.test.js.snap
428
+ - webpack/ForemanInventoryUpload/__tests__/__snapshots__/ForemanInventoryUpload.test.js.snap
320
429
  - webpack/ForemanInventoryUpload/index.js
430
+ - webpack/ForemanRhCloudHelpers.js
431
+ - webpack/ForemanRhCloudPages.js
432
+ - webpack/ForemanRhCloudReducers.js
433
+ - webpack/ForemanRhCloudSelectors.js
434
+ - webpack/ForemanRhCloudTestHelpers.js
435
+ - webpack/InsightsCloudSync/Components/InsightsSettings/InsightsSettings.js
436
+ - webpack/InsightsCloudSync/Components/InsightsSettings/InsightsSettingsActions.js
437
+ - webpack/InsightsCloudSync/Components/InsightsSettings/InsightsSettingsConstants.js
438
+ - webpack/InsightsCloudSync/Components/InsightsSettings/InsightsSettingsReducer.js
439
+ - webpack/InsightsCloudSync/Components/InsightsSettings/InsightsSettingsSelectors.js
440
+ - webpack/InsightsCloudSync/Components/InsightsSettings/__tests__/InsightsSettings.test.js
441
+ - webpack/InsightsCloudSync/Components/InsightsSettings/__tests__/InsightsSettingsActions.test.js
442
+ - webpack/InsightsCloudSync/Components/InsightsSettings/__tests__/InsightsSettingsReducer.test.js
443
+ - webpack/InsightsCloudSync/Components/InsightsSettings/__tests__/InsightsSettingsSelectors.test.js
444
+ - webpack/InsightsCloudSync/Components/InsightsSettings/__tests__/__snapshots__/InsightsSettings.test.js.snap
445
+ - webpack/InsightsCloudSync/Components/InsightsSettings/__tests__/__snapshots__/InsightsSettingsActions.test.js.snap
446
+ - webpack/InsightsCloudSync/Components/InsightsSettings/__tests__/__snapshots__/InsightsSettingsReducer.test.js.snap
447
+ - webpack/InsightsCloudSync/Components/InsightsSettings/__tests__/__snapshots__/InsightsSettingsSelectors.test.js.snap
448
+ - webpack/InsightsCloudSync/Components/InsightsSettings/index.js
449
+ - webpack/InsightsCloudSync/Components/InsightsSettings/insightsSettings.scss
450
+ - webpack/InsightsCloudSync/Components/InsightsSyncSwitcher/InsightsSyncSwitcher.fixtures.js
451
+ - webpack/InsightsCloudSync/Components/InsightsSyncSwitcher/InsightsSyncSwitcher.js
452
+ - webpack/InsightsCloudSync/Components/InsightsSyncSwitcher/__tests__/InsightsSyncSwitcher.test.js
453
+ - webpack/InsightsCloudSync/Components/InsightsSyncSwitcher/__tests__/__snapshots__/InsightsSyncSwitcher.test.js.snap
454
+ - webpack/InsightsCloudSync/Components/InsightsSyncSwitcher/index.js
455
+ - webpack/InsightsCloudSync/Components/InsightsSyncSwitcher/insightsSyncSwitcher.scss
456
+ - webpack/InsightsCloudSync/InsightsCloudSync.js
457
+ - webpack/InsightsCloudSync/InsightsCloudSync.test.js
458
+ - webpack/InsightsCloudSync/InsightsCloudSyncActions.js
459
+ - webpack/InsightsCloudSync/InsightsCloudSyncConstants.js
460
+ - webpack/InsightsCloudSync/InsightsCloudSyncHelpers.js
461
+ - webpack/InsightsCloudSync/InsightsCloudSyncReducers.js
462
+ - webpack/InsightsCloudSync/__snapshots__/InsightsCloudSync.test.js.snap
463
+ - webpack/InsightsCloudSync/__tests__/InsightsCloudSyncHelpers.test.js
464
+ - webpack/InsightsCloudSync/__tests__/__snapshots__/InsightsCloudSyncHelpers.test.js.snap
465
+ - webpack/InsightsCloudSync/index.js
466
+ - webpack/InsightsHostDetailsTab/InsightsTab.js
467
+ - webpack/InsightsHostDetailsTab/InsightsTab.scss
468
+ - webpack/InsightsHostDetailsTab/InsightsTabActions.js
469
+ - webpack/InsightsHostDetailsTab/InsightsTabConstants.js
470
+ - webpack/InsightsHostDetailsTab/InsightsTabReducer.js
471
+ - webpack/InsightsHostDetailsTab/InsightsTabSelectors.js
472
+ - webpack/InsightsHostDetailsTab/__tests__/InsightsTab.fixtures.js
473
+ - webpack/InsightsHostDetailsTab/__tests__/InsightsTab.test.js
474
+ - webpack/InsightsHostDetailsTab/__tests__/InsightsTabActions.test.js
475
+ - webpack/InsightsHostDetailsTab/__tests__/InsightsTabIntegration.test.js
476
+ - webpack/InsightsHostDetailsTab/__tests__/InsightsTabReducer.test.js
477
+ - webpack/InsightsHostDetailsTab/__tests__/InsightsTabSelectors.test.js
478
+ - webpack/InsightsHostDetailsTab/__tests__/__snapshots__/InsightsTab.test.js.snap
479
+ - webpack/InsightsHostDetailsTab/__tests__/__snapshots__/InsightsTabActions.test.js.snap
480
+ - webpack/InsightsHostDetailsTab/__tests__/__snapshots__/InsightsTabReducer.test.js.snap
481
+ - webpack/InsightsHostDetailsTab/__tests__/__snapshots__/InsightsTabSelectors.test.js.snap
482
+ - webpack/InsightsHostDetailsTab/components/ListItem/ListItem.js
483
+ - webpack/InsightsHostDetailsTab/components/ListItem/index.js
484
+ - webpack/InsightsHostDetailsTab/index.js
321
485
  - webpack/__mocks__/foremanReact/API.js
322
486
  - webpack/__mocks__/foremanReact/common/I18n.js
323
487
  - webpack/__mocks__/foremanReact/common/helpers.js
488
+ - webpack/__mocks__/foremanReact/components/Layout/LayoutConstants.js
489
+ - webpack/__mocks__/foremanReact/constants.js
490
+ - webpack/__mocks__/foremanReact/redux/actions/toasts.js
491
+ - webpack/__tests__/ForemanRhCloudHelpers.test.js
492
+ - webpack/__tests__/ForemanRhCloudSelectors.test.js
493
+ - webpack/__tests__/ForemanRhCloudTestHelpers.test.js
494
+ - webpack/__tests__/__snapshots__/ForemanRhCloudHelpers.test.js.snap
495
+ - webpack/__tests__/__snapshots__/ForemanRhCloudSelectors.test.js.snap
496
+ - webpack/__tests__/__snapshots__/ForemanRhCloudTestHelpers.test.js.snap
324
497
  - webpack/index.js
498
+ - webpack/subscriptions_extension_index.js
325
499
  homepage: https://github.com/theforeman/foreman_rh_cloud
326
500
  licenses:
327
501
  - GPL-3.0
@@ -341,19 +515,24 @@ required_rubygems_version: !ruby/object:Gem::Requirement
341
515
  - !ruby/object:Gem::Version
342
516
  version: '0'
343
517
  requirements: []
344
- rubygems_version: 3.0.6
518
+ rubygems_version: 3.0.8
345
519
  signing_key:
346
520
  specification_version: 4
347
521
  summary: Summary of ForemanRhCloud.
348
522
  test_files:
349
- - test/controllers/uploads_controller_test.rb
350
- - test/controllers/accounts_controller_test.rb
351
- - test/controllers/reports_controller_test.rb
352
523
  - test/test_plugin_helper.rb
353
524
  - test/factories/inventory_upload_factories.rb
354
- - test/unit/shell_process_job_test.rb
525
+ - test/factories/insights_factories.rb
526
+ - test/controllers/reports_controller_test.rb
527
+ - test/controllers/uploads_controller_test.rb
528
+ - test/controllers/accounts_controller_test.rb
529
+ - test/controllers/insights_sync/settings_controller_test.rb
530
+ - test/unit/slice_generator_test.rb
355
531
  - test/unit/metadata_generator_test.rb
356
- - test/unit/slice_generator_test.rb.orig
357
- - test/unit/fact_helpers_test.rb
532
+ - test/unit/shell_process_job_test.rb
533
+ - test/unit/insights_facet_test.rb
358
534
  - test/unit/archived_report_generator_test.rb
359
- - test/unit/slice_generator_test.rb
535
+ - test/unit/fact_helpers_test.rb
536
+ - test/jobs/inventory_full_sync_test.rb
537
+ - test/jobs/insights_full_sync_test.rb
538
+ - test/jobs/upload_report_job_test.rb