Skip to content

Commit

Permalink
fix: update order (#744)
Browse files Browse the repository at this point in the history
  • Loading branch information
juzhiyuan authored Nov 9, 2020
1 parent c1efb04 commit 6efd492
Showing 1 changed file with 22 additions and 21 deletions.
43 changes: 22 additions & 21 deletions web/src/components/Upstream/UpstreamForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -216,53 +216,54 @@ const UpstreamForm: React.FC<Props> = forwardRef(
<span style={{ margin: '0 8px' }}>s</span>
</Form.Item>
<Form.Item
label={formatMessage({ id: 'upstream.step.healthy.checks.active.http_path' })}
label={formatMessage({ id: 'upstream.step.healthy.checks.active.host' })}
required
>
<Form.Item
name={['checks', 'active', 'http_path']}
noStyle
style={{ marginBottom: 0 }}
name={['checks', 'active', 'host']}
rules={[
{
required: true,
message: formatMessage({
id: 'upstream.step.input.healthy.checks.active.http_path',
}),
message: formatMessage({ id: 'upstream.step.input.healthy.checks.active.host' }),
},
{
pattern: new RegExp(
/(^([1-9]?\d|1\d{2}|2[0-4]\d|25[0-5])(\.(25[0-5]|1\d{2}|2[0-4]\d|[1-9]?\d)){3}$|^(?![0-9.]+$)([a-zA-Z0-9_-]+)(\.[a-zA-Z0-9_-]+){0,}$)/,
'g',
),
message: formatMessage({ id: 'upstream.step.domain.name.or.ip.rule' }),
},
]}
>
<Input
placeholder={formatMessage({ id: 'upstream.step.input.healthy.checks.active.host' })}
disabled={readonly}
placeholder={formatMessage({
id: 'upstream.step.input.healthy.checks.active.http_path',
})}
/>
</Form.Item>
</Form.Item>

<Form.Item
label={formatMessage({ id: 'upstream.step.healthy.checks.active.host' })}
label={formatMessage({ id: 'upstream.step.healthy.checks.active.http_path' })}
required
>
<Form.Item
style={{ marginBottom: 0 }}
name={['checks', 'active', 'host']}
name={['checks', 'active', 'http_path']}
noStyle
rules={[
{
required: true,
message: formatMessage({ id: 'upstream.step.input.healthy.checks.active.host' }),
},
{
pattern: new RegExp(
/(^([1-9]?\d|1\d{2}|2[0-4]\d|25[0-5])(\.(25[0-5]|1\d{2}|2[0-4]\d|[1-9]?\d)){3}$|^(?![0-9.]+$)([a-zA-Z0-9_-]+)(\.[a-zA-Z0-9_-]+){0,}$)/,
'g',
),
message: formatMessage({ id: 'upstream.step.domain.name.or.ip.rule' }),
message: formatMessage({
id: 'upstream.step.input.healthy.checks.active.http_path',
}),
},
]}
>
<Input
placeholder={formatMessage({ id: 'upstream.step.input.healthy.checks.active.host' })}
disabled={readonly}
placeholder={formatMessage({
id: 'upstream.step.input.healthy.checks.active.http_path',
})}
/>
</Form.Item>
</Form.Item>
Expand Down

0 comments on commit 6efd492

Please sign in to comment.