[Search] Offer self-managed connector as only option (#211206)

## Summary

Removing Set up clock. Making Self-managed the only way to create a
connector for ECH 9.0

![CleanShot 2025-02-17 at 10 52
39@2x](https://github.com/user-attachments/assets/f37d989e-cfeb-4657-a480-faa8443e0543)


### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [ ] 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/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [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
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This commit is contained in:
José Luis González 2025-02-17 11:59:55 +01:00 committed by GitHub
parent cd502acea1
commit 55f451fe9e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 47 additions and 116 deletions

View file

@ -16690,13 +16690,9 @@
"xpack.enterpriseSearch.createConnector.startStep.euiFormRow.connectorLabel": "Connecteur",
"xpack.enterpriseSearch.createConnector.startStep.euiFormRow.connectorNameLabel": "Nom du connecteur",
"xpack.enterpriseSearch.createConnector.startStep.euiFormRow.descriptionLabel": "Description",
"xpack.enterpriseSearch.createConnector.startStep.euiRadio.elasticManagedLabel": "Géré par Elastic",
"xpack.enterpriseSearch.createConnector.startStep.euiRadio.selfManagedLabel": "Autogéré",
"xpack.enterpriseSearch.createConnector.startStep.h4.configureIndexAndAPILabel": "Configurer l'index et la clé dAPI",
"xpack.enterpriseSearch.createConnector.startStep.h4.deploymentLabel": "Déploiement",
"xpack.enterpriseSearch.createConnector.startStep.h4.setUpLabel": "Installation",
"xpack.enterpriseSearch.createConnector.startStep.p.thisProcessWillCreateLabel": "Ce processus créera un nouvel index, une clé d'API et un ID de connecteur. Cela est facultatif, mais vous pouvez également utiliser votre propre configuration.",
"xpack.enterpriseSearch.createConnector.startStep.p.whereDoYouWantLabel": "Où souhaitez-vous stocker le connecteur et comment souhaitez-vous le gérer ?",
"xpack.enterpriseSearch.createConnector.startStep.p.youWillStartTheLabel": "Vous devrez démarrer le processus de création manuelle d'un nouvel index, d'une clé d'API et d'un ID de connecteur de robot d'indexation. Cela est facultatif, mais vous pouvez également utiliser votre propre configuration.",
"xpack.enterpriseSearch.createConnector.startStep.startLabel": "Début",
"xpack.enterpriseSearch.defaultSettingsFlyout.body.description.ingestPipelinesLink.link": "pipelines d'ingestion",

View file

@ -16552,13 +16552,9 @@
"xpack.enterpriseSearch.createConnector.startStep.euiFormRow.connectorLabel": "コネクター",
"xpack.enterpriseSearch.createConnector.startStep.euiFormRow.connectorNameLabel": "コネクター名",
"xpack.enterpriseSearch.createConnector.startStep.euiFormRow.descriptionLabel": "説明",
"xpack.enterpriseSearch.createConnector.startStep.euiRadio.elasticManagedLabel": "Elasticマネージド",
"xpack.enterpriseSearch.createConnector.startStep.euiRadio.selfManagedLabel": "自己管理",
"xpack.enterpriseSearch.createConnector.startStep.h4.configureIndexAndAPILabel": "インデックスとAPIキーを構成",
"xpack.enterpriseSearch.createConnector.startStep.h4.deploymentLabel": "デプロイ",
"xpack.enterpriseSearch.createConnector.startStep.h4.setUpLabel": "設定",
"xpack.enterpriseSearch.createConnector.startStep.p.thisProcessWillCreateLabel": "このプロセスにより、新しいインデックス、APIキー、コネクターIDが作成されます。任意で、独自の構成を使用することもできます。",
"xpack.enterpriseSearch.createConnector.startStep.p.whereDoYouWantLabel": "コネクターを保存する場所と管理する方法",
"xpack.enterpriseSearch.createConnector.startStep.p.youWillStartTheLabel": "新しいインデックス、APIキー、WebクローラーコネクターIDの作成プロセスを手動で開始します。任意で、独自の構成を使用することもできます。",
"xpack.enterpriseSearch.createConnector.startStep.startLabel": "開始",
"xpack.enterpriseSearch.defaultSettingsFlyout.body.description.ingestPipelinesLink.link": "インジェストパイプライン",

View file

@ -16275,13 +16275,9 @@
"xpack.enterpriseSearch.createConnector.startStep.euiFormRow.connectorLabel": "连接器",
"xpack.enterpriseSearch.createConnector.startStep.euiFormRow.connectorNameLabel": "连接器名称",
"xpack.enterpriseSearch.createConnector.startStep.euiFormRow.descriptionLabel": "描述",
"xpack.enterpriseSearch.createConnector.startStep.euiRadio.elasticManagedLabel": "Elastic 托管",
"xpack.enterpriseSearch.createConnector.startStep.euiRadio.selfManagedLabel": "自管型",
"xpack.enterpriseSearch.createConnector.startStep.h4.configureIndexAndAPILabel": "配置索引和 API 密钥",
"xpack.enterpriseSearch.createConnector.startStep.h4.deploymentLabel": "部署",
"xpack.enterpriseSearch.createConnector.startStep.h4.setUpLabel": "设置",
"xpack.enterpriseSearch.createConnector.startStep.p.thisProcessWillCreateLabel": "此过程将创建一个新索引、API 密钥和连接器 ID。可选您也可以提供自己的配置。",
"xpack.enterpriseSearch.createConnector.startStep.p.whereDoYouWantLabel": "您希望将连接器存储在什么位置?您希望如何管理连接器?",
"xpack.enterpriseSearch.createConnector.startStep.p.youWillStartTheLabel": "您将手动开始创建新索引、API 密钥和网络爬虫连接器 ID 的过程。(可选)您也可以提供自己的配置。",
"xpack.enterpriseSearch.createConnector.startStep.startLabel": "启动",
"xpack.enterpriseSearch.defaultSettingsFlyout.body.description.ingestPipelinesLink.link": "采集管道",

View file

@ -91,11 +91,13 @@ const connectorClientPopoverPanels = [
export interface ConnectorDescriptionPopoverProps {
isNative: boolean;
showIsOnlySelfManaged: boolean;
isElasticManagedDiscontinued?: boolean;
}
export const ConnectorDescriptionPopover: React.FC<ConnectorDescriptionPopoverProps> = ({
isNative,
showIsOnlySelfManaged,
isElasticManagedDiscontinued,
}) => {
const [isPopoverOpen, setIsPopoverOpen] = useState(false);
const panels = isNative ? nativePopoverPanels : connectorClientPopoverPanels;
@ -126,28 +128,49 @@ export const ConnectorDescriptionPopover: React.FC<ConnectorDescriptionPopoverPr
hasBorder={false}
hasShadow={false}
>
{((isNative && !isAgentlessEnabled) || showIsOnlySelfManaged) && (
{((isNative && !isAgentlessEnabled) || showIsOnlySelfManaged) &&
!isElasticManagedDiscontinued && (
<>
<EuiFlexGroup>
<EuiFlexItem>
<EuiCallOut
title={
showIsOnlySelfManaged
? i18n.translate(
'xpack.enterpriseSearch.createConnector.connectorDescriptionBadge.isOnlySelfManagedAvailableTitle',
{
defaultMessage:
'This connector is not available as an Elastic-managed Connector',
}
)
: i18n.translate(
'xpack.enterpriseSearch.createConnector.connectorDescriptionBadge.isRunningLocallyTitle',
{
defaultMessage:
'Elastic managed connectors are only available in Elastic Cloud',
}
)
}
size="s"
iconType="warning"
color="warning"
/>
</EuiFlexItem>
</EuiFlexGroup>
<EuiSpacer size="m" />
</>
)}
{isElasticManagedDiscontinued && (
<>
<EuiFlexGroup>
<EuiFlexItem>
<EuiCallOut
title={
showIsOnlySelfManaged
? i18n.translate(
'xpack.enterpriseSearch.createConnector.connectorDescriptionBadge.isOnlySelfManagedAvailableTitle',
{
defaultMessage:
'This connector is not available as an Elastic-managed Connector',
}
)
: i18n.translate(
'xpack.enterpriseSearch.createConnector.connectorDescriptionBadge.isRunningLocallyTitle',
{
defaultMessage:
'Elastic managed connectors are only available in Elastic Cloud',
}
)
}
title={i18n.translate(
'xpack.enterpriseSearch.createConnector.connectorDescriptionBadge.elasticManagedDiscontinuedTitle',
{
defaultMessage: 'Elastic managed Connector are no longer supported',
}
)}
size="s"
iconType="warning"
color="warning"
@ -189,7 +212,7 @@ export const ConnectorDescriptionPopover: React.FC<ConnectorDescriptionPopoverPr
})}
</EuiFlexGroup>
)}
{isNative && !isAgentlessEnabled && (
{isNative && !isAgentlessEnabled && !isElasticManagedDiscontinued && (
<>
<EuiSpacer size="m" />
<EuiFlexGroup direction="column" justifyContent="center">

View file

@ -5,7 +5,7 @@
* 2.0.
*/
import React, { useEffect, useState } from 'react';
import React, { useState } from 'react';
import { css } from '@emotion/react';
@ -56,25 +56,17 @@ export const CreateConnector: React.FC = () => {
const { overlays } = useKibana().services;
const { http } = useValues(HttpLogic);
const { application, history, isAgentlessEnabled } = useValues(KibanaLogic);
const { application, history } = useValues(KibanaLogic);
const { error } = useValues(AddConnectorApiLogic);
const { euiTheme } = useEuiTheme();
const [selfManagePreference, setSelfManagePreference] = useState<SelfManagePreference>('native');
const [selfManagePreference, setSelfManagePreference] =
useState<SelfManagePreference>('selfManaged');
const { selectedConnector, currentStep, isFormDirty } = useValues(NewConnectorLogic);
const { setCurrentStep } = useActions(NewConnectorLogic);
const stepStates = generateStepState(currentStep);
useEffect(() => {
if (
(selectedConnector && !selectedConnector.isNative && selfManagePreference === 'native') ||
!isAgentlessEnabled
) {
setSelfManagePreference('selfManaged');
}
}, [selectedConnector]);
const getSteps = (selfManaged: boolean): EuiContainedStepProps[] => {
return [
{
@ -209,7 +201,7 @@ export const CreateConnector: React.FC = () => {
background-size: contain;
background-repeat: no-repeat;
background-position: bottom center;
min-height: 550px;
min-height: 466px;
border: 1px solid ${euiTheme.colors.lightShade};
`}
>

View file

@ -17,18 +17,15 @@ import {
EuiForm,
EuiFormRow,
EuiPanel,
EuiRadio,
EuiSpacer,
EuiText,
useIsWithinBreakpoints,
EuiTitle,
useGeneratedHtmlId,
} from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import * as Constants from '../../../../shared/constants';
import { KibanaLogic } from '../../../../shared/kibana';
import { isValidIndexName } from '../../../utils/validate_index_name';
import { GeneratedConfigFields } from '../../connector_detail/components/generated_config_fields';
@ -36,7 +33,6 @@ import { ConnectorViewLogic } from '../../connector_detail/connector_view_logic'
import { NewConnectorLogic } from '../../new_index/method_connector/new_connector_logic';
import { ChooseConnector } from './components/choose_connector';
import { ConnectorDescriptionPopover } from './components/connector_description_popover';
import { ManualConfiguration } from './components/manual_configuration';
import { SelfManagePreference } from './create_connector';
@ -52,12 +48,9 @@ export const StartStep: React.FC<StartStepProps> = ({
title,
selfManagePreference,
setCurrentStep,
onSelfManagePreferenceChange,
error,
}) => {
const isMediumDevice = useIsWithinBreakpoints(['xs', 's', 'm', 'l']);
const elasticManagedRadioButtonId = useGeneratedHtmlId({ prefix: 'elasticManagedRadioButton' });
const selfManagedRadioButtonId = useGeneratedHtmlId({ prefix: 'selfManagedRadioButton' });
const {
rawName,
@ -66,12 +59,10 @@ export const StartStep: React.FC<StartStepProps> = ({
generatedConfigData,
isGenerateLoading,
isCreateLoading,
isFormDirty,
} = useValues(NewConnectorLogic);
const { setRawName, createConnector, generateConnectorName, setFormDirty } =
useActions(NewConnectorLogic);
const { connector } = useValues(ConnectorViewLogic);
const { isAgentlessEnabled } = useValues(KibanaLogic);
const handleNameChange = (e: ChangeEvent<HTMLInputElement>) => {
setRawName(e.target.value);
@ -183,69 +174,6 @@ export const StartStep: React.FC<StartStepProps> = ({
</EuiPanel>
</EuiFlexItem>
{/* Set up */}
<EuiFlexItem>
<EuiPanel hasShadow={false} hasBorder paddingSize="l">
<EuiTitle size="s">
<h4>
{i18n.translate('xpack.enterpriseSearch.createConnector.startStep.h4.setUpLabel', {
defaultMessage: 'Setup',
})}
</h4>
</EuiTitle>
<EuiSpacer size="m" />
<EuiText size="s">
<p>
{i18n.translate(
'xpack.enterpriseSearch.createConnector.startStep.p.whereDoYouWantLabel',
{
defaultMessage: 'Choose how to deploy and manage your connector:',
}
)}
</p>
</EuiText>
<EuiSpacer size="m" />
<EuiFlexGroup gutterSize="xs">
<EuiFlexItem grow={false}>
<EuiRadio
id={elasticManagedRadioButtonId}
label={i18n.translate(
'xpack.enterpriseSearch.createConnector.startStep.euiRadio.elasticManagedLabel',
{ defaultMessage: 'Elastic managed' }
)}
checked={selfManagePreference === 'native'}
disabled={
selectedConnector?.isNative === false || !isAgentlessEnabled || isFormDirty
}
onChange={() => onSelfManagePreferenceChange('native')}
name="setUp"
/>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<ConnectorDescriptionPopover
showIsOnlySelfManaged={selectedConnector?.isNative === false}
isNative
/>
</EuiFlexItem>
&nbsp; &nbsp;
<EuiFlexItem grow={false}>
<EuiRadio
id={selfManagedRadioButtonId}
label={i18n.translate(
'xpack.enterpriseSearch.createConnector.startStep.euiRadio.selfManagedLabel',
{ defaultMessage: 'Self-managed' }
)}
checked={selfManagePreference === 'selfManaged'}
disabled={isFormDirty}
onChange={() => onSelfManagePreferenceChange('selfManaged')}
name="setUp"
/>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<ConnectorDescriptionPopover showIsOnlySelfManaged={false} isNative={false} />
</EuiFlexItem>
</EuiFlexGroup>
</EuiPanel>
</EuiFlexItem>
{selfManagePreference === 'selfManaged' ? (
<EuiFlexItem>
<EuiPanel