Skip to content

Commit dcec501

Browse files
More firewall rule form help copy (#2286)
* Add helper text to firewall form * Use Message component * might as well go all out --------- Co-authored-by: David Crespo <[email protected]>
1 parent ed4d92e commit dcec501

File tree

1 file changed

+34
-3
lines changed

1 file changed

+34
-3
lines changed

app/forms/firewall-rules-create.tsx

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,12 @@ export const CommonFields = ({ error, control }: CommonFieldsProps) => {
228228
label="Direction of traffic"
229229
column
230230
control={control}
231+
description={
232+
<>
233+
An inbound rule applies to traffic <em>to</em> the targets, while an outbound
234+
rule applies to traffic <em>from</em> the targets.
235+
</>
236+
}
231237
items={[
232238
{ value: 'inbound', label: 'Inbound' },
233239
{ value: 'outbound', label: 'Outbound' },
@@ -247,7 +253,15 @@ export const CommonFields = ({ error, control }: CommonFieldsProps) => {
247253
<h3 className="mb-4 text-sans-2xl">Targets</h3>
248254
<Message
249255
variant="info"
250-
content="Targets determine the instances to which this rule applies. You can target instances directly or specify a VPC, VPC subnet, IP, or IP subnet which will apply the rule to all matching instances. Targets are additive: the rule applies to instances matching any target."
256+
content={
257+
<>
258+
Targets determine the instances to which this rule applies. You can target
259+
instances directly by name, or specify a VPC, VPC subnet, IP, or IP subnet,
260+
which will apply the rule to traffic going to all matching instances. Targets
261+
are additive: the rule applies to instances matching{' '}
262+
<span className="underline">any</span> target.
263+
</>
264+
}
251265
/>
252266
{/* TODO: make ListboxField smarter with the values like RadioField is */}
253267
<ListboxField
@@ -338,7 +352,14 @@ export const CommonFields = ({ error, control }: CommonFieldsProps) => {
338352

339353
<Message
340354
variant="info"
341-
content="Filters reduce the scope of this rule. Without filters, the rule applies to all traffic to the targets (or from the targets, if it's an outbound rule). With multiple filters, it applies to traffic matching all filters."
355+
content={
356+
<>
357+
Filters reduce the scope of this rule. Without filters, the rule applies to all
358+
traffic to the targets (or from the targets, if it&rsquo;s an outbound rule).
359+
With multiple filters, the rule applies to traffic matching{' '}
360+
<span className="underline">all</span> filters.
361+
</>
362+
}
342363
/>
343364

344365
<div className="flex flex-col gap-3">
@@ -349,7 +370,7 @@ export const CommonFields = ({ error, control }: CommonFieldsProps) => {
349370
Port filters
350371
</label>
351372
<TextInputHint id="portRange-help-text" className="mb-2">
352-
A single port (1234) or a range (1234&ndash;2345)
373+
A single destination port (1234) or a range (1234&ndash;2345)
353374
</TextInputHint>
354375
<TextFieldInner
355376
id="portRange"
@@ -426,6 +447,16 @@ export const CommonFields = ({ error, control }: CommonFieldsProps) => {
426447

427448
<div className="flex flex-col gap-3">
428449
<h3 className="mt-4 text-sans-lg">Host filters</h3>
450+
<Message
451+
variant="info"
452+
content={
453+
<>
454+
Host filters match the &ldquo;other end&rdquo; of traffic from the
455+
target&rsquo;s perspective: for an inbound rule, they match the source of
456+
traffic. For an outbound rule, they match the destination.
457+
</>
458+
}
459+
/>
429460
<ListboxField
430461
name="type"
431462
label="Host type"

0 commit comments

Comments
 (0)