Skip to content

Commit

Permalink
[8.x] [CLOUD] add the term search for es in kibana (elastic#197667) (e…
Browse files Browse the repository at this point in the history
…lastic#197709)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[CLOUD] add the term search for es in kibana
(elastic#197667)](elastic#197667)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Xavier
Mouligneau","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-24T17:49:14Z","message":"[CLOUD]
add the term search for es in kibana (elastic#197667)\n\n## Summary\r\n\r\nThe
cloud can pass the term `search` for the solution type. It will
be\r\nideal to only have one term but for now let's merge this fix and I
will\r\ncheck with CP that we only pass one term for `search`
and\r\n`elasticsearch`.\r\n\r\n\r\n### Checklist\r\n\r\nDelete any items
that are not applicable to this PR.\r\n\r\n- [x] Any text added follows
[EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)","sha":"60e3da73b6118e34ec250a1cb4a2f4904097b532","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","Team:Cloud","release_note:skip","v9.0.0","v8.16.0","backport:version","v8.17.0"],"title":"[CLOUD]
add the term search for es in
kibana","number":197667,"url":"https://github.com/elastic/kibana/pull/197667","mergeCommit":{"message":"[CLOUD]
add the term search for es in kibana (elastic#197667)\n\n## Summary\r\n\r\nThe
cloud can pass the term `search` for the solution type. It will
be\r\nideal to only have one term but for now let's merge this fix and I
will\r\ncheck with CP that we only pass one term for `search`
and\r\n`elasticsearch`.\r\n\r\n\r\n### Checklist\r\n\r\nDelete any items
that are not applicable to this PR.\r\n\r\n- [x] Any text added follows
[EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)","sha":"60e3da73b6118e34ec250a1cb4a2f4904097b532"}},"sourceBranch":"main","suggestedTargetBranches":["8.16","8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/197667","number":197667,"mergeCommit":{"message":"[CLOUD]
add the term search for es in kibana (elastic#197667)\n\n## Summary\r\n\r\nThe
cloud can pass the term `search` for the solution type. It will
be\r\nideal to only have one term but for now let's merge this fix and I
will\r\ncheck with CP that we only pass one term for `search`
and\r\n`elasticsearch`.\r\n\r\n\r\n### Checklist\r\n\r\nDelete any items
that are not applicable to this PR.\r\n\r\n- [x] Any text added follows
[EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)","sha":"60e3da73b6118e34ec250a1cb4a2f4904097b532"}},{"branch":"8.16","label":"v8.16.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Xavier Mouligneau <[email protected]>
  • Loading branch information
kibanamachine and XavierM authored Oct 24, 2024
1 parent 20a83d1 commit 9d54a62
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 9d54a62

Please sign in to comment.