Sha256: e7413797ba7049d781a01733b6656fa772a575bf9b39d23b4bb83a8462ecfbf8

Contents?: true

Size: 1.24 KB

Versions: 29

Compression:

Stored size: 1.24 KB

Contents

import React from 'react';
import PropTypes from 'prop-types';
import { noop, Grid, Button, Icon } from 'patternfly-react';
import { sprintf, translate as __ } from 'foremanReact/common/I18n';
import './tabHeader.scss';

const TabHeader = ({ exitCode, onRestart, onDownload, toggleFullScreen }) => (
  <Grid.Row className="tab-header">
    <Grid.Col sm={6}>
      <p>{sprintf(__('Exit Code: %s'), exitCode)}</p>
    </Grid.Col>
    <Grid.Col sm={6}>
      <div className="tab-action-buttons">
        {onRestart ? (
          <Button bsStyle="primary" onClick={onRestart}>
            {__('Restart')}
          </Button>
        ) : null}
        {onDownload ? (
          <Button onClick={onDownload}>
            {__('Download Report')} <Icon name="download" />
          </Button>
        ) : null}
        <Button onClick={toggleFullScreen}>
          {__('Full Screen')}
          <Icon name="arrows-alt" />
        </Button>
      </div>
    </Grid.Col>
  </Grid.Row>
);

TabHeader.propTypes = {
  onRestart: PropTypes.func,
  onDownload: PropTypes.func,
  exitCode: PropTypes.string,
  toggleFullScreen: PropTypes.func,
};

TabHeader.defaultProps = {
  onRestart: null,
  exitCode: '',
  onDownload: null,
  toggleFullScreen: noop,
};

export default TabHeader;

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
foreman_rh_cloud-0.9.12 webpack/ForemanInventoryUpload/Components/TabHeader/TabHeader.js
foreman_rh_cloud-1.0.12 webpack/ForemanInventoryUpload/Components/TabHeader/TabHeader.js
foreman_rh_cloud-2.0.12 webpack/ForemanInventoryUpload/Components/TabHeader/TabHeader.js
foreman_rh_cloud-0.9.11 webpack/ForemanInventoryUpload/Components/TabHeader/TabHeader.js
foreman_rh_cloud-1.0.11 webpack/ForemanInventoryUpload/Components/TabHeader/TabHeader.js
foreman_rh_cloud-2.0.11 webpack/ForemanInventoryUpload/Components/TabHeader/TabHeader.js
foreman_rh_cloud-0.9.10 webpack/ForemanInventoryUpload/Components/TabHeader/TabHeader.js
foreman_rh_cloud-1.0.10 webpack/ForemanInventoryUpload/Components/TabHeader/TabHeader.js
foreman_rh_cloud-2.0.10 webpack/ForemanInventoryUpload/Components/TabHeader/TabHeader.js
foreman_rh_cloud-2.0.9 webpack/ForemanInventoryUpload/Components/TabHeader/TabHeader.js
foreman_rh_cloud-1.0.9 webpack/ForemanInventoryUpload/Components/TabHeader/TabHeader.js
foreman_rh_cloud-0.9.9 webpack/ForemanInventoryUpload/Components/TabHeader/TabHeader.js
foreman_rh_cloud-0.9.8 webpack/ForemanInventoryUpload/Components/TabHeader/TabHeader.js
foreman_rh_cloud-1.0.8 webpack/ForemanInventoryUpload/Components/TabHeader/TabHeader.js
foreman_rh_cloud-2.0.8 webpack/ForemanInventoryUpload/Components/TabHeader/TabHeader.js
foreman_rh_cloud-0.9.7 webpack/ForemanInventoryUpload/Components/TabHeader/TabHeader.js
foreman_rh_cloud-1.0.7 webpack/ForemanInventoryUpload/Components/TabHeader/TabHeader.js
foreman_rh_cloud-2.0.7 webpack/ForemanInventoryUpload/Components/TabHeader/TabHeader.js
foreman_rh_cloud-0.9.6 webpack/ForemanInventoryUpload/Components/TabHeader/TabHeader.js
foreman_rh_cloud-1.0.6 webpack/ForemanInventoryUpload/Components/TabHeader/TabHeader.js