mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 10:40: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'];
|
||||
}
|
||||
|
||||
const exampleGuideIds: GuideId[] = [
|
||||
'websiteSearch',
|
||||
'databaseSearch',
|
||||
'siem',
|
||||
'kubernetes',
|
||||
'testGuide',
|
||||
];
|
||||
const exampleGuideIds: GuideId[] = ['databaseSearch', 'siem', 'kubernetes', 'testGuide'];
|
||||
const selectOptions: EuiSelectOption[] = exampleGuideIds.map((guideId) => ({
|
||||
value: guideId,
|
||||
text: guideId,
|
||||
|
|
|
@ -93,30 +93,6 @@ exports[`guide cards snapshots should render all cards 1`] = `
|
|||
size="m"
|
||||
/>
|
||||
</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>
|
||||
</EuiFlexItem>
|
||||
<EuiFlexItem
|
||||
|
|
|
@ -72,16 +72,6 @@ export const guideCards: GuideCardConstants[] = [
|
|||
telemetryId: 'onboarding--search--ai',
|
||||
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',
|
||||
icon: 'logstashInput',
|
||||
|
|
|
@ -82,16 +82,6 @@ export const getGuideCards = (
|
|||
telemetryId: 'onboarding--search--ai',
|
||||
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',
|
||||
icon: 'logstashInput',
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
* 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 SiemStepIds = 'add_data' | 'rules' | 'alertsCases';
|
||||
|
|
|
@ -29,16 +29,5 @@ export default function testGetGuideConfig({ getService }: FtrProviderContext) {
|
|||
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.universalProfilingObservability.title": "Optimiser mes charges de travail avec Universal Profiling",
|
||||
"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.observability.buttonLabel": "Observabilité",
|
||||
"guidedOnboardingPackage.gettingStarted.guideFilter.search.buttonLabel": "Elasticsearch",
|
||||
|
|
|
@ -3991,7 +3991,6 @@
|
|||
"guidedOnboardingPackage.gettingStarted.cards.syntheticsObservability.title": "シンセティック監視を作成",
|
||||
"guidedOnboardingPackage.gettingStarted.cards.universalProfilingObservability.title": "ユニバーサルプロファイリングでワークロードを最適化",
|
||||
"guidedOnboardingPackage.gettingStarted.cards.vectorSearch.title": "ベクトル検索を設定",
|
||||
"guidedOnboardingPackage.gettingStarted.cards.websiteSearch.title": "検索をWebサイトに追加",
|
||||
"guidedOnboardingPackage.gettingStarted.guideFilter.all.buttonLabel": "すべて",
|
||||
"guidedOnboardingPackage.gettingStarted.guideFilter.observability.buttonLabel": "Observability",
|
||||
"guidedOnboardingPackage.gettingStarted.guideFilter.search.buttonLabel": "Elasticsearch",
|
||||
|
|
|
@ -3997,7 +3997,6 @@
|
|||
"guidedOnboardingPackage.gettingStarted.cards.syntheticsObservability.title": "创建 Synthetic 监测",
|
||||
"guidedOnboardingPackage.gettingStarted.cards.universalProfilingObservability.title": "使用 Universal Profiling 优化我的工作负载",
|
||||
"guidedOnboardingPackage.gettingStarted.cards.vectorSearch.title": "设置矢量搜索",
|
||||
"guidedOnboardingPackage.gettingStarted.cards.websiteSearch.title": "添加搜索到我的网站",
|
||||
"guidedOnboardingPackage.gettingStarted.guideFilter.all.buttonLabel": "全部",
|
||||
"guidedOnboardingPackage.gettingStarted.guideFilter.observability.buttonLabel": "Observability",
|
||||
"guidedOnboardingPackage.gettingStarted.guideFilter.search.buttonLabel": "Elasticsearch",
|
||||
|
|
|
@ -8,15 +8,13 @@
|
|||
import type { GuideConfig, StepConfig } from '@kbn/guided-onboarding';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
|
||||
export const websiteSearchGuideId = 'websiteSearch';
|
||||
export const databaseSearchGuideId = 'databaseSearch';
|
||||
|
||||
const apiRoutes = {
|
||||
[databaseSearchGuideId]: '/connectors/select_connector',
|
||||
[websiteSearchGuideId]: '/crawlers',
|
||||
};
|
||||
|
||||
export type EnterpriseSearchGuideIds = typeof websiteSearchGuideId | typeof databaseSearchGuideId;
|
||||
export type EnterpriseSearchGuideIds = typeof databaseSearchGuideId;
|
||||
|
||||
const getAddDataStep: (method?: EnterpriseSearchGuideIds) => StepConfig = (method) => {
|
||||
return {
|
||||
|
@ -83,6 +81,4 @@ const getGuideConfig: (telemetryId: EnterpriseSearchGuideIds) => GuideConfig = (
|
|||
};
|
||||
};
|
||||
|
||||
export const websiteSearchGuideConfig: GuideConfig = getGuideConfig(websiteSearchGuideId);
|
||||
|
||||
export const databaseSearchGuideConfig: GuideConfig = getGuideConfig(databaseSearchGuideId);
|
||||
|
|
|
@ -73,17 +73,6 @@ export const SearchIndex: React.FC = () => {
|
|||
updateSideNavDefinition,
|
||||
} = 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(() => {
|
||||
const subscription = guidedOnboarding?.guidedOnboardingApi
|
||||
?.isGuideStepActive$('databaseSearch', 'add_data')
|
||||
|
|
|
@ -36,9 +36,7 @@ import {
|
|||
} from '../common/constants';
|
||||
|
||||
import {
|
||||
websiteSearchGuideId,
|
||||
databaseSearchGuideId,
|
||||
websiteSearchGuideConfig,
|
||||
databaseSearchGuideConfig,
|
||||
} 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
|
||||
*/
|
||||
if (config.hasWebCrawler) {
|
||||
// TODO: Do we remove this guide with the removal of native crawler?
|
||||
guidedOnboarding?.registerGuideConfig(websiteSearchGuideId, websiteSearchGuideConfig);
|
||||
}
|
||||
if (config.hasConnectors) {
|
||||
guidedOnboarding?.registerGuideConfig(databaseSearchGuideId, databaseSearchGuideConfig);
|
||||
}
|
||||
|
|
|
@ -11,7 +11,6 @@ import {
|
|||
guideStateSavedObjectsType,
|
||||
pluginStateSavedObjectsType,
|
||||
} 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 { X_ELASTIC_INTERNAL_ORIGIN_REQUEST } from '@kbn/core-http-common';
|
||||
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 () => {
|
||||
await createGuides(kibanaServer, [
|
||||
testGuideStep1ActiveState,
|
||||
{ ...testGuideStep1ActiveState, guideId: websiteSearchGuideId },
|
||||
]);
|
||||
await createGuides(kibanaServer, [testGuideStep1ActiveState]);
|
||||
const response = await supertest
|
||||
.get(getGuidesPath)
|
||||
.set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana')
|
||||
.expect(200);
|
||||
expect(response.body).not.to.be.empty();
|
||||
expect(response.body.state).to.eql([
|
||||
testGuideStep1ActiveState,
|
||||
{ ...testGuideStep1ActiveState, guideId: websiteSearchGuideId },
|
||||
]);
|
||||
expect(response.body.state).to.eql([testGuideStep1ActiveState]);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
@ -19,7 +19,6 @@ import {
|
|||
guideStateSavedObjectsType,
|
||||
} from '@kbn/guided-onboarding-plugin/server/saved_objects/guided_setup';
|
||||
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 { X_ELASTIC_INTERNAL_ORIGIN_REQUEST } from '@kbn/core-http-common';
|
||||
import {
|
||||
|
@ -135,11 +134,8 @@ export default function testPutState({ getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('updates any existing active guides to inactive', async () => {
|
||||
// create an active guide and an inactive guide
|
||||
await createGuides(kibanaServer, [
|
||||
testGuideStep1ActiveState,
|
||||
{ ...testGuideNotActiveState, guideId: websiteSearchGuideId },
|
||||
]);
|
||||
// create an active guide
|
||||
await createGuides(kibanaServer, [testGuideStep1ActiveState]);
|
||||
|
||||
// Create a new guide with isActive: true
|
||||
await supertest
|
||||
|
@ -161,12 +157,6 @@ export default function testPutState({ getService }: FtrProviderContext) {
|
|||
});
|
||||
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({
|
||||
type: guideStateSavedObjectsType,
|
||||
id: 'kubernetes',
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
"@kbn/test-suites-xpack-platform",
|
||||
"@kbn/expect",
|
||||
"@kbn/guided-onboarding-plugin",
|
||||
"@kbn/enterprise-search-plugin",
|
||||
"@kbn/test-suites-src",
|
||||
"@kbn/guided-onboarding",
|
||||
"@kbn/search-playground",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue