Sha256: c6d8b7d448e6ed3b56a2fe5872301a2c969c2f33cd8b7178c4d703a9e2bbae2d

Contents?: true

Size: 954 Bytes

Versions: 11

Compression:

Stored size: 954 Bytes

Contents

import React from 'react';
import PropTypes from 'prop-types';
import { useQuery } from '@apollo/client';

import { translate as __ } from 'foremanReact/common/I18n';

import OvalContentsShow from './OvalContentsShow';
import { encodeId } from '../../../helpers/globalIdHelper';

import ovalContent from '../../../graphql/queries/ovalContent.gql';

const WrappedOvalContentsShow = props => {
  const id = encodeId('ForemanOpenscap::OvalContent', props.match.params.id);

  const useFetchFn = componentProps =>
    useQuery(ovalContent, { variables: { id } });

  const renameData = data => ({ ovalContent: data.ovalContent });

  return (
    <OvalContentsShow
      {...props}
      fetchFn={useFetchFn}
      renameData={renameData}
      resultPath="ovalContent"
      emptyStateTitle={__('No OVAL Content found')}
    />
  );
};

WrappedOvalContentsShow.propTypes = {
  match: PropTypes.object.isRequired,
};

export default WrappedOvalContentsShow;

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
foreman_openscap-8.0.0 webpack/routes/OvalContents/OvalContentsShow/index.js
foreman_openscap-7.1.1 webpack/routes/OvalContents/OvalContentsShow/index.js
foreman_openscap-7.1.0 webpack/routes/OvalContents/OvalContentsShow/index.js
foreman_openscap-7.0.0 webpack/routes/OvalContents/OvalContentsShow/index.js
foreman_openscap-6.0.0 webpack/routes/OvalContents/OvalContentsShow/index.js
foreman_openscap-5.2.3 webpack/routes/OvalContents/OvalContentsShow/index.js
foreman_openscap-5.2.2 webpack/routes/OvalContents/OvalContentsShow/index.js
foreman_openscap-5.1.1 webpack/routes/OvalContents/OvalContentsShow/index.js
foreman_openscap-5.2.1 webpack/routes/OvalContents/OvalContentsShow/index.js
foreman_openscap-5.2.0 webpack/routes/OvalContents/OvalContentsShow/index.js
foreman_openscap-5.1.0 webpack/routes/OvalContents/OvalContentsShow/index.js