-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Enterprise Search] Index Pipelines JSON Configurations #142609
[Enterprise Search] Index Pipelines JSON Configurations #142609
Conversation
{ defaultMessage: 'View the JSON for your pipeline configurations on this index.' } | ||
)} | ||
footerDocLink={ | ||
<EuiLink href={docLinks.ingestPipelines} target="_blank" color="subdued"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not 100% sure if we want to use the same doc link here since it's already in the footer for the Ingest Pipelines card.
</EuiFlexItem> | ||
</EuiFlexGroup> | ||
<EuiSpacer size="m" /> | ||
<EuiCodeBlock language="json" overflowHeight={300} isCopyable> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this overflowHeight={300}
is a bit arbitrary, is there a patter we usually follow for what to set this value to?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we have, we can try to come up with one though.
@@ -293,9 +295,15 @@ export function registerIndexRoutes({ | |||
elasticsearchErrorHandler(log, async (context, request, response) => { | |||
const indexName = decodeURIComponent(request.params.indexName); | |||
const { client } = (await context.core).elasticsearch; | |||
const pipelines = await getCustomPipelines(indexName, client); | |||
const [defaultPipeline, customPipelines] = await Promise.all([ | |||
getPipeline(DEFAULT_PIPELINE_NAME, client), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I went back and forth on if I should add a new endpoint for getting a pipeline or one specific to the default pipeline. But eventually landed on returning the default ingest pipeline from this endpoint we were already calling. This works for indices that do and do not already have custom pipelines.
We already have an endpoint for the default pipeline, but it's parsing it and returning a response specific to what the ingest pipeline card/modal uses via the PipelinesLogic
.
It might be worthwhile to refactor the default pipeline endpoint to return the full IngestPipeline
and then do the parsing in the PipelinesLogic
. Then we would not need to return the default pipeline here. but instead combine the custom pipelines and default pipeline into a single list in the frontend logic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the refactor idea. Do you think we can handle this during the node architecture overhaul ?
.../applications/enterprise_search_content/components/search_index/pipelines/pipelines_logic.ts
Show resolved
Hide resolved
6db65f7
to
bfd3506
Compare
...nterprise_search_content/components/search_index/pipelines/pipelines_json_configurations.tsx
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. I don't see a major problem. 🚀
If you can check the comments before merging that would be cool.
...cations/enterprise_search_content/components/search_index/pipelines/pipeline_json_badges.tsx
Outdated
Show resolved
Hide resolved
</EuiFlexItem> | ||
</EuiFlexGroup> | ||
<EuiSpacer size="m" /> | ||
<EuiCodeBlock language="json" overflowHeight={300} isCopyable> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we have, we can try to come up with one though.
...nterprise_search_content/components/search_index/pipelines/pipelines_json_configurations.tsx
Show resolved
Hide resolved
@@ -293,9 +295,15 @@ export function registerIndexRoutes({ | |||
elasticsearchErrorHandler(log, async (context, request, response) => { | |||
const indexName = decodeURIComponent(request.params.indexName); | |||
const { client } = (await context.core).elasticsearch; | |||
const pipelines = await getCustomPipelines(indexName, client); | |||
const [defaultPipeline, customPipelines] = await Promise.all([ | |||
getPipeline(DEFAULT_PIPELINE_NAME, client), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the refactor idea. Do you think we can handle this during the node architecture overhaul ?
.../applications/enterprise_search_content/components/search_index/pipelines/pipelines_logic.ts
Show resolved
Hide resolved
Add the right panel with tabs for the Search Index Pipelines page, along with the JSON configurations tab. The index pipeliens get request was already returning the index specific ingest pipelines so I added the default pipeline to this result so we can get all the pipelines related to an index with a single call.
The modal is closed from the pipelines logic and this createApiSuccess listener ended up being completely unnecessary.
bfd3506
to
6389378
Compare
💚 Build Succeeded
Metrics [docs]Module Count
Async chunks
History
To update your PR or re-run it, just comment with: |
* [Enterprise Search] pipelines json configs tab Add the right panel with tabs for the Search Index Pipelines page, along with the JSON configurations tab. The index pipeliens get request was already returning the index specific ingest pipelines so I added the default pipeline to this result so we can get all the pipelines related to an index with a single call. * removed unnecessary listener The modal is closed from the pipelines logic and this createApiSuccess listener ended up being completely unnecessary.
* [Enterprise Search] pipelines json configs tab Add the right panel with tabs for the Search Index Pipelines page, along with the JSON configurations tab. The index pipeliens get request was already returning the index specific ingest pipelines so I added the default pipeline to this result so we can get all the pipelines related to an index with a single call. * removed unnecessary listener The modal is closed from the pipelines logic and this createApiSuccess listener ended up being completely unnecessary.
Summary
Add the right panel with tabs for the Search Index Pipelines page, along with the JSON configurations tab.
The index pipelines get request was already returning the index specific ingest pipelines so I added the default pipeline to this result so we can get all the pipelines related to an index with a single call.
Index without a custom pipeline:
Checklist