Skip to content
This repository was archived by the owner on Apr 23, 2025. It is now read-only.

Commit b5070ed

Browse files
committed
[Feature] Add targeted documentation links to responders, certificate template, and content security policies pages.
1 parent 0fc1b3e commit b5070ed

3 files changed

Lines changed: 44 additions & 0 deletions

File tree

src/pages/workspace/utils/certificates/certificates_self_signed_certificates.tsx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { useCallback, useEffect, useState } from 'react';
33
import type { Criteria, Pagination, PropertySort } from '@elastic/eui';
44
import {
55
EuiButton,
6+
EuiButtonEmpty,
67
EuiCallOut,
78
EuiConfirmModal,
89
EuiEmptyPrompt,
@@ -77,6 +78,17 @@ export default function CertificatesSelfSignedCertificates() {
7778
</EuiButton>
7879
);
7980

81+
const docsButton = (
82+
<EuiButtonEmpty
83+
iconType={'documentation'}
84+
title="Learn how to create and use certificate templates"
85+
target={'_blank'}
86+
href={'/docs/guides/digital_certificates'}
87+
>
88+
Learn how to
89+
</EuiButtonEmpty>
90+
);
91+
8092
useEffect(() => {
8193
if (!uiState.synced || !uiState.user) {
8294
return;
@@ -197,6 +209,8 @@ export default function CertificatesSelfSignedCertificates() {
197209
<div>
198210
<p>Go ahead and create your first self-signed certificate template.</p>
199211
{createButton}
212+
<EuiSpacer size={'s'} />
213+
{docsButton}
200214
</div>
201215
}
202216
/>

src/pages/workspace/utils/web_security/csp/web_security_csp_policies.tsx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@ import { useCallback, useEffect, useState } from 'react';
33
import type { Criteria, Pagination, PropertySort } from '@elastic/eui';
44
import {
55
EuiButton,
6+
EuiButtonEmpty,
67
EuiConfirmModal,
78
EuiEmptyPrompt,
89
EuiFlexGroup,
910
EuiFlexItem,
1011
EuiIcon,
1112
EuiInMemoryTable,
13+
EuiSpacer,
1214
EuiText,
1315
EuiToolTip,
1416
} from '@elastic/eui';
@@ -97,6 +99,17 @@ export default function WebSecurityContentSecurityPolicies() {
9799
</EuiButton>
98100
);
99101

102+
const docsButton = (
103+
<EuiButtonEmpty
104+
iconType={'documentation'}
105+
title="Learn how to create and use content security policies"
106+
target={'_blank'}
107+
href={'/docs/guides/web_security/csp'}
108+
>
109+
Learn how to
110+
</EuiButtonEmpty>
111+
);
112+
100113
useEffect(() => {
101114
if (!uiState.synced || !uiState.user) {
102115
return;
@@ -165,6 +178,8 @@ export default function WebSecurityContentSecurityPolicies() {
165178
<div>
166179
<p>Go ahead and create your first policy.</p>
167180
{createButton}
181+
<EuiSpacer size={'s'} />
182+
{docsButton}
168183
</div>
169184
}
170185
/>

src/pages/workspace/utils/webhooks/webhooks_responders.tsx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { useCallback, useEffect, useState } from 'react';
44
import type { Criteria, Pagination, PropertySort } from '@elastic/eui';
55
import {
66
EuiButton,
7+
EuiButtonEmpty,
78
EuiButtonIcon,
89
EuiConfirmModal,
910
EuiEmptyPrompt,
@@ -13,6 +14,7 @@ import {
1314
EuiInMemoryTable,
1415
EuiLink,
1516
EuiScreenReaderOnly,
17+
EuiSpacer,
1618
EuiText,
1719
EuiToolTip,
1820
} from '@elastic/eui';
@@ -60,6 +62,17 @@ export default function WebhooksResponders() {
6062
</EuiButton>
6163
);
6264

65+
const docsButton = (
66+
<EuiButtonEmpty
67+
iconType={'documentation'}
68+
title="Learn how to create and use responders"
69+
target={'_blank'}
70+
href={'/docs/guides/webhooks'}
71+
>
72+
Learn how to
73+
</EuiButtonEmpty>
74+
);
75+
6376
useEffect(() => {
6477
if (!uiState.synced || !uiState.user) {
6578
return;
@@ -166,6 +179,8 @@ export default function WebhooksResponders() {
166179
<div>
167180
<p>Go ahead and create your first HTTP responder.</p>
168181
{createButton}
182+
<EuiSpacer size={'s'} />
183+
{docsButton}
169184
</div>
170185
}
171186
/>

0 commit comments

Comments
 (0)