Skip to content

Commit 01b03e3

Browse files
authored
add help text to contact form and aws integration setup (#35)
1 parent e352265 commit 01b03e3

2 files changed

Lines changed: 21 additions & 1 deletion

File tree

frontend/src/app/(public-area)/contact/ContactForm.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@ export const ContactForm = () => {
4141
};
4242

4343
return success ? (
44-
<SuccessMessage>Message submitted! We&apos;ll be in touch soon.</SuccessMessage>
44+
<SuccessMessage>
45+
Message submitted! We&apos;ll be in touch soon. If you don&apos;t see any emails from us within a few
46+
business days, please be sure to check your spam folder.
47+
</SuccessMessage>
4548
) : (
4649
<>
4750
<p>

frontend/src/app/(user-area)/teams/[teamId]/settings/integrations/page.tsx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ interface CreateIntegrationFormProps {
1717
onSuccess: () => void;
1818
}
1919

20+
const startsWithAwsLogsRegex = /^\/?AWSLogs($|\/)/;
21+
const includesAwsLogsRegex = /(^|\/)AWSLogs($|\/)/;
22+
2023
const CreateIntegrationForm = (props: CreateIntegrationFormProps) => {
2124
const dispatch = useDispatch();
2225

@@ -122,6 +125,20 @@ const CreateIntegrationForm = (props: CreateIntegrationFormProps) => {
122125
onChange={setS3BucketName}
123126
/>
124127
<TextField disabled={isBusy} label="S3 Key Prefix" value={s3KeyPrefix} onChange={setS3KeyPrefix} />
128+
{s3KeyPrefix &&
129+
(startsWithAwsLogsRegex.test(s3KeyPrefix) ? (
130+
<p className="text-xs text-indian-red">
131+
Cloud Snitch will automatically search for the &quot;AWSLogs&quot; directory in your S3
132+
bucket. This field is only necessary if you have a custom prefix for your CloudTrail
133+
logs. Otherwise, you should leave it empty.
134+
</p>
135+
) : includesAwsLogsRegex.test(s3KeyPrefix) ? (
136+
<p className="text-xs text-indian-red">
137+
Cloud Snitch will automatically search for the &quot;AWSLogs&quot; directory in your S3
138+
bucket. This field should only contain the custom prefix that you specified when
139+
creating the trail, if any.
140+
</p>
141+
) : null)}
125142
<Checkbox
126143
disabled={isBusy}
127144
checked={getAccountNamesFromOrganizations}

0 commit comments

Comments
 (0)