katello 4.4.0.rc1 → 4.4.0.rc2

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 (139) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/katello/api/v2/repositories_bulk_actions_controller.rb +10 -1
  3. data/app/controllers/katello/api/v2/repositories_controller.rb +3 -0
  4. data/app/lib/actions/katello/repository/errata_mail.rb +4 -5
  5. data/app/lib/actions/katello/repository/sync.rb +2 -2
  6. data/app/lib/actions/pulp3/abstract.rb +1 -1
  7. data/app/lib/actions/pulp3/content_view/delete_repository_references.rb +14 -4
  8. data/app/lib/actions/pulp3/content_view_version/create_import_history.rb +1 -2
  9. data/app/lib/actions/pulp3/repository/reclaim_space.rb +3 -10
  10. data/app/lib/katello/util/pulpcore_content_filters.rb +2 -1
  11. data/app/models/katello/candlepin/repository_mapper.rb +1 -0
  12. data/app/models/katello/concerns/audit_comment_extensions.rb +17 -0
  13. data/app/models/katello/concerns/host_managed_extensions.rb +11 -1
  14. data/app/models/katello/concerns/smart_proxy_extensions.rb +1 -0
  15. data/app/models/katello/content_view_version_export_history.rb +2 -1
  16. data/app/models/katello/content_view_version_import_history.rb +4 -4
  17. data/app/models/katello/host_available_module_stream.rb +10 -0
  18. data/app/models/katello/installed_package.rb +1 -0
  19. data/app/models/katello/root_repository.rb +14 -2
  20. data/app/models/setting/content.rb +9 -2
  21. data/app/services/katello/pulp3/api/yum.rb +4 -0
  22. data/app/services/katello/pulp3/repository/yum.rb +11 -4
  23. data/app/services/katello/pulp3/repository.rb +4 -2
  24. data/app/views/foreman/job_templates/remove_packages_by_search_query.erb +19 -0
  25. data/app/views/foreman/job_templates/update_packages_by_search_query.erb +19 -0
  26. data/app/views/katello/api/v2/content_views/base.json.rabl +8 -4
  27. data/app/views/katello/api/v2/host_module_streams/base.json.rabl +1 -0
  28. data/db/migrate/20210119162528_delete_puppet_and_ostree_repos.rb +2 -0
  29. data/db/migrate/20211019192121_create_cdn_configuration.katello.rb +11 -2
  30. data/db/migrate/20220209205137_expand_sync_timeout_settings.rb +23 -0
  31. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/apply-errata.controller.js +10 -3
  32. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-info.controller.js +4 -0
  33. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/new-repository.controller.js +17 -12
  34. data/lib/katello/plugin.rb +2 -0
  35. data/lib/katello/repository_types/ostree.rb +0 -6
  36. data/lib/katello/version.rb +1 -1
  37. data/webpack/components/Errata/index.js +57 -57
  38. data/webpack/components/ErratumTypeLabel.js +16 -16
  39. data/webpack/components/MultiSelect/index.js +2 -2
  40. data/webpack/components/Select/Select.js +1 -1
  41. data/webpack/components/SelectOrg/SelectOrgReducer.js +15 -15
  42. data/webpack/components/SelectOrg/SetOrganization.js +1 -1
  43. data/webpack/components/Table/TableHooks.js +1 -0
  44. data/webpack/components/Table/TableWrapper.js +4 -1
  45. data/webpack/components/TypeAhead/helpers/commonPropTypes.js +1 -1
  46. data/webpack/components/TypeAhead/helpers/helpers.js +14 -14
  47. data/webpack/components/TypeAhead/pf3Search/TypeAheadSearch.js +1 -1
  48. data/webpack/components/WithOrganization/withOrganization.js +3 -3
  49. data/webpack/components/extensions/HostDetails/HostPackages/HostPackagesActions.js +32 -1
  50. data/webpack/components/extensions/HostDetails/HostPackages/HostPackagesConstants.js +3 -2
  51. data/webpack/components/extensions/HostDetails/Tabs/ContentTab/SecondaryTabsRoutes.js +5 -3
  52. data/webpack/components/extensions/HostDetails/Tabs/ContentTab/constants.js +1 -0
  53. data/webpack/components/extensions/HostDetails/Tabs/ErrataTab/ErratumExpansionContents.js +3 -3
  54. data/webpack/components/extensions/HostDetails/Tabs/ModuleStreamsTab/ModuleStreamsActions.js +16 -0
  55. data/webpack/components/extensions/HostDetails/Tabs/ModuleStreamsTab/ModuleStreamsConstants.js +3 -0
  56. data/webpack/components/extensions/HostDetails/Tabs/ModuleStreamsTab/ModuleStreamsSelectors.js +19 -0
  57. data/webpack/components/extensions/HostDetails/Tabs/ModuleStreamsTab/ModuleStreamsTab.js +241 -0
  58. data/webpack/components/extensions/HostDetails/Tabs/ModuleStreamsTab/__tests__/moduleStreamsTab.test.js +108 -0
  59. data/webpack/components/extensions/HostDetails/Tabs/ModuleStreamsTab/__tests__/modules.fixtures.json +34 -0
  60. data/webpack/components/extensions/HostDetails/Tabs/PackageInstallModal.js +5 -5
  61. data/webpack/components/extensions/HostDetails/Tabs/PackagesTab.js +255 -79
  62. data/webpack/components/extensions/HostDetails/Tabs/RemoteExecutionActions.js +76 -0
  63. data/webpack/components/extensions/HostDetails/Tabs/RemoteExecutionConstants.js +4 -0
  64. data/webpack/components/extensions/HostDetails/Tabs/__tests__/packagesTab.test.js +259 -9
  65. data/webpack/components/extensions/HostDetails/Tabs/__tests__/tracesTab.test.js +22 -26
  66. data/webpack/components/extensions/HostDetails/Tabs/customizedRexUrlHelpers.js +13 -0
  67. data/webpack/components/extensions/RegistrationCommands/__tests__/__snapshots__/ActivationKeys.test.js.snap +4 -0
  68. data/webpack/components/extensions/RegistrationCommands/fields/ActivationKeys.js +1 -1
  69. data/webpack/components/extensions/RegistrationCommands/fields/LifecycleEnvironment.js +1 -1
  70. data/webpack/components/extensions/about/SystemStatuses.js +1 -1
  71. data/webpack/components/extensions/about/SystemStatusesReducer.js +10 -10
  72. data/webpack/components/pf3Table/components/Table.js +2 -2
  73. data/webpack/components/pf3Table/components/TableBody.js +2 -2
  74. data/webpack/redux/OrganizationProducts/OrganizationProductsReducer.js +15 -15
  75. data/webpack/redux/reducers/RedHatRepositories/enabled.js +43 -43
  76. data/webpack/redux/reducers/RedHatRepositories/repositorySetRepositories.js +43 -43
  77. data/webpack/redux/reducers/RedHatRepositories/sets.js +31 -31
  78. data/webpack/scenes/AnsibleCollections/AnsibleCollectionsReducer.js +26 -26
  79. data/webpack/scenes/AnsibleCollections/Details/AnsibleCollectionDetailsReducer.js +19 -19
  80. data/webpack/scenes/Content/Table/ContentTable.js +1 -1
  81. data/webpack/scenes/ContentViews/Create/CreateContentViewForm.js +2 -1
  82. data/webpack/scenes/ContentViews/Delete/Steps/CVDeletionReassignHostsForm.js +2 -2
  83. data/webpack/scenes/ContentViews/Details/ComponentContentViews/ContentViewComponents.js +1 -1
  84. data/webpack/scenes/ContentViews/Details/ContentViewDetailActions.js +1 -1
  85. data/webpack/scenes/ContentViews/Details/ContentViewDetailReducer.js +8 -8
  86. data/webpack/scenes/ContentViews/Details/Filters/AffectedRepositories/AffectedRepositoryTable.js +1 -1
  87. data/webpack/scenes/ContentViews/Details/Filters/ArtifactsWithNoErrata.js +8 -8
  88. data/webpack/scenes/ContentViews/Details/Filters/CVContainerImageFilterContent.js +1 -1
  89. data/webpack/scenes/ContentViews/Details/Filters/CVErrataDateFilterContent.js +1 -1
  90. data/webpack/scenes/ContentViews/Details/Filters/CVErrataIDFilterContent.js +1 -1
  91. data/webpack/scenes/ContentViews/Details/Filters/CVFilterDetailType.js +46 -46
  92. data/webpack/scenes/ContentViews/Details/Filters/CVModuleStreamFilterContent.js +14 -14
  93. data/webpack/scenes/ContentViews/Details/Filters/CVPackageGroupFilterContent.js +14 -14
  94. data/webpack/scenes/ContentViews/Details/Filters/CVRpmFilterContent.js +1 -1
  95. data/webpack/scenes/ContentViews/Details/Filters/ContentViewFilters.js +1 -1
  96. data/webpack/scenes/ContentViews/Details/Filters/Rules/Package/AddEditPackageRuleModal.js +17 -17
  97. data/webpack/scenes/ContentViews/Details/Repositories/ContentViewRepositories.js +1 -1
  98. data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersionContent.js +19 -18
  99. data/webpack/scenes/ContentViews/Details/Versions/Delete/RemoveSteps/CVEnvironmentSelectionForm.js +18 -18
  100. data/webpack/scenes/ContentViews/Details/Versions/Delete/RemoveSteps/CVReassignActivationKeysForm.js +3 -3
  101. data/webpack/scenes/ContentViews/Details/Versions/Delete/RemoveSteps/CVReassignHostsForm.js +3 -3
  102. data/webpack/scenes/ContentViews/Details/Versions/Delete/affectedActivationKeys.js +1 -1
  103. data/webpack/scenes/ContentViews/Details/Versions/Delete/affectedHosts.js +1 -1
  104. data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionDetailConfig.js +1 -1
  105. data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionDetailsTable.js +46 -34
  106. data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionRepositoryCell.js +65 -48
  107. data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js +1 -1
  108. data/webpack/scenes/ContentViews/Publish/CVPublishFinish.js +2 -2
  109. data/webpack/scenes/ContentViews/Table/ContentViewsTable.js +4 -4
  110. data/webpack/scenes/ContentViews/components/EnvironmentLabels.js +18 -18
  111. data/webpack/scenes/ContentViews/components/EnvironmentPaths/EnvironmentPaths.js +10 -10
  112. data/webpack/scenes/ContentViews/expansions/DetailsExpansion.js +2 -2
  113. data/webpack/scenes/Hosts/ChangeContentSource/components/ContentSourceForm.js +7 -7
  114. data/webpack/scenes/Hosts/ChangeContentSource/components/ContentSourceTemplate.js +7 -7
  115. data/webpack/scenes/Hosts/ChangeContentSource/components/FormField.js +3 -3
  116. data/webpack/scenes/ModuleStreams/Details/ModuleStreamDetailsReducer.js +18 -18
  117. data/webpack/scenes/ModuleStreams/ModuleStreamsReducer.js +26 -26
  118. data/webpack/scenes/Organizations/OrganizationReducer.js +8 -8
  119. data/webpack/scenes/RedHatRepositories/components/EnabledRepository/EnabledRepositoryContent.js +4 -4
  120. data/webpack/scenes/RedHatRepositories/components/RepositorySetRepositories.js +1 -1
  121. data/webpack/scenes/Settings/SettingsReducer.js +14 -14
  122. data/webpack/scenes/Settings/Tables/TableReducer.js +23 -23
  123. data/webpack/scenes/Subscriptions/Details/SubscriptionDetailInfo.js +2 -2
  124. data/webpack/scenes/Subscriptions/Details/SubscriptionDetailProductContent.js +15 -15
  125. data/webpack/scenes/Subscriptions/Details/SubscriptionDetailProducts.js +1 -1
  126. data/webpack/scenes/Subscriptions/Details/SubscriptionDetailReducer.js +34 -34
  127. data/webpack/scenes/Subscriptions/Details/SubscriptionDetails.js +13 -13
  128. data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/AirGappedTypeForm.js +3 -3
  129. data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/CdnTypeForm.js +4 -4
  130. data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/UpstreamServerTypeForm.js +3 -3
  131. data/webpack/scenes/Subscriptions/Manifest/ManageManifestModal.js +5 -5
  132. data/webpack/scenes/Subscriptions/Manifest/ManifestHistoryReducer.js +16 -16
  133. data/webpack/scenes/Subscriptions/SubscriptionReducer.js +149 -149
  134. data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsReducer.js +41 -41
  135. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Dialogs/DeleteDialog.js +6 -6
  136. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Table.js +12 -12
  137. data/webpack/services/index.js +36 -36
  138. data/webpack/utils/helpers.js +5 -5
  139. metadata +16 -6
@@ -159,7 +159,7 @@ class ManageManifestModal extends Component {
159
159
  simpleContentAccessEligible={simpleContentAccessEligible}
160
160
  />
161
161
  </Row>
162
- }
162
+ }
163
163
  <Row>
164
164
  <Col sm={5}>
165
165
  <strong>{__('Subscription Allocation')}</strong>
@@ -176,7 +176,7 @@ class ManageManifestModal extends Component {
176
176
  >
177
177
  <div>{__('Import New Manifest')}</div>
178
178
  </ControlLabel>
179
- }
179
+ }
180
180
  </Col>
181
181
  <Col sm={7} className="manifest-actions">
182
182
  <Spinner loading={actionInProgress} />
@@ -188,7 +188,7 @@ class ManageManifestModal extends Component {
188
188
  disabled={actionInProgress}
189
189
  onChange={e => this.uploadManifest(e.target.files)}
190
190
  />
191
- }
191
+ }
192
192
  <div id="manifest-actions-row">
193
193
  {canImportManifest &&
194
194
  <TooltipButton
@@ -200,7 +200,7 @@ class ManageManifestModal extends Component {
200
200
  disabled={!isManifestImported ||
201
201
  actionInProgress || disableManifestActions}
202
202
  />
203
- }
203
+ }
204
204
  {canDeleteManifest &&
205
205
  <React.Fragment>
206
206
  <TooltipButton
@@ -213,7 +213,7 @@ class ManageManifestModal extends Component {
213
213
  tooltipPlacement="top"
214
214
  />
215
215
  </React.Fragment>
216
- }
216
+ }
217
217
  </div>
218
218
  <ForemanModal title={__('Confirm delete manifest')} id={DELETE_MANIFEST_MODAL_ID}>
219
219
  <DeleteManifestModalText />
@@ -10,25 +10,25 @@ const initialState = Immutable({ loading: true, results: [] });
10
10
 
11
11
  export default (state = initialState, action) => {
12
12
  switch (action.type) {
13
- case MANIFEST_HISTORY_REQUEST:
14
- return state.set('loading', true);
13
+ case MANIFEST_HISTORY_REQUEST:
14
+ return state.set('loading', true);
15
15
 
16
- case MANIFEST_HISTORY_SUCCESS: {
17
- const results = action.response;
16
+ case MANIFEST_HISTORY_SUCCESS: {
17
+ const results = action.response;
18
18
 
19
- return state.merge({
20
- results,
21
- loading: false,
22
- });
23
- }
19
+ return state.merge({
20
+ results,
21
+ loading: false,
22
+ });
23
+ }
24
24
 
25
- case MANIFEST_HISTORY_FAILURE:
26
- return state.merge({
27
- error: action.payload.message,
28
- loading: false,
29
- });
25
+ case MANIFEST_HISTORY_FAILURE:
26
+ return state.merge({
27
+ error: action.payload.message,
28
+ loading: false,
29
+ });
30
30
 
31
- default:
32
- return state;
31
+ default:
32
+ return state;
33
33
  }
34
34
  };
