foreman_rh_cloud 1.0.4 → 2.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (93) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +8 -0
  3. data/app/controllers/foreman_inventory_upload/accounts_controller.rb +1 -0
  4. data/app/controllers/foreman_inventory_upload/uploads_controller.rb +14 -7
  5. data/app/models/setting/rh_cloud.rb +13 -0
  6. data/config/routes.rb +1 -0
  7. data/lib/foreman_inventory_upload.rb +12 -0
  8. data/lib/foreman_inventory_upload/async/async_helpers.rb +13 -0
  9. data/lib/foreman_inventory_upload/async/generate_all_reports_job.rb +8 -0
  10. data/lib/foreman_inventory_upload/async/shell_process.rb +3 -1
  11. data/lib/foreman_inventory_upload/async/upload_report_job.rb +1 -5
  12. data/lib/foreman_inventory_upload/generators/archived_report.rb +6 -3
  13. data/lib/foreman_inventory_upload/generators/fact_helpers.rb +13 -0
  14. data/lib/foreman_inventory_upload/generators/queries.rb +2 -0
  15. data/lib/foreman_inventory_upload/generators/slice.rb +31 -11
  16. data/lib/foreman_rh_cloud/engine.rb +5 -1
  17. data/lib/foreman_rh_cloud/version.rb +1 -1
  18. data/package.json +20 -100
  19. data/test/controllers/accounts_controller_test.rb +8 -3
  20. data/test/controllers/uploads_controller_test.rb +13 -0
  21. data/test/factories/inventory_upload_factories.rb +13 -13
  22. data/test/unit/archived_report_generator_test.rb +1 -0
  23. data/test/unit/fact_helpers_test.rb +29 -0
  24. data/test/unit/slice_generator_test.rb +112 -15
  25. data/test/unit/slice_generator_test.rb.orig +280 -0
  26. data/webpack/ForemanInventoryUpload/Components/AccountList/AccountList.fixtures.js +2 -0
  27. data/webpack/ForemanInventoryUpload/Components/AccountList/AccountList.stories.js +5 -14
  28. data/webpack/ForemanInventoryUpload/Components/AccountList/AccountListActions.js +2 -1
  29. data/webpack/ForemanInventoryUpload/Components/AccountList/AccountListReducer.js +8 -0
  30. data/webpack/ForemanInventoryUpload/Components/AccountList/AccountListSelectors.js +2 -0
  31. data/webpack/ForemanInventoryUpload/Components/AccountList/Components/EmptyState/__tests__/EmptyState.test.js +1 -1
  32. data/webpack/ForemanInventoryUpload/Components/AccountList/Components/ErrorState/__tests__/ErrorState.test.js +1 -1
  33. data/webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/__tests__/ListItem.test.js +1 -1
  34. data/webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/__tests__/ListItemStatus.test.js +1 -1
  35. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountList.test.js +1 -1
  36. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListActions.test.js +1 -1
  37. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListIntegration.test.js +1 -1
  38. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListReducer.test.js +12 -1
  39. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListSelectors.test.js +10 -2
  40. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/__snapshots__/AccountListReducer.test.js.snap +10 -0
  41. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/__snapshots__/AccountListSelectors.test.js.snap +5 -2
  42. data/webpack/ForemanInventoryUpload/Components/AutoUploadSwitcher/AutoUploadSwitcher.fixtures.js +1 -0
  43. data/webpack/ForemanInventoryUpload/Components/AutoUploadSwitcher/AutoUploadSwitcher.js +32 -0
  44. data/webpack/ForemanInventoryUpload/Components/AutoUploadSwitcher/AutoUploadSwitcherActions.js +27 -0
  45. data/webpack/ForemanInventoryUpload/Components/AutoUploadSwitcher/AutoUploadSwitcherConstants.js +2 -0
  46. data/webpack/ForemanInventoryUpload/Components/AutoUploadSwitcher/__tests__/AutoUploadSwitcher.test.js +14 -0
  47. data/webpack/ForemanInventoryUpload/Components/AutoUploadSwitcher/__tests__/AutoUploadSwitcherActions.test.js +14 -0
  48. data/webpack/ForemanInventoryUpload/Components/AutoUploadSwitcher/__tests__/__snapshots__/AutoUploadSwitcher.test.js.snap +38 -0
  49. data/webpack/ForemanInventoryUpload/Components/AutoUploadSwitcher/__tests__/__snapshots__/AutoUploadSwitcherActions.test.js.snap +14 -0
  50. data/webpack/ForemanInventoryUpload/Components/AutoUploadSwitcher/autoUploadSwitcher.scss +3 -0
  51. data/webpack/ForemanInventoryUpload/Components/AutoUploadSwitcher/index.js +17 -0
  52. data/webpack/ForemanInventoryUpload/Components/Dashboard/Dashboard.fixtures.js +13 -9
  53. data/webpack/ForemanInventoryUpload/Components/Dashboard/Dashboard.stories.js +5 -15
  54. data/webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js +1 -2
  55. data/webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardActions.test.js +15 -2
  56. data/webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardIntegration.test.js +3 -2
  57. data/webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardReducer.test.js +1 -1
  58. data/webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardSelectors.test.js +1 -1
  59. data/webpack/ForemanInventoryUpload/Components/FileDownload/__tests__/FileDownload.test.js +1 -1
  60. data/webpack/ForemanInventoryUpload/Components/FullScreenModal/__tests__/FullScreenModal.test.js +1 -1
  61. data/webpack/ForemanInventoryUpload/Components/NavContainer/NavContainer.fixtures.js +5 -2
  62. data/webpack/ForemanInventoryUpload/Components/NavContainer/__tests__/NavContainer.test.js +1 -2
  63. data/webpack/ForemanInventoryUpload/Components/NavContainer/__tests__/__snapshots__/NavContainer.test.js.snap +1 -1
  64. data/webpack/ForemanInventoryUpload/Components/PageHeader/PageHeader.js +21 -0
  65. data/webpack/ForemanInventoryUpload/Components/PageHeader/__tests__/PageHeader.test.js +13 -0
  66. data/webpack/ForemanInventoryUpload/Components/PageHeader/__tests__/__snapshots__/PageHeader.test.js.snap +33 -0
  67. data/webpack/ForemanInventoryUpload/Components/PageHeader/index.js +1 -0
  68. data/webpack/ForemanInventoryUpload/Components/ReportGenerate/__tests__/ReportGenerate.test.js +1 -1
  69. data/webpack/ForemanInventoryUpload/Components/ReportUpload/__tests__/ReportUpload.test.js +1 -1
  70. data/webpack/ForemanInventoryUpload/Components/ScheduledRun/ScheduledRun.fixtures.js +1 -0
  71. data/webpack/ForemanInventoryUpload/Components/ScheduledRun/ScheduledRun.js +4 -2
  72. data/webpack/ForemanInventoryUpload/Components/ScheduledRun/__tests__/ScheduledRun.test.js +1 -2
  73. data/webpack/ForemanInventoryUpload/Components/ScheduledRun/__tests__/__snapshots__/ScheduledRun.test.js.snap +0 -2
  74. data/webpack/ForemanInventoryUpload/Components/ScheduledRun/index.js +12 -1
  75. data/webpack/ForemanInventoryUpload/Components/StatusChart/__tests__/StatusChart.test.js +1 -1
  76. data/webpack/ForemanInventoryUpload/Components/TabBody/__tests__/TabBody.test.js +1 -1
  77. data/webpack/ForemanInventoryUpload/Components/TabBody/__tests__/__snapshots__/TabBody.test.js.snap +1 -1
  78. data/webpack/ForemanInventoryUpload/Components/TabContainer/__tests__/TabContainer.test.js +1 -1
  79. data/webpack/ForemanInventoryUpload/Components/TabFooter/__tests__/TabFooter.test.js +1 -1
  80. data/webpack/ForemanInventoryUpload/Components/TabHeader/__tests__/TabHeader.test.js +1 -1
  81. data/webpack/ForemanInventoryUpload/Components/Terminal/Terminal.js +1 -1
  82. data/webpack/ForemanInventoryUpload/Components/Terminal/__tests__/Terminal.test.js +1 -2
  83. data/webpack/ForemanInventoryUpload/ForemanInventoryUpload.js +5 -4
  84. data/webpack/ForemanInventoryUpload/ForemanInventoryUpload.test.js +1 -1
  85. data/webpack/ForemanInventoryUpload/__snapshots__/ForemanInventoryUpload.test.js.snap +6 -5
  86. metadata +22 -9
  87. data/webpack/stories/ForemanInventoryUploadReducers.js +0 -3
  88. data/webpack/stories/configureStore.js +0 -15
  89. data/webpack/stories/decorators/index.js +0 -1
  90. data/webpack/stories/decorators/withCardsDecorator.js +0 -14
  91. data/webpack/stories/index.js +0 -10
  92. data/webpack/stories/index.scss +0 -7
  93. data/webpack/test_setup.js +0 -6
