Sha256: aa4e6da939e54170ed2125e51d73fff6f0fe6e0c6bb0d26d4b5c3ead29d4727a

Contents?: true

Size: 1.35 KB

Versions: 31

Compression:

Stored size: 1.35 KB

Contents

import React from 'react';
import { translate as __ } from 'foremanReact/common/I18n';
import PropTypes from 'prop-types';
import { Tooltip } from '@patternfly/react-core';
import { ArrowCircleUpIcon } from '@patternfly/react-icons';
import './NeedsPublishIcon.scss';

const tooltipContent = (composite, determinate) => {
  let content = '';
  if (determinate) {
    content = composite ? __('Updates available: Component content view versions have been updated.') :
      __('Updates available: Repositories and/or filters have changed.');
  } else {
    content = __('We could not determine if publish is required for the content view. ' +
        'Audit records may have been cleaned or not created for this version.');
  }
  return content;
};

const NeedsPublishIcon = ({ composite, determinate }) => (
  <Tooltip
    position="auto"
    enableFlip
    entryDelay={400}
    content={tooltipContent(composite, determinate)}
  >
    <ArrowCircleUpIcon
      id={determinate ? 'determinate-needs-publish' : 'indeterminate-needs-publish'}
      size="sm"
      className={determinate ? 'determinate-needs-publish' : 'indeterminate-needs-publish'}
    />
  </Tooltip>
);

NeedsPublishIcon.propTypes = {
  composite: PropTypes.bool,
  determinate: PropTypes.bool,
};

NeedsPublishIcon.defaultProps = {
  composite: false,
  determinate: false,
};

export default NeedsPublishIcon;

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
katello-4.14.3 webpack/scenes/ContentViews/components/NeedsPublishIcon.js
katello-4.14.2 webpack/scenes/ContentViews/components/NeedsPublishIcon.js
katello-4.15.0 webpack/scenes/ContentViews/components/NeedsPublishIcon.js
katello-4.15.0.rc2 webpack/scenes/ContentViews/components/NeedsPublishIcon.js
katello-4.15.0.rc1 webpack/scenes/ContentViews/components/NeedsPublishIcon.js
katello-4.14.1 webpack/scenes/ContentViews/components/NeedsPublishIcon.js
katello-4.14.0 webpack/scenes/ContentViews/components/NeedsPublishIcon.js
katello-4.14.0.rc3 webpack/scenes/ContentViews/components/NeedsPublishIcon.js
katello-4.14.0.rc2 webpack/scenes/ContentViews/components/NeedsPublishIcon.js
katello-4.14.0.rc1.1 webpack/scenes/ContentViews/components/NeedsPublishIcon.js
katello-4.14.0.rc1 webpack/scenes/ContentViews/components/NeedsPublishIcon.js
katello-4.13.1 webpack/scenes/ContentViews/components/NeedsPublishIcon.js
katello-4.13.0 webpack/scenes/ContentViews/components/NeedsPublishIcon.js
katello-4.12.1 webpack/scenes/ContentViews/components/NeedsPublishIcon.js
katello-4.13.0.rc1 webpack/scenes/ContentViews/components/NeedsPublishIcon.js
katello-4.12.0 webpack/scenes/ContentViews/components/NeedsPublishIcon.js
katello-4.12.0.rc3 webpack/scenes/ContentViews/components/NeedsPublishIcon.js
katello-4.12.0.rc2 webpack/scenes/ContentViews/components/NeedsPublishIcon.js
katello-4.12.0.rc1 webpack/scenes/ContentViews/components/NeedsPublishIcon.js
katello-4.11.1 webpack/scenes/ContentViews/components/NeedsPublishIcon.js