foreman_rh_cloud 2.0.16 → 3.0.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +0 -13
  3. data/app/helpers/foreman_inventory_upload_host_helper.rb +1 -8
  4. data/app/models/setting/rh_cloud.rb +5 -5
  5. data/lib/foreman_inventory_upload.rb +1 -1
  6. data/lib/foreman_inventory_upload/generators/archived_report.rb +1 -1
  7. data/lib/foreman_rh_cloud/engine.rb +4 -2
  8. data/lib/foreman_rh_cloud/version.rb +1 -1
  9. data/lib/tasks/rh_cloud_inventory.rake +0 -23
  10. data/package.json +1 -1
  11. data/webpack/ForemanInventoryUpload/Components/AutoUploadSwitcher/AutoUploadSwitcher.js +1 -1
  12. data/webpack/ForemanInventoryUpload/Components/AutoUploadSwitcher/__tests__/__snapshots__/AutoUploadSwitcher.test.js.snap +1 -1
  13. data/webpack/ForemanInventoryUpload/SubscriptionsPageExtension/InventoryAutoUpload/InventoryAutoUpload.js +92 -0
  14. data/webpack/ForemanInventoryUpload/SubscriptionsPageExtension/InventoryAutoUpload/__tests__/InventoryAutoUpload.test.js +17 -0
  15. data/webpack/ForemanInventoryUpload/SubscriptionsPageExtension/InventoryAutoUpload/__tests__/__snapshots__/InventoryAutoUpload.test.js.snap +106 -0
  16. data/webpack/ForemanInventoryUpload/SubscriptionsPageExtension/InventoryAutoUpload/components/AdvancedSettings/AdvancedSettings.js +60 -0
  17. data/webpack/ForemanInventoryUpload/SubscriptionsPageExtension/InventoryAutoUpload/components/AdvancedSettings/index.js +28 -0
  18. data/webpack/ForemanInventoryUpload/SubscriptionsPageExtension/InventoryAutoUpload/index.js +22 -0
  19. data/webpack/ForemanRhCloudFills.js +23 -0
  20. data/webpack/ForemanRhCloudPages.js +6 -1
  21. data/webpack/ForemanRhCloudReducers.js +10 -1
  22. data/webpack/InsightsHostDetailsTab/InsightsTab.js +5 -7
  23. data/webpack/InsightsHostDetailsTab/__tests__/InsightsTab.fixtures.js +12 -14
  24. data/webpack/InsightsHostDetailsTab/__tests__/__snapshots__/InsightsTabActions.test.js.snap +10 -12
  25. data/webpack/InsightsHostDetailsTab/__tests__/__snapshots__/InsightsTabReducer.test.js.snap +10 -12
  26. data/webpack/InsightsHostDetailsTab/__tests__/__snapshots__/InsightsTabSelectors.test.js.snap +10 -12
  27. data/webpack/__mocks__/foremanReact/common/MountingService.js +1 -0
  28. data/webpack/common/Switcher/index.js +79 -0
  29. data/webpack/global_index.js +5 -0
  30. data/webpack/index.js +4 -14
  31. metadata +25 -20
  32. data/config/Gemfile.lock.gh_test +0 -815
  33. data/config/database.yml.example +0 -17
  34. data/config/package-lock.json.gh_test +0 -36317
  35. data/webpack/ForemanInventoryUpload/SubscriptionsPageExtension/SubscriptionsPageExtensionActions.js +0 -34
  36. data/webpack/subscriptions_extension_index.js +0 -8
@@ -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
- }