Skip to content

Commit

Permalink
refactor(cf): use new inline RadioInput (#7085)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jammy Louie committed Jun 7, 2019
1 parent 94dc56d commit be14551
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 65 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
export * from './CloudFoundryRadioButtonInput';
export * from './FormikConfigField';
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -35,7 +33,7 @@ export class HealthCheck extends React.Component<IHealthCheckProps> {
name={healthCheckTypeFieldName}
label="Health Check Type"
fastField={false}
input={props => <CloudFoundryRadioButtonInput {...props} options={this.HEALTH_CHECK_TYPE_OPTIONS} />}
input={props => <RadioButtonInput {...props} inline={true} options={this.HEALTH_CHECK_TYPE_OPTIONS} />}
onChange={value => {
onHealthCheckTypeChange && onHealthCheckTypeChange(value);
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
IWizardPageComponent,
IPipeline,
IStage,
RadioButtonInput,
StageArtifactSelector,
ArtifactTypePatterns,
} from '@spinnaker/core';
Expand All @@ -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,
Expand Down Expand Up @@ -145,10 +145,11 @@ export class CloudFoundryServerGroupConfigurationSettings
<>
<div className="form-group">
<div className="col-md-11">
<div className="StandardFieldLayout flex-container-h margin-between-lg">
<div className="StandardFieldLayout flex-container-h baseline margin-between-lg">
<div className="sm-label-right">Source Type</div>
<div className="flex-grow">
<CloudFoundryRadioButtonInput
<RadioButtonInput
inline={true}
value={direct ? 'direct' : 'artifact'}
options={[{ label: 'Artifact', value: 'artifact' }, { label: 'Form', value: 'direct' }]}
onChange={(e: any) => this.manifestSourceUpdated(e.target.value)}
Expand Down

0 comments on commit be14551

Please sign in to comment.