katello 3.9.1 → 3.10.0.rc1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of katello might be problematic. Click here for more details.

Files changed (229) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/katello/hosts/host_and_hostgroup_edit.js +28 -12
  3. data/app/controllers/katello/api/rhsm/candlepin_dynflow_proxy_controller.rb +12 -3
  4. data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +4 -13
  5. data/app/controllers/katello/api/v2/content_credentials_controller.rb +1 -1
  6. data/app/controllers/katello/api/v2/content_view_filter_rules_controller.rb +1 -1
  7. data/app/controllers/katello/api/v2/content_view_versions_controller.rb +6 -4
  8. data/app/controllers/katello/api/v2/content_views_controller.rb +8 -3
  9. data/app/controllers/katello/api/v2/gpg_keys_controller.rb +2 -1
  10. data/app/controllers/katello/api/v2/host_module_streams_controller.rb +39 -0
  11. data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +20 -11
  12. data/app/controllers/katello/api/v2/module_streams_controller.rb +2 -1
  13. data/app/controllers/katello/api/v2/repository_sets_controller.rb +17 -8
  14. data/app/controllers/katello/application_controller.rb +0 -2
  15. data/app/controllers/katello/concerns/hosts_controller_extensions.rb +5 -2
  16. data/app/lib/actions/candlepin/consumer/attach_subscription.rb +0 -2
  17. data/app/lib/actions/candlepin/consumer/remove_subscription.rb +0 -2
  18. data/app/lib/actions/katello/capsule_content/create_repos.rb +1 -25
  19. data/app/lib/actions/katello/capsule_content/sync.rb +1 -1
  20. data/app/lib/actions/katello/content_view/promote.rb +2 -5
  21. data/app/lib/actions/katello/content_view/promote_to_environment.rb +2 -5
  22. data/app/lib/actions/katello/content_view/publish.rb +1 -4
  23. data/app/lib/actions/katello/content_view_puppet_environment/create.rb +6 -10
  24. data/app/lib/actions/katello/content_view_version/export.rb +0 -2
  25. data/app/lib/actions/katello/content_view_version/incremental_update.rb +19 -1
  26. data/app/lib/actions/katello/environment/publish_repositories.rb +2 -1
  27. data/app/lib/actions/katello/gpg_key/update.rb +17 -0
  28. data/app/lib/actions/katello/host/attach_subscriptions.rb +0 -2
  29. data/app/lib/actions/katello/host/erratum/install.rb +6 -0
  30. data/app/lib/actions/katello/host/generate_applicability.rb +0 -2
  31. data/app/lib/actions/katello/host/hypervisors_update.rb +11 -6
  32. data/app/lib/actions/katello/host/package/install.rb +6 -0
  33. data/app/lib/actions/katello/host/package/remove.rb +6 -0
  34. data/app/lib/actions/katello/host/package/update.rb +7 -1
  35. data/app/lib/actions/katello/host/package_group/install.rb +6 -0
  36. data/app/lib/actions/katello/host/package_group/remove.rb +6 -0
  37. data/app/lib/actions/katello/host/recalculate_errata_status.rb +0 -2
  38. data/app/lib/actions/katello/host/remove_subscriptions.rb +0 -2
  39. data/app/lib/actions/katello/host/update.rb +1 -0
  40. data/app/lib/actions/katello/host/update_content_overrides.rb +0 -2
  41. data/app/lib/actions/katello/host/upload_package_profile.rb +13 -12
  42. data/app/lib/actions/katello/host/upload_profiles.rb +70 -0
  43. data/app/lib/actions/katello/product/reindex_subscriptions.rb +0 -2
  44. data/app/lib/actions/katello/product/repositories_certs_reset.rb +4 -4
  45. data/app/lib/actions/katello/product/repositories_gpg_reset.rb +2 -2
  46. data/app/lib/actions/katello/repository/check_matching_content.rb +18 -6
  47. data/app/lib/actions/katello/repository/clone_deb_content.rb +1 -1
  48. data/app/lib/actions/katello/repository/clone_to_environment.rb +3 -5
  49. data/app/lib/actions/katello/repository/clone_to_version.rb +2 -3
  50. data/app/lib/actions/katello/repository/clone_yum_content.rb +1 -2
  51. data/app/lib/actions/katello/repository/clone_yum_metadata.rb +2 -2
  52. data/app/lib/actions/katello/repository/create.rb +1 -31
  53. data/app/lib/actions/katello/repository/destroy.rb +1 -2
  54. data/app/lib/actions/katello/repository/export.rb +0 -2
  55. data/app/lib/actions/katello/repository/fetch_pxe_files.rb +0 -2
  56. data/app/lib/actions/katello/repository/filtered_index_content.rb +0 -2
  57. data/app/lib/actions/katello/repository/finish_upload.rb +0 -2
  58. data/app/lib/actions/katello/repository/import_upload.rb +0 -2
  59. data/app/lib/actions/katello/repository/index_content.rb +0 -1
  60. data/app/lib/actions/katello/repository/index_package_groups.rb +0 -2
  61. data/app/lib/actions/katello/repository/instance_update.rb +21 -0
  62. data/app/lib/actions/katello/repository/remove_content.rb +0 -2
  63. data/app/lib/actions/katello/repository/sync.rb +0 -1
  64. data/app/lib/actions/katello/repository/update.rb +0 -2
  65. data/app/lib/actions/katello/upstream_subscriptions/bind_entitlement.rb +0 -2
  66. data/app/lib/actions/katello/upstream_subscriptions/bind_entitlements.rb +0 -2
  67. data/app/lib/actions/katello/upstream_subscriptions/remove_entitlement.rb +0 -1
  68. data/app/lib/actions/katello/upstream_subscriptions/remove_entitlements.rb +0 -2
  69. data/app/lib/actions/katello/upstream_subscriptions/update_entitlement.rb +0 -1
  70. data/app/lib/actions/katello/upstream_subscriptions/update_entitlements.rb +0 -2
  71. data/app/lib/actions/pulp/abstract.rb +13 -14
  72. data/app/lib/actions/pulp/repository/create.rb +13 -211
  73. data/app/lib/actions/pulp/repository/create_in_plan.rb +4 -18
  74. data/app/lib/actions/pulp/repository/refresh.rb +7 -70
  75. data/app/lib/actions/pulp/repository/sync.rb +1 -2
  76. data/app/lib/katello/capsule_content.rb +3 -3
  77. data/app/lib/katello/resources/candlepin/consumer.rb +1 -1
  78. data/app/lib/katello/resources/candlepin/product.rb +1 -1
  79. data/app/lib/katello/validators/hostgroup_kickstart_repository_validator.rb +1 -1
  80. data/app/models/katello/available_module_stream.rb +11 -0
  81. data/app/models/katello/concerns/content_facet_host_extensions.rb +1 -0
  82. data/app/models/katello/concerns/host_managed_extensions.rb +56 -0
  83. data/app/models/katello/concerns/hostgroup_extensions.rb +17 -0
  84. data/app/models/katello/concerns/redhat_extensions.rb +20 -6
  85. data/app/models/katello/concerns/search_by_repository_name.rb +0 -1
  86. data/app/models/katello/concerns/smart_proxy_extensions.rb +26 -12
  87. data/app/models/katello/content_facet_applicable_module_stream.rb +7 -0
  88. data/app/models/katello/content_view_puppet_environment.rb +14 -35
  89. data/app/models/katello/erratum.rb +54 -24
  90. data/app/models/katello/erratum_package.rb +6 -0
  91. data/app/models/katello/glue/pulp/repo.rb +5 -228
  92. data/app/models/katello/gpg_key.rb +1 -0
  93. data/app/models/katello/host/content_facet.rb +38 -83
  94. data/app/models/katello/host_available_module_stream.rb +47 -0
  95. data/app/models/katello/module_stream.rb +18 -0
  96. data/app/models/katello/module_stream_erratum_package.rb +6 -0
  97. data/app/models/katello/product.rb +0 -2
  98. data/app/models/katello/product_content.rb +1 -0
  99. data/app/models/katello/repository.rb +15 -6
  100. data/app/models/katello/root_repository.rb +1 -1
  101. data/app/models/katello/rpm.rb +5 -17
  102. data/app/services/katello/applicable_content_helper.rb +111 -0
  103. data/app/services/katello/managed_content_medium_provider.rb +7 -0
  104. data/app/services/katello/pulp/consumer.rb +13 -7
  105. data/app/services/katello/pulp/repository.rb +157 -4
  106. data/app/services/katello/pulp/repository/deb.rb +47 -0
  107. data/app/services/katello/pulp/repository/docker.rb +43 -0
  108. data/app/services/katello/pulp/repository/file.rb +31 -0
  109. data/app/services/katello/pulp/repository/ostree.rb +40 -0
  110. data/app/services/katello/pulp/repository/puppet.rb +43 -0
  111. data/app/services/katello/pulp/repository/yum.rb +61 -0
  112. data/app/services/katello/repository_type.rb +1 -1
  113. data/app/views/katello/api/v2/content_facet/base.json.rabl +1 -0
  114. data/app/views/katello/api/v2/content_view_versions/base.json.rabl +0 -1
  115. data/app/views/katello/api/v2/errata/_counts.json.rabl +0 -1
  116. data/app/views/katello/api/v2/errata/show.json.rabl +9 -3
  117. data/app/views/katello/api/v2/host_collections/delta_activation_keys.rabl +0 -1
  118. data/app/views/katello/api/v2/host_module_streams/base.json.rabl +8 -0
  119. data/app/views/katello/api/v2/host_module_streams/index.json.rabl +7 -0
  120. data/app/views/katello/api/v2/packages/backend.json.rabl +0 -1
  121. data/app/views/katello/api/v2/repositories/show.json.rabl +6 -6
  122. data/app/views/katello/layouts/react.html.erb +2 -2
  123. data/app/views/overrides/activation_keys/_host_synced_content_select.html.erb +0 -1
  124. data/config/routes/api/rhsm.rb +1 -0
  125. data/config/routes/overrides.rb +4 -0
  126. data/db/migrate/20181008201422_add_modules_to_errata_packages.rb +29 -0
  127. data/db/migrate/20181017181806_available_module_streams.rb +34 -0
  128. data/db/migrate/20181027014323_add_applicable_modules.rb +24 -0
  129. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/common/module-stream-actions.service.js +2 -1
  130. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-credentials/details/views/content-credential-info.html +1 -1
  131. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-credentials/new/views/new-content-credential.html +1 -0
  132. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-host-bulk-module-streams-modal.html +2 -2
  133. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-errata-modal.html +37 -22
  134. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts.controller.js +4 -1
  135. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-module-streams.controller.js +27 -7
  136. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-module-streams.html +29 -0
  137. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/errata-details.html +15 -1
  138. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/content-hosts.html +1 -1
  139. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-promotion.controller.js +0 -1
  140. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-publish.controller.js +1 -2
  141. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-versions.controller.js +3 -1
  142. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/histories/content-view-history.controller.js +1 -1
  143. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-promotion.html +0 -15
  144. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-publish.html +0 -14
  145. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/erratum.controller.js +19 -0
  146. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/views/erratum-info.html +0 -12
  147. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/views/erratum-packages.html +36 -0
  148. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/views/erratum.html +7 -0
  149. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/errata.routes.js +9 -0
  150. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host-module-streams.factory.js +18 -0
  151. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html +4 -2
  152. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html +2 -2
  153. data/engines/bastion_katello/app/assets/stylesheets/bastion_katello/bastion_katello.scss +13 -0
  154. data/lib/katello/permissions/host_permissions.rb +3 -0
  155. data/lib/katello/repository_types/deb.rb +3 -1
  156. data/lib/katello/repository_types/docker.rb +3 -1
  157. data/lib/katello/repository_types/file.rb +1 -0
  158. data/lib/katello/repository_types/ostree.rb +3 -1
  159. data/lib/katello/repository_types/puppet.rb +3 -1
  160. data/lib/katello/repository_types/yum.rb +3 -1
  161. data/lib/katello/tasks/delete_orphaned_content.rake +1 -1
  162. data/lib/katello/tasks/reset.rake +1 -0
  163. data/lib/katello/tasks/test.rake +14 -0
  164. data/lib/katello/tasks/unify_hosts.rake +2 -0
  165. data/lib/katello/tasks/virt_who_report.rake +2 -1
  166. data/lib/katello/version.rb +1 -1
  167. data/locale/Makefile +52 -17
  168. data/locale/update-i18n +22 -0
  169. data/package.json +11 -1
  170. data/webpack/__mocks__/foremanReact/components/common/EmptyState.js +8 -0
  171. data/webpack/move_to_foreman/components/common/table/components/Table.js +2 -1
  172. data/webpack/move_to_pf/react-bootstrap-select/index.js +4 -2
  173. data/webpack/move_to_pf/test-utils/testHelpers.js +9 -0
  174. data/webpack/redux/OrganizationProducts/OrganizationProductsActions.js +24 -0
  175. data/webpack/redux/OrganizationProducts/OrganizationProductsConstants.js +5 -0
  176. data/webpack/redux/OrganizationProducts/OrganizationProductsReducer.js +38 -0
  177. data/webpack/redux/OrganizationProducts/OrganizationProductsSelectors.js +7 -0
  178. data/webpack/redux/OrganizationProducts/__tests__/OrganizationProductsActions.test.js +47 -0
  179. data/webpack/redux/OrganizationProducts/__tests__/OrganizationProductsReducer.test.js +33 -0
  180. data/webpack/redux/OrganizationProducts/__tests__/OrganizationProductsSelectors.test.js +19 -0
  181. data/webpack/redux/OrganizationProducts/__tests__/__snapshots__/OrganizationProductsActions.test.js.snap +49 -0
  182. data/webpack/redux/OrganizationProducts/__tests__/__snapshots__/OrganizationProductsReducer.test.js.snap +36 -0
  183. data/webpack/redux/OrganizationProducts/__tests__/__snapshots__/OrganizationProductsSelectors.test.js.snap +9 -0
  184. data/webpack/redux/OrganizationProducts/index.js +13 -0
  185. data/webpack/redux/actions/RedHatRepositories/enabled.js +7 -1
  186. data/webpack/redux/actions/RedHatRepositories/helpers.js +4 -0
  187. data/webpack/redux/actions/RedHatRepositories/sets.js +2 -0
  188. data/webpack/redux/reducers/RedHatRepositories/enabled.fixtures.js +8 -2
  189. data/webpack/redux/reducers/RedHatRepositories/enabled.js +1 -1
  190. data/webpack/redux/reducers/RedHatRepositories/sets.fixtures.js +12 -3
  191. data/webpack/redux/reducers/index.js +2 -0
  192. data/webpack/scenes/RedHatRepositories/components/SearchBar.js +68 -33
  193. data/webpack/scenes/RedHatRepositories/index.js +13 -2
  194. data/webpack/scenes/RedHatRepositories/index.scss +26 -0
  195. data/webpack/scenes/Subscriptions/Manifest/ManageManifestModal.js +1 -1
  196. data/webpack/scenes/Subscriptions/Manifest/__tests__/__snapshots__/ManageManifestModal.test.js.snap +1 -1
  197. data/webpack/scenes/Subscriptions/SubscriptionActions.js +18 -2
  198. data/webpack/scenes/Subscriptions/SubscriptionConstants.js +8 -0
  199. data/webpack/scenes/Subscriptions/SubscriptionHelpers.js +15 -0
  200. data/webpack/scenes/Subscriptions/SubscriptionReducer.js +22 -14
  201. data/webpack/scenes/Subscriptions/SubscriptionsPage.js +39 -90
  202. data/webpack/scenes/Subscriptions/SubscriptionsSelectors.js +14 -0
  203. data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsPage.js +1 -3
  204. data/webpack/scenes/Subscriptions/UpstreamSubscriptions/__tests__/__snapshots__/UpstreamSubscriptionsPage.test.js.snap +0 -1
  205. data/webpack/scenes/Subscriptions/__tests__/SubscriptionHelpers.test.js +84 -0
  206. data/webpack/scenes/Subscriptions/__tests__/SubscriptionsActions.test.js +26 -1
  207. data/webpack/scenes/Subscriptions/__tests__/SubscriptionsPage.test.js +5 -0
  208. data/webpack/scenes/Subscriptions/__tests__/SubscriptionsReducer.test.js +177 -75
  209. data/webpack/scenes/Subscriptions/__tests__/SubscriptionsSelectors.test.js +29 -0
  210. data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionHelpers.test.js.snap +31 -0
  211. data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsActions.test.js.snap +32 -0
  212. data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsPage.test.js.snap +18 -96
  213. data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsReducer.test.js.snap +511 -0
  214. data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsSelectors.test.js.snap +26 -0
  215. data/webpack/scenes/Subscriptions/__tests__/subscriptions.fixtures.js +6 -1
  216. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/__snapshots__/SubscriptionsTable.test.js.snap +3 -21
  217. data/webpack/scenes/Subscriptions/components/SubscriptionsToolbar/SubscriptionsToolbar.js +113 -0
  218. data/webpack/scenes/Subscriptions/components/SubscriptionsToolbar/SubscriptionsToolbar.test.js +47 -0
  219. data/webpack/scenes/Subscriptions/components/SubscriptionsToolbar/__snapshots__/SubscriptionsToolbar.test.js.snap +504 -0
  220. data/webpack/scenes/Subscriptions/components/SubscriptionsToolbar/index.js +1 -0
  221. data/webpack/scenes/Subscriptions/index.js +15 -4
  222. metadata +59 -14
  223. data/app/lib/actions/pulp/repository/associate_distributor.rb +0 -20
  224. data/app/lib/actions/pulp/repository/associate_importer.rb +0 -23
  225. data/app/lib/actions/pulp/repository/delete_distributor.rb +0 -18
  226. data/app/lib/actions/pulp/repository/refresh_distributor.rb +0 -19
  227. data/app/lib/actions/pulp/repository/update_importer.rb +0 -33
  228. data/app/lib/katello/bulk_actions.rb +0 -63
  229. data/webpack/move_to_foreman/components/common/EmptyState/index.js +0 -68