@@ -1,3 +0,0 @@
1
- import reducers from '../ForemanInventoryUpload/ForemanInventoryUploadReducers';
2
-
3
- export default reducers.ForemanInventoryUpload;
@@ -1,15 +0,0 @@
1
- import { applyMiddleware, compose, createStore } from 'redux';
2
- import thunkMiddleware from 'redux-thunk';
3
- import rootReducer from './ForemanInventoryUploadReducers';
4
-
5
- export default function configureStore(preloadedState) {
6
- const middlewares = [thunkMiddleware];
7
- const middlewareEnhancer = applyMiddleware(...middlewares);
8
-
9
- const enhancers = [middlewareEnhancer];
10
- const composedEnhancers = compose(...enhancers);
11
-
12
- const store = createStore(rootReducer, preloadedState, composedEnhancers);
13
-
14
- return store;
15
- }
@@ -1 +0,0 @@
1
- export * from './withCardsDecorator';
@@ -1,14 +0,0 @@
1
- import React from 'react';
2
-
3
- export const withCardsDecorator = storyFn => (
4
- <div
5
- style={{
6
- width: '100%',
7
- height: '100vh',
8
- backgroundColor: '#F5F5F5',
9
- padding: '50px',
10
- }}
11
- >
12
- <div style={{ width: '300px', margin: 'auto' }}>{storyFn()}</div>
13
- </div>
14
- );
@@ -1,10 +0,0 @@
1
- import { configure } from '@storybook/react';
2
- import './index.scss';
3
-
4
- const req = require.context('../', true, /.stories.js$/);
5
-
6
- function loadStories() {
7
- req.keys().forEach(filename => req(filename));
8
- }
9
-
10
- configure(loadStories, module);
@@ -1,7 +0,0 @@
1
- $img-path: '~patternfly/dist/img/';
2
- $font-path: '~patternfly/dist/fonts/';
3
- $icon-font-path: '~patternfly/dist/fonts/';
4
-
5
- @import '~patternfly/dist/sass/patternfly';
6
- @import '~patternfly-react/dist/sass/patternfly-react';
7
- @import '~font-awesome-sass/assets/stylesheets/_font-awesome';
@@ -1,6 +0,0 @@
1
- import 'babel-polyfill';
2
-
3
- import { configure } from 'enzyme';
4
- import Adapter from 'enzyme-adapter-react-16';
5
-
6
- configure({ adapter: new Adapter() });