Skip to content

Commit

Permalink
fix(docker,titus): re-align digest field on image + tag selector (#7526)
Browse files Browse the repository at this point in the history
  • Loading branch information
Erik Munson authored and christopherthielen committed Oct 15, 2019
1 parent 64d88cc commit c7feedd
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 21 deletions.
34 changes: 17 additions & 17 deletions app/scripts/modules/docker/src/image/DockerImageAndTagSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ export interface IDockerImageAndTagSelectorProps {
digest: string;
account: string;
showRegistry?: boolean;
labelClass?: string;
fieldClass?: string;
onChange: (changes: IDockerImageAndTagChanges) => void;
deferInitialization?: boolean;
showDigest?: boolean;
Expand All @@ -57,8 +55,6 @@ export class DockerImageAndTagSelector extends React.Component<
IDockerImageAndTagSelectorState
> {
public static defaultProps: Partial<IDockerImageAndTagSelectorProps> = {
fieldClass: 'col-md-8',
labelClass: 'col-md-3',
organization: '',
registry: '',
repository: '',
Expand Down Expand Up @@ -414,9 +410,7 @@ export class DockerImageAndTagSelector extends React.Component<
const {
account,
digest,
fieldClass,
imageId,
labelClass,
organization,
repository,
showDigest,
Expand Down Expand Up @@ -672,18 +666,24 @@ export class DockerImageAndTagSelector extends React.Component<

const Digest =
lookupType === 'digest' ? (
<div className="form-group">
<div className={`sm-label-right ${labelClass}`}>
Digest <HelpField id="pipeline.config.docker.trigger.digest" />
<div className="sp-formItem">
<div className="sp-formItem__left">
<div className="sp-formLabel">
Digest <HelpField id="pipeline.config.docker.trigger.digest" />
</div>
</div>
<div className={fieldClass}>
<input
className="form-control input-sm"
placeholder="sha256:abc123"
value={digest || parsedImageId.digest || ''}
onChange={e => this.valueChanged('digest', e.target.value)}
required={true}
/>
<div className="sp-formItem__right">
<div className="sp-form">
<span className="field">
<input
className="form-control input-sm"
placeholder="sha256:abc123"
value={digest || parsedImageId.digest || ''}
onChange={e => this.valueChanged('digest', e.target.value)}
required={true}
/>
</span>
</div>
</div>
</div>
) : null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,6 @@ export class TitusRunJobStageConfig extends React.Component<IStageConfigProps, I
showRegistry={false}
onChange={this.dockerChanged}
deferInitialization={stage.deferredInitialization}
labelClass="col-md-2 col-md-offset-1 sm-label-right"
fieldClass="col-md-6"
/>

<StageConfigField label="CPU(s)">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,6 @@ export class ServerGroupBasicSettings
tag={values.tag}
showRegistry={false}
deferInitialization={values.deferredInitialization}
labelClass="col-md-3"
fieldClass="col-md-7"
onChange={this.dockerValuesChanged}
/>
)}
Expand Down

0 comments on commit c7feedd

Please sign in to comment.