Skip to content

Commit 6a954e5

Browse files
author
Constance
authored
[Enterprise Search] Error state UI tweaks to account for current Cloud SSO behavior (elastic#73324) (elastic#73369)
* Do not disable the Launch App Search button on the error page - so users always have access to App Search * Add troubleshooting steps that mention user authentication - more info can be found in setup guide * Tweak styling/spacing on troubleshooting steps * Copyedits (thanks Chris!)
1 parent aadbbdd commit 6a954e5

File tree

5 files changed

+42
-27
lines changed

5 files changed

+42
-27
lines changed

x-pack/plugins/enterprise_search/public/applications/app_search/components/empty_states/error_state.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export const ErrorState: React.FC = () => {
2121
<SendTelemetry action="error" metric="cannot_connect" />
2222

2323
<EuiPageBody>
24-
<EngineOverviewHeader isButtonDisabled />
24+
<EngineOverviewHeader />
2525
<EuiPageContent>
2626
<ErrorStatePrompt />
2727
</EuiPageContent>

x-pack/plugins/enterprise_search/public/applications/app_search/components/engine_overview_header/engine_overview_header.test.tsx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,4 @@ describe('EngineOverviewHeader', () => {
3030
button.simulate('click');
3131
expect(sendTelemetry).toHaveBeenCalled();
3232
});
33-
34-
it('renders a disabled button when isButtonDisabled is true', () => {
35-
const wrapper = shallow(<EngineOverviewHeader isButtonDisabled />);
36-
const button = wrapper.find('[data-test-subj="launchButton"]');
37-
38-
expect(button.prop('isDisabled')).toBe(true);
39-
expect(button.prop('href')).toBeUndefined();
40-
});
4133
});

x-pack/plugins/enterprise_search/public/applications/app_search/components/engine_overview_header/engine_overview_header.tsx

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -18,34 +18,23 @@ import { FormattedMessage } from '@kbn/i18n/react';
1818
import { sendTelemetry } from '../../../shared/telemetry';
1919
import { KibanaContext, IKibanaContext } from '../../../index';
2020

21-
interface IEngineOverviewHeaderProps {
22-
isButtonDisabled?: boolean;
23-
}
24-
25-
export const EngineOverviewHeader: React.FC<IEngineOverviewHeaderProps> = ({
26-
isButtonDisabled,
27-
}) => {
21+
export const EngineOverviewHeader: React.FC = () => {
2822
const { enterpriseSearchUrl, http } = useContext(KibanaContext) as IKibanaContext;
2923

3024
const buttonProps = {
3125
fill: true,
3226
iconType: 'popout',
3327
'data-test-subj': 'launchButton',
34-
} as EuiButtonProps & EuiLinkProps;
35-
36-
if (isButtonDisabled) {
37-
buttonProps.isDisabled = true;
38-
} else {
39-
buttonProps.href = `${enterpriseSearchUrl}/as`;
40-
buttonProps.target = '_blank';
41-
buttonProps.onClick = () =>
28+
href: `${enterpriseSearchUrl}/as`,
29+
target: '_blank',
30+
onClick: () =>
4231
sendTelemetry({
4332
http,
4433
product: 'app_search',
4534
action: 'clicked',
4635
metric: 'header_launch_button',
47-
});
48-
}
36+
}),
37+
} as EuiButtonProps & EuiLinkProps;
4938

5039
return (
5140
<EuiPageHeader>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.troubleshootingSteps {
2+
text-align: left;
3+
4+
li {
5+
margin: $euiSizeS auto;
6+
}
7+
8+
ul,
9+
ol {
10+
margin-bottom: 0;
11+
}
12+
}

x-pack/plugins/enterprise_search/public/applications/shared/error_state/error_state_prompt.tsx

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ import { FormattedMessage } from '@kbn/i18n/react';
1111
import { EuiButton } from '../react_router_helpers';
1212
import { KibanaContext, IKibanaContext } from '../../index';
1313

14+
import './error_state_prompt.scss';
15+
1416
export const ErrorStatePrompt: React.FC = () => {
1517
const { enterpriseSearchUrl } = useContext(KibanaContext) as IKibanaContext;
1618

@@ -38,7 +40,7 @@ export const ErrorStatePrompt: React.FC = () => {
3840
}}
3941
/>
4042
</p>
41-
<ol className="eui-textLeft">
43+
<ol className="troubleshootingSteps">
4244
<li>
4345
<FormattedMessage
4446
id="xpack.enterpriseSearch.errorConnectingState.description2"
@@ -54,6 +56,26 @@ export const ErrorStatePrompt: React.FC = () => {
5456
defaultMessage="Confirm that the Enterprise Search server is responsive."
5557
/>
5658
</li>
59+
<li>
60+
<FormattedMessage
61+
id="xpack.enterpriseSearch.errorConnectingState.troubleshootAuth"
62+
defaultMessage="Check your user authentication:"
63+
/>
64+
<ul>
65+
<li>
66+
<FormattedMessage
67+
id="xpack.enterpriseSearch.errorConnectingState.troubleshootAuthNative"
68+
defaultMessage="You must authenticate using Elasticsearch Native auth or SSO/SAML."
69+
/>
70+
</li>
71+
<li>
72+
<FormattedMessage
73+
id="xpack.enterpriseSearch.errorConnectingState.troubleshootAuthSAML"
74+
defaultMessage="If using SSO/SAML, your SAML realm must also be set up on Enterprise Search."
75+
/>
76+
</li>
77+
</ul>
78+
</li>
5779
<li>
5880
<FormattedMessage
5981
id="xpack.enterpriseSearch.errorConnectingState.description4"

0 commit comments

Comments
 (0)