Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #36492 - duplicate content warning for composite CVs for non-docker repos #10741

Merged
merged 1 commit into from
Oct 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/views/katello/api/v2/content_views/base.json.rabl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ extends 'katello/api/v2/common/identifier'
extends 'katello/api/v2/common/org_reference'

attributes :composite
attributes :component_ids
attributes :component_ids, :duplicate_repositories_to_publish
attributes :default
attributes :version_count
attributes :latest_version, :latest_version_id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ import {
selectCVDetails,
selectCVDetailStatus,
} from '../../Details/ContentViewDetailSelectors';
import { addComponent } from '../ContentViewDetailActions';
import { CONTENT_VIEW_NEEDS_PUBLISH } from '../../ContentViewsConstants';
import getContentViewDetails, { addComponent } from '../ContentViewDetailActions';

const ComponentContentViewAddModal = ({
cvId, componentCvId, componentId, latest, componentVersionId, show, setIsOpen,
Expand Down Expand Up @@ -67,12 +66,12 @@ const ComponentContentViewAddModal = ({
dispatch(addComponent({
compositeContentViewId: cvId,
components: getUpdateParams(),
}, () => dispatch({ type: CONTENT_VIEW_NEEDS_PUBLISH })));
}, () => dispatch(getContentViewDetails(cvId))));
} else {
dispatch(addComponent({
compositeContentViewId: cvId,
components: getAddParams(),
}, () => dispatch({ type: CONTENT_VIEW_NEEDS_PUBLISH })));
}, () => dispatch(getContentViewDetails(cvId))));
}
setIsOpen(false);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
import { OutlinedQuestionCircleIcon } from '@patternfly/react-icons';
import { useDispatch } from 'react-redux';
import { translate as __ } from 'foremanReact/common/I18n';
import { addComponent } from '../ContentViewDetailActions';
import getContentViewDetails, { addComponent } from '../ContentViewDetailActions';

const ComponentContentViewBulkAddModal = ({ cvId, rowsToAdd, onClose }) => {
const dispatch = useDispatch();
Expand Down Expand Up @@ -37,7 +37,7 @@ const ComponentContentViewBulkAddModal = ({ cvId, rowsToAdd, onClose }) => {
dispatch(addComponent({
compositeContentViewId: cvId,
components: bulkAddParams(),
}));
}, () => dispatch(getContentViewDetails(cvId))));
onClose();
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import AddedStatusLabel from '../../../../components/AddedStatusLabel';
import ComponentVersion from './ComponentVersion';
import ComponentEnvironments from './ComponentEnvironments';
import ContentViewIcon from '../../components/ContentViewIcon';
import { ADDED, ALL_STATUSES, CONTENT_VIEW_NEEDS_PUBLISH, NOT_ADDED } from '../../ContentViewsConstants';
import { ADDED, ALL_STATUSES, NOT_ADDED } from '../../ContentViewsConstants';
import SelectableDropdown from '../../../../components/SelectableDropdown/SelectableDropdown';
import '../../../../components/EditableTextInput/editableTextInput.scss';
import ComponentContentViewAddModal from './ComponentContentViewAddModal';
Expand Down Expand Up @@ -98,7 +98,7 @@ const ContentViewComponents = ({ cvId, details }) => {
dispatch(addComponent({
compositeContentViewId: cvId,
components: [{ latest: true, content_view_id: componentCvId }],
}, () => dispatch({ type: CONTENT_VIEW_NEEDS_PUBLISH })));
}, () => dispatch(getContentViewDetails(cvId))));
}
}, [cvId, dispatch]);

Expand All @@ -108,7 +108,7 @@ const ContentViewComponents = ({ cvId, details }) => {
dispatch(removeComponent({
compositeContentViewId: cvId,
component_ids: componentIds,
}, () => dispatch({ type: CONTENT_VIEW_NEEDS_PUBLISH })));
}, () => dispatch(getContentViewDetails(cvId))));
};

const addBulk = () => {
Expand All @@ -122,7 +122,7 @@ const ContentViewComponents = ({ cvId, details }) => {
dispatch(removeComponent({
compositeContentViewId: cvId,
component_ids: [componentIdToRemove],
}, () => dispatch({ type: CONTENT_VIEW_NEEDS_PUBLISH })));
}, () => dispatch(getContentViewDetails(cvId))));
};

const toggleBulkAction = () => {
Expand Down
Loading
Loading