webpack/scenes/ContentViews/Details/ComponentContentViews/ContentViewComponents.js in katello-4.10.0 vs webpack/scenes/ContentViews/Details/ComponentContentViews/ContentViewComponents.js in katello-4.11.0.rc1
- old
+ new
@@ -28,11 +28,11 @@
} from '../ContentViewDetailActions';
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';
import ComponentContentViewBulkAddModal from './ComponentContentViewBulkAddModal';
import { hasPermission } from '../../helpers';
@@ -96,21 +96,21 @@
setComponentId(added);
} else { // if no versions are present, default to always latest and add cv without modal
dispatch(addComponent({
compositeContentViewId: cvId,
components: [{ latest: true, content_view_id: componentCvId }],
- }, () => dispatch({ type: CONTENT_VIEW_NEEDS_PUBLISH })));
+ }, () => dispatch(getContentViewDetails(cvId))));
}
}, [cvId, dispatch]);
const removeBulk = () => {
const componentIds = [];
rows.forEach(row => row.selected && componentIds.push(row.added));
dispatch(removeComponent({
compositeContentViewId: cvId,
component_ids: componentIds,
- }, () => dispatch({ type: CONTENT_VIEW_NEEDS_PUBLISH })));
+ }, () => dispatch(getContentViewDetails(cvId))));
};
const addBulk = () => {
const rowsToAdd = rows.filter(row => row.selected && !row.added);
setSelectedComponentsToAdd(rowsToAdd);
@@ -120,11 +120,11 @@
const onRemove = (componentIdToRemove) => {
dispatch(removeComponent({
compositeContentViewId: cvId,
component_ids: [componentIdToRemove],
- }, () => dispatch({ type: CONTENT_VIEW_NEEDS_PUBLISH })));
+ }, () => dispatch(getContentViewDetails(cvId))));
};
const toggleBulkAction = () => {
setBulkActionOpen(!bulkActionOpen);
};
@@ -154,10 +154,10 @@
</SplitItem>
{hasPermission(permissions, 'edit_content_views') && componentCvId && cvVersion &&
<SplitItem>
<Button
ouiaId={`edit-component-version-${componentCvId}`}
- className="foreman-edit-icon"
+ className="katello-edit-icon foreman-edit-icon"
aria-label="edit_version"
variant="plain"
onClick={() => {
onAdd({
componentCvId: id, published: cvVersion, added: componentCvId, latest,