-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Ingest Manager] Change agent config YAML view to flyout #67918
Conversation
…nfig->yaml service
Pinging @elastic/ingest-management (Team:Ingest Management) |
const body = configToYaml(fullAgentConfig); | ||
const headers: ResponseHeaders = { | ||
'content-type': 'text/x-yaml', | ||
'content-disposition': `attachment; filename="elastic-agent-config-${fullAgentConfig.id}.yml"`, |
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.
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.
The default config that is picked up by the agent is called elastic-agent.yml
: https://github.com/elastic/beats/blob/master/x-pack/elastic-agent/elastic-agent.yml Taking this name would make it very easy to copy / paste. Having the id inside makes it nice for tracking but not sure we need it at the moment?
💚 Build SucceededTo update your PR or re-run it, just comment with: |
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.
Tested locally and it work as expected 👍
Do you think we should add a functional test for the download API endpoint? Personally I like to at least cover the green path for each endpoint
: undefined | ||
} | ||
items={[ | ||
<EuiContextMenuItem |
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.
Would you be ok if we had a URL param in the route that would trigger this flyout? Does not have to be part of this PR.
One of the integration tests I have been thinking about for Endpoint "policy" data is to ensure that data (when created/edited) lands in the right place in the YAML file, which should give us an assurance that it will make it to the Endpoint exe as intended. Having a route to get this panel would make it easier to build up that integration test.
Like I said - does not have to be part of this PR, but was wondering if you would be ok with such a change in the future when we get around to implementing that integration test 😃
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.
Yes, I'm ok with any url params to trigger any of our flyouts :)
@nchaulet I'll work on a test in a subsequent PR. |
* Consolidate context menu/row action components and usage, and some export/imports * Missed export * Move agent config yaml tab to flyout, add and consolidate agent config action menus * Fix i18n * Add download config YAML endpoint and link from flyout, add common config->yaml service * Actually remove the tab lol * Fix i18n
…8034) * Consolidate context menu/row action components and usage, and some export/imports * Missed export * Move agent config yaml tab to flyout, add and consolidate agent config action menus * Fix i18n * Add download config YAML endpoint and link from flyout, add common config->yaml service * Actually remove the tab lol * Fix i18n
Resolves #62313
Summary
This PR moves the agent config YAML tab to be a flyout instead and address some tech debt.
/api/ingest_manager/agent_configs/{agentConfigId}/download
elastic-agent-config-{agentConfigId}.yml
Screenshots