diff --git a/app/scripts/modules/cloudfoundry/src/presentation/forms/inputs/CloudFoundryRadioButtonInput.tsx b/app/scripts/modules/cloudfoundry/src/presentation/forms/inputs/CloudFoundryRadioButtonInput.tsx deleted file mode 100644 index 38aee8d6e58..00000000000 --- a/app/scripts/modules/cloudfoundry/src/presentation/forms/inputs/CloudFoundryRadioButtonInput.tsx +++ /dev/null @@ -1,57 +0,0 @@ -import * as React from 'react'; -import { Option } from 'react-select'; - -import { - IFormInputProps, - isStringArray, - Markdown, - orEmptyString, - OmitControlledInputPropsFrom, - StringsAsOptions, - validationClassName, -} from '@spinnaker/core'; - -import 'cloudfoundry/common/cloudFoundry.less'; - -interface ICloudFoundryRadioButtonInputProps - extends IFormInputProps, - OmitControlledInputPropsFrom> { - options: Array>; - inputClassName?: string; -} - -export const CloudFoundryRadioButtonInput = (props: ICloudFoundryRadioButtonInputProps) => { - const { value, validation, inputClassName, options, ...otherProps } = props; - const className = `RadioButtonInput radio ${orEmptyString(inputClassName)} ${validationClassName(validation)}`; - - const RadioButtonsElement = ({ opts }: { opts: Array> }) => ( -
- {opts.map(option => ( -
- -
- ))} -
- ); - - if (isStringArray(options)) { - return {opts => }; - } else { - return >} />; - } -}; diff --git a/app/scripts/modules/cloudfoundry/src/presentation/forms/inputs/index.ts b/app/scripts/modules/cloudfoundry/src/presentation/forms/inputs/index.ts index eab5da20667..cc24612b0a8 100644 --- a/app/scripts/modules/cloudfoundry/src/presentation/forms/inputs/index.ts +++ b/app/scripts/modules/cloudfoundry/src/presentation/forms/inputs/index.ts @@ -1,2 +1 @@ -export * from './CloudFoundryRadioButtonInput'; export * from './FormikConfigField'; diff --git a/app/scripts/modules/cloudfoundry/src/presentation/forms/serverGroup/HealthCheck.tsx b/app/scripts/modules/cloudfoundry/src/presentation/forms/serverGroup/HealthCheck.tsx index e39f3d903e8..27e7c09d34d 100644 --- a/app/scripts/modules/cloudfoundry/src/presentation/forms/serverGroup/HealthCheck.tsx +++ b/app/scripts/modules/cloudfoundry/src/presentation/forms/serverGroup/HealthCheck.tsx @@ -1,8 +1,6 @@ import * as React from 'react'; -import { FormikFormField, TextInput } from '@spinnaker/core'; - -import { CloudFoundryRadioButtonInput } from 'cloudfoundry/presentation/forms/inputs/CloudFoundryRadioButtonInput'; +import { FormikFormField, RadioButtonInput, TextInput } from '@spinnaker/core'; export interface IHealthCheckProps { healthCheckHttpEndpointFieldName: string; @@ -35,7 +33,7 @@ export class HealthCheck extends React.Component { name={healthCheckTypeFieldName} label="Health Check Type" fastField={false} - input={props => } + input={props => } onChange={value => { onHealthCheckTypeChange && onHealthCheckTypeChange(value); }} diff --git a/app/scripts/modules/cloudfoundry/src/serverGroup/configure/wizard/sections/configurationSettings/ConfigurationSettings.cf.tsx b/app/scripts/modules/cloudfoundry/src/serverGroup/configure/wizard/sections/configurationSettings/ConfigurationSettings.cf.tsx index 4f5bbabdd7f..7065a936241 100644 --- a/app/scripts/modules/cloudfoundry/src/serverGroup/configure/wizard/sections/configurationSettings/ConfigurationSettings.cf.tsx +++ b/app/scripts/modules/cloudfoundry/src/serverGroup/configure/wizard/sections/configurationSettings/ConfigurationSettings.cf.tsx @@ -8,6 +8,7 @@ import { IWizardPageComponent, IPipeline, IStage, + RadioButtonInput, StageArtifactSelector, ArtifactTypePatterns, } from '@spinnaker/core'; @@ -17,7 +18,6 @@ import { ICloudFoundryManifest, } from 'cloudfoundry/serverGroup/configure/serverGroupConfigurationModel.cf'; -import { CloudFoundryRadioButtonInput } from 'cloudfoundry/presentation/forms/inputs/CloudFoundryRadioButtonInput'; import { ICloudFoundryEnvVar } from 'cloudfoundry/domain'; import { Buildpacks, @@ -145,10 +145,11 @@ export class CloudFoundryServerGroupConfigurationSettings <>
-
+
Source Type
- this.manifestSourceUpdated(e.target.value)}