Skip to content

Commit

Permalink
[8.x] [Search][Onboarding] Use new index details page (elastic#193058) (
Browse files Browse the repository at this point in the history
elastic#193100)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Search][Onboarding] Use new index details page
(elastic#193058)](elastic#193058)

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

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

<!--BACKPORT [{"author":{"name":"Rodney
Norris","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-09-16T22:02:49Z","message":"[Search][Onboarding]
Use new index details page (elastic#193058)\n\n## Summary\r\n\r\n- Updated the
empty state redirect to use the new index details page\r\n- Updated the
empty state to only show \"Run in Console\" when cURL is the\r\nselected
coding
language.","sha":"d6fdc825b4dd7c5878d32a01c4bd8ff9d5eec91e","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Search","backport:prev-minor"],"title":"[Search][Onboarding]
Use new index details
page","number":193058,"url":"https://github.com/elastic/kibana/pull/193058","mergeCommit":{"message":"[Search][Onboarding]
Use new index details page (elastic#193058)\n\n## Summary\r\n\r\n- Updated the
empty state redirect to use the new index details page\r\n- Updated the
empty state to only show \"Run in Console\" when cURL is the\r\nselected
coding
language.","sha":"d6fdc825b4dd7c5878d32a01c4bd8ff9d5eec91e"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/193058","number":193058,"mergeCommit":{"message":"[Search][Onboarding]
Use new index details page (elastic#193058)\n\n## Summary\r\n\r\n- Updated the
empty state redirect to use the new index details page\r\n- Updated the
empty state to only show \"Run in Console\" when cURL is the\r\nselected
coding language.","sha":"d6fdc825b4dd7c5878d32a01c4bd8ff9d5eec91e"}}]}]
BACKPORT-->

Co-authored-by: Rodney Norris <[email protected]>
  • Loading branch information
kibanamachine and TattdCodeMonkey authored Sep 16, 2024
1 parent 34c0a02 commit 4d25d0f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,21 +43,23 @@ export const CreateIndexCodeView = ({ createIndexForm }: CreateIndexCodeViewProp
return (
<EuiFlexGroup direction="column" data-test-subj="createIndexCodeView">
<EuiFlexGroup justifyContent="spaceBetween" alignItems="center">
<EuiFlexItem>
<EuiFlexItem css={{ maxWidth: '300px' }}>
<LanguageSelector
options={LanguageOptions}
selectedLanguage={selectedLanguage}
onSelectLanguage={(value) => setSelectedLanguage(value)}
/>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<TryInConsoleButton
request={SelectedCodeExamples.sense.createIndex(codeParams)}
application={application}
sharePlugin={share}
consolePlugin={consolePlugin}
/>
</EuiFlexItem>
{selectedLanguage === 'curl' && (
<EuiFlexItem grow={false}>
<TryInConsoleButton
request={SelectedCodeExamples.sense.createIndex(codeParams)}
application={application}
sharePlugin={share}
consolePlugin={consolePlugin}
/>
</EuiFlexItem>
)}
</EuiFlexGroup>
{selectedCodeExample.installCommand && (
<CodeSample
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@

import type { ApplicationStart, HttpSetup } from '@kbn/core/public';

// TODO: we should define a locator for this and use that instead
const INDEX_DETAILS_PATH = '/app/management/data/index_management/indices/index_details';
const INDEX_DETAILS_PATH = '/app/elasticsearch/indices/index_details';

function getIndexDetailsPath(http: HttpSetup, indexName: string) {
return http.basePath.prepend(`${INDEX_DETAILS_PATH}?indexName=${indexName}`);
return http.basePath.prepend(`${INDEX_DETAILS_PATH}/${encodeURIComponent(indexName)}`);
}

export const navigateToIndexDetails = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ export function SvlSearchElasticsearchStartPageProvider({ getService }: FtrProvi
},
async expectToBeOnIndexDetailsPage() {
await retry.tryForTime(60 * 1000, async () => {
expect(await browser.getCurrentUrl()).contain(
'/app/management/data/index_management/indices/index_details'
);
expect(await browser.getCurrentUrl()).contain('/app/elasticsearch/indices/index_details');
});
},
async expectToBeOnIndexListPage() {
Expand Down

0 comments on commit 4d25d0f

Please sign in to comment.