katello 4.14.0.rc1.1 → 4.14.0.rc3
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.
- checksums.yaml +4 -4
- data/app/assets/javascripts/katello/common/katello.common.js +1 -1
- data/app/assets/javascripts/katello/sync_management/sync_management.js +1 -1
- data/app/controllers/katello/api/v2/api_controller.rb +2 -2
- data/app/controllers/katello/api/v2/host_packages_controller.rb +16 -1
- data/app/controllers/katello/api/v2/repositories_bulk_actions_controller.rb +2 -2
- data/app/models/katello/concerns/host_managed_extensions.rb +1 -1
- data/app/views/katello/api/v2/host_packages/installed_packages.json.rabl +6 -0
- data/app/views/katello/sync_management/_controls.html.erb +1 -1
- data/config/routes/overrides.rb +1 -0
- data/lib/katello/permission_creator.rb +2 -1
- data/lib/katello/version.rb +1 -1
- data/locale/bn/LC_MESSAGES/katello.mo +0 -0
- data/locale/bn_IN/LC_MESSAGES/katello.mo +0 -0
- data/locale/ca/LC_MESSAGES/katello.mo +0 -0
- data/locale/cs/LC_MESSAGES/katello.mo +0 -0
- data/locale/cs_CZ/LC_MESSAGES/katello.mo +0 -0
- data/locale/de/LC_MESSAGES/katello.mo +0 -0
- data/locale/de_AT/LC_MESSAGES/katello.mo +0 -0
- data/locale/de_DE/LC_MESSAGES/katello.mo +0 -0
- data/locale/el/LC_MESSAGES/katello.mo +0 -0
- data/locale/en/LC_MESSAGES/katello.mo +0 -0
- data/locale/en_GB/LC_MESSAGES/katello.mo +0 -0
- data/locale/en_US/LC_MESSAGES/katello.mo +0 -0
- data/locale/es/LC_MESSAGES/katello.mo +0 -0
- data/locale/et_EE/LC_MESSAGES/katello.mo +0 -0
- data/locale/fr/LC_MESSAGES/katello.mo +0 -0
- data/locale/gl/LC_MESSAGES/katello.mo +0 -0
- data/locale/gu/LC_MESSAGES/katello.mo +0 -0
- data/locale/he_IL/LC_MESSAGES/katello.mo +0 -0
- data/locale/hi/LC_MESSAGES/katello.mo +0 -0
- data/locale/id/LC_MESSAGES/katello.mo +0 -0
- data/locale/it/LC_MESSAGES/katello.mo +0 -0
- data/locale/ja/LC_MESSAGES/katello.mo +0 -0
- data/locale/ka/LC_MESSAGES/katello.mo +0 -0
- data/locale/kn/LC_MESSAGES/katello.mo +0 -0
- data/locale/ko/LC_MESSAGES/katello.mo +0 -0
- data/locale/ml_IN/LC_MESSAGES/katello.mo +0 -0
- data/locale/mr/LC_MESSAGES/katello.mo +0 -0
- data/locale/nl_NL/LC_MESSAGES/katello.mo +0 -0
- data/locale/or/LC_MESSAGES/katello.mo +0 -0
- data/locale/pa/LC_MESSAGES/katello.mo +0 -0
- data/locale/pl/LC_MESSAGES/katello.mo +0 -0
- data/locale/pl_PL/LC_MESSAGES/katello.mo +0 -0
- data/locale/pt/LC_MESSAGES/katello.mo +0 -0
- data/locale/pt_BR/LC_MESSAGES/katello.mo +0 -0
- data/locale/ro/LC_MESSAGES/katello.mo +0 -0
- data/locale/ro_RO/LC_MESSAGES/katello.mo +0 -0
- data/locale/ru/LC_MESSAGES/katello.mo +0 -0
- data/locale/sl/LC_MESSAGES/katello.mo +0 -0
- data/locale/sv_SE/LC_MESSAGES/katello.mo +0 -0
- data/locale/ta/LC_MESSAGES/katello.mo +0 -0
- data/locale/ta_IN/LC_MESSAGES/katello.mo +0 -0
- data/locale/te/LC_MESSAGES/katello.mo +0 -0
- data/locale/tr/LC_MESSAGES/katello.mo +0 -0
- data/locale/vi/LC_MESSAGES/katello.mo +0 -0
- data/locale/vi_VN/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh_CN/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh_TW/LC_MESSAGES/katello.mo +0 -0
- data/webpack/components/Table/PageControls.js +1 -0
- data/webpack/components/extensions/HostDetails/Tabs/RemoteExecutionActions.js +18 -0
- data/webpack/components/extensions/HostDetails/Tabs/RepositorySetsTab/RepositorySetsTab.js +7 -1
- data/webpack/components/extensions/HostDetails/Tabs/__tests__/packagesTab.test.js +88 -0
- data/webpack/components/extensions/Hosts/BulkActions/BulkPackagesWizard/02_BulkPackagesTable.js +1 -1
- data/webpack/components/extensions/Hosts/BulkActions/BulkPackagesWizard/BulkPackagesWizard.js +8 -3
- data/webpack/components/pf3Table/components/Table.js +1 -0
- data/webpack/components/pf3Table/components/__snapshots__/Table.test.js.snap +1 -1
- data/webpack/scenes/RedHatRepositories/__tests__/__snapshots__/RedHatRepositoriesPage.test.js.snap +1 -1
- data/webpack/scenes/RedHatRepositories/helpers.js +2 -0
- metadata +67 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 59babbb3cb7836e9eb0567c1dea29d720eaa3b96968f4d078eeaf98d4e3177a1
|
4
|
+
data.tar.gz: d57019bdcc781e11d389669b393f5ea8a8b144f09a6f87dbddac773a346b3257
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f668a837bd14561a7da7712b31b9f59df257276ea8b96224e9ca4bbd655cd799ae47474d98f7cb60a716765c41db9837730ead8499671799316bf24c2baf3ad
|
7
|
+
data.tar.gz: 726e63b52258f087bcbf640d8a01c398e23a683fec281aeddfc3b2ac97383eff599d593f78ac638c3d4443e60b55f45de132966cab505ad0de3f07cdb87521f9
|
@@ -65,7 +65,7 @@ KT.common = (function() {
|
|
65
65
|
}
|
66
66
|
},
|
67
67
|
spinner_path : function() {
|
68
|
-
return
|
68
|
+
return document.querySelector('#sync_toggle_cont').dataset.spinnerAssetPath;
|
69
69
|
},
|
70
70
|
to_human_readable_bytes : function(bytes) {
|
71
71
|
var sizes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB'],
|
@@ -386,7 +386,7 @@ $("#sync_product_form")
|
|
386
386
|
});
|
387
387
|
|
388
388
|
$("#sync_toggle").change(function () {
|
389
|
-
var img = "<img
|
389
|
+
var img = "<img src='" + KT.common.spinner_path() + "'>";
|
390
390
|
$("#sync_toggle_cont").append(img);
|
391
391
|
if ($(this).is(":checked")) {
|
392
392
|
KT.content.showOnlySyncing();
|
@@ -100,8 +100,8 @@ module Katello
|
|
100
100
|
else
|
101
101
|
query = query.paginate(paginate_options)
|
102
102
|
end
|
103
|
-
page =
|
104
|
-
per_page =
|
103
|
+
page = metadata_page # from Foreman Api::V2::BaseController
|
104
|
+
per_page = metadata_per_page
|
105
105
|
query = (total.zero? || subtotal.zero?) ? blank_query : query
|
106
106
|
|
107
107
|
if options[:csv]
|
@@ -1,6 +1,7 @@
|
|
1
1
|
module Katello
|
2
2
|
class Api::V2::HostPackagesController < Api::V2::ApiController
|
3
3
|
include Katello::Concerns::FilteredAutoCompleteSearch
|
4
|
+
include Katello::Concerns::Api::V2::RepositoryContentController
|
4
5
|
|
5
6
|
UPGRADABLE = "upgradable".freeze
|
6
7
|
UP_TO_DATE = "up-to-date".freeze
|
@@ -8,7 +9,7 @@ module Katello
|
|
8
9
|
|
9
10
|
before_action :require_packages_or_groups, :only => [:install, :remove]
|
10
11
|
before_action :require_packages_only, :only => [:upgrade]
|
11
|
-
before_action :find_editable_host_with_facet, :except => :index
|
12
|
+
before_action :find_editable_host_with_facet, :except => [:index, :installed_packages]
|
12
13
|
before_action :find_host, :only => :index
|
13
14
|
|
14
15
|
resource_description do
|
@@ -21,6 +22,20 @@ module Katello
|
|
21
22
|
param :groups, Array, :desc => N_("List of package group names (Deprecated)"), :required => false
|
22
23
|
end
|
23
24
|
|
25
|
+
api :GET, "/host_packages/installed_packages", N_("Return a list of installed packages distinct by name")
|
26
|
+
param_group :search, ::Katello::Api::V2::ApiController
|
27
|
+
def installed_packages
|
28
|
+
_sort_by, _sort_order, options = sort_options
|
29
|
+
sort_by = 'name'
|
30
|
+
sort_order = 'asc'
|
31
|
+
|
32
|
+
options[:select] = "DISTINCT ON (#{::Katello::InstalledPackage.table_name}.name) #{::Katello::InstalledPackage.table_name}.id, #{::Katello::InstalledPackage.table_name}.name"
|
33
|
+
final_relation = ::Katello::InstalledPackage.all
|
34
|
+
|
35
|
+
result = scoped_search(final_relation, sort_by, sort_order, options)
|
36
|
+
respond_for_index(:collection => result, :template => "installed_packages")
|
37
|
+
end
|
38
|
+
|
24
39
|
api :GET, "/hosts/:host_id/packages", N_("List packages installed on the host")
|
25
40
|
param :host_id, :number, :required => true, :desc => N_("ID of the host")
|
26
41
|
param :include_latest_upgradable, :boolean, :desc => N_("Also include the latest upgradable package version for each host package")
|
@@ -6,7 +6,7 @@ module Katello
|
|
6
6
|
param :ids, Array, :desc => N_("List of repository ids"), :required => true
|
7
7
|
def destroy_repositories
|
8
8
|
deletion_authorized_repositories = @repositories.deletable
|
9
|
-
unpromoted_repos = Setting
|
9
|
+
unpromoted_repos = Setting[:delete_repo_across_cv] ? deletion_authorized_repositories : deletion_authorized_repositories.reject { |repo| repo.promoted? && repo.content_views.generated_for_none.exists? }
|
10
10
|
unpromoted_repos_non_last_affected_repo = unpromoted_repos.reject { |repo| repo.filters.any? { |filter| filter.repositories.size == 1 } }
|
11
11
|
messages1 = format_bulk_action_messages(
|
12
12
|
:success => "",
|
@@ -36,7 +36,7 @@ module Katello
|
|
36
36
|
task = async_task(::Actions::BulkAction,
|
37
37
|
::Actions::Katello::Repository::Destroy,
|
38
38
|
unpromoted_repos_non_last_affected_repo,
|
39
|
-
remove_from_content_view_versions: Setting
|
39
|
+
remove_from_content_view_versions: Setting[:delete_repo_across_cv]
|
40
40
|
)
|
41
41
|
else
|
42
42
|
status = 400
|
@@ -498,7 +498,7 @@ module Katello
|
|
498
498
|
end
|
499
499
|
|
500
500
|
def package_names_for_job_template(action:, search:, versions: nil)
|
501
|
-
if self
|
501
|
+
if self&.operatingsystem&.family == 'Debian'
|
502
502
|
deb_names_for_job_template(action: action, search: search)
|
503
503
|
else
|
504
504
|
yum_names_for_job_template(action: action, search: search, versions: versions)
|
@@ -21,7 +21,7 @@
|
|
21
21
|
</a>
|
22
22
|
</div>
|
23
23
|
<% end %>
|
24
|
-
<div id="sync_toggle_cont" class="fl table-action">
|
24
|
+
<div id="sync_toggle_cont" class="fl table-action" data-spinner-asset-path="<%= asset_path('spinner.gif') %>">
|
25
25
|
<input id="sync_toggle" type="checkbox"/>
|
26
26
|
<label for="sync_toggle">
|
27
27
|
<%= _('Active only') %>
|
data/config/routes/overrides.rb
CHANGED
@@ -80,6 +80,7 @@ Foreman::Application.routes.draw do
|
|
80
80
|
match '/bulk/module_streams' => 'hosts_bulk_actions#module_streams', :via => :post
|
81
81
|
match '/bulk/change_content_source' => 'hosts_bulk_actions#change_content_source', :via => :put
|
82
82
|
match '/subscriptions/' => 'host_subscriptions#create', :via => :post
|
83
|
+
match '/host_packages/installed_packages' => 'host_packages#installed_packages', :via => :get
|
83
84
|
end
|
84
85
|
|
85
86
|
resources :packages, :only => [:index], :controller => :host_packages do
|
@@ -279,7 +279,8 @@ module Katello
|
|
279
279
|
:repo_errata,
|
280
280
|
:repo_compare_errata,
|
281
281
|
:repo_compare_packages],
|
282
|
-
'katello/api/v2/repository_sets' => [:index, :show, :available_repositories, :auto_complete_search]
|
282
|
+
'katello/api/v2/repository_sets' => [:index, :show, :available_repositories, :auto_complete_search],
|
283
|
+
'katello/api/v2/host_packages' => [:installed_packages]
|
283
284
|
},
|
284
285
|
:resource_type => 'Katello::Product',
|
285
286
|
:finder_scope => :readable
|
data/lib/katello/version.rb
CHANGED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -73,6 +73,14 @@ const katelloPackageRemoveParams = ({ hostname, packageName }) =>
|
|
73
73
|
feature: REX_FEATURES.KATELLO_PACKAGE_REMOVE,
|
74
74
|
});
|
75
75
|
|
76
|
+
const katelloPackagesRemoveParams = ({ hostname, search, descriptionFormat }) =>
|
77
|
+
baseParams({
|
78
|
+
hostname,
|
79
|
+
inputs: { [PACKAGES_SEARCH_QUERY]: search },
|
80
|
+
feature: REX_FEATURES.KATELLO_PACKAGES_REMOVE_BY_SEARCH,
|
81
|
+
descriptionFormat,
|
82
|
+
});
|
83
|
+
|
76
84
|
const katelloPackageRemoveBySearchParams = ({
|
77
85
|
hostname, hostSearch, search, descriptionFormat,
|
78
86
|
}) =>
|
@@ -209,6 +217,16 @@ export const removePackage = ({ hostname, packageName }) => post({
|
|
209
217
|
errorToast,
|
210
218
|
});
|
211
219
|
|
220
|
+
// Used by packages wizard
|
221
|
+
export const removePackages = ({ hostname, search, descriptionFormat }) => post({
|
222
|
+
type: API_OPERATIONS.POST,
|
223
|
+
key: REX_JOB_INVOCATIONS_KEY,
|
224
|
+
url: foremanApi.getApiUrl('/job_invocations'),
|
225
|
+
params: katelloPackagesRemoveParams({ hostname, search, descriptionFormat }),
|
226
|
+
handleSuccess: showRexToast,
|
227
|
+
errorToast,
|
228
|
+
});
|
229
|
+
|
212
230
|
export const removePackagesBySearch = ({
|
213
231
|
hostname, hostSearch, search, descriptionFormat,
|
214
232
|
}) => post({
|
@@ -188,9 +188,13 @@ const RepositorySetsTab = () => {
|
|
188
188
|
lifecycleEnvironmentLibrary,
|
189
189
|
contentView,
|
190
190
|
lifecycleEnvironment,
|
191
|
+
contentViewEnvironments = [],
|
191
192
|
} = contentFacet;
|
192
193
|
const { name: contentViewName } = contentView ?? {};
|
193
194
|
const { name: lifecycleEnvironmentName } = lifecycleEnvironment ?? {};
|
195
|
+
const multiEnvHost = contentViewEnvironments.length > 1;
|
196
|
+
const contentViewEnvironmentNames =
|
197
|
+
contentViewEnvironments.map(({ candlepin_name: candlepinName }) => candlepinName).join(', ');
|
194
198
|
const nonLibraryHost = contentViewDefault === false ||
|
195
199
|
lifecycleEnvironmentLibrary === false;
|
196
200
|
const [isBulkActionOpen, setIsBulkActionOpen] = useState(false);
|
@@ -497,7 +501,8 @@ const RepositorySetsTab = () => {
|
|
497
501
|
</Split>
|
498
502
|
) : null;
|
499
503
|
|
500
|
-
const hostEnvText = 'the
|
504
|
+
const hostEnvText = multiEnvHost ? 'the host\'s content view environments: {contentViewEnvironmentNames}'
|
505
|
+
: 'the "{contentViewName}" content view and "{lifecycleEnvironmentName}" lifecycle environment';
|
501
506
|
|
502
507
|
const alertText = (toggleGroupState === LIMIT_TO_ENVIRONMENT ?
|
503
508
|
`Showing only repositories in ${hostEnvText}.` :
|
@@ -531,6 +536,7 @@ const RepositorySetsTab = () => {
|
|
531
536
|
values={{
|
532
537
|
contentViewName,
|
533
538
|
lifecycleEnvironmentName,
|
539
|
+
contentViewEnvironmentNames,
|
534
540
|
}}
|
535
541
|
/>
|
536
542
|
}
|
@@ -255,6 +255,94 @@ test('Can upgrade a package via customized remote execution', async (done) => {
|
|
255
255
|
assertNockRequest(statusScope, done);
|
256
256
|
});
|
257
257
|
|
258
|
+
test('Can remove a package via remote execution', async (done) => {
|
259
|
+
const autocompleteScope = mockForemanAutocomplete(nockInstance, autocompleteUrl);
|
260
|
+
|
261
|
+
const scope = nockInstance
|
262
|
+
.get(hostPackages)
|
263
|
+
.query(defaultQuery)
|
264
|
+
.reply(200, { ...mockPackagesData, results: [firstPackage] });
|
265
|
+
|
266
|
+
const removeScope = nockInstance
|
267
|
+
.post(jobInvocations, {
|
268
|
+
job_invocation: {
|
269
|
+
inputs: {
|
270
|
+
package: firstPackage.name,
|
271
|
+
},
|
272
|
+
search_query: `name ^ (${hostname})`,
|
273
|
+
feature: REX_FEATURES.KATELLO_PACKAGE_REMOVE,
|
274
|
+
},
|
275
|
+
})
|
276
|
+
.reply(201);
|
277
|
+
|
278
|
+
const {
|
279
|
+
getByText,
|
280
|
+
getAllByText,
|
281
|
+
getByLabelText,
|
282
|
+
} = renderWithRedux(<PackagesTab />, renderOptions());
|
283
|
+
|
284
|
+
await patientlyWaitFor(() => expect(getAllByText(firstPackage.name)[0]).toBeInTheDocument());
|
285
|
+
|
286
|
+
const kebabDropdown = getByLabelText('Actions');
|
287
|
+
kebabDropdown.click();
|
288
|
+
|
289
|
+
const rexAction = getByText('Remove');
|
290
|
+
await patientlyWaitFor(() => expect(rexAction).toBeInTheDocument());
|
291
|
+
fireEvent.click(rexAction);
|
292
|
+
|
293
|
+
assertNockRequest(autocompleteScope);
|
294
|
+
assertNockRequest(scope);
|
295
|
+
assertNockRequest(removeScope, done);
|
296
|
+
});
|
297
|
+
|
298
|
+
test('Can bulk remove a package via remote execution', async (done) => {
|
299
|
+
const autocompleteScope = mockForemanAutocomplete(nockInstance, autocompleteUrl);
|
300
|
+
|
301
|
+
const scope = nockInstance
|
302
|
+
.get(hostPackages)
|
303
|
+
.query(defaultQuery)
|
304
|
+
.reply(200, mockPackagesData);
|
305
|
+
|
306
|
+
const removeScope = nockInstance
|
307
|
+
.post(jobInvocations, {
|
308
|
+
job_invocation: {
|
309
|
+
inputs: {
|
310
|
+
[PACKAGES_SEARCH_QUERY]: `id ^ (${firstPackage.id},${secondPackage.id})`,
|
311
|
+
},
|
312
|
+
search_query: `name ^ (${hostname})`,
|
313
|
+
feature: REX_FEATURES.KATELLO_PACKAGES_REMOVE_BY_SEARCH,
|
314
|
+
description_format: 'Remove package(s) chrony, coreutils',
|
315
|
+
},
|
316
|
+
})
|
317
|
+
.reply(201);
|
318
|
+
|
319
|
+
const {
|
320
|
+
getByText,
|
321
|
+
getAllByText,
|
322
|
+
getByRole,
|
323
|
+
getByLabelText,
|
324
|
+
} = renderWithRedux(<PackagesTab />, renderOptions());
|
325
|
+
|
326
|
+
await patientlyWaitFor(() => expect(getAllByText(firstPackage.name)[0]).toBeInTheDocument());
|
327
|
+
|
328
|
+
getByRole('checkbox', { name: 'Select row 0' }).click();
|
329
|
+
expect(getByLabelText('Select row 0').checked).toEqual(true);
|
330
|
+
getByRole('checkbox', { name: 'Select row 1' }).click();
|
331
|
+
expect(getByLabelText('Select row 1').checked).toEqual(true);
|
332
|
+
|
333
|
+
const kebabDropdown = getByRole('button', { name: 'bulk_actions' });
|
334
|
+
await patientlyWaitFor(() => expect(kebabDropdown).toBeInTheDocument());
|
335
|
+
fireEvent.click(kebabDropdown);
|
336
|
+
|
337
|
+
const rexAction = getByText('Remove');
|
338
|
+
await patientlyWaitFor(() => expect(rexAction).toBeInTheDocument());
|
339
|
+
fireEvent.click(rexAction);
|
340
|
+
|
341
|
+
assertNockRequest(autocompleteScope);
|
342
|
+
assertNockRequest(scope);
|
343
|
+
assertNockRequest(removeScope, done);
|
344
|
+
});
|
345
|
+
|
258
346
|
test('Can bulk upgrade via remote execution', async (done) => {
|
259
347
|
const autocompleteScope = mockForemanAutocomplete(nockInstance, autocompleteUrl);
|
260
348
|
|
data/webpack/components/extensions/Hosts/BulkActions/BulkPackagesWizard/02_BulkPackagesTable.js
CHANGED
@@ -93,7 +93,7 @@ const BulkPackagesTable = ({
|
|
93
93
|
name: {
|
94
94
|
title: __('Package'),
|
95
95
|
wrapper: ({ name, id }) => (
|
96
|
-
<a target="_blank" href={`/packages/${id}`} rel="noreferrer">{name}</a>
|
96
|
+
<a target="_blank" href={tableType === 'remove' ? `/packages?search=${name}` : `/packages/${id}`} rel="noreferrer">{name}</a>
|
97
97
|
),
|
98
98
|
isSorted: true,
|
99
99
|
weight: 50,
|
data/webpack/components/extensions/Hosts/BulkActions/BulkPackagesWizard/BulkPackagesWizard.js
CHANGED
@@ -12,7 +12,7 @@ import HostReview from '../HostReview';
|
|
12
12
|
import { BulkPackagesReview, dropdownOptions } from './04_Review';
|
13
13
|
import { BulkPackagesUpgradeTable, BulkPackagesInstallTable, BulkPackagesRemoveTable } from './02_BulkPackagesTable';
|
14
14
|
import { BulkPackagesReviewFooter } from './04_ReviewFooter';
|
15
|
-
import katelloApi from '../../../../../services/api';
|
15
|
+
import katelloApi, { foremanApi } from '../../../../../services/api';
|
16
16
|
|
17
17
|
export const UPGRADE_ALL = 'upgradeAll';
|
18
18
|
export const UPGRADE = 'upgrade';
|
@@ -53,8 +53,13 @@ export const useHostsBulkSelect = ({ initialSelectedHosts, modalIsOpen }) => {
|
|
53
53
|
};
|
54
54
|
};
|
55
55
|
|
56
|
-
export const getPackagesUrl = selectedAction =>
|
57
|
-
|
56
|
+
export const getPackagesUrl = (selectedAction) => {
|
57
|
+
if (selectedAction === REMOVE) {
|
58
|
+
return `${foremanApi.getApiUrl('/hosts/host_packages/installed_packages')}?per_page=7&include_permissions=true`;
|
59
|
+
}
|
60
|
+
|
61
|
+
return `${katelloApi.getApiUrl('/packages/thindex')}?per_page=7&include_permissions=true&packages_restrict_upgradable=${selectedAction === 'upgrade'}`;
|
62
|
+
};
|
58
63
|
|
59
64
|
const BulkPackagesWizard = () => {
|
60
65
|
const { modalOpen, setModalClosed: closeModal } = useForemanModal({ id: 'bulk-packages-wizard' });
|
@@ -36,6 +36,7 @@ export const getSetsComponent = (repoSetsState, onPaginationChange) => {
|
|
36
36
|
<Pagination
|
37
37
|
itemCount={itemCount}
|
38
38
|
onChange={onPaginationChange}
|
39
|
+
updateParamsByUrl={false}
|
39
40
|
isCompact
|
40
41
|
{...pagination}
|
41
42
|
/>
|
@@ -67,6 +68,7 @@ export const getEnabledComponent = (enabledReposState, onPaginationChange) => {
|
|
67
68
|
isCompact
|
68
69
|
itemCount={itemCount}
|
69
70
|
onChange={onPaginationChange}
|
71
|
+
updateParamsByUrl={false}
|
70
72
|
{...pagination}
|
71
73
|
/>
|
72
74
|
</div>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: katello
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.14.0.
|
4
|
+
version: 4.14.0.rc3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- N/A
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-09-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -86,28 +86,40 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
89
|
+
version: 9.2.3
|
90
|
+
- - "<"
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
version: '10.0'
|
90
93
|
type: :runtime
|
91
94
|
prerelease: false
|
92
95
|
version_requirements: !ruby/object:Gem::Requirement
|
93
96
|
requirements:
|
94
97
|
- - ">="
|
95
98
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
99
|
+
version: 9.2.3
|
100
|
+
- - "<"
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '10.0'
|
97
103
|
- !ruby/object:Gem::Dependency
|
98
104
|
name: foreman_remote_execution
|
99
105
|
requirement: !ruby/object:Gem::Requirement
|
100
106
|
requirements:
|
101
107
|
- - ">="
|
102
108
|
- !ruby/object:Gem::Version
|
103
|
-
version:
|
109
|
+
version: 13.2.5
|
110
|
+
- - "<"
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
version: 14.0.0
|
104
113
|
type: :runtime
|
105
114
|
prerelease: false
|
106
115
|
version_requirements: !ruby/object:Gem::Requirement
|
107
116
|
requirements:
|
108
117
|
- - ">="
|
109
118
|
- !ruby/object:Gem::Version
|
110
|
-
version:
|
119
|
+
version: 13.2.5
|
120
|
+
- - "<"
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
version: 14.0.0
|
111
123
|
- !ruby/object:Gem::Dependency
|
112
124
|
name: dynflow
|
113
125
|
requirement: !ruby/object:Gem::Requirement
|
@@ -1567,6 +1579,7 @@ files:
|
|
1567
1579
|
- app/views/katello/api/v2/host_module_streams/index.json.rabl
|
1568
1580
|
- app/views/katello/api/v2/host_packages/base.json.rabl
|
1569
1581
|
- app/views/katello/api/v2/host_packages/index.json.rabl
|
1582
|
+
- app/views/katello/api/v2/host_packages/installed_packages.json.rabl
|
1570
1583
|
- app/views/katello/api/v2/host_subscriptions/available_release_versions.json.rabl
|
1571
1584
|
- app/views/katello/api/v2/host_subscriptions/events.json.rabl
|
1572
1585
|
- app/views/katello/api/v2/host_subscriptions/index.json.rabl
|
@@ -4374,55 +4387,103 @@ files:
|
|
4374
4387
|
- locale/Makefile
|
4375
4388
|
- locale/README
|
4376
4389
|
- locale/action_names.rb
|
4390
|
+
- locale/bn/LC_MESSAGES/katello.mo
|
4377
4391
|
- locale/bn/katello.po
|
4392
|
+
- locale/bn_IN/LC_MESSAGES/katello.mo
|
4378
4393
|
- locale/bn_IN/katello.po
|
4394
|
+
- locale/ca/LC_MESSAGES/katello.mo
|
4379
4395
|
- locale/ca/katello.po
|
4396
|
+
- locale/cs/LC_MESSAGES/katello.mo
|
4380
4397
|
- locale/cs/katello.po
|
4398
|
+
- locale/cs_CZ/LC_MESSAGES/katello.mo
|
4381
4399
|
- locale/cs_CZ/katello.po
|
4400
|
+
- locale/de/LC_MESSAGES/katello.mo
|
4382
4401
|
- locale/de/katello.po
|
4402
|
+
- locale/de_AT/LC_MESSAGES/katello.mo
|
4383
4403
|
- locale/de_AT/katello.po
|
4404
|
+
- locale/de_DE/LC_MESSAGES/katello.mo
|
4384
4405
|
- locale/de_DE/katello.po
|
4406
|
+
- locale/el/LC_MESSAGES/katello.mo
|
4385
4407
|
- locale/el/katello.po
|
4408
|
+
- locale/en/LC_MESSAGES/katello.mo
|
4386
4409
|
- locale/en/katello.po
|
4410
|
+
- locale/en_GB/LC_MESSAGES/katello.mo
|
4387
4411
|
- locale/en_GB/katello.po
|
4412
|
+
- locale/en_US/LC_MESSAGES/katello.mo
|
4388
4413
|
- locale/en_US/katello.po
|
4414
|
+
- locale/es/LC_MESSAGES/katello.mo
|
4389
4415
|
- locale/es/katello.po
|
4416
|
+
- locale/et_EE/LC_MESSAGES/katello.mo
|
4390
4417
|
- locale/et_EE/katello.po
|
4418
|
+
- locale/fr/LC_MESSAGES/katello.mo
|
4391
4419
|
- locale/fr/katello.po
|
4420
|
+
- locale/gl/LC_MESSAGES/katello.mo
|
4392
4421
|
- locale/gl/katello.po
|
4422
|
+
- locale/gu/LC_MESSAGES/katello.mo
|
4393
4423
|
- locale/gu/katello.po
|
4424
|
+
- locale/he_IL/LC_MESSAGES/katello.mo
|
4394
4425
|
- locale/he_IL/katello.po
|
4426
|
+
- locale/hi/LC_MESSAGES/katello.mo
|
4395
4427
|
- locale/hi/katello.po
|
4428
|
+
- locale/id/LC_MESSAGES/katello.mo
|
4396
4429
|
- locale/id/katello.po
|
4430
|
+
- locale/it/LC_MESSAGES/katello.mo
|
4397
4431
|
- locale/it/katello.po
|
4432
|
+
- locale/ja/LC_MESSAGES/katello.mo
|
4398
4433
|
- locale/ja/katello.po
|
4434
|
+
- locale/ka/LC_MESSAGES/katello.mo
|
4399
4435
|
- locale/ka/katello.po
|
4400
4436
|
- locale/katello.pot
|
4437
|
+
- locale/kn/LC_MESSAGES/katello.mo
|
4401
4438
|
- locale/kn/katello.po
|
4439
|
+
- locale/ko/LC_MESSAGES/katello.mo
|
4402
4440
|
- locale/ko/katello.po
|
4441
|
+
- locale/ml_IN/LC_MESSAGES/katello.mo
|
4403
4442
|
- locale/ml_IN/katello.po
|
4443
|
+
- locale/mr/LC_MESSAGES/katello.mo
|
4404
4444
|
- locale/mr/katello.po
|
4445
|
+
- locale/nl_NL/LC_MESSAGES/katello.mo
|
4405
4446
|
- locale/nl_NL/katello.po
|
4447
|
+
- locale/or/LC_MESSAGES/katello.mo
|
4406
4448
|
- locale/or/katello.po
|
4449
|
+
- locale/pa/LC_MESSAGES/katello.mo
|
4407
4450
|
- locale/pa/katello.po
|
4451
|
+
- locale/pl/LC_MESSAGES/katello.mo
|
4408
4452
|
- locale/pl/katello.po
|
4453
|
+
- locale/pl_PL/LC_MESSAGES/katello.mo
|
4409
4454
|
- locale/pl_PL/katello.po
|
4455
|
+
- locale/pt/LC_MESSAGES/katello.mo
|
4410
4456
|
- locale/pt/katello.po
|
4457
|
+
- locale/pt_BR/LC_MESSAGES/katello.mo
|
4411
4458
|
- locale/pt_BR/katello.po
|
4459
|
+
- locale/ro/LC_MESSAGES/katello.mo
|
4412
4460
|
- locale/ro/katello.po
|
4461
|
+
- locale/ro_RO/LC_MESSAGES/katello.mo
|
4413
4462
|
- locale/ro_RO/katello.po
|
4463
|
+
- locale/ru/LC_MESSAGES/katello.mo
|
4414
4464
|
- locale/ru/katello.po
|
4465
|
+
- locale/sl/LC_MESSAGES/katello.mo
|
4415
4466
|
- locale/sl/katello.po
|
4467
|
+
- locale/sv_SE/LC_MESSAGES/katello.mo
|
4416
4468
|
- locale/sv_SE/katello.po
|
4469
|
+
- locale/ta/LC_MESSAGES/katello.mo
|
4417
4470
|
- locale/ta/katello.po
|
4471
|
+
- locale/ta_IN/LC_MESSAGES/katello.mo
|
4418
4472
|
- locale/ta_IN/katello.po
|
4473
|
+
- locale/te/LC_MESSAGES/katello.mo
|
4419
4474
|
- locale/te/katello.po
|
4475
|
+
- locale/tr/LC_MESSAGES/katello.mo
|
4420
4476
|
- locale/tr/katello.po
|
4421
4477
|
- locale/update-i18n
|
4478
|
+
- locale/vi/LC_MESSAGES/katello.mo
|
4422
4479
|
- locale/vi/katello.po
|
4480
|
+
- locale/vi_VN/LC_MESSAGES/katello.mo
|
4423
4481
|
- locale/vi_VN/katello.po
|
4482
|
+
- locale/zh/LC_MESSAGES/katello.mo
|
4424
4483
|
- locale/zh/katello.po
|
4484
|
+
- locale/zh_CN/LC_MESSAGES/katello.mo
|
4425
4485
|
- locale/zh_CN/katello.po
|
4486
|
+
- locale/zh_TW/LC_MESSAGES/katello.mo
|
4426
4487
|
- locale/zh_TW/katello.po
|
4427
4488
|
- package.json
|
4428
4489
|
- vendor/assets/images/katello/add2.png
|