foreman_rh_cloud 2.0.18.1 → 3.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +0 -13
  3. data/app/controllers/foreman_inventory_upload/accounts_controller.rb +2 -2
  4. data/app/controllers/foreman_inventory_upload/uploads_controller.rb +8 -1
  5. data/app/helpers/foreman_inventory_upload_host_helper.rb +1 -8
  6. data/app/models/setting/rh_cloud.rb +5 -5
  7. data/lib/foreman_inventory_upload.rb +2 -3
  8. data/lib/foreman_inventory_upload/generators/archived_report.rb +1 -1
  9. data/lib/foreman_inventory_upload/generators/json_stream.rb +1 -1
  10. data/lib/foreman_inventory_upload/generators/slice.rb +3 -3
  11. data/lib/foreman_rh_cloud/engine.rb +4 -2
  12. data/lib/foreman_rh_cloud/version.rb +1 -1
  13. data/lib/tasks/rh_cloud_inventory.rake +0 -23
  14. data/package.json +1 -1
  15. data/test/controllers/accounts_controller_test.rb +1 -1
  16. data/test/unit/slice_generator_test.rb +4 -30
  17. data/webpack/ForemanInventoryUpload/Components/AccountList/AccountList.fixtures.js +3 -3
  18. data/webpack/ForemanInventoryUpload/Components/AccountList/AccountList.js +7 -7
  19. data/webpack/ForemanInventoryUpload/Components/AccountList/AccountListHelper.js +6 -6
  20. data/webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/ListItem.fixtures.js +1 -10
  21. data/webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/ListItem.js +7 -7
  22. data/webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/__tests__/__snapshots__/ListItem.test.js.snap +8 -11
  23. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListHelper.test.js +3 -3
  24. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/__snapshots__/AccountList.test.js.snap +6 -6
  25. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/__snapshots__/AccountListActions.test.js.snap +3 -3
  26. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/__snapshots__/AccountListReducer.test.js.snap +3 -3
  27. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/__snapshots__/AccountListSelectors.test.js.snap +6 -6
  28. data/webpack/ForemanInventoryUpload/Components/AutoUploadSwitcher/AutoUploadSwitcher.js +1 -1
  29. data/webpack/ForemanInventoryUpload/Components/AutoUploadSwitcher/__tests__/__snapshots__/AutoUploadSwitcher.test.js.snap +1 -1
  30. data/webpack/ForemanInventoryUpload/Components/Dashboard/DashboardActions.js +1 -1
  31. data/webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardActions.test.js +4 -4
  32. data/webpack/ForemanInventoryUpload/SubscriptionsPageExtension/InventoryAutoUpload/InventoryAutoUpload.js +92 -0
  33. data/webpack/ForemanInventoryUpload/SubscriptionsPageExtension/InventoryAutoUpload/__tests__/InventoryAutoUpload.test.js +17 -0
  34. data/webpack/ForemanInventoryUpload/SubscriptionsPageExtension/InventoryAutoUpload/__tests__/__snapshots__/InventoryAutoUpload.test.js.snap +106 -0
  35. data/webpack/ForemanInventoryUpload/SubscriptionsPageExtension/InventoryAutoUpload/components/AdvancedSettings/AdvancedSettings.js +60 -0
  36. data/webpack/ForemanInventoryUpload/SubscriptionsPageExtension/InventoryAutoUpload/components/AdvancedSettings/index.js +28 -0
  37. data/webpack/ForemanInventoryUpload/SubscriptionsPageExtension/InventoryAutoUpload/index.js +22 -0
  38. data/webpack/ForemanRhCloudFills.js +23 -0
  39. data/webpack/ForemanRhCloudPages.js +6 -1
  40. data/webpack/ForemanRhCloudReducers.js +10 -1
  41. data/webpack/InsightsHostDetailsTab/InsightsTab.js +5 -7
  42. data/webpack/InsightsHostDetailsTab/__tests__/InsightsTab.fixtures.js +12 -14
  43. data/webpack/InsightsHostDetailsTab/__tests__/__snapshots__/InsightsTabActions.test.js.snap +10 -12
  44. data/webpack/InsightsHostDetailsTab/__tests__/__snapshots__/InsightsTabReducer.test.js.snap +10 -12
  45. data/webpack/InsightsHostDetailsTab/__tests__/__snapshots__/InsightsTabSelectors.test.js.snap +10 -12
  46. data/webpack/__mocks__/foremanReact/common/MountingService.js +1 -0
  47. data/webpack/common/Switcher/index.js +79 -0
  48. data/webpack/global_index.js +5 -0
  49. data/webpack/index.js +4 -14
  50. metadata +25 -21
  51. data/config/Gemfile.lock.gh_test +0 -817
  52. data/config/database.yml.example +0 -17
  53. data/config/package-lock.json.gh_test +0 -36317
  54. data/db/migrate/20210307000001_add_unique_to_insights_facet.foreman_rh_cloud.rb +0 -11
  55. data/webpack/ForemanInventoryUpload/SubscriptionsPageExtension/SubscriptionsPageExtensionActions.js +0 -34
  56. data/webpack/subscriptions_extension_index.js +0 -8
@@ -1,11 +0,0 @@
1
- class AddUniqueToInsightsFacet < ActiveRecord::Migration[5.2]
2
- def change
3
- # Remove duplicate records
4
- InsightsFacet.where.not(id: InsightsFacet.select('max(id)').group(:host_id)).delete_all
5
-
6
- # remove old index
7
- remove_index :insights_facets, [:host_id]
8
- # add unique constraint
9
- add_index :insights_facets, [:host_id], unique: true
10
- end
11
- end
@@ -1,34 +0,0 @@
1
- import API from 'foremanReact/API';
2
- import { translate as __ } from 'foremanReact/common/I18n';
3
- import { foremanUrl } from '../../ForemanRhCloudHelpers';
4
- import { inventoryUrl } from '../ForemanInventoryHelpers';
5
-
6
- export const subscriptionCountListener = (itemsCount, unsubscribe) => {
7
- const showToast = autoUploadEnabled => {
8
- !autoUploadEnabled &&
9
- window.tfm.toastNotifications.notify({
10
- message: __('Now you can enable Red Hat inventory upload'),
11
- type: 'info',
12
- link: {
13
- children: __('Go to inventory upload settings'),
14
- href: foremanUrl('foreman_rh_cloud/inventory_upload'),
15
- },
16
- });
17
-
18
- unsubscribe();
19
- };
20
-
21
- itemsCount && fetchInventoryAutoUploadSetting(showToast);
22
- };
23
-
24
- const fetchInventoryAutoUploadSetting = async processApiResponse => {
25
- let settingValue;
26
- try {
27
- const {
28
- data: { autoUploadEnabled },
29
- } = await API.get(inventoryUrl('auto_upload'));
30
- settingValue = autoUploadEnabled;
31
- } finally {
32
- processApiResponse(settingValue);
33
- }
34
- };
@@ -1,8 +0,0 @@
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
- }