[Search] Add example status for OpenText Documentum (#184426)

## Summary

Adds example status for OpenText Documentum connector

<img width="1579" alt="Screenshot 2024-05-29 at 14 35 55"
src="a81bf662-79bc-4650-9611-443478f0206b">
<img width="452" alt="Screenshot 2024-05-29 at 14 36 05"
src="15c34d9a-42fd-4c2e-bda8-f6ac9d136e42">



### Checklist


- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [x] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [x] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [ ] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)
This commit is contained in:
Efe Gürkan YALAMAN 2024-05-29 18:21:35 +02:00 committed by GitHub
parent 58f1c67a50
commit cd9cd89bbf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 88 additions and 3 deletions

View file

@ -243,3 +243,6 @@ export const PLUGIN_ID = 'enterpriseSearch';
export const CONNECTOR_NATIVE_TYPE = 'native';
export const CONNECTOR_CLIENTS_TYPE = 'connector_clients';
// TODO remove this once the connector service types are no longer in "example" state
export const EXAMPLE_CONNECTOR_SERVICE_TYPES = ['opentext_documentum'];

View file

@ -28,6 +28,8 @@ import { FormattedMessage } from '@kbn/i18n-react';
import { ConnectorConfigurationComponent, ConnectorStatus } from '@kbn/search-connectors';
import { EXAMPLE_CONNECTOR_SERVICE_TYPES } from '../../../../../common/constants';
import { Status } from '../../../../../common/types/api';
import { BetaConnectorCallout } from '../../../shared/beta/beta_connector_callout';
import { useCloudDetails } from '../../../shared/cloud_details/cloud_details';
@ -95,6 +97,34 @@ export const ConnectorConfiguration: React.FC = () => {
return (
<>
<EuiSpacer />
{
// TODO remove this callout when example status is removed
connector &&
connector.service_type &&
EXAMPLE_CONNECTOR_SERVICE_TYPES.includes(connector.service_type) && (
<>
<EuiCallOut
iconType="iInCircle"
color="warning"
title={i18n.translate(
'xpack.enterpriseSearch.content.connectors.overview.connectorUnsupportedCallOut.title',
{
defaultMessage: 'Example connector',
}
)}
>
<EuiSpacer size="s" />
<EuiText size="s">
<FormattedMessage
id="xpack.enterpriseSearch.content.connectors.overview.connectorUnsupportedCallOut.description"
defaultMessage="This is an example connector that serves as a building block for customizations. The design and code is being provided as-is with no warranties. This is not subject to the SLA of supported features."
/>
</EuiText>
</EuiCallOut>
<EuiSpacer />
</>
)
}
<EuiFlexGroup>
<EuiFlexItem grow={2}>
<EuiPanel hasShadow={false} hasBorder>

View file

@ -15,7 +15,10 @@ import { i18n } from '@kbn/i18n';
import { FormattedMessage } from '@kbn/i18n-react';
import { ENTERPRISE_SEARCH_CONNECTOR_CRAWLER_SERVICE_TYPE } from '../../../../../common/constants';
import {
ENTERPRISE_SEARCH_CONNECTOR_CRAWLER_SERVICE_TYPE,
EXAMPLE_CONNECTOR_SERVICE_TYPES,
} from '../../../../../common/constants';
import { docLinks } from '../../../shared/doc_links';
import { generateEncodedPath } from '../../../shared/encode_path_params';
@ -42,6 +45,34 @@ export const ConnectorDetailOverview: React.FC = () => {
return (
<>
{
// TODO remove this callout when example status is removed
connector &&
connector.service_type &&
EXAMPLE_CONNECTOR_SERVICE_TYPES.includes(connector.service_type) && (
<>
<EuiCallOut
iconType="iInCircle"
color="warning"
title={i18n.translate(
'xpack.enterpriseSearch.content.connectors.overview.connectorUnsupportedCallOut.title',
{
defaultMessage: 'Example connector',
}
)}
>
<EuiSpacer size="s" />
<EuiText size="s">
<FormattedMessage
id="xpack.enterpriseSearch.content.connectors.overview.connectorUnsupportedCallOut.description"
defaultMessage="This is an example connector that serves as a building block for customizations. The design and code is being provided as-is with no warranties. This is not subject to the SLA of supported features."
/>
</EuiText>
</EuiCallOut>
<EuiSpacer />
</>
)
}
{error && (
<>
<EuiCallOut

View file

@ -29,7 +29,14 @@ import {
import { i18n } from '@kbn/i18n';
import { BETA_LABEL, NATIVE_LABEL, CONNECTOR_CLIENT_LABEL } from '../../../../shared/constants';
import { EXAMPLE_CONNECTOR_SERVICE_TYPES } from '../../../../../../common/constants';
import {
BETA_LABEL,
NATIVE_LABEL,
CONNECTOR_CLIENT_LABEL,
EXAMPLE_CONNECTOR_LABEL,
} from '../../../../shared/constants';
import { PlatinumLicensePopover } from '../../shared/platinum_license_popover/platinum_license_popover';
@ -249,7 +256,14 @@ export const ConnectorCheckable: React.FC<ConnectorCheckableProps> = ({
</EuiBadge>
</EuiFlexItem>
)}
{isTechPreview && (
{EXAMPLE_CONNECTOR_SERVICE_TYPES.includes(serviceType) && (
<EuiFlexItem grow={false}>
<EuiBadge color="hollow" iconType="beaker">
<EuiText size="xs">{EXAMPLE_CONNECTOR_LABEL}</EuiText>
</EuiBadge>
</EuiFlexItem>
)}
{isTechPreview && !EXAMPLE_CONNECTOR_SERVICE_TYPES.includes(serviceType) && (
<EuiFlexItem grow={false}>
<EuiBadge color="hollow" iconType="beaker">
<EuiText size="xs">

View file

@ -53,3 +53,10 @@ export const CONNECTOR_CLIENT_LABEL = i18n.translate(
defaultMessage: 'Connector Client',
}
);
export const EXAMPLE_CONNECTOR_LABEL = i18n.translate(
'xpack.enterpriseSearch.exampleConnectorLabel',
{
defaultMessage: 'Example',
}
);