Sha256: 89f9698d3662545eba201a1a3ece8870436214dc2a052c32bba91d57ba91d09f

Contents?: true

Size: 963 Bytes

Versions: 10

Compression:

Stored size: 963 Bytes

Contents

import React from 'react';
import { useQuery } from '@apollo/client';
import { translate as __ } from 'foremanReact/common/I18n';
import IndexLayout from '../../../components/IndexLayout';

import ovalContentsQuery from '../../../graphql/queries/ovalContents.gql';
import NewOvalPolicyForm from './NewOvalPolicyForm';

const OvalPoliciesNew = props => {
  const useFetchFn = () => useQuery(ovalContentsQuery);

  const renameData = data => ({
    ovalContents: data.ovalContents.nodes,
  });

  return (
    <IndexLayout pageTitle={__('Create OVAL Policy')}>
      <NewOvalPolicyForm
        fetchFn={useFetchFn}
        renameData={renameData}
        resultPath="ovalContents.nodes"
        emptyStateTitle={__('No OVAL Content found')}
        emptyStateBody={__(
          'OVAL Content is required to create OVAL Policy. Please create one before proceeding.'
        )}
        {...props}
      />
    </IndexLayout>
  );
};

export default OvalPoliciesNew;

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
foreman_openscap-8.0.0 webpack/routes/OvalPolicies/OvalPoliciesNew/OvalPoliciesNew.js
foreman_openscap-7.1.1 webpack/routes/OvalPolicies/OvalPoliciesNew/OvalPoliciesNew.js
foreman_openscap-7.1.0 webpack/routes/OvalPolicies/OvalPoliciesNew/OvalPoliciesNew.js
foreman_openscap-7.0.0 webpack/routes/OvalPolicies/OvalPoliciesNew/OvalPoliciesNew.js
foreman_openscap-6.0.0 webpack/routes/OvalPolicies/OvalPoliciesNew/OvalPoliciesNew.js
foreman_openscap-5.2.3 webpack/routes/OvalPolicies/OvalPoliciesNew/OvalPoliciesNew.js
foreman_openscap-5.2.2 webpack/routes/OvalPolicies/OvalPoliciesNew/OvalPoliciesNew.js
foreman_openscap-5.1.1 webpack/routes/OvalPolicies/OvalPoliciesNew/OvalPoliciesNew.js
foreman_openscap-5.2.1 webpack/routes/OvalPolicies/OvalPoliciesNew/OvalPoliciesNew.js
foreman_openscap-5.2.0 webpack/routes/OvalPolicies/OvalPoliciesNew/OvalPoliciesNew.js