Sha256: cdceab0048b06d4958409b3b631b223013f675b0cc358c2db9fa9aceaa89d59a

Contents?: true

Size: 1.21 KB

Versions: 36

Compression:

Stored size: 1.21 KB

Contents

import React from 'react';
import PropTypes from 'prop-types';
import { Modal, Icon, noop } from 'patternfly-react';
import { translate as __ } from 'foremanReact/common/I18n';
import Terminal from '../Terminal';
import './fullScreenModal.scss';

const FullScreenModal = ({
  showFullScreen,
  toggleFullScreen,
  terminalProps,
}) => (
  <Modal show={showFullScreen} onHide={toggleFullScreen}>
    <Modal.Header>
      <button
        className="close"
        onClick={toggleFullScreen}
        aria-hidden="true"
        aria-label="Close"
      >
        <Icon type="pf" name="close" />
      </button>
      <Modal.Title>{__('Full Screen')}</Modal.Title>
    </Modal.Header>
    <Modal.Body>
      <Terminal autoScroll={false} {...terminalProps} />
    </Modal.Body>
  </Modal>
);

FullScreenModal.propTypes = {
  showFullScreen: PropTypes.bool,
  toggleFullScreen: PropTypes.func,
  terminalProps: PropTypes.shape({
    exitCode: PropTypes.string,
    logs: PropTypes.oneOfType([
      PropTypes.arrayOf(PropTypes.string),
      PropTypes.string,
    ]),
    error: PropTypes.string,
  }),
};

FullScreenModal.defaultProps = {
  showFullScreen: false,
  toggleFullScreen: noop,
  terminalProps: {},
};

export default FullScreenModal;

Version data entries

36 entries across 36 versions & 2 rubygems

Version Path
foreman_inventory_upload-2.0.4.pre.2 webpack/ForemanInventoryUpload/Components/FullScreenModal/FullScreenModal.js
foreman_inventory_upload-2.0.4.pre.1 webpack/ForemanInventoryUpload/Components/FullScreenModal/FullScreenModal.js
foreman_inventory_upload-2.0.3 webpack/ForemanInventoryUpload/Components/FullScreenModal/FullScreenModal.js
foreman_inventory_upload-1.0.3 webpack/ForemanInventoryUpload/Components/FullScreenModal/FullScreenModal.js
foreman_inventory_upload-0.9.2 webpack/ForemanInventoryUpload/Components/FullScreenModal/FullScreenModal.js
foreman_inventory_upload-1.0.2 webpack/ForemanInventoryUpload/Components/FullScreenModal/FullScreenModal.js
foreman_inventory_upload-0.9.1 webpack/ForemanInventoryUpload/Components/FullScreenModal/FullScreenModal.js
foreman_inventory_upload-1.0.1 webpack/ForemanInventoryUpload/Components/FullScreenModal/FullScreenModal.js
foreman_inventory_upload-0.9.0 webpack/ForemanInventoryUpload/Components/FullScreenModal/FullScreenModal.js
foreman_inventory_upload-1.0.0 webpack/ForemanInventoryUpload/Components/FullScreenModal/FullScreenModal.js
foreman_inventory_upload-1.0.0.beta7 webpack/ForemanInventoryUpload/Components/FullScreenModal/FullScreenModal.js
foreman_inventory_upload-1.0.0.beta6 webpack/ForemanInventoryUpload/Components/FullScreenModal/FullScreenModal.js
foreman_inventory_upload-1.0.0.beta5 webpack/ForemanInventoryUpload/Components/FullScreenModal/FullScreenModal.js
foreman_inventory_upload-1.0.0.beta4 webpack/ForemanInventoryUpload/Components/FullScreenModal/FullScreenModal.js
foreman_inventory_upload-1.0.0.beta3 webpack/ForemanInventoryUpload/Components/FullScreenModal/FullScreenModal.js
foreman_inventory_upload-1.0.0.beta2 webpack/ForemanInventoryUpload/Components/FullScreenModal/FullScreenModal.js