katello 4.7.2 → 4.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of katello might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/app/lib/actions/candlepin/environment/set_content.rb +7 -1
- data/db/migrate/20230119003859_ensure_repo_username_password_nil_not_blank.rb +1 -1
- 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 +6 -6
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 58b5925ff8555ac324b96a6ef2586d6f38e09400e6139a8b18d7e4301b1c6595
         | 
| 4 | 
            +
              data.tar.gz: c4d40153fc8d19270c842352ce292d9c67f2c829e72791b0903a5d6caf61da7a
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 213cea9b546d83bd1bd7fe0e8a912f765bbf110321f7388c29480baf52fbf0c39d7cb8185d453c2adf542bb1748e009952c74cf900ad2cba5a8b1adefd4dd9c5
         | 
| 7 | 
            +
              data.tar.gz: 572177ab7ccdf854b3ffe7df6714d6fc920491c5c7c0e424dd03eb0ecf8338aa09e327474ce68a4b10cb37d21b4f65d0577bbaa29c6cfaf2b110a35ac99687d6
         | 
| @@ -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
         | 
| @@ -2,7 +2,7 @@ class EnsureRepoUsernamePasswordNilNotBlank < ActiveRecord::Migration[6.1] | |
| 2 2 | 
             
              def change
         | 
| 3 3 | 
             
                ::Katello::Repository.library.each do |repo|
         | 
| 4 4 | 
             
                  if repo.upstream_username == '' && repo.upstream_password == ''
         | 
| 5 | 
            -
                    repo.update(upstream_username: nil, upstream_password: nil)
         | 
| 5 | 
            +
                    repo.root.update(upstream_username: nil, upstream_password: nil)
         | 
| 6 6 | 
             
                  end
         | 
| 7 7 | 
             
                end
         | 
| 8 8 | 
             
              end
         | 
    
        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.4
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - N/A
         | 
| 8 | 
            -
            autorequire:
         | 
| 8 | 
            +
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2023- | 
| 11 | 
            +
            date: 2023-03-16 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: rails
         | 
| @@ -5427,7 +5427,7 @@ homepage: http://www.katello.org | |
| 5427 5427 | 
             
            licenses:
         | 
| 5428 5428 | 
             
            - GPL-2.0
         | 
| 5429 5429 | 
             
            metadata: {}
         | 
| 5430 | 
            -
            post_install_message:
         | 
| 5430 | 
            +
            post_install_message: 
         | 
| 5431 5431 | 
             
            rdoc_options: []
         | 
| 5432 5432 | 
             
            require_paths:
         | 
| 5433 5433 | 
             
            - lib
         | 
| @@ -5442,8 +5442,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement | |
| 5442 5442 | 
             
                - !ruby/object:Gem::Version
         | 
| 5443 5443 | 
             
                  version: '0'
         | 
| 5444 5444 | 
             
            requirements: []
         | 
| 5445 | 
            -
            rubygems_version: 3. | 
| 5446 | 
            -
            signing_key:
         | 
| 5445 | 
            +
            rubygems_version: 3.1.6
         | 
| 5446 | 
            +
            signing_key: 
         | 
| 5447 5447 | 
             
            specification_version: 4
         | 
| 5448 5448 | 
             
            summary: Content and Subscription Management plugin for Foreman
         | 
| 5449 5449 | 
             
            test_files: []
         |