@@ -0,0 +1,29 @@
1
+ import { testSelectorsSnapshotWithFixtures } from '../../../move_to_pf/test-utils/testHelpers';
2
+ import {
3
+ selectSubscriptionsState,
4
+ selectSearchQuery,
5
+ selectManifestModalOpened,
6
+ selectDeleteModalOpened,
7
+ selectSubscriptionsTasks,
8
+ } from '../SubscriptionsSelectors';
9
+
10
+ const state = {
11
+ katello: {
12
+ subscriptions: {
13
+ searchQuery: 'some-query',
14
+ manifestModalOpened: false,
15
+ deleteModalOpened: false,
16
+ tasks: ['task1', 'task2'],
17
+ },
18
+ },
19
+ };
20
+
21
+ const fixtures = {
22
+ 'should select the subscriptions state': () => selectSubscriptionsState(state),
23
+ 'should select search-query': () => selectSearchQuery(state),
24
+ 'should select manifest-modal-opened': () => selectManifestModalOpened(state),
25
+ 'should select delete-modal-opened': () => selectDeleteModalOpened(state),
26
+ 'should select subscriptions tasks': () => selectSubscriptionsTasks(state),
27
+ };
28
+
29
+ describe('Subscriptions selectors', () => testSelectorsSnapshotWithFixtures(fixtures));
@@ -0,0 +1,31 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`Subscription helper should filter redhat subscriptions 1`] = `
4
+ Array [
5
+ Object {
6
+ "available": 0,
7
+ "key": "sub-1",
8
+ "upstream_pool_id": " ",
9
+ },
10
+ Object {
11
+ "available": 4,
12
+ "key": "sub-2",
13
+ "upstream_pool_id": " ",
14
+ },
15
+ Object {
16
+ "available": 100,
17
+ "key": "sub-4",
18
+ "upstream_pool_id": " ",
19
+ },
20
+ ]
21
+ `;
22
+
23
+ exports[`Subscription helper should filter subscriptions without upstream_pool_id 1`] = `
24
+ Array [
25
+ Object {
26
+ "available": 4,
27
+ "key": "sub-2",
28
+ "upstream_pool_id": " ",
29
+ },
30
+ ]
31
+ `;
@@ -0,0 +1,32 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`subscription actions deleteModal it should close delete modal 1`] = `
4
+ Object {
5
+ "type": "SUBSCRIPTIONS_CLOSE_DELETE_MODAL",
6
+ }
7
+ `;
8
+
9
+ exports[`subscription actions deleteModal it should open delete modal 1`] = `
10
+ Object {
11
+ "type": "SUBSCRIPTIONS_OPEN_DELETE_MODAL",
12
+ }
13
+ `;
14
+
15
+ exports[`subscription actions manageManifestModal it should close manage-manifest modal 1`] = `
16
+ Object {
17
+ "type": "SUBSCRIPTIONS_CLOSE_MANIFEST_MODAL",
18
+ }
19
+ `;
20
+
21
+ exports[`subscription actions manageManifestModal it should open manage-manifest modal 1`] = `
22
+ Object {
23
+ "type": "SUBSCRIPTIONS_OPEN_MANIFEST_MODAL",
24
+ }
25
+ `;
26
+
27
+ exports[`subscription actions searchQuery it should update the search-query 1`] = `
28
+ Object {
29
+ "payload": "some-query",
30
+ "type": "SUBSCRIPTIONS_UPDATE_SEARCH_QUERY",
31
+ }
32
+ `;
@@ -18,102 +18,23 @@ exports[`subscriptions page should render 1`] = `
18
18
  <h1>
19
19
  Red Hat Subscriptions
20
20
  </h1>
21
- <Row
22
- bsClass="row"
23
- className="toolbar-pf table-view-pf-toolbar-external"
24
- componentClass="div"
25
- >
26
- <Col
27
- bsClass="col"
28
- componentClass="div"
29
- sm={12}
30
- >
31
- <Form
32
- bsClass="form"
33
- className="toolbar-pf-actions"
34
- componentClass="form"
35
- horizontal={false}
36
- inline={false}
37
- >
38
- <FormGroup
39
- bsClass="form-group"
40
- className="toolbar-pf-filter"
41
- >
42
- <Search
43
- getAutoCompleteParams={[Function]}
44
- initialInputValue=""
45
- onSearch={[Function]}
46
- updateSearchQuery={[Function]}
47
- />
48
- </FormGroup>
49
- <div
50
- className="option-tooltip-container"
51
- >
52
- <OptionTooltip
53
- icon="fa-columns"
54
- id="subscriptionTableTooltip"
55
- onChange={[Function]}
56
- onClose={[Function]}
57
- options={Array []}
58
- rootClose={true}
59
- />
60
- </div>
61
- <div
62
- className="toolbar-pf-action-right"
63
- >
64
- <FormGroup
65
- bsClass="form-group"
66
- >
67
- <LinkContainer
68
- activeClassName="active"
69
- disabled={false}
70
- exact={false}
71
- replace={false}
72
- strict={false}
73
- to="subscriptions/add"
74
- >
75
- <TooltipButton
76
- bsStyle="primary"
77
- title="Add Subscriptions"
78
- tooltipId="add-subscriptions-button-tooltip"
79
- tooltipPlacement="top"
80
- tooltipText={null}
81
- />
82
- </LinkContainer>
83
- <Button
84
- active={false}
85
- block={false}
86
- bsClass="btn"
87
- bsStyle="default"
88
- disabled={false}
89
- onClick={[Function]}
90
- >
91
- Manage Manifest
92
- </Button>
93
- <Button
94
- active={false}
95
- block={false}
96
- bsClass="btn"
97
- bsStyle="default"
98
- disabled={false}
99
- onClick={[Function]}
100
- >
101
- Export CSV
102
- </Button>
103
- <TooltipButton
104
- bsStyle="danger"
105
- disabled={true}
106
- onClick={[Function]}
107
- title="Delete"
108
- tooltipId="delete-subscriptions-button-tooltip"
109
- tooltipPlacement="top"
110
- tooltipText="This is disabled because no subscriptions are selected."
111
- />
112
- </FormGroup>
113
- </div>
114
- </Form>
115
- </Col>
116
- </Row>
21
+ <SubscriptionsToolbar
22
+ disableAddButton={false}
23
+ disableDeleteButton={true}
24
+ disableDeleteReason="This is disabled because no subscriptions are selected."
25
+ disableManifestActions={false}
26
+ disableManifestReason={null}
27
+ getAutoCompleteParams={[Function]}
28
+ initialInputValue=""
29
+ onDeleteButtonClick={[Function]}
30
+ onExportCsvButtonClick={[Function]}
31
+ onManageManifestButtonClick={[Function]}
32
+ onSearch={[Function]}
33
+ tableColumns={Array []}
34
+ toolTipOnChange={[Function]}
35
+ toolTipOnclose={[Function]}
36
+ updateSearchQuery={[Function]}
37
+ />
117
38
  <Connect(ManageManifestModal)
118
39
  delete={[Function]}
119
40
  disabledReason={null}
@@ -147,6 +68,7 @@ exports[`subscriptions page should render 1`] = `
147
68
  "availableQuantities": null,
