Sha256: bc5511cbf04043d0666cd40b655527f4e47270c7ace452d327dde46880fd0ede

Contents?: true

Size: 1.28 KB

Versions: 22

Compression:

Stored size: 1.28 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"
      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

22 entries across 22 versions & 1 rubygems

Version Path
katello-4.6.2.1 webpack/scenes/ContentViews/Copy/CopyContentViewModal.js
katello-4.6.2 webpack/scenes/ContentViews/Copy/CopyContentViewModal.js
katello-4.6.1 webpack/scenes/ContentViews/Copy/CopyContentViewModal.js
katello-4.4.2.2 webpack/scenes/ContentViews/Copy/CopyContentViewModal.js
katello-4.4.2.1 webpack/scenes/ContentViews/Copy/CopyContentViewModal.js
katello-4.4.2 webpack/scenes/ContentViews/Copy/CopyContentViewModal.js
katello-4.5.1 webpack/scenes/ContentViews/Copy/CopyContentViewModal.js
katello-4.6.0 webpack/scenes/ContentViews/Copy/CopyContentViewModal.js
katello-4.6.0.rc2 webpack/scenes/ContentViews/Copy/CopyContentViewModal.js
katello-4.6.0.rc1 webpack/scenes/ContentViews/Copy/CopyContentViewModal.js
katello-4.5.0 webpack/scenes/ContentViews/Copy/CopyContentViewModal.js
katello-4.5.0.rc2 webpack/scenes/ContentViews/Copy/CopyContentViewModal.js
katello-4.4.1 webpack/scenes/ContentViews/Copy/CopyContentViewModal.js
katello-4.5.0.rc1 webpack/scenes/ContentViews/Copy/CopyContentViewModal.js
katello-4.4.0.2 webpack/scenes/ContentViews/Copy/CopyContentViewModal.js
katello-4.4.0.1 webpack/scenes/ContentViews/Copy/CopyContentViewModal.js
katello-4.3.1 webpack/scenes/ContentViews/Copy/CopyContentViewModal.js
katello-4.4.0 webpack/scenes/ContentViews/Copy/CopyContentViewModal.js
katello-4.4.0.rc2 webpack/scenes/ContentViews/Copy/CopyContentViewModal.js
katello-4.4.0.rc1 webpack/scenes/ContentViews/Copy/CopyContentViewModal.js