@@ -69,160 +69,160 @@ const initialState = Immutable({
69
69
 
70
70
  export default (state = initialState, action) => {
71
71
  switch (action.type) {
72
- case SIMPLE_CONTENT_ACCESS_ELIGIBLE_SUCCESS:
73
- return state.set('simpleContentAccessEligible', action.response.simple_content_access_eligible);
74
- case PING_UPSTREAM_SUBSCRIPTIONS_SUCCESS:
75
- return state.set('hasUpstreamConnection', true);
76
- case PING_UPSTREAM_SUBSCRIPTIONS_FAILURE:
77
- return state.set('hasUpstreamConnection', false);
78
- case SUBSCRIPTIONS_REQUEST:
79
- return state.set('loading', true);
80
- case SUBSCRIPTIONS_COLUMNS_REQUEST:
81
- return state
82
- .set('tableColumns', action.payload.tableColumns);
83
- case UPDATE_SUBSCRIPTION_COLUMNS:
84
- return state
85
- .set('selectedTableColumns', action.payload.enabledColumns);
86
- case SUBSCRIPTIONS_SUCCESS: {
87
- const {
88
- page,
89
- per_page, // eslint-disable-line camelcase
90
- subtotal,
91
- results,
92
- can_import_manifest, // eslint-disable-line camelcase
93
- can_delete_manifest, // eslint-disable-line camelcase
94
- can_manage_subscription_allocations, // eslint-disable-line camelcase
95
- can_edit_organizations, // eslint-disable-line camelcase
96
- } = action.response;
97
-
98
- return state.merge({
99
- results,
100
- activePermissions: {
101
- can_import_manifest,
102
- can_delete_manifest,
103
- can_manage_subscription_allocations,
104
- can_edit_organizations,
105
- },
106
- loading: false,
107
- searchIsActive: !!action.search,
108
- search: action.search,
109
- pagination: {
110
- page: Number(page),
111
- // eslint-disable-next-line camelcase
112
- perPage: Number(per_page || state.pagination.perPage),
113
- },
114
- itemCount: Number(subtotal),
115
- });
116
- }
72
+ case SIMPLE_CONTENT_ACCESS_ELIGIBLE_SUCCESS:
73
+ return state.set('simpleContentAccessEligible', action.response.simple_content_access_eligible);
74
+ case PING_UPSTREAM_SUBSCRIPTIONS_SUCCESS:
75
+ return state.set('hasUpstreamConnection', true);
76
+ case PING_UPSTREAM_SUBSCRIPTIONS_FAILURE:
77
+ return state.set('hasUpstreamConnection', false);
78
+ case SUBSCRIPTIONS_REQUEST:
79
+ return state.set('loading', true);
80
+ case SUBSCRIPTIONS_COLUMNS_REQUEST:
81
+ return state
82
+ .set('tableColumns', action.payload.tableColumns);
83
+ case UPDATE_SUBSCRIPTION_COLUMNS:
84
+ return state
85
+ .set('selectedTableColumns', action.payload.enabledColumns);
86
+ case SUBSCRIPTIONS_SUCCESS: {
87
+ const {
88
+ page,
89
+ per_page, // eslint-disable-line camelcase
90
+ subtotal,
91
+ results,
92
+ can_import_manifest, // eslint-disable-line camelcase
93
+ can_delete_manifest, // eslint-disable-line camelcase
94
+ can_manage_subscription_allocations, // eslint-disable-line camelcase
95
+ can_edit_organizations, // eslint-disable-line camelcase
96
+ } = action.response;
97
+
98
+ return state.merge({
99
+ results,
100
+ activePermissions: {
101
+ can_import_manifest,
102
+ can_delete_manifest,
103
+ can_manage_subscription_allocations,
104
+ can_edit_organizations,
105
+ },
106
+ loading: false,
107
+ searchIsActive: !!action.search,
108
+ search: action.search,
109
+ pagination: {
110
+ page: Number(page),
111
+ // eslint-disable-next-line camelcase
112
+ perPage: Number(per_page || state.pagination.perPage),
113
+ },
114
+ itemCount: Number(subtotal),
115
+ });
116
+ }
117
117
 
118
- case SUBSCRIPTIONS_FAILURE:
119
- return state
120
- .set('loading', false)
121
- .set('results', [])
122
- .set('itemCount', 0)
123
- .set(
124
- 'missingPermissions',
125
- get(action, ['payload', 'messages', 0, 'missing_permissions']),
126
- );
127
-
128
- case SUBSCRIPTIONS_QUANTITIES_REQUEST:
129
- return state.merge({
130
- quantitiesLoading: true,
131
- availableQuantities: null,
132
- });
133
-
134
- case SUBSCRIPTIONS_QUANTITIES_SUCCESS: {
135
- return state.merge({
136
- quantitiesLoading: false,
137
- availableQuantities: action.payload,
138
- });
139
- }
118
+ case SUBSCRIPTIONS_FAILURE:
119
+ return state
120
+ .set('loading', false)
121
+ .set('results', [])
122
+ .set('itemCount', 0)
123
+ .set(
124
+ 'missingPermissions',
125
+ get(action, ['payload', 'messages', 0, 'missing_permissions']),
126
+ );
127
+
128
+ case SUBSCRIPTIONS_QUANTITIES_REQUEST:
129
+ return state.merge({
130
+ quantitiesLoading: true,
131
+ availableQuantities: null,
132
+ });
133
+
134
+ case SUBSCRIPTIONS_QUANTITIES_SUCCESS: {
135
+ return state.merge({
136
+ quantitiesLoading: false,
137
+ availableQuantities: action.payload,
138
+ });
139
+ }
140
140
 
141
- case SUBSCRIPTIONS_QUANTITIES_FAILURE: {
142
- return state.merge({
143
- quantitiesLoading: false,
144
- availableQuantities: {},
145
- });
146
- }
141
+ case SUBSCRIPTIONS_QUANTITIES_FAILURE: {
142
+ return state.merge({
143
+ quantitiesLoading: false,
144
+ availableQuantities: {},
145
+ });
146
+ }
147
147
 
148
- case SUBSCRIPTIONS_TASK_SEARCH_SUCCESS: {
149
- if (!state.task) {
150
- const tasks = action.response.results;
151
- if (tasks.length > 0) {
152
- return state
153
- .set('task', tasks[0]); // this will be the oldest pending task
154
- }
148
+ case SUBSCRIPTIONS_TASK_SEARCH_SUCCESS: {
149
+ if (!state.task) {
150
+ const tasks = action.response.results;
151
+ if (tasks.length > 0) {
152
+ return state
153
+ .set('task', tasks[0]); // this will be the oldest pending task
155
154
  }
156
-
157
- return state;
158
155
  }
159
156
 
160
- case DELETE_MANIFEST_SUCCESS:
161
- return state.merge({
162
- task: action.response,
163
- hasUpstreamConnection: false,
164
- manifestActionStarted: false,
165
- });
166
-
167
- case SUBSCRIPTIONS_POLL_TASK_SUCCESS:
168
- return state
169
- .set('task', action.response);
170
-
171
- case UPDATE_QUANTITY_SUCCESS:
172
- case UPLOAD_MANIFEST_SUCCESS:
173
- case REFRESH_MANIFEST_SUCCESS:
174
- case ENABLE_SIMPLE_CONTENT_ACCESS_SUCCESS:
175
- case DISABLE_SIMPLE_CONTENT_ACCESS_SUCCESS:
176
- return state
177
- .set('task', action.response)
178
- .set('manifestActionStarted', false);
179
-
180
- case ENABLE_SIMPLE_CONTENT_ACCESS_REQUEST:
181
- case DISABLE_SIMPLE_CONTENT_ACCESS_REQUEST:
182
- case REFRESH_MANIFEST_REQUEST:
183
- case UPLOAD_MANIFEST_REQUEST:
184
- case DELETE_MANIFEST_REQUEST:
185
- case UPDATE_QUANTITY_REQUEST:
186
- case DELETE_SUBSCRIPTIONS_REQUEST:
187
- return state
188
- .set('manifestActionStarted', true);
189
-
190
- case ENABLE_SIMPLE_CONTENT_ACCESS_FAILURE:
191
- case DISABLE_SIMPLE_CONTENT_ACCESS_FAILURE:
192
- case REFRESH_MANIFEST_FAILURE:
193
- case UPLOAD_MANIFEST_FAILURE:
194
- case DELETE_MANIFEST_FAILURE:
195
- case DELETE_SUBSCRIPTIONS_FAILURE:
196
- case UPDATE_QUANTITY_FAILURE:
197
- return state
198
- .set('manifestActionStarted', false);
199
-
200
- case DELETE_SUBSCRIPTIONS_SUCCESS:
201
- return state
202
- .set('task', action.response)
203
- .set('manifestActionStarted', false)
204
- .set('deleteButtonDisabled', true);
205
-
206
- case SUBSCRIPTIONS_RESET_TASKS:
207
- case SUBSCRIPTIONS_TASK_SEARCH_FAILURE:
208
- case SUBSCRIPTIONS_POLL_TASK_FAILURE:
209
- return state
210
- .set('task', null);
211
-
212
- case SUBSCRIPTIONS_UPDATE_SEARCH_QUERY:
213
- return state.set('searchQuery', action.payload);
214
-
215
- case SUBSCRIPTIONS_OPEN_DELETE_MODAL:
216
- return state.set('deleteModalOpened', true);
217
- case SUBSCRIPTIONS_CLOSE_DELETE_MODAL:
218
- return state.set('deleteModalOpened', false);
219
-
220
- case SUBSCRIPTIONS_DISABLE_DELETE_BUTTON:
221
- return state.set('deleteButtonDisabled', true);
222
- case SUBSCRIPTIONS_ENABLE_DELETE_BUTTON:
223
- return state.set('deleteButtonDisabled', false);
224
-
225
- default:
226
- return state;
157
+ return state;
158
+ }
159
+
160
+ case DELETE_MANIFEST_SUCCESS:
161
+ return state.merge({
162
+ task: action.response,
163
+ hasUpstreamConnection: false,
164
+ manifestActionStarted: false,
165
+ });
166
+
167
+ case SUBSCRIPTIONS_POLL_TASK_SUCCESS:
168
+ return state
169
+ .set('task', action.response);
170
+
171
+ case UPDATE_QUANTITY_SUCCESS:
172
+ case UPLOAD_MANIFEST_SUCCESS:
173
+ case REFRESH_MANIFEST_SUCCESS:
174
+ case ENABLE_SIMPLE_CONTENT_ACCESS_SUCCESS:
175
+ case DISABLE_SIMPLE_CONTENT_ACCESS_SUCCESS:
176
+ return state
177
+ .set('task', action.response)
178
+ .set('manifestActionStarted', false);
179
+
180
+ case ENABLE_SIMPLE_CONTENT_ACCESS_REQUEST:
181
+ case DISABLE_SIMPLE_CONTENT_ACCESS_REQUEST:
182
+ case REFRESH_MANIFEST_REQUEST:
183
+ case UPLOAD_MANIFEST_REQUEST:
184
+ case DELETE_MANIFEST_REQUEST:
185
+ case UPDATE_QUANTITY_REQUEST:
186
+ case DELETE_SUBSCRIPTIONS_REQUEST:
187
+ return state
188
+ .set('manifestActionStarted', true);
189
+
190
+ case ENABLE_SIMPLE_CONTENT_ACCESS_FAILURE:
191
+ case DISABLE_SIMPLE_CONTENT_ACCESS_FAILURE:
192
+ case REFRESH_MANIFEST_FAILURE:
193
+ case UPLOAD_MANIFEST_FAILURE:
194
+ case DELETE_MANIFEST_FAILURE:
195
+ case DELETE_SUBSCRIPTIONS_FAILURE:
196
+ case UPDATE_QUANTITY_FAILURE:
197
+ return state
198
+ .set('manifestActionStarted', false);
199
+
200
+ case DELETE_SUBSCRIPTIONS_SUCCESS:
201
+ return state
202
+ .set('task', action.response)
203
+ .set('manifestActionStarted', false)
204
+ .set('deleteButtonDisabled', true);
205
+
206
+ case SUBSCRIPTIONS_RESET_TASKS:
207
+ case SUBSCRIPTIONS_TASK_SEARCH_FAILURE:
208
+ case SUBSCRIPTIONS_POLL_TASK_FAILURE:
209
+ return state
210
+ .set('task', null);
211
+
212
+ case SUBSCRIPTIONS_UPDATE_SEARCH_QUERY:
213
+ return state.set('searchQuery', action.payload);
214
+
215
+ case SUBSCRIPTIONS_OPEN_DELETE_MODAL:
216
+ return state.set('deleteModalOpened', true);
217
+ case SUBSCRIPTIONS_CLOSE_DELETE_MODAL:
218
+ return state.set('deleteModalOpened', false);
219
+
220
+ case SUBSCRIPTIONS_DISABLE_DELETE_BUTTON:
221
+ return state.set('deleteButtonDisabled', true);
222
+ case SUBSCRIPTIONS_ENABLE_DELETE_BUTTON:
223
+ return state.set('deleteButtonDisabled', false);
224
+
225
+ default:
226
+ return state;
227
227
  }
228
228
  };
@@ -13,46 +13,46 @@ const initialState = initialApiState;
13
13
 
14
14
  export default (state = initialState, action) => {
15
15
  switch (action.type) {
16
- case UPSTREAM_SUBSCRIPTIONS_REQUEST:
17
- return state.set('loading', true);
18
-
19
- case UPSTREAM_SUBSCRIPTIONS_SUCCESS: {
20
- const {
21
- page, per_page, total, results, // eslint-disable-line camelcase
22
-
23
- } = action.response;
24
-
25
- return state.merge({
26
- results,
27
- loading: false,
28
- searchIsActive: !!action.search,
29
- search: action.search,
30
- pagination: {
31
- page: Number(page),
32
- // eslint-disable-next-line camelcase
33
- perPage: Number(per_page || state.pagination.perPage),
34
- },
35
- itemCount: Number(total),
36
- });
37
- }
38
-
39
- case UPSTREAM_SUBSCRIPTIONS_FAILURE:
40
- return state.merge({
41
- error: action.payload.message,
42
- loading: false,
43
- });
44
-
45
- case SAVE_UPSTREAM_SUBSCRIPTIONS_REQUEST:
46
- return state.set('loading', true);
47
-
48
- case SAVE_UPSTREAM_SUBSCRIPTIONS_SUCCESS:
49
- return state.set('task', action.response).set('loading', false);
50
-
51
- case SAVE_UPSTREAM_SUBSCRIPTIONS_FAILURE: {
52
- return state.set('error', action.payload.message).set('loading', false);
53
- }
54
-
55
- default:
56
- return state;
16
+ case UPSTREAM_SUBSCRIPTIONS_REQUEST:
17
+ return state.set('loading', true);
18
+
19
+ case UPSTREAM_SUBSCRIPTIONS_SUCCESS: {
20
+ const {
21
+ page, per_page, total, results, // eslint-disable-line camelcase
22
+
23
+ } = action.response;
24
+
25
+ return state.merge({
26
+ results,
27
+ loading: false,
28
+ searchIsActive: !!action.search,
29
+ search: action.search,
30
+ pagination: {
31
+ page: Number(page),
32
+ // eslint-disable-next-line camelcase
33
+ perPage: Number(per_page || state.pagination.perPage),
34
+ },
35
+ itemCount: Number(total),
36
+ });
37
+ }
38
+
39
+ case UPSTREAM_SUBSCRIPTIONS_FAILURE:
40
+ return state.merge({
41
+ error: action.payload.message,
42
+ loading: false,
43
+ });
44
+
45
+ case SAVE_UPSTREAM_SUBSCRIPTIONS_REQUEST:
46
+ return state.set('loading', true);
47
+
48
+ case SAVE_UPSTREAM_SUBSCRIPTIONS_SUCCESS:
49
+ return state.set('task', action.response).set('loading', false);
50
+
51
+ case SAVE_UPSTREAM_SUBSCRIPTIONS_FAILURE: {
52
+ return state.set('error', action.payload.message).set('loading', false);
53
+ }
54
+
55
+ default:
56
+ return state;
57
57
  }
58
58
  };
@@ -13,15 +13,15 @@ const DeleteDialog = ({
13
13
  // eslint-disable-next-line react/no-danger
14
14
  <p dangerouslySetInnerHTML={{
15
15
  __html: sprintf(
16
- __(`Are you sure you want to delete %(entitlementCount)s
16
+ __(`Are you sure you want to delete %(entitlementCount)s
17
17
  subscription(s)? This action will remove the subscription(s) and
18
18
  refresh your manifest. All systems using these subscription(s) will
19
19
  lose them and also may lose access to updates and Errata.`),
20
- {
21
- entitlementCount: `<b>${selectedRows.length}</b>`,
22
- },
23
- ),
24
- }}
20
+ {
21
+ entitlementCount: `<b>${selectedRows.length}</b>`,
22
+ },
23
+ ),
24
+ }}
25
25
  />
26
26
  }
27
27
  primaryActionButtonContent={__('Delete')}
@@ -65,10 +65,10 @@ const Table = ({
65
65
  bodyMessage={bodyMessage}
66
66
  rows={rows}
67
67
  components={{
68
- header: {
69
- row: PFtable.TableInlineEditHeaderRow,
70
- },
71
- }}
68
+ header: {
69
+ row: PFtable.TableInlineEditHeaderRow,
70
+ },
71
+ }}
72
72
  itemCount={subscriptions.itemCount}
73
73
  pagination={subscriptions.pagination}
74
74
  onPaginationChange={onPaginationChange}
@@ -76,11 +76,11 @@ const Table = ({
76
76
  >
77
77
  <PFtable.Header
78
78
  onRow={() => ({
79
- role: 'row',
80
- isEditing: () => editing,
81
- onCancel: () => inlineEditController.onCancel(),
82
- onConfirm: () => inlineEditController.onConfirm(),
83
- })}
79
+ role: 'row',
80
+ isEditing: () => editing,
81
+ onCancel: () => inlineEditController.onCancel(),
82
+ onConfirm: () => inlineEditController.onConfirm(),
83
+ })}
84
84
  />
85
85
  <ForemanTableBody
86
86
  columns={columnsDefinition}
@@ -88,8 +88,8 @@ const Table = ({
88
88
  rowKey="id"
89
89
  message={bodyMessage}
90
90
  onRow={rowData => ({
91
- className: classNames({ 'open-grouped-row': !groupingController.isCollapsed({ rowData }) }),
92
- })}
91
+ className: classNames({ 'open-grouped-row': !groupingController.isCollapsed({ rowData }) }),
92
+ })}
93
93
  />
94
94
  </ForemanTable>
95
95
  );
@@ -115,7 +115,7 @@ Table.propTypes = {
115
115
  }).isRequired,
116
116
  groupedSubscriptions: PropTypes.shape({}).isRequired,
117
117
  editing: PropTypes.bool.isRequired,
118
- rows: PropTypes.arrayOf(PropTypes.object).isRequired,
118
+ rows: PropTypes.arrayOf(PropTypes.shape({})).isRequired,
119
119
  selectionEnabled: PropTypes.bool.isRequired,
120
120
  };
121
121
 
@@ -3,42 +3,42 @@ export function getTypeIcon(type) {
3
3
  const typeIcon = { name: '', type: '' };
4
4
 
5
5
  switch (type) {
6
- case 'yum':
7
- typeIcon.name = 'bundle';
8
- typeIcon.type = 'pf';
9
- break;
10
- case 'source_rpm':
11
- typeIcon.name = 'code';
12
- typeIcon.type = 'fa';
13
- break;
14
- case 'file':
15
- typeIcon.name = 'file';
16
- typeIcon.type = 'fa';
17
- break;
18
- case 'debug':
19
- typeIcon.name = 'bug';
20
- typeIcon.type = 'fa';
21
- break;
22
- case 'iso':
23
- typeIcon.name = 'file-image-o';
24
- typeIcon.type = 'fa';
25
- break;
26
- case 'beta':
27
- typeIcon.name = 'bold';
28
- typeIcon.type = 'fa';
29
- break;
30
- case 'kickstart':
31
- typeIcon.name = 'futbol-o';
32
- typeIcon.type = 'fa';
33
- break;
34
- case 'containerimage':
35
- typeIcon.name = 'cube';
36
- typeIcon.type = 'fa';
37
- break;
38
- default:
39
- typeIcon.name = 'question';
40
- typeIcon.type = 'fa';
41
- break;
6
+ case 'yum':
7
+ typeIcon.name = 'bundle';
8
+ typeIcon.type = 'pf';
9
+ break;
10
+ case 'source_rpm':
11
+ typeIcon.name = 'code';
12
+ typeIcon.type = 'fa';
13
+ break;
14
+ case 'file':
15
+ typeIcon.name = 'file';
16
+ typeIcon.type = 'fa';
17
+ break;
18
+ case 'debug':
19
+ typeIcon.name = 'bug';
20
+ typeIcon.type = 'fa';
21
+ break;
22
+ case 'iso':
23
+ typeIcon.name = 'file-image-o';
24
+ typeIcon.type = 'fa';
25
+ break;
26
+ case 'beta':
27
+ typeIcon.name = 'bold';
28
+ typeIcon.type = 'fa';
29
+ break;
30
+ case 'kickstart':
31
+ typeIcon.name = 'futbol-o';
32
+ typeIcon.type = 'fa';
33
+ break;
34
+ case 'containerimage':
35
+ typeIcon.name = 'cube';
36
+ typeIcon.type = 'fa';
37
+ break;
38
+ default:
39
+ typeIcon.name = 'question';
40
+ typeIcon.type = 'fa';
41
+ break;
42
42
  }
43
43
  return typeIcon;
44
44
  }
@@ -23,11 +23,11 @@ export const getBookmarkErrorMsgs = ({ data: { error } } = {}) => {
23
23
  const getCustomMessage = (actionType, message) => {
24
24
  let customMessage;
25
25
  switch (actionType) {
26
- case SUBSCRIPTIONS_QUANTITIES_FAILURE:
27
- customMessage = getSubscriptionsErrorMessage(message);
28
- break;
29
- default:
30
- customMessage = null;
26
+ case SUBSCRIPTIONS_QUANTITIES_FAILURE:
27
+ customMessage = getSubscriptionsErrorMessage(message);
28
+ break;
29
+ default:
30
+ customMessage = null;
31
31
  }
32
32
  return customMessage;
33
33
  };