Sha256: 1e19ffae643886864d528ccec4997886ed72cbf5570672b174abfccdaa8da9b5

Contents?: true

Size: 1.32 KB

Versions: 36

Compression:

Stored size: 1.32 KB

Contents

import React from 'react';
import PropTypes from 'prop-types';
import { Modal, ModalVariant } from '@patternfly/react-core';
import { FormattedMessage } from 'react-intl';
import { translate as __ } from 'foremanReact/common/I18n';
import CopyContentViewForm from './CopyContentViewForm';

const CopyContentViewModal = ({
  cvId, cvName, show, setIsOpen,
}) => {
  const description = (
    <FormattedMessage
      id="copy-cv-description"
      values={{ cv: <b>{cvName}</b> }}
      defaultMessage={__('This will create a copy of {cv}, including details, repositories, and filters. Generated data such as history, tasks and versions will not be copied.')}
    />
  );
  return (
    <Modal
      title="Copy content view"
      ouiaId="copy-content-view-modal"
      variant={ModalVariant.small}
      isOpen={show}
      description={description}
      onClose={() => {
        setIsOpen(false);
      }}
      appendTo={document.body}
    ><CopyContentViewForm cvId={cvId} setModalOpen={setIsOpen} />
    </Modal>);
};

CopyContentViewModal.propTypes = {
  cvId: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
  cvName: PropTypes.string,
  show: PropTypes.bool,
  setIsOpen: PropTypes.func,
};

CopyContentViewModal.defaultProps = {
  cvId: null,
  cvName: null,
  show: false,
  setIsOpen: null,
};

export default CopyContentViewModal;

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
katello-4.7.6 webpack/scenes/ContentViews/Copy/CopyContentViewModal.js
katello-4.8.2 webpack/scenes/ContentViews/Copy/CopyContentViewModal.js
katello-4.9.0.rc2 webpack/scenes/ContentViews/Copy/CopyContentViewModal.js
katello-4.9.0.rc1 webpack/scenes/ContentViews/Copy/CopyContentViewModal.js
katello-4.8.1 webpack/scenes/ContentViews/Copy/CopyContentViewModal.js
katello-4.7.5 webpack/scenes/ContentViews/Copy/CopyContentViewModal.js
katello-4.8.0 webpack/scenes/ContentViews/Copy/CopyContentViewModal.js
katello-4.8.0.rc2 webpack/scenes/ContentViews/Copy/CopyContentViewModal.js
katello-4.7.4 webpack/scenes/ContentViews/Copy/CopyContentViewModal.js
katello-4.8.0.rc1 webpack/scenes/ContentViews/Copy/CopyContentViewModal.js
katello-4.7.3 webpack/scenes/ContentViews/Copy/CopyContentViewModal.js
katello-4.7.2 webpack/scenes/ContentViews/Copy/CopyContentViewModal.js
katello-4.7.1 webpack/scenes/ContentViews/Copy/CopyContentViewModal.js
katello-4.7.0 webpack/scenes/ContentViews/Copy/CopyContentViewModal.js
katello-4.7.0.rc2 webpack/scenes/ContentViews/Copy/CopyContentViewModal.js
katello-4.7.0.rc1 webpack/scenes/ContentViews/Copy/CopyContentViewModal.js