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.
- checksums.yaml +4 -4
- data/README.md +0 -13
- data/app/controllers/foreman_inventory_upload/accounts_controller.rb +2 -2
- data/app/controllers/foreman_inventory_upload/uploads_controller.rb +8 -1
- data/app/helpers/foreman_inventory_upload_host_helper.rb +1 -8
- data/app/models/setting/rh_cloud.rb +5 -5
- data/lib/foreman_inventory_upload.rb +2 -3
- data/lib/foreman_inventory_upload/generators/archived_report.rb +1 -1
- data/lib/foreman_inventory_upload/generators/json_stream.rb +1 -1
- data/lib/foreman_inventory_upload/generators/slice.rb +3 -3
- data/lib/foreman_rh_cloud/engine.rb +4 -2
- data/lib/foreman_rh_cloud/version.rb +1 -1
- data/lib/tasks/rh_cloud_inventory.rake +0 -23
- data/package.json +1 -1
- data/test/controllers/accounts_controller_test.rb +1 -1
- data/test/unit/slice_generator_test.rb +4 -30
- data/webpack/ForemanInventoryUpload/Components/AccountList/AccountList.fixtures.js +3 -3
- data/webpack/ForemanInventoryUpload/Components/AccountList/AccountList.js +7 -7
- data/webpack/ForemanInventoryUpload/Components/AccountList/AccountListHelper.js +6 -6
- data/webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/ListItem.fixtures.js +1 -10
- data/webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/ListItem.js +7 -7
- data/webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/__tests__/__snapshots__/ListItem.test.js.snap +8 -11
- data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListHelper.test.js +3 -3
- data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/__snapshots__/AccountList.test.js.snap +6 -6
- data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/__snapshots__/AccountListActions.test.js.snap +3 -3
- data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/__snapshots__/AccountListReducer.test.js.snap +3 -3
- data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/__snapshots__/AccountListSelectors.test.js.snap +6 -6
- data/webpack/ForemanInventoryUpload/Components/AutoUploadSwitcher/AutoUploadSwitcher.js +1 -1
- data/webpack/ForemanInventoryUpload/Components/AutoUploadSwitcher/__tests__/__snapshots__/AutoUploadSwitcher.test.js.snap +1 -1
- data/webpack/ForemanInventoryUpload/Components/Dashboard/DashboardActions.js +1 -1
- data/webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardActions.test.js +4 -4
- data/webpack/ForemanInventoryUpload/SubscriptionsPageExtension/InventoryAutoUpload/InventoryAutoUpload.js +92 -0
- data/webpack/ForemanInventoryUpload/SubscriptionsPageExtension/InventoryAutoUpload/__tests__/InventoryAutoUpload.test.js +17 -0
- data/webpack/ForemanInventoryUpload/SubscriptionsPageExtension/InventoryAutoUpload/__tests__/__snapshots__/InventoryAutoUpload.test.js.snap +106 -0
- data/webpack/ForemanInventoryUpload/SubscriptionsPageExtension/InventoryAutoUpload/components/AdvancedSettings/AdvancedSettings.js +60 -0
- data/webpack/ForemanInventoryUpload/SubscriptionsPageExtension/InventoryAutoUpload/components/AdvancedSettings/index.js +28 -0
- data/webpack/ForemanInventoryUpload/SubscriptionsPageExtension/InventoryAutoUpload/index.js +22 -0
- data/webpack/ForemanRhCloudFills.js +23 -0
- data/webpack/ForemanRhCloudPages.js +6 -1
- data/webpack/ForemanRhCloudReducers.js +10 -1
- data/webpack/InsightsHostDetailsTab/InsightsTab.js +5 -7
- data/webpack/InsightsHostDetailsTab/__tests__/InsightsTab.fixtures.js +12 -14
- data/webpack/InsightsHostDetailsTab/__tests__/__snapshots__/InsightsTabActions.test.js.snap +10 -12
- data/webpack/InsightsHostDetailsTab/__tests__/__snapshots__/InsightsTabReducer.test.js.snap +10 -12
- data/webpack/InsightsHostDetailsTab/__tests__/__snapshots__/InsightsTabSelectors.test.js.snap +10 -12
- data/webpack/__mocks__/foremanReact/common/MountingService.js +1 -0
- data/webpack/common/Switcher/index.js +79 -0
- data/webpack/global_index.js +5 -0
- data/webpack/index.js +4 -14
- metadata +25 -21
- data/config/Gemfile.lock.gh_test +0 -817
- data/config/database.yml.example +0 -17
- data/config/package-lock.json.gh_test +0 -36317
- data/db/migrate/20210307000001_add_unique_to_insights_facet.foreman_rh_cloud.rb +0 -11
- data/webpack/ForemanInventoryUpload/SubscriptionsPageExtension/SubscriptionsPageExtensionActions.js +0 -34
- 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
|
data/webpack/ForemanInventoryUpload/SubscriptionsPageExtension/SubscriptionsPageExtensionActions.js
DELETED
|
@@ -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
|
-
}
|