[8.12] [monitoring] Add version header to Integration installation call (#174509) (#174552)

# Backport

This will backport the following commits from `main` to `8.12`:
- [[monitoring] Add version header to Integration installation call
(#174509)](https://github.com/elastic/kibana/pull/174509)

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

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

<!--BACKPORT [{"author":{"name":"Milton
Hultgren","email":"milton.hultgren@elastic.co"},"sourceCommit":{"committedDate":"2024-01-09T20:18:03Z","message":"[monitoring]
Add version header to Integration installation call (#174509)\n\nThe
initial install call fails because we don't pass the version
header.","sha":"aa1950f655441836076ba435d8c87c1bb914582e","branchLabelMapping":{"^v8.13.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Feature:Stack
Monitoring","backport:prev-minor","v8.13.0"],"title":"[monitoring] Add
version header to Integration installation
call","number":174509,"url":"https://github.com/elastic/kibana/pull/174509","mergeCommit":{"message":"[monitoring]
Add version header to Integration installation call (#174509)\n\nThe
initial install call fails because we don't pass the version
header.","sha":"aa1950f655441836076ba435d8c87c1bb914582e"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.13.0","branchLabelMappingKey":"^v8.13.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/174509","number":174509,"mergeCommit":{"message":"[monitoring]
Add version header to Integration installation call (#174509)\n\nThe
initial install call fails because we don't pass the version
header.","sha":"aa1950f655441836076ba435d8c87c1bb914582e"}}]}]
BACKPORT-->

Co-authored-by: Milton Hultgren <milton.hultgren@elastic.co>
This commit is contained in:
Kibana Machine 2024-01-09 16:34:18 -05:00 committed by GitHub
parent c310ce2afa
commit 47b78f0d18
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -43,7 +43,10 @@ export const ingestPipelineTabOnClick = async (
});
if (!dashboardFound) {
const installPackage = () => services.http!.post('/api/fleet/epm/packages/elasticsearch');
const installPackage = () =>
services.http!.post('/api/fleet/epm/packages/elasticsearch', {
headers: { 'Elastic-Api-Version': '2023-10-31' },
});
const ref = services.overlays!.openModal(
toMountPoint(