katello 4.7.1 → 4.7.3
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/controllers/katello/api/v2/activation_keys_controller.rb +1 -0
- data/app/controllers/katello/api/v2/simple_content_access_controller.rb +2 -2
- data/app/lib/actions/candlepin/environment/set_content.rb +7 -1
- data/app/lib/actions/katello/repository/update.rb +1 -0
- data/app/models/katello/concerns/organization_extensions.rb +4 -4
- data/app/models/katello/glue/candlepin/owner.rb +4 -0
- data/app/services/katello/pulp3/ansible_collection.rb +9 -6
- data/app/services/katello/pulp3/repository.rb +2 -0
- data/app/services/katello/pulp3/smart_proxy_mirror_repository.rb +2 -2
- data/db/migrate/20230119003859_ensure_repo_username_password_nil_not_blank.rb +9 -0
- data/engines/bastion/app/views/bastion/layouts/assets.html.erb +5 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-info.controller.js +2 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html +7 -0
- data/lib/katello/version.rb +1 -1
- data/webpack/components/RoutedTabs/index.js +6 -11
- data/webpack/components/extensions/HostDetails/Tabs/__tests__/packagesTab.test.js +1 -1
- data/webpack/components/extensions/RegistrationCommands/__tests__/__snapshots__/ActivationKeys.test.js.snap +7 -0
- data/webpack/components/extensions/RegistrationCommands/__tests__/__snapshots__/Force.test.js.snap +2 -0
- data/webpack/components/extensions/RegistrationCommands/__tests__/__snapshots__/IgnoreSubmanErrors.test.js.snap +2 -0
- data/webpack/components/extensions/RegistrationCommands/__tests__/__snapshots__/LifeCycleEnvironment.test.js.snap +1 -0
- data/webpack/scenes/AlternateContentSources/Create/ACSCreateWizard.js +0 -7
- data/webpack/scenes/AlternateContentSources/Create/Steps/ACSCreateFinish.js +17 -3
- data/webpack/scenes/ContentViews/Details/Filters/CVErrataDateFilterContent.js +2 -2
- data/webpack/scenes/ContentViews/Details/Filters/CVErrataIDFilterContent.js +2 -2
- metadata +3 -3
- data/app/services/katello/candlepin/upstream_consumer.rb +0 -28
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1085e9921f43ff4ed75e3f6f8a21769ed8866b91d5e5715a20a6a39317d9695a
|
4
|
+
data.tar.gz: 64599d569adf852a6f5b7dc82f23c204f386bc0361e8fb345fedcd2b73a7d1d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1006d71c0a3562cc415a9117664450bc5bb8f65058ddfc4d0d56a55d42ef49d5b6fdb27ab5e493510b2febfc964fb80789747014db7dbee376158f98f8d7de0f
|
7
|
+
data.tar.gz: fc20f108a5658f8ceef9aadfcb2d19443645d57b9b9f4770ae14f4f2521572cb5bffefd0148f594aadbc94d0a04df83dbb9f3d94d4c0cb9944c74a876b4bcff8
|
@@ -341,6 +341,7 @@ module Katello
|
|
341
341
|
end
|
342
342
|
|
343
343
|
def validate_release_version
|
344
|
+
@organization ||= find_organization
|
344
345
|
if params[:release_version].present? && !@organization.library.available_releases.include?(params[:release_version])
|
345
346
|
fail HttpErrors::BadRequest, _("Invalid release version: [%s]") % params[:release_version]
|
346
347
|
end
|
@@ -1,7 +1,6 @@
|
|
1
1
|
module Katello
|
2
2
|
class Api::V2::SimpleContentAccessController < Api::V2::ApiController
|
3
3
|
before_action :find_organization
|
4
|
-
before_action :check_upstream_connection
|
5
4
|
|
6
5
|
resource_description do
|
7
6
|
description "Red Hat subscriptions management platform."
|
@@ -11,7 +10,8 @@ module Katello
|
|
11
10
|
api :GET, "/organizations/:organization_id/simple_content_access/eligible",
|
12
11
|
N_("Check if the specified organization is eligible for Simple Content Access")
|
13
12
|
def eligible
|
14
|
-
eligible
|
13
|
+
::Foreman::Deprecation.api_deprecation_warning("This endpoint is deprecated and will be removed in a future release. All organizations are now eligible for Simple Content Access.")
|
14
|
+
eligible = @organization.simple_content_access_eligible?
|
15
15
|
render json: { simple_content_access_eligible: eligible }
|
16
16
|
end
|
17
17
|
|
@@ -52,7 +52,13 @@ module Actions
|
|
52
52
|
def existing_ids
|
53
53
|
::Katello::Resources::Candlepin::Environment.
|
54
54
|
find(input[:cp_environment_id])[:environmentContent].map do |content|
|
55
|
-
content
|
55
|
+
if content.key?('contentId')
|
56
|
+
# Supports Candlepin 4.2.11 and up
|
57
|
+
content['contentId']
|
58
|
+
else
|
59
|
+
# Supports Candlepin versions below 4.2.11
|
60
|
+
content[:content][:id]
|
61
|
+
end
|
56
62
|
end
|
57
63
|
end
|
58
64
|
end
|
@@ -9,6 +9,7 @@ module Actions
|
|
9
9
|
action_subject root.library_instance
|
10
10
|
|
11
11
|
repo_params[:url] = nil if repo_params[:url] == ''
|
12
|
+
repo_params[:checksum_type] = nil if repo_params[:download_policy] == ::Katello::RootRepository::DOWNLOAD_ON_DEMAND
|
12
13
|
update_cv_cert_protected = repo_params.key?(:unprotected) && (repo_params[:unprotected] != repository.unprotected)
|
13
14
|
create_acs = create_acs?(repository.url, repo_params[:url])
|
14
15
|
delete_acs = delete_acs?(repository.url, repo_params[:url])
|
@@ -90,6 +90,10 @@ module Katello
|
|
90
90
|
self.providers.anonymous.first
|
91
91
|
end
|
92
92
|
|
93
|
+
def simple_content_access_eligible?
|
94
|
+
self.content_access_mode_list.include?('org_environment')
|
95
|
+
end
|
96
|
+
|
93
97
|
def manifest_imported?(cached: false)
|
94
98
|
Rails.cache.fetch("#{self.label}_manifest_imported?", expires_in: 1.minute, force: !cached) do
|
95
99
|
owner_details['upstreamConsumer'].present?
|
@@ -238,10 +242,6 @@ module Katello
|
|
238
242
|
# doesn't provide much benefit for the frustration it creates.
|
239
243
|
self.save(validate: false)
|
240
244
|
end
|
241
|
-
|
242
|
-
def upstream_consumer
|
243
|
-
Katello::Candlepin::UpstreamConsumer.new(self)
|
244
|
-
end
|
245
245
|
end
|
246
246
|
end
|
247
247
|
end
|
@@ -45,6 +45,10 @@ module Katello
|
|
45
45
|
self.owner_details['contentAccessMode']
|
46
46
|
end
|
47
47
|
|
48
|
+
def content_access_mode_list
|
49
|
+
self.owner_details['contentAccessModeList'].split(',')
|
50
|
+
end
|
51
|
+
|
48
52
|
def simple_content_access?(cached: true)
|
49
53
|
Rails.cache.fetch("#{self.label}_simple_content_access?", expires_in: 1.minute, force: !cached) do
|
50
54
|
content_access_mode == "org_environment"
|
@@ -30,22 +30,25 @@ module Katello
|
|
30
30
|
end
|
31
31
|
|
32
32
|
def self.insert_child_associations(units, pulp_id_to_id)
|
33
|
-
|
34
|
-
tag_rows = tag_names.map { |name| {name: name } }
|
35
|
-
Katello::AnsibleTag.insert_all(tag_rows, unique_by: [:name]) if tag_rows.any?
|
36
|
-
|
33
|
+
insert_tags units
|
37
34
|
collection_tag_rows = []
|
38
35
|
units.each do |unit|
|
39
36
|
katello_id = pulp_id_to_id[unit['pulp_href']]
|
40
37
|
#delete old tags
|
41
|
-
unit_tags = unit['tags']
|
38
|
+
unit_tags = unit['tags']&.map { |tag| tag[:name] }
|
42
39
|
Katello::AnsibleCollectionTag.where(:ansible_collection_id => katello_id).where.not(:ansible_tag_id => Katello::AnsibleTag.where(:name => unit_tags)).delete_all
|
43
|
-
collection_tag_rows += Katello::AnsibleTag.where(:name => unit_tags)
|
40
|
+
collection_tag_rows += Katello::AnsibleTag.where(:name => unit_tags)&.pluck(:id)&.map { |tag_id| {ansible_collection_id: katello_id, ansible_tag_id: tag_id} }
|
44
41
|
end
|
45
42
|
|
46
43
|
collection_tag_rows.flatten!
|
47
44
|
Katello::AnsibleCollectionTag.insert_all(collection_tag_rows, unique_by: [:ansible_collection_id, :ansible_tag_id]) unless collection_tag_rows.empty?
|
48
45
|
end
|
46
|
+
|
47
|
+
def self.insert_tags(units)
|
48
|
+
tag_names = units.map { |unit| unit['tags']&.map { |tag| tag[:name] } }&.flatten
|
49
|
+
tag_rows = tag_names&.compact&.map { |name| {name: name } }
|
50
|
+
Katello::AnsibleTag.insert_all(tag_rows, unique_by: [:name]) if tag_rows.any?
|
51
|
+
end
|
49
52
|
end
|
50
53
|
end
|
51
54
|
end
|
@@ -385,6 +385,8 @@ module Katello
|
|
385
385
|
remote_options[:download_concurrency] = root.download_concurrency unless root.download_concurrency.blank?
|
386
386
|
remote_options.merge!(username: root&.upstream_username,
|
387
387
|
password: root&.upstream_password)
|
388
|
+
remote_options[:username] = nil if remote_options[:username] == ''
|
389
|
+
remote_options[:password] = nil if remote_options[:password] == ''
|
388
390
|
remote_options.merge!(ssl_remote_options)
|
389
391
|
end
|
390
392
|
|
@@ -26,7 +26,7 @@ module Katello
|
|
26
26
|
api = repo_type.pulp3_api(smart_proxy)
|
27
27
|
version_hrefs = api.repository_versions
|
28
28
|
orphan_version_hrefs = api.list_all.collect do |pulp_repo|
|
29
|
-
mirror_repo_versions = api.versions_list_for_repository(pulp_repo.pulp_href, ordering:
|
29
|
+
mirror_repo_versions = api.versions_list_for_repository(pulp_repo.pulp_href, ordering: ['-pulp_created'])
|
30
30
|
version_hrefs = mirror_repo_versions.select { |repo_version| repo_version.number != 0 }.collect { |version| version.pulp_href }
|
31
31
|
|
32
32
|
version_hrefs - [pulp_repo.latest_version_href]
|
@@ -104,7 +104,7 @@ module Katello
|
|
104
104
|
|
105
105
|
remotes.each do |remote|
|
106
106
|
if !repo_names.include?(remote.name) && !acs_remotes.include?(remote.pulp_href)
|
107
|
-
tasks << api.delete_remote(
|
107
|
+
tasks << api.delete_remote(remote.pulp_href)
|
108
108
|
end
|
109
109
|
end
|
110
110
|
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
class EnsureRepoUsernamePasswordNilNotBlank < ActiveRecord::Migration[6.1]
|
2
|
+
def change
|
3
|
+
::Katello::Repository.library.each do |repo|
|
4
|
+
if repo.upstream_username == '' && repo.upstream_password == ''
|
5
|
+
repo.update(upstream_username: nil, upstream_password: nil)
|
6
|
+
end
|
7
|
+
end
|
8
|
+
end
|
9
|
+
end
|
@@ -21,17 +21,17 @@
|
|
21
21
|
angular.module('Bastion').value('simpleContentAccessEnabled', <%= Organization.current.simple_content_access? if Organization.current %>);
|
22
22
|
angular.module('Bastion').value('isManifestImported', <%= !!Organization.current&.manifest_imported?(cached: true) %>)
|
23
23
|
angular.module('Bastion').value('foreman', tfm);
|
24
|
-
angular.module('Bastion').value('repositoryTypes', angular.fromJson(
|
25
|
-
angular.module('Bastion').value('deleteHostOnUnregister', angular.fromJson(
|
26
|
-
angular.module('Bastion').value('globalContentProxy', angular.fromJson(
|
24
|
+
angular.module('Bastion').value('repositoryTypes', angular.fromJson(`<%= Katello::RepositoryTypeManager.enabled_repository_types.values.to_json.html_safe %>`));
|
25
|
+
angular.module('Bastion').value('deleteHostOnUnregister', angular.fromJson(`<%= Setting[:unregister_delete_host] %>`));
|
26
|
+
angular.module('Bastion').value('globalContentProxy', angular.fromJson(`<%= Setting[:content_default_http_proxy].empty? ? nil.to_json : Setting[:content_default_http_proxy].to_json.html_safe %>`));
|
27
27
|
angular.module('Bastion').value('entriesPerPage', "<%= Setting[:entries_per_page] %>");
|
28
28
|
angular.module('Bastion').value('contentViewSolveDependencies', "<%= Setting[:content_view_solve_dependencies] %>");
|
29
|
-
angular.module('Bastion').constant('BastionConfig', angular.fromJson(
|
29
|
+
angular.module('Bastion').constant('BastionConfig', angular.fromJson(`<%= Bastion.config.to_json.html_safe %>`));
|
30
30
|
angular.module('Bastion.auth').value('CurrentUser', {
|
31
31
|
id: <%= User.current.id %>,
|
32
32
|
admin: <%= User.current.admin || User.current.usergroups.any? { |group| group.admin } %>
|
33
33
|
});
|
34
|
-
angular.module('Bastion.auth').value('Permissions', angular.fromJson(
|
34
|
+
angular.module('Bastion.auth').value('Permissions', angular.fromJson(`<%= User.current.cached_roles.collect { |role| role.permissions }.flatten.to_json.html_safe %>`));
|
35
35
|
angular.module('Bastion').value('newHostDetailsUI', "<%= Setting[:host_details_ui] %>");
|
36
36
|
</script>
|
37
37
|
<% Bastion.plugins.each do |name, plugin| %>
|
@@ -30,6 +30,7 @@ angular.module('Bastion.repositories').controller('RepositoryDetailsInfoControll
|
|
30
30
|
$scope.repository['ignore_srpms'] = $scope.repository['ignorable_content'] && $scope.repository['ignorable_content'].includes("srpm");
|
31
31
|
$scope.repository['ansible_collection_auth_exists'] = $scope.repository['ansible_collection_auth_url'] && $scope.repository['ansible_collection_auth_token'];
|
32
32
|
$scope.genericContentTypes = RepositoryTypesService.genericContentTypes($scope.repository['content_type']);
|
33
|
+
$scope.immediateDownloadPolicy = $scope.repository['download_policy'] === 'immediate';
|
33
34
|
});
|
34
35
|
|
35
36
|
$scope.gpgKeys = function () {
|
@@ -140,6 +141,7 @@ angular.module('Bastion.repositories').controller('RepositoryDetailsInfoControll
|
|
140
141
|
repository.os_versions = $scope.osVersionsParam();
|
141
142
|
repository.$update(function (response) {
|
142
143
|
deferred.resolve(response);
|
144
|
+
$scope.immediateDownloadPolicy = repository['download_policy'] === 'immediate';
|
143
145
|
$scope.repository.ignore_srpms = $scope.repository.ignorable_content && $scope.repository.ignorable_content.includes("srpm");
|
144
146
|
if (!_.isEmpty(response["include_tags"])) {
|
145
147
|
repository.commaIncludeTags = repository["include_tags"].join(", ");
|
@@ -315,6 +315,13 @@
|
|
315
315
|
options-format="id as name for (id, name) in options"
|
316
316
|
on-save="save(repository)">
|
317
317
|
</dd>
|
318
|
+
<dd>
|
319
|
+
<p bst-alert='info' ng-show="immediateDownloadPolicy && repository.download_policy == 'on_demand'">
|
320
|
+
<span translate>
|
321
|
+
Changing download policy to "On Demand" will also clear the checksum type if set. The repository will use the upstream checksum type to verify downloads.
|
322
|
+
</span>
|
323
|
+
</p>
|
324
|
+
</dd>
|
318
325
|
</span>
|
319
326
|
<span>
|
320
327
|
<dt translate>Mirroring Policy</dt>
|
data/lib/katello/version.rb
CHANGED
@@ -22,17 +22,13 @@ const RoutedTabs = ({
|
|
22
22
|
className="margin-0-24"
|
23
23
|
>
|
24
24
|
{tabs.map(({ key, title }) => (
|
25
|
-
<
|
26
|
-
key={key}
|
25
|
+
<Tab
|
27
26
|
href={`#/${key}`}
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
title={<TabTitleText>{title}</TabTitleText>}
|
34
|
-
/>
|
35
|
-
</a>
|
27
|
+
key={key}
|
28
|
+
eventKey={key}
|
29
|
+
aria-label={title}
|
30
|
+
title={<TabTitleText>{title}</TabTitleText>}
|
31
|
+
/>
|
36
32
|
))}
|
37
33
|
</Tabs>
|
38
34
|
<div className="margin-16-0">
|
@@ -64,4 +60,3 @@ RoutedTabs.defaultProps = {
|
|
64
60
|
};
|
65
61
|
|
66
62
|
export default withRouter(RoutedTabs);
|
67
|
-
|
@@ -405,7 +405,7 @@ test('Remove is disabled when in select all mode', async (done) => {
|
|
405
405
|
fireEvent.click(selectAllCheckbox);
|
406
406
|
getByRole('button', { name: 'bulk_actions' }).click();
|
407
407
|
|
408
|
-
const removeButton = getByRole('
|
408
|
+
const removeButton = getByRole('menuitem', { name: 'bulk_remove' });
|
409
409
|
await patientlyWaitFor(() => expect(removeButton).toBeInTheDocument());
|
410
410
|
expect(removeButton).toHaveAttribute('aria-disabled', 'true');
|
411
411
|
|
@@ -35,8 +35,10 @@ exports[`ActivationKeys renders 1`] = `
|
|
35
35
|
inputAutoComplete="off"
|
36
36
|
inputIdPrefix=""
|
37
37
|
isCreatable={false}
|
38
|
+
isCreateOptionOnTop={false}
|
38
39
|
isCreateSelectOptionObject={false}
|
39
40
|
isDisabled={true}
|
41
|
+
isFlipEnabled={true}
|
40
42
|
isGrouped={false}
|
41
43
|
isInputFilterPersisted={false}
|
42
44
|
isInputValuePersisted={false}
|
@@ -53,15 +55,20 @@ exports[`ActivationKeys renders 1`] = `
|
|
53
55
|
ouiaSafe={true}
|
54
56
|
placeholderText="No Activation keys to select"
|
55
57
|
position="left"
|
58
|
+
removeFindDomNode={false}
|
56
59
|
removeSelectionAriaLabel="Remove"
|
57
60
|
selections={Array []}
|
61
|
+
shouldResetOnSelect={true}
|
58
62
|
toggleAriaLabel="Options menu"
|
59
63
|
toggleIcon={null}
|
60
64
|
toggleId={null}
|
65
|
+
toggleIndicator={null}
|
66
|
+
typeAheadAriaDescribedby=""
|
61
67
|
typeAheadAriaLabel=""
|
62
68
|
validated="default"
|
63
69
|
variant="typeaheadmulti"
|
64
70
|
width=""
|
71
|
+
zIndex={9999}
|
65
72
|
/>
|
66
73
|
</FormGroup>
|
67
74
|
`;
|
@@ -40,7 +40,6 @@ const ACSCreateWizard = ({ show, setIsOpen }) => {
|
|
40
40
|
const [caCertName, setCACertName] = useState('');
|
41
41
|
const [productIds, setProductIds] = useState([]);
|
42
42
|
const [productNames, setProductNames] = useState([]);
|
43
|
-
const [currentStep, setCurrentStep] = useState(1);
|
44
43
|
const dispatch = useDispatch();
|
45
44
|
|
46
45
|
useEffect(
|
@@ -139,8 +138,6 @@ const ACSCreateWizard = ({ show, setIsOpen }) => {
|
|
139
138
|
<ACSCreateContext.Provider value={{
|
140
139
|
show,
|
141
140
|
setIsOpen,
|
142
|
-
currentStep,
|
143
|
-
setCurrentStep,
|
144
141
|
acsType,
|
145
142
|
setAcsType,
|
146
143
|
contentType,
|
@@ -186,10 +183,6 @@ const ACSCreateWizard = ({ show, setIsOpen }) => {
|
|
186
183
|
<Wizard
|
187
184
|
title={__('Add an alternate content source')}
|
188
185
|
steps={steps}
|
189
|
-
startAtStep={currentStep}
|
190
|
-
onGoToStep={({ id }) => setCurrentStep(id)}
|
191
|
-
onNext={({ id }) => setCurrentStep(id)}
|
192
|
-
onBack={({ id }) => setCurrentStep(id)}
|
193
186
|
onClose={() => {
|
194
187
|
setIsOpen(false);
|
195
188
|
}}
|
@@ -1,7 +1,9 @@
|
|
1
1
|
import React, { useCallback, useContext, useState } from 'react';
|
2
2
|
import { useDispatch, useSelector } from 'react-redux';
|
3
3
|
import { useHistory } from 'react-router-dom';
|
4
|
+
import PropTypes from 'prop-types';
|
4
5
|
import useDeepCompareEffect from 'use-deep-compare-effect';
|
6
|
+
import { WizardContextConsumer } from '@patternfly/react-core';
|
5
7
|
import { translate as __ } from 'foremanReact/common/I18n';
|
6
8
|
import { STATUS } from 'foremanReact/constants';
|
7
9
|
import ACSCreateContext from '../ACSCreateContext';
|
@@ -9,10 +11,16 @@ import { selectCreateACS, selectCreateACSError, selectCreateACSStatus } from '..
|
|
9
11
|
import getAlternateContentSources, { createACS } from '../../ACSActions';
|
10
12
|
import Loading from '../../../../components/Loading';
|
11
13
|
|
12
|
-
const
|
14
|
+
const ACSCreateFinishWrapper = () => (
|
15
|
+
<WizardContextConsumer>
|
16
|
+
{({ activeStep }) => <ACSCreateFinish activeStep={activeStep} />}
|
17
|
+
</WizardContextConsumer>
|
18
|
+
);
|
19
|
+
|
20
|
+
const ACSCreateFinish = ({ activeStep }) => {
|
13
21
|
const { push } = useHistory();
|
22
|
+
const currentStep = activeStep.id;
|
14
23
|
const {
|
15
|
-
currentStep,
|
16
24
|
setIsOpen,
|
17
25
|
acsType,
|
18
26
|
contentType,
|
@@ -94,4 +102,10 @@ const ACSCreateFinish = () => {
|
|
94
102
|
return <Loading loadingText={__('Saving alternate content source...')} />;
|
95
103
|
};
|
96
104
|
|
97
|
-
|
105
|
+
ACSCreateFinish.propTypes = {
|
106
|
+
activeStep: PropTypes.shape({
|
107
|
+
id: PropTypes.number.isRequired,
|
108
|
+
}).isRequired,
|
109
|
+
};
|
110
|
+
|
111
|
+
export default ACSCreateFinishWrapper;
|
@@ -205,7 +205,7 @@ const CVErrataDateFilterContent = ({
|
|
205
205
|
value={startDate}
|
206
206
|
invalidFormatText={invalidDateFormat}
|
207
207
|
dateFormat={dateFormat}
|
208
|
-
onChange={setStartDate}
|
208
|
+
onChange={(e, val) => setStartDate(val)}
|
209
209
|
dateParse={dateParse}
|
210
210
|
placeholder={startEntry ? 'MM/DD/YYYY' : __('Start date')}
|
211
211
|
isDisabled={!hasPermission(permissions, 'edit_content_views')}
|
@@ -227,7 +227,7 @@ const CVErrataDateFilterContent = ({
|
|
227
227
|
value={endDate}
|
228
228
|
invalidFormatText={invalidDateFormat}
|
229
229
|
dateFormat={dateFormat}
|
230
|
-
onChange={setEndDate}
|
230
|
+
onChange={(e, val) => setEndDate(val)}
|
231
231
|
dateParse={dateParse}
|
232
232
|
placeholder={endEntry ? 'MM/DD/YYYY' : __('End date')}
|
233
233
|
isDisabled={!hasPermission(permissions, 'edit_content_views')}
|
@@ -206,12 +206,12 @@ const CVErrataIDFilterContent = ({
|
|
206
206
|
} else setSelectedTypes([...selectedTypes, selection]);
|
207
207
|
};
|
208
208
|
|
209
|
-
const setValidStartDate = (value) => {
|
209
|
+
const setValidStartDate = (e, value) => {
|
210
210
|
setStartDate(value);
|
211
211
|
if (validAPIDate(value)) setApiStartDate(value);
|
212
212
|
};
|
213
213
|
|
214
|
-
const setValidEndDate = (value) => {
|
214
|
+
const setValidEndDate = (e, value) => {
|
215
215
|
setEndDate(value);
|
216
216
|
if (validAPIDate(value)) setApiEndDate(value);
|
217
217
|
};
|
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.7.
|
4
|
+
version: 4.7.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- N/A
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-02-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -1485,7 +1485,6 @@ files:
|
|
1485
1485
|
- app/services/katello/candlepin/message_handler.rb
|
1486
1486
|
- app/services/katello/candlepin/pool_service.rb
|
1487
1487
|
- app/services/katello/candlepin/system_purpose.rb
|
1488
|
-
- app/services/katello/candlepin/upstream_consumer.rb
|
1489
1488
|
- app/services/katello/candlepin_event_listener.rb
|
1490
1489
|
- app/services/katello/component_view_presenter.rb
|
1491
1490
|
- app/services/katello/content_unit_indexer.rb
|
@@ -2235,6 +2234,7 @@ files:
|
|
2235
2234
|
- db/migrate/20220920173656_add_http_proxy_to_smart_proxy.rb
|
2236
2235
|
- db/migrate/20220920180858_remove_http_proxy_from_katello_alternate_content_sources.rb
|
2237
2236
|
- db/migrate/20221206170122_update_ignore_srpm_to_false_for_mirror_complete.rb
|
2237
|
+
- db/migrate/20230119003859_ensure_repo_username_password_nil_not_blank.rb
|
2238
2238
|
- db/seeds.d/101-locations.rb
|
2239
2239
|
- db/seeds.d/102-organizations.rb
|
2240
2240
|
- db/seeds.d/104-proxy.rb
|
@@ -1,28 +0,0 @@
|
|
1
|
-
module Katello
|
2
|
-
module Candlepin
|
3
|
-
class UpstreamConsumer
|
4
|
-
def initialize(organization)
|
5
|
-
@organization = organization
|
6
|
-
end
|
7
|
-
|
8
|
-
def simple_content_access_eligible?
|
9
|
-
eligible = true
|
10
|
-
::Organization.as_org(@organization) do
|
11
|
-
content_modes = resource_class.content_access
|
12
|
-
|
13
|
-
if content_modes.key?(:contentAccessModeList)
|
14
|
-
eligible = content_modes[:contentAccessModeList].include?('org_environment')
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
eligible
|
19
|
-
end
|
20
|
-
|
21
|
-
private
|
22
|
-
|
23
|
-
def resource_class
|
24
|
-
Katello::Resources::Candlepin::UpstreamConsumer
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|