148
69
  "itemCount": 81,
149
70
  "loading": false,
71
+ "manifestModalOpened": false,
150
72
  "pagination": Object {
151
73
  "page": 1,
152
74
  "perPage": 2,
@@ -0,0 +1,511 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`Subscriptions reducer should handle DELETE_SUBSCRIPTIONS_FAILURE 1`] = `
4
+ Object {
5
+ "availableQuantities": null,
6
+ "deleteModalOpened": false,
7
+ "itemCount": 0,
8
+ "loading": false,
9
+ "manifestModalOpened": false,
10
+ "pagination": Object {
11
+ "page": 0,
12
+ "perPage": 20,
13
+ },
14
+ "quantitiesLoading": false,
15
+ "results": Array [],
16
+ "searchQuery": "",
17
+ "selectedTableColumns": Array [],
18
+ "tableColumns": Array [],
19
+ "tasks": Array [],
20
+ }
21
+ `;
22
+
23
+ exports[`Subscriptions reducer should handle DELETE_SUBSCRIPTIONS_REQUEST 1`] = `
24
+ Object {
25
+ "availableQuantities": null,
26
+ "deleteModalOpened": false,
27
+ "itemCount": 0,
28
+ "loading": true,
29
+ "manifestModalOpened": false,
30
+ "pagination": Object {
31
+ "page": 0,
32
+ "perPage": 20,
33
+ },
34
+ "quantitiesLoading": false,
35
+ "results": Array [],
36
+ "searchQuery": "",
37
+ "selectedTableColumns": Array [],
38
+ "tableColumns": Array [],
39
+ "tasks": Array [],
40
+ }
41
+ `;
42
+
43
+ exports[`Subscriptions reducer should handle DELETE_SUBSCRIPTIONS_SUCCESS 1`] = `
44
+ Object {
45
+ "availableQuantities": null,
46
+ "deleteModalOpened": false,
47
+ "itemCount": 0,
48
+ "loading": false,
49
+ "manifestModalOpened": false,
50
+ "pagination": Object {
51
+ "page": 0,
52
+ "perPage": 20,
53
+ },
54
+ "quantitiesLoading": false,
55
+ "results": Array [],
56
+ "searchQuery": "",
57
+ "selectedTableColumns": Array [],
58
+ "tableColumns": Array [],
59
+ "tasks": Array [],
60
+ }
61
+ `;
62
+
63
+ exports[`Subscriptions reducer should handle GET_SETTING_SUCCESS with content_disconnected response 1`] = `
64
+ Object {
65
+ "availableQuantities": null,
66
+ "deleteModalOpened": false,
67
+ "disconnected": "some-value",
68
+ "itemCount": 0,
69
+ "loading": true,
70
+ "manifestModalOpened": false,
71
+ "pagination": Object {
72
+ "page": 0,
73
+ "perPage": 20,
74
+ },
75
+ "quantitiesLoading": false,
76
+ "results": Array [],
77
+ "searchQuery": "",
78
+ "selectedTableColumns": Array [],
79
+ "tableColumns": Array [],
80
+ "tasks": Array [],
81
+ }
82
+ `;
83
+
84
+ exports[`Subscriptions reducer should handle GET_SETTING_SUCCESS without content_disconnected response 1`] = `
85
+ Object {
86
+ "availableQuantities": null,
87
+ "deleteModalOpened": false,
88
+ "itemCount": 0,
89
+ "loading": true,
90
+ "manifestModalOpened": false,
91
+ "pagination": Object {
92
+ "page": 0,
93
+ "perPage": 20,
94
+ },
95
+ "quantitiesLoading": false,
96
+ "results": Array [],
97
+ "searchQuery": "",
98
+ "selectedTableColumns": Array [],
99
+ "tableColumns": Array [],
100
+ "tasks": Array [],
101
+ }
102
+ `;
103
+
104
+ exports[`Subscriptions reducer should handle GET_TASK_SUCCESS 1`] = `
105
+ Object {
106
+ "availableQuantities": null,
107
+ "deleteModalOpened": false,
108
+ "itemCount": 0,
109
+ "loading": true,
110
+ "manifestModalOpened": false,
111
+ "pagination": Object {
112
+ "page": 0,
113
+ "perPage": 20,
114
+ },
115
+ "quantitiesLoading": false,
116
+ "results": Array [],
117
+ "searchQuery": "",
118
+ "selectedTableColumns": Array [],
119
+ "tableColumns": Array [],
120
+ "tasks": Array [],
121
+ }
122
+ `;
123
+
124
+ exports[`Subscriptions reducer should handle RESET_TASKS 1`] = `
125
+ Object {
126
+ "availableQuantities": null,
127
+ "deleteModalOpened": false,
128
+ "itemCount": 0,
129
+ "loading": true,
130
+ "manifestModalOpened": false,
131
+ "pagination": Object {
132
+ "page": 0,
133
+ "perPage": 20,
134
+ },
135
+ "quantitiesLoading": false,
136
+ "results": Array [],
137
+ "searchQuery": "",
138
+ "selectedTableColumns": Array [],
139
+ "tableColumns": Array [],
140
+ "tasks": Array [],
141
+ }
142
+ `;
143
+
144
+ exports[`Subscriptions reducer should handle SUBSCRIPTIONS_CLOSE_DELETE_MODAL 1`] = `
145
+ Object {
146
+ "availableQuantities": null,
147
+ "deleteModalOpened": false,
148
+ "itemCount": 0,
149
+ "loading": true,
150
+ "manifestModalOpened": false,
151
+ "pagination": Object {
152
+ "page": 0,
153
+ "perPage": 20,
154
+ },
155
+ "quantitiesLoading": false,
156
+ "results": Array [],
157
+ "searchQuery": "",
158
+ "selectedTableColumns": Array [],
159
+ "tableColumns": Array [],
160
+ "tasks": Array [],
161
+ }
162
+ `;
163
+
164
+ exports[`Subscriptions reducer should handle SUBSCRIPTIONS_CLOSE_MANIFEST_MODAL 1`] = `
165
+ Object {
166
+ "availableQuantities": null,
167
+ "deleteModalOpened": false,
168
+ "itemCount": 0,
169
+ "loading": true,
170
+ "manifestModalOpened": false,
171
+ "pagination": Object {
172
+ "page": 0,
173
+ "perPage": 20,
174
+ },
175
+ "quantitiesLoading": false,
176
+ "results": Array [],
177
+ "searchQuery": "",
178
+ "selectedTableColumns": Array [],
179
+ "tableColumns": Array [],
180
+ "tasks": Array [],
181
+ }
182
+ `;
183
+
184
+ exports[`Subscriptions reducer should handle SUBSCRIPTIONS_COLUMNS_REQUEST 1`] = `
185
+ Object {
186
+ "availableQuantities": null,
187
+ "deleteModalOpened": false,
188
+ "itemCount": 0,
189
+ "loading": true,
190
+ "manifestModalOpened": false,
191
+ "pagination": Object {
192
+ "page": 0,
193
+ "perPage": 20,
194
+ },
195
+ "quantitiesLoading": false,
196
+ "results": Array [],
197
+ "searchQuery": "",
198
+ "selectedTableColumns": Array [],
199
+ "tableColumns": Array [
200
+ "col1",
201
+ "col2",
202
+ "col3",
203
+ ],
204
+ "tasks": Array [],
205
+ }
206
+ `;
207
+
208
+ exports[`Subscriptions reducer should handle SUBSCRIPTIONS_FAILURE 1`] = `
209
+ Object {
210
+ "availableQuantities": null,
211
+ "deleteModalOpened": false,
212
+ "itemCount": 0,
213
+ "loading": false,
214
+ "manifestModalOpened": false,
215
+ "pagination": Object {
216
+ "page": 0,
217
+ "perPage": 20,
218
+ },
219
+ "quantitiesLoading": false,
220
+ "results": Array [],
221
+ "searchQuery": "",
222
+ "selectedTableColumns": Array [],
223
+ "tableColumns": Array [],
224
+ "tasks": Array [],
225
+ }
226
+ `;
227
+
228
+ exports[`Subscriptions reducer should handle SUBSCRIPTIONS_OPEN_DELETE_MODAL 1`] = `
229
+ Object {
230
+ "availableQuantities": null,
231
+ "deleteModalOpened": true,
232
+ "itemCount": 0,
233
+ "loading": true,
234
+ "manifestModalOpened": false,
235
+ "pagination": Object {
236
+ "page": 0,
237
+ "perPage": 20,
238
+ },
239
+ "quantitiesLoading": false,
240
+ "results": Array [],
241
+ "searchQuery": "",
242
+ "selectedTableColumns": Array [],
243
+ "tableColumns": Array [],
244
+ "tasks": Array [],
245
+ }
246
+ `;
247
+
248
+ exports[`Subscriptions reducer should handle SUBSCRIPTIONS_OPEN_MANIFEST_MODAL 1`] = `
249
+ Object {
250
+ "availableQuantities": null,
251
+ "deleteModalOpened": false,
252
+ "itemCount": 0,
253
+ "loading": true,
254
+ "manifestModalOpened": true,
255
+ "pagination": Object {
256
+ "page": 0,
257
+ "perPage": 20,
258
+ },
259
+ "quantitiesLoading": false,
260
+ "results": Array [],
261
+ "searchQuery": "",
262
+ "selectedTableColumns": Array [],
263
+ "tableColumns": Array [],
264
+ "tasks": Array [],
265
+ }
266
+ `;
267
+
268
+ exports[`Subscriptions reducer should handle SUBSCRIPTIONS_QUANTITIES_FAILURE 1`] = `
269
+ Object {
270
+ "availableQuantities": Object {},
271
+ "deleteModalOpened": false,
272
+ "itemCount": 0,
273
+ "loading": true,
274
+ "manifestModalOpened": false,
275
+ "pagination": Object {
276
+ "page": 0,
277
+ "perPage": 20,
278
+ },
279
+ "quantitiesLoading": false,
280
+ "results": Array [],
281
+ "searchQuery": "",
282
+ "selectedTableColumns": Array [],
283
+ "tableColumns": Array [],
284
+ "tasks": Array [],
285
+ }
286
+ `;
287
+
288
+ exports[`Subscriptions reducer should handle SUBSCRIPTIONS_QUANTITIES_REQUEST 1`] = `
289
+ Object {
290
+ "availableQuantities": null,
291
+ "deleteModalOpened": false,
292
+ "itemCount": 0,
293
+ "loading": true,
294
+ "manifestModalOpened": false,
295
+ "pagination": Object {
296
+ "page": 0,
297
+ "perPage": 20,
298
+ },
299
+ "quantitiesLoading": true,
300
+ "results": Array [],
301
+ "searchQuery": "",
302
+ "selectedTableColumns": Array [],
303
+ "tableColumns": Array [],
304
+ "tasks": Array [],
305
+ }
306
+ `;
307
+
308
+ exports[`Subscriptions reducer should handle SUBSCRIPTIONS_QUANTITIES_SUCCESS 1`] = `
309
+ Object {
310
+ "availableQuantities": "some-quantities-data",
311
+ "deleteModalOpened": false,
312
+ "itemCount": 0,
313
+ "loading": true,
314
+ "manifestModalOpened": false,
315
+ "pagination": Object {
316
+ "page": 0,
317
+ "perPage": 20,
318
+ },
319
+ "quantitiesLoading": false,
320
+ "results": Array [],
321
+ "searchQuery": "",
322
+ "selectedTableColumns": Array [],
323
+ "tableColumns": Array [],
324
+ "tasks": Array [],
325
+ }
326
+ `;
327
+
328
+ exports[`Subscriptions reducer should handle SUBSCRIPTIONS_REQUEST 1`] = `
329
+ Object {
330
+ "availableQuantities": null,
331
+ "deleteModalOpened": false,
332
+ "itemCount": 0,
333
+ "loading": true,
334
+ "manifestModalOpened": false,
335
+ "pagination": Object {
336
+ "page": 0,
337
+ "perPage": 20,
338
+ },
339
+ "quantitiesLoading": false,
340
+ "results": Array [],
341
+ "searchQuery": "",
342
+ "selectedTableColumns": Array [],
343
+ "tableColumns": Array [],
344
+ "tasks": Array [],
345
+ }
346
+ `;
347
+
348
+ exports[`Subscriptions reducer should handle SUBSCRIPTIONS_SUCCESS 1`] = `
349
+ Object {
350
+ "availableQuantities": null,
351
+ "deleteModalOpened": false,
352
+ "itemCount": 20,
353
+ "loading": false,
354
+ "manifestModalOpened": false,
355
+ "pagination": Object {
356
+ "page": 1,
357
+ "perPage": 10,
358
+ },
359
+ "quantitiesLoading": false,
360
+ "results": "some-results",
361
+ "search": "some search",
362
+ "searchIsActive": true,
363
+ "searchQuery": "",
364
+ "selectedTableColumns": Array [],
365
+ "tableColumns": Array [],
366
+ "tasks": Array [],
367
+ }
368
+ `;
369
+
370
+ exports[`Subscriptions reducer should handle SUBSCRIPTIONS_UPDATE_SEARCH_QUERY 1`] = `
371
+ Object {
372
+ "availableQuantities": null,
373
+ "deleteModalOpened": false,
374
+ "itemCount": 0,
375
+ "loading": true,
376
+ "manifestModalOpened": false,
377
+ "pagination": Object {
378
+ "page": 0,
379
+ "perPage": 20,
380
+ },
381
+ "quantitiesLoading": false,
382
+ "results": Array [],
383
+ "searchQuery": "some-query",
384
+ "selectedTableColumns": Array [],
385
+ "tableColumns": Array [],
386
+ "tasks": Array [],
387
+ }
388
+ `;
389
+
390
+ exports[`Subscriptions reducer should handle TASK_BULK_SEARCH_SUCCESS 1`] = `
391
+ Object {
392
+ "availableQuantities": null,
393
+ "deleteModalOpened": false,
394
+ "itemCount": 0,
395
+ "loading": true,
396
+ "manifestModalOpened": false,
397
+ "pagination": Object {
398
+ "page": 0,
399
+ "perPage": 20,
400
+ },
401
+ "quantitiesLoading": false,
402
+ "results": Array [],
403
+ "searchQuery": "",
404
+ "selectedTableColumns": Array [],
405
+ "tableColumns": Array [],
406
+ "tasks": Array [],
407
+ }
408
+ `;
409
+
410
+ exports[`Subscriptions reducer should handle UPDATE_QUANTITY_FAILURE 1`] = `
411
+ Object {
412
+ "availableQuantities": null,
413
+ "deleteModalOpened": false,
414
+ "itemCount": 0,
415
+ "loading": false,
416
+ "manifestModalOpened": false,
417
+ "pagination": Object {
418
+ "page": 0,
419
+ "perPage": 20,
420
+ },
421
+ "quantitiesLoading": false,
422
+ "results": Array [],
423
+ "searchQuery": "",
424
+ "selectedTableColumns": Array [],
425
+ "tableColumns": Array [],
426
+ "tasks": Array [],
427
+ }
428
+ `;
429
+
430
+ exports[`Subscriptions reducer should handle UPDATE_QUANTITY_REQUEST 1`] = `
431
+ Object {
432
+ "availableQuantities": null,
433
+ "deleteModalOpened": false,
434
+ "itemCount": 0,
435
+ "loading": true,
436
+ "manifestModalOpened": false,
437
+ "pagination": Object {
438
+ "page": 0,
439
+ "perPage": 20,
440
+ },
441
+ "quantitiesLoading": false,
442
+ "results": Array [],
443
+ "searchQuery": "",
444
+ "selectedTableColumns": Array [],
445
+ "tableColumns": Array [],
446
+ "tasks": Array [],
447
+ }
448
+ `;
449
+
450
+ exports[`Subscriptions reducer should handle UPDATE_QUANTITY_SUCCESS 1`] = `
451
+ Object {
452
+ "availableQuantities": null,
453
+ "deleteModalOpened": false,
454
+ "itemCount": 0,
455
+ "loading": false,
456
+ "manifestModalOpened": false,
457
+ "pagination": Object {
458
+ "page": 0,
459
+ "perPage": 20,
460
+ },
461
+ "quantitiesLoading": false,
462
+ "results": Array [],
463
+ "searchQuery": "",
464
+ "selectedTableColumns": Array [],
465
+ "tableColumns": Array [],
466
+ "tasks": Array [],
467
+ }
468
+ `;
469
+
470
+ exports[`Subscriptions reducer should handle UPDATE_SUBSCRIPTION_COLUMNS 1`] = `
471
+ Object {
472
+ "availableQuantities": null,
473
+ "deleteModalOpened": false,
474
+ "itemCount": 0,
475
+ "loading": true,
476
+ "manifestModalOpened": false,
477
+ "pagination": Object {
478
+ "page": 0,
479
+ "perPage": 20,
480
+ },
481
+ "quantitiesLoading": false,
482
+ "results": Array [],
483
+ "searchQuery": "",
484
+ "selectedTableColumns": Array [
485
+ "col1",
486
+ "col2",
487
+ ],
488
+ "tableColumns": Array [],
489
+ "tasks": Array [],
490
+ }
491
+ `;
492
+
493
+ exports[`Subscriptions reducer should return the initial state 1`] = `
494
+ Object {
495
+ "availableQuantities": null,
496
+ "deleteModalOpened": false,
497
+ "itemCount": 0,
498
+ "loading": true,
499
+ "manifestModalOpened": false,
500
+ "pagination": Object {
501
+ "page": 0,
502
+ "perPage": 20,
503
+ },
504
+ "quantitiesLoading": false,
505
+ "results": Array [],
506
+ "searchQuery": "",
507
+ "selectedTableColumns": Array [],
508
+ "tableColumns": Array [],
509
+ "tasks": Array [],
510
+ }
511
+ `;