mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 18:51:07 -04:00
[Search] Remove website search guided onboarding (#224538)
## Summary This removes the deprecated website search guided onboarding from Kibana. Deprecated because we no longer offer a managed web crawler. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
fb5474a1c9
commit
9171743e83
15 changed files with 7 additions and 110 deletions
|
@ -36,13 +36,7 @@ interface MainProps {
|
||||||
notifications: CoreStart['notifications'];
|
notifications: CoreStart['notifications'];
|
||||||
}
|
}
|
||||||
|
|
||||||
const exampleGuideIds: GuideId[] = [
|
const exampleGuideIds: GuideId[] = ['databaseSearch', 'siem', 'kubernetes', 'testGuide'];
|
||||||
'websiteSearch',
|
|
||||||
'databaseSearch',
|
|
||||||
'siem',
|
|
||||||
'kubernetes',
|
|
||||||
'testGuide',
|
|
||||||
];
|
|
||||||
const selectOptions: EuiSelectOption[] = exampleGuideIds.map((guideId) => ({
|
const selectOptions: EuiSelectOption[] = exampleGuideIds.map((guideId) => ({
|
||||||
value: guideId,
|
value: guideId,
|
||||||
text: guideId,
|
text: guideId,
|
||||||
|
|
|
@ -93,30 +93,6 @@ exports[`guide cards snapshots should render all cards 1`] = `
|
||||||
size="m"
|
size="m"
|
||||||
/>
|
/>
|
||||||
</EuiFlexItem>
|
</EuiFlexItem>
|
||||||
<EuiFlexItem
|
|
||||||
grow={false}
|
|
||||||
key="3"
|
|
||||||
>
|
|
||||||
<GuideCard
|
|
||||||
activateGuide={[MockFunction]}
|
|
||||||
activeFilter="all"
|
|
||||||
card={
|
|
||||||
Object {
|
|
||||||
"guideId": "websiteSearch",
|
|
||||||
"icon": "search",
|
|
||||||
"order": 13,
|
|
||||||
"solution": "search",
|
|
||||||
"telemetryId": "onboarding--search--website",
|
|
||||||
"title": "Add search to my website",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
guidesState={Array []}
|
|
||||||
navigateToApp={[MockFunction]}
|
|
||||||
/>
|
|
||||||
<EuiSpacer
|
|
||||||
size="m"
|
|
||||||
/>
|
|
||||||
</EuiFlexItem>
|
|
||||||
</EuiFlexGroup>
|
</EuiFlexGroup>
|
||||||
</EuiFlexItem>
|
</EuiFlexItem>
|
||||||
<EuiFlexItem
|
<EuiFlexItem
|
||||||
|
|
|
@ -72,16 +72,6 @@ export const guideCards: GuideCardConstants[] = [
|
||||||
telemetryId: 'onboarding--search--ai',
|
telemetryId: 'onboarding--search--ai',
|
||||||
order: 7,
|
order: 7,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
solution: 'search',
|
|
||||||
icon: 'search',
|
|
||||||
title: i18n.translate('guidedOnboardingPackage.gettingStarted.cards.websiteSearch.title', {
|
|
||||||
defaultMessage: 'Add search to my website',
|
|
||||||
}),
|
|
||||||
guideId: 'websiteSearch',
|
|
||||||
telemetryId: 'onboarding--search--website',
|
|
||||||
order: 13,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
solution: 'observability',
|
solution: 'observability',
|
||||||
icon: 'logstashInput',
|
icon: 'logstashInput',
|
||||||
|
|
|
@ -82,16 +82,6 @@ export const getGuideCards = (
|
||||||
telemetryId: 'onboarding--search--ai',
|
telemetryId: 'onboarding--search--ai',
|
||||||
order: 7,
|
order: 7,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
solution: 'search',
|
|
||||||
icon: 'search',
|
|
||||||
title: i18n.translate('guidedOnboardingPackage.gettingStarted.cards.websiteSearch.title', {
|
|
||||||
defaultMessage: 'Add search to my website',
|
|
||||||
}),
|
|
||||||
guideId: 'websiteSearch',
|
|
||||||
telemetryId: 'onboarding--search--website',
|
|
||||||
order: 13,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
solution: 'observability',
|
solution: 'observability',
|
||||||
icon: 'logstashInput',
|
icon: 'logstashInput',
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
* License v3.0 only", or the "Server Side Public License, v 1".
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export type GuideId = 'kubernetes' | 'siem' | 'websiteSearch' | 'databaseSearch' | 'testGuide';
|
export type GuideId = 'kubernetes' | 'siem' | 'databaseSearch' | 'testGuide';
|
||||||
|
|
||||||
type KubernetesStepIds = 'add_data' | 'view_dashboard' | 'tour_observability';
|
type KubernetesStepIds = 'add_data' | 'view_dashboard' | 'tour_observability';
|
||||||
type SiemStepIds = 'add_data' | 'rules' | 'alertsCases';
|
type SiemStepIds = 'add_data' | 'rules' | 'alertsCases';
|
||||||
|
|
|
@ -29,16 +29,5 @@ export default function testGetGuideConfig({ getService }: FtrProviderContext) {
|
||||||
expect(config).to.not.be.empty();
|
expect(config).to.not.be.empty();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// expecting websiteSearch to be disabled for now, but adding this test to ensure
|
|
||||||
// it's added back to the above list when support for web crawlers is added back.
|
|
||||||
['websiteSearch'].map((guideId) => {
|
|
||||||
it(`does not returns config for ${guideId}`, async () => {
|
|
||||||
await supertest
|
|
||||||
.get(`${getConfigsPath}/${guideId}`)
|
|
||||||
.set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana')
|
|
||||||
.expect(404);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -3997,7 +3997,6 @@
|
||||||
"guidedOnboardingPackage.gettingStarted.cards.syntheticsObservability.title": "Créer un moniteur synthétique",
|
"guidedOnboardingPackage.gettingStarted.cards.syntheticsObservability.title": "Créer un moniteur synthétique",
|
||||||
"guidedOnboardingPackage.gettingStarted.cards.universalProfilingObservability.title": "Optimiser mes charges de travail avec Universal Profiling",
|
"guidedOnboardingPackage.gettingStarted.cards.universalProfilingObservability.title": "Optimiser mes charges de travail avec Universal Profiling",
|
||||||
"guidedOnboardingPackage.gettingStarted.cards.vectorSearch.title": "Configurer une recherche vectorielle",
|
"guidedOnboardingPackage.gettingStarted.cards.vectorSearch.title": "Configurer une recherche vectorielle",
|
||||||
"guidedOnboardingPackage.gettingStarted.cards.websiteSearch.title": "Ajouter la recherche à mon site web",
|
|
||||||
"guidedOnboardingPackage.gettingStarted.guideFilter.all.buttonLabel": "Tous",
|
"guidedOnboardingPackage.gettingStarted.guideFilter.all.buttonLabel": "Tous",
|
||||||
"guidedOnboardingPackage.gettingStarted.guideFilter.observability.buttonLabel": "Observabilité",
|
"guidedOnboardingPackage.gettingStarted.guideFilter.observability.buttonLabel": "Observabilité",
|
||||||
"guidedOnboardingPackage.gettingStarted.guideFilter.search.buttonLabel": "Elasticsearch",
|
"guidedOnboardingPackage.gettingStarted.guideFilter.search.buttonLabel": "Elasticsearch",
|
||||||
|
|
|
@ -3991,7 +3991,6 @@
|
||||||
"guidedOnboardingPackage.gettingStarted.cards.syntheticsObservability.title": "シンセティック監視を作成",
|
"guidedOnboardingPackage.gettingStarted.cards.syntheticsObservability.title": "シンセティック監視を作成",
|
||||||
"guidedOnboardingPackage.gettingStarted.cards.universalProfilingObservability.title": "ユニバーサルプロファイリングでワークロードを最適化",
|
"guidedOnboardingPackage.gettingStarted.cards.universalProfilingObservability.title": "ユニバーサルプロファイリングでワークロードを最適化",
|
||||||
"guidedOnboardingPackage.gettingStarted.cards.vectorSearch.title": "ベクトル検索を設定",
|
"guidedOnboardingPackage.gettingStarted.cards.vectorSearch.title": "ベクトル検索を設定",
|
||||||
"guidedOnboardingPackage.gettingStarted.cards.websiteSearch.title": "検索をWebサイトに追加",
|
|
||||||
"guidedOnboardingPackage.gettingStarted.guideFilter.all.buttonLabel": "すべて",
|
"guidedOnboardingPackage.gettingStarted.guideFilter.all.buttonLabel": "すべて",
|
||||||
"guidedOnboardingPackage.gettingStarted.guideFilter.observability.buttonLabel": "Observability",
|
"guidedOnboardingPackage.gettingStarted.guideFilter.observability.buttonLabel": "Observability",
|
||||||
"guidedOnboardingPackage.gettingStarted.guideFilter.search.buttonLabel": "Elasticsearch",
|
"guidedOnboardingPackage.gettingStarted.guideFilter.search.buttonLabel": "Elasticsearch",
|
||||||
|
|
|
@ -3997,7 +3997,6 @@
|
||||||
"guidedOnboardingPackage.gettingStarted.cards.syntheticsObservability.title": "创建 Synthetic 监测",
|
"guidedOnboardingPackage.gettingStarted.cards.syntheticsObservability.title": "创建 Synthetic 监测",
|
||||||
"guidedOnboardingPackage.gettingStarted.cards.universalProfilingObservability.title": "使用 Universal Profiling 优化我的工作负载",
|
"guidedOnboardingPackage.gettingStarted.cards.universalProfilingObservability.title": "使用 Universal Profiling 优化我的工作负载",
|
||||||
"guidedOnboardingPackage.gettingStarted.cards.vectorSearch.title": "设置矢量搜索",
|
"guidedOnboardingPackage.gettingStarted.cards.vectorSearch.title": "设置矢量搜索",
|
||||||
"guidedOnboardingPackage.gettingStarted.cards.websiteSearch.title": "添加搜索到我的网站",
|
|
||||||
"guidedOnboardingPackage.gettingStarted.guideFilter.all.buttonLabel": "全部",
|
"guidedOnboardingPackage.gettingStarted.guideFilter.all.buttonLabel": "全部",
|
||||||
"guidedOnboardingPackage.gettingStarted.guideFilter.observability.buttonLabel": "Observability",
|
"guidedOnboardingPackage.gettingStarted.guideFilter.observability.buttonLabel": "Observability",
|
||||||
"guidedOnboardingPackage.gettingStarted.guideFilter.search.buttonLabel": "Elasticsearch",
|
"guidedOnboardingPackage.gettingStarted.guideFilter.search.buttonLabel": "Elasticsearch",
|
||||||
|
|
|
@ -8,15 +8,13 @@
|
||||||
import type { GuideConfig, StepConfig } from '@kbn/guided-onboarding';
|
import type { GuideConfig, StepConfig } from '@kbn/guided-onboarding';
|
||||||
import { i18n } from '@kbn/i18n';
|
import { i18n } from '@kbn/i18n';
|
||||||
|
|
||||||
export const websiteSearchGuideId = 'websiteSearch';
|
|
||||||
export const databaseSearchGuideId = 'databaseSearch';
|
export const databaseSearchGuideId = 'databaseSearch';
|
||||||
|
|
||||||
const apiRoutes = {
|
const apiRoutes = {
|
||||||
[databaseSearchGuideId]: '/connectors/select_connector',
|
[databaseSearchGuideId]: '/connectors/select_connector',
|
||||||
[websiteSearchGuideId]: '/crawlers',
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export type EnterpriseSearchGuideIds = typeof websiteSearchGuideId | typeof databaseSearchGuideId;
|
export type EnterpriseSearchGuideIds = typeof databaseSearchGuideId;
|
||||||
|
|
||||||
const getAddDataStep: (method?: EnterpriseSearchGuideIds) => StepConfig = (method) => {
|
const getAddDataStep: (method?: EnterpriseSearchGuideIds) => StepConfig = (method) => {
|
||||||
return {
|
return {
|
||||||
|
@ -83,6 +81,4 @@ const getGuideConfig: (telemetryId: EnterpriseSearchGuideIds) => GuideConfig = (
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
export const websiteSearchGuideConfig: GuideConfig = getGuideConfig(websiteSearchGuideId);
|
|
||||||
|
|
||||||
export const databaseSearchGuideConfig: GuideConfig = getGuideConfig(databaseSearchGuideId);
|
export const databaseSearchGuideConfig: GuideConfig = getGuideConfig(databaseSearchGuideId);
|
||||||
|
|
|
@ -73,17 +73,6 @@ export const SearchIndex: React.FC = () => {
|
||||||
updateSideNavDefinition,
|
updateSideNavDefinition,
|
||||||
} = useValues(KibanaLogic);
|
} = useValues(KibanaLogic);
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
const subscription = guidedOnboarding?.guidedOnboardingApi
|
|
||||||
?.isGuideStepActive$('websiteSearch', 'add_data')
|
|
||||||
.subscribe((isStepActive) => {
|
|
||||||
if (isStepActive && index?.count) {
|
|
||||||
guidedOnboarding?.guidedOnboardingApi?.completeGuideStep('websiteSearch', 'add_data');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return () => subscription?.unsubscribe();
|
|
||||||
}, [guidedOnboarding, index?.count]);
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const subscription = guidedOnboarding?.guidedOnboardingApi
|
const subscription = guidedOnboarding?.guidedOnboardingApi
|
||||||
?.isGuideStepActive$('databaseSearch', 'add_data')
|
?.isGuideStepActive$('databaseSearch', 'add_data')
|
||||||
|
|
|
@ -36,9 +36,7 @@ import {
|
||||||
} from '../common/constants';
|
} from '../common/constants';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
websiteSearchGuideId,
|
|
||||||
databaseSearchGuideId,
|
databaseSearchGuideId,
|
||||||
websiteSearchGuideConfig,
|
|
||||||
databaseSearchGuideConfig,
|
databaseSearchGuideConfig,
|
||||||
} from '../common/guided_onboarding/search_guide_config';
|
} from '../common/guided_onboarding/search_guide_config';
|
||||||
|
|
||||||
|
@ -303,10 +301,6 @@ export class EnterpriseSearchPlugin implements Plugin<void, void, PluginsSetup,
|
||||||
/**
|
/**
|
||||||
* Register a config for the search guide
|
* Register a config for the search guide
|
||||||
*/
|
*/
|
||||||
if (config.hasWebCrawler) {
|
|
||||||
// TODO: Do we remove this guide with the removal of native crawler?
|
|
||||||
guidedOnboarding?.registerGuideConfig(websiteSearchGuideId, websiteSearchGuideConfig);
|
|
||||||
}
|
|
||||||
if (config.hasConnectors) {
|
if (config.hasConnectors) {
|
||||||
guidedOnboarding?.registerGuideConfig(databaseSearchGuideId, databaseSearchGuideConfig);
|
guidedOnboarding?.registerGuideConfig(databaseSearchGuideId, databaseSearchGuideConfig);
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,6 @@ import {
|
||||||
guideStateSavedObjectsType,
|
guideStateSavedObjectsType,
|
||||||
pluginStateSavedObjectsType,
|
pluginStateSavedObjectsType,
|
||||||
} from '@kbn/guided-onboarding-plugin/server/saved_objects/guided_setup';
|
} from '@kbn/guided-onboarding-plugin/server/saved_objects/guided_setup';
|
||||||
import { websiteSearchGuideId } from '@kbn/enterprise-search-plugin/common/guided_onboarding/search_guide_config';
|
|
||||||
import { API_BASE_PATH } from '@kbn/guided-onboarding-plugin/common';
|
import { API_BASE_PATH } from '@kbn/guided-onboarding-plugin/common';
|
||||||
import { X_ELASTIC_INTERNAL_ORIGIN_REQUEST } from '@kbn/core-http-common';
|
import { X_ELASTIC_INTERNAL_ORIGIN_REQUEST } from '@kbn/core-http-common';
|
||||||
import { createGuides } from '@kbn/test-suites-src/api_integration/apis/guided_onboarding/helpers';
|
import { createGuides } from '@kbn/test-suites-src/api_integration/apis/guided_onboarding/helpers';
|
||||||
|
@ -41,19 +40,13 @@ export default function testGetGuidesState({ getService }: FtrProviderContext) {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('returns all created guides (active and inactive)', async () => {
|
it('returns all created guides (active and inactive)', async () => {
|
||||||
await createGuides(kibanaServer, [
|
await createGuides(kibanaServer, [testGuideStep1ActiveState]);
|
||||||
testGuideStep1ActiveState,
|
|
||||||
{ ...testGuideStep1ActiveState, guideId: websiteSearchGuideId },
|
|
||||||
]);
|
|
||||||
const response = await supertest
|
const response = await supertest
|
||||||
.get(getGuidesPath)
|
.get(getGuidesPath)
|
||||||
.set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana')
|
.set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana')
|
||||||
.expect(200);
|
.expect(200);
|
||||||
expect(response.body).not.to.be.empty();
|
expect(response.body).not.to.be.empty();
|
||||||
expect(response.body.state).to.eql([
|
expect(response.body.state).to.eql([testGuideStep1ActiveState]);
|
||||||
testGuideStep1ActiveState,
|
|
||||||
{ ...testGuideStep1ActiveState, guideId: websiteSearchGuideId },
|
|
||||||
]);
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,6 @@ import {
|
||||||
guideStateSavedObjectsType,
|
guideStateSavedObjectsType,
|
||||||
} from '@kbn/guided-onboarding-plugin/server/saved_objects/guided_setup';
|
} from '@kbn/guided-onboarding-plugin/server/saved_objects/guided_setup';
|
||||||
import { testGuideId } from '@kbn/guided-onboarding';
|
import { testGuideId } from '@kbn/guided-onboarding';
|
||||||
import { websiteSearchGuideId } from '@kbn/enterprise-search-plugin/common/guided_onboarding/search_guide_config';
|
|
||||||
import { API_BASE_PATH } from '@kbn/guided-onboarding-plugin/common';
|
import { API_BASE_PATH } from '@kbn/guided-onboarding-plugin/common';
|
||||||
import { X_ELASTIC_INTERNAL_ORIGIN_REQUEST } from '@kbn/core-http-common';
|
import { X_ELASTIC_INTERNAL_ORIGIN_REQUEST } from '@kbn/core-http-common';
|
||||||
import {
|
import {
|
||||||
|
@ -135,11 +134,8 @@ export default function testPutState({ getService }: FtrProviderContext) {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('updates any existing active guides to inactive', async () => {
|
it('updates any existing active guides to inactive', async () => {
|
||||||
// create an active guide and an inactive guide
|
// create an active guide
|
||||||
await createGuides(kibanaServer, [
|
await createGuides(kibanaServer, [testGuideStep1ActiveState]);
|
||||||
testGuideStep1ActiveState,
|
|
||||||
{ ...testGuideNotActiveState, guideId: websiteSearchGuideId },
|
|
||||||
]);
|
|
||||||
|
|
||||||
// Create a new guide with isActive: true
|
// Create a new guide with isActive: true
|
||||||
await supertest
|
await supertest
|
||||||
|
@ -161,12 +157,6 @@ export default function testPutState({ getService }: FtrProviderContext) {
|
||||||
});
|
});
|
||||||
expect(testGuideSO.attributes.isActive).to.eql(false);
|
expect(testGuideSO.attributes.isActive).to.eql(false);
|
||||||
|
|
||||||
const searchGuideSO = await kibanaServer.savedObjects.get({
|
|
||||||
type: guideStateSavedObjectsType,
|
|
||||||
id: websiteSearchGuideId,
|
|
||||||
});
|
|
||||||
expect(searchGuideSO.attributes.isActive).to.eql(false);
|
|
||||||
|
|
||||||
const kubernetesGuide = await kibanaServer.savedObjects.get({
|
const kubernetesGuide = await kibanaServer.savedObjects.get({
|
||||||
type: guideStateSavedObjectsType,
|
type: guideStateSavedObjectsType,
|
||||||
id: 'kubernetes',
|
id: 'kubernetes',
|
||||||
|
|
|
@ -24,7 +24,6 @@
|
||||||
"@kbn/test-suites-xpack-platform",
|
"@kbn/test-suites-xpack-platform",
|
||||||
"@kbn/expect",
|
"@kbn/expect",
|
||||||
"@kbn/guided-onboarding-plugin",
|
"@kbn/guided-onboarding-plugin",
|
||||||
"@kbn/enterprise-search-plugin",
|
|
||||||
"@kbn/test-suites-src",
|
"@kbn/test-suites-src",
|
||||||
"@kbn/guided-onboarding",
|
"@kbn/guided-onboarding",
|
||||||
"@kbn/search-playground",
|
"@kbn/search-playground",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue