Skip to content

Commit

Permalink
[CLOUD] add the term search for es in kibana (elastic#197667)
Browse files Browse the repository at this point in the history
## Summary

The cloud can pass the term `search` for the solution type. It will be
ideal to only have one term but for now let's merge this fix and I will
check with CP that we only pass one term for `search` and
`elasticsearch`.


### Checklist

Delete any items that are not applicable to this PR.

- [x] 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)
  • Loading branch information
XavierM authored Oct 24, 2024
1 parent 49102dd commit 60e3da7
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ describe('parseOnboardingSolution', () => {
[
['elasticsearch', 'es'],
['Elasticsearch', 'es'],
['search', 'es'],
['Search', 'es'],
['observability', 'oblt'],
['Observability', 'oblt'],
['security', 'security'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,13 @@ export function parseOnboardingSolution(value?: string): OnBoardingDefaultSoluti
if (!value) return;

const solutions: Array<{
cloudValue: 'elasticsearch' | 'observability' | 'security';
cloudValue: 'search' | 'elasticsearch' | 'observability' | 'security';
kibanaValue: OnBoardingDefaultSolution;
}> = [
{
cloudValue: 'search',
kibanaValue: 'es',
},
{
cloudValue: 'elasticsearch',
kibanaValue: 'es',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ describe('parseCloudSolution', () => {
expect(parseCloudSolution('elasticsearch')).toBe('es');
});

it('should return "es" for "search"', () => {
expect(parseCloudSolution('search')).toBe('es');
});

it('should return "oblt" for "observability"', () => {
expect(parseCloudSolution('observability')).toBe('oblt');
});
Expand All @@ -26,6 +30,10 @@ describe('parseCloudSolution', () => {
expect(parseCloudSolution('ELASTICSEARCH')).toBe('es');
});

it('should return "es" for "SEARCH"', () => {
expect(parseCloudSolution('SEARCH')).toBe('es');
});

it('should return "oblt" for "OBSERVABILITY"', () => {
expect(parseCloudSolution('OBSERVABILITY')).toBe('oblt');
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import type { SolutionView } from '../../../common';

const CLOUD_TO_KIBANA_SOLUTION_MAP = new Map<string, SolutionView>([
['search', 'es'],
['elasticsearch', 'es'],
['observability', 'oblt'],
['security', 'security'],
Expand Down

0 comments on commit 60e3da7

Please sign in to comment.