import React, { useContext } from 'react'; import { capitalize, upperCase } from 'lodash'; import { translate as __ } from 'foremanReact/common/I18n'; import { TextContent, TextList, TextListItem, TextListItemVariants, TextListVariants } from '@patternfly/react-core'; import ACSCreateContext from '../ACSCreateContext'; import WizardHeader from '../../../ContentViews/components/WizardHeader'; import InactiveText from '../../../ContentViews/components/InactiveText'; const ACSReview = () => { const { name, description, acsType, contentType, smartProxies, useHttpProxies, url, subpaths, verifySSL, authentication, sslCertName, sslKeyName, username, password, caCertName, productNames, } = useContext(ACSCreateContext); return ( <> {__('Review the information below and click ')}{__('Add')}{__(' to add your source. ' + 'To edit details in previous steps, click ')}{__('Back')}{__(' or any step on the left.') } } /> {__('Name')} {name} {__('Source type')} {acsType === 'rhui' ? upperCase(acsType) : capitalize(acsType)} {__('Description')} {description} {__('Content type')} {capitalize(contentType)} {__('Smart proxies')} {smartProxies.join(', ')} {__('Use HTTP Proxies')} {useHttpProxies ? __('Yes') : __('No')} {(acsType === 'custom' || acsType === 'rhui') && <> {__('Base URL')} {url} {__('Subpaths')} {subpaths} {__('Verify SSL')} {verifySSL ? __('Yes') : __('No')} {__('SSL CA certificate')} {caCertName} {authentication === 'manual' && ( <> {__('Authentication type')} {__('Manual')} {__('Username')} {username} {__('Password')} {password.length > 0 ? '••••••••' : } )} {authentication === 'content_credentials' && ( <> {__('Authentication type')} {__('Content credential')} {__('SSL client certificate')} {sslCertName} {__('SSL client key')} {sslKeyName} )} } {acsType === 'simplified' && <> {__('Products')} {productNames.join(', ')} } ); }; export default ACSReview;