Sha256: 1218a8550fed5875c1d66bf7c1c321ec49d95653697f399c34a17cfb869343d5
Contents?: true
Size: 1.37 KB
Versions: 7
Compression:
Stored size: 1.37 KB
Contents
import React, { useState } from 'react'; import { FormGroup, Radio } from '@patternfly/react-core'; import { translate as __ } from 'foremanReact/common/I18n'; import { helpLabel } from '../form/FormHelpers'; export const QueryType = () => { const [isTypeStatic, setIsTypeStatic] = useState(true); return ( <FormGroup label={__('Query type')} fieldId="query-type" labelIcon={helpLabel( <p> {__('Type has impact on when is the query evaluated to hosts.')} <br /> <ul> <li> <b>{__('Static')}</b> -{' '} {__('evaluates just after you submit this form')} </li> <li> <b>{__('Dynamic')}</b> -{' '} {__( "evaluates just before the execution is started, so if it's planed in future, targeted hosts set may change before it" )} </li> </ul> </p>, 'query-type' )} > <Radio isChecked={isTypeStatic} name="query-type" onChange={() => setIsTypeStatic(true)} id="query-type-static" label={__('Static query')} /> <Radio isChecked={!isTypeStatic} name="query-type" onChange={() => setIsTypeStatic(false)} id="query-type-dynamic" label={__('Dynamic query')} /> </FormGroup> ); };
Version data entries
7 entries across 7 versions & 1 rubygems