Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Onboarding] Make search_indices index details page as default route in index management #194857

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

saarikabhasi
Copy link
Member

@saarikabhasi saarikabhasi commented Oct 3, 2024

Summary

Makes search_indices index details page as default route in the index_management plugin list page.

index.management.details.page.mov

How to test:

  1. Enable searchIndices plugin in kibana.dev.yml as this plugin is behind Feature flag
xpack.searchIndices.enabled: true

  1. Create new index
  2. Navigate to index management app
  3. Click on index name and confirm is navigated to /app/elasticsearch/indices/index_details/my-index/data
  4. set xpack.searchIndices.enabled: false in kibana.dev.yml
  5. Navigate again to index management app
  6. Click on index name and confirm is navigated to index management index details page

Checklist

Delete any items that are not applicable to this PR.

@saarikabhasi saarikabhasi added release_note:skip Skip the PR/issue when compiling release notes v9.0.0 backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) v8.16.0 labels Oct 3, 2024
@saarikabhasi saarikabhasi marked this pull request as ready for review October 3, 2024 15:56
@saarikabhasi saarikabhasi requested review from a team as code owners October 3, 2024 15:56
@kibanamachine
Copy link
Contributor

Flaky Test Runner Stats

🎉 All tests passed! - kibana-flaky-test-suite-runner#7076

[✅] x-pack/test_serverless/api_integration/test_suites/search/common_configs/config.group1.ts: 25/25 tests passed.
[✅] x-pack/test_serverless/functional/test_suites/search/config.feature_flags.ts: 25/25 tests passed.
[✅] x-pack/test_serverless/functional/test_suites/search/common_configs/config.group1.ts: 25/25 tests passed.

see run history

@kibanamachine
Copy link
Contributor

Flaky Test Runner Stats

🎉 All tests passed! - kibana-flaky-test-suite-runner#7077

[✅] x-pack/test_serverless/api_integration/test_suites/search/common_configs/config.group1.ts: 25/25 tests passed.
[✅] x-pack/test_serverless/api_integration/test_suites/search/config.ts: 25/25 tests passed.
[✅] x-pack/test_serverless/functional/test_suites/search/common_configs/config.group1.ts: 25/25 tests passed.
[✅] x-pack/test_serverless/functional/test_suites/search/config.feature_flags.ts: 25/25 tests passed.

see run history

Comment on lines 75 to 78
renderRoute: () => {
return '/app/elasticsearch/indices/index_details/';
},
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should take the index name and do the full template here. It would allow us to include a default tab.

Suggested change
renderRoute: () => {
return '/app/elasticsearch/indices/index_details/';
},
});
renderRoute: ({ indexName }) => {
return `/app/elasticsearch/indices/index_details/${indexName}`;
},
});

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated in 9ab2e9b

Comment on lines 78 to 79
const url = extensionsService.indexDetailsPageRoute.renderRoute({ index });
application.navigateToUrl(`${url}${index.name}`);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const url = extensionsService.indexDetailsPageRoute.renderRoute({ index });
application.navigateToUrl(`${url}${index.name}`);
const url = extensionsService.indexDetailsPageRoute.renderRoute({ indexName: index.name });
application.navigateToUrl(url);

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated in 9ab2e9b

@@ -30,6 +30,9 @@ export interface IndexBadge {
filterExpression?: string;
color: EuiBadgeProps['color'];
}
export interface IndexDetailsPageRoute {
renderRoute: () => string;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the usage this function is taking a variable. We should update this to have an accurate type.

Suggested change
renderRoute: () => string;
renderRoute: ({ indexName: string }) => string;

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated in 9ab2e9b

history.push(getIndexDetailsLink(index.name, location.search || ''));
} else {
const route = extensionsService.indexDetailsPageRoute.renderRoute(index.name);
application.navigateToUrl(route);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will work in serverless but in stateful I think you need to prepend the base path.

application.navigateToUrl(http.basePath.prepend(route));

we could do the http.basePath.prepend(route) in the renderRoute function too, we have coreStart available there.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will work in serverless but in stateful I think you need to prepend the base path.

Curious, why this wouldn't work in stateful ?

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/index-management-shared-types 114 119 +5

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
indexManagement 684.4KB 684.6KB +159.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
indexManagement 44.4KB 44.7KB +327.0B
searchIndices 6.2KB 6.4KB +149.0B
total +476.0B
Unknown metric groups

API count

id before after diff
@kbn/index-management-shared-types 114 119 +5

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) release_note:skip Skip the PR/issue when compiling release notes v8.16.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants