Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/task/olm-5711-console-arg-value-…
Browse files Browse the repository at this point in the history
…selector-support' into task/olm-5711-console-arg-value-selector-support
  • Loading branch information
paul-tavares committed Jan 24, 2023
2 parents 9eac198 + 8cab164 commit 55816db
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 13 deletions.
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,7 @@
"**/chokidar": "^3.5.3",
"**/deepmerge": "^4.2.2",
"**/fast-deep-equal": "^3.1.1",
"**/handlebars/uglify-js": "^3.14.3",
"**/hoist-non-react-statics": "^3.3.2",
"**/html-minifier/uglify-js": "^3.14.3",
"**/isomorphic-fetch/node-fetch": "^2.6.7",
"**/istanbul-lib-coverage": "^3.2.0",
"**/json-schema": "^0.4.0",
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/fleet/common/types/models/package_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export interface PackageSpecManifest {
owner: { github: string };
elasticsearch?: Pick<
RegistryElasticsearch,
'index_template.settings' | 'index_template.mappings'
'index_template.settings' | 'index_template.mappings' | 'index_template.data_stream'
>;
}

Expand Down
36 changes: 36 additions & 0 deletions x-pack/plugins/fleet/server/services/epm/archive/parse.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,42 @@ describe('parseDataStreamElasticsearchEntry', () => {
},
});
});
it('Should handle dotted values for data_stream', () => {
expect(
parseDataStreamElasticsearchEntry({
'index_template.data_stream': { hidden: true },
})
).toEqual({
'index_template.data_stream': { hidden: true },
});
expect(
parseDataStreamElasticsearchEntry({
'index_template.data_stream': { hidden: false },
})
).toEqual({
'index_template.data_stream': { hidden: false },
});
});
it('Should handle non-dotted values for data_stream', () => {
expect(
parseDataStreamElasticsearchEntry({
index_template: {
data_stream: { hidden: true },
},
})
).toEqual({
'index_template.data_stream': { hidden: true },
});
expect(
parseDataStreamElasticsearchEntry({
index_template: {
data_stream: { hidden: false },
},
})
).toEqual({
'index_template.data_stream': { hidden: false },
});
});
it('Should handle dotted values for mappings and settings', () => {
expect(
parseDataStreamElasticsearchEntry({
Expand Down
6 changes: 6 additions & 0 deletions x-pack/plugins/fleet/server/services/epm/archive/parse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,12 @@ export function parseDataStreamElasticsearchEntry(
);
}

if (expandedElasticsearch?.index_template?.data_stream) {
parsedElasticsearchEntry['index_template.data_stream'] = expandDottedEntries(
expandedElasticsearch.index_template.data_stream
);
}

if (expandedElasticsearch?.index_mode) {
parsedElasticsearchEntry.index_mode = expandedElasticsearch.index_mode;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,7 @@ describe('<IndexManagementHome />', () => {
});
});

// FLAKY: https://github.com/elastic/kibana/issues/132780
describe.skip('index actions', () => {
describe('index actions', () => {
const indexNameA = 'testIndexA';
const indexNameB = 'testIndexB';
const indexMockA = createNonDataStreamIndex(indexNameA);
Expand Down Expand Up @@ -311,7 +310,6 @@ describe('<IndexManagementHome />', () => {

test("should be able to clear an index's cache", async () => {
const { actions } = testBed;
await actions.clickManageContextMenuButton();

await actions.clickManageContextMenuButton();
await actions.clickContextMenuOption('clearCacheIndexMenuButton');
Expand Down
14 changes: 7 additions & 7 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7961,9 +7961,9 @@
integrity sha512-0+S1S9Iq0oJ9w9IaBC5W/z1WsPNDUIAJG+THGmqR4vUAxUPCzIY+dApTvyGsaBUWjafTDL0Dg8Z9+iRuk3/BQA==

"@types/uglify-js@*":
version "3.0.4"
resolved "https://registry.yarnpkg.com/@types/uglify-js/-/uglify-js-3.0.4.tgz#96beae23df6f561862a830b4288a49e86baac082"
integrity sha512-SudIN9TRJ+v8g5pTG8RRCqfqTMNqgWCKKd3vtynhGzkIIjxaicNAMuY5TRadJ6tzDu3Dotf3ngaMILtmOdmWEQ==
version "3.17.1"
resolved "https://registry.yarnpkg.com/@types/uglify-js/-/uglify-js-3.17.1.tgz#e0ffcef756476410e5bce2cb01384ed878a195b5"
integrity sha512-GkewRA4i5oXacU/n4MA9+bLgt5/L3F1mKrYvFGm7r2ouLXhRKjuWwo9XHNnbx6WF3vlGW21S3fCvgqxvxXXc5g==
dependencies:
source-map "^0.6.1"

Expand Down Expand Up @@ -26779,10 +26779,10 @@ uc.micro@^1.0.1, uc.micro@^1.0.5:
resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.5.tgz#0c65f15f815aa08b560a61ce8b4db7ffc3f45376"
integrity sha512-JoLI4g5zv5qNyT09f4YAvEZIIV1oOjqnewYg5D38dkQljIzpPT296dbIGvKro3digYI1bkb7W6EP1y4uDlmzLg==

uglify-js@^3.1.4, uglify-js@^3.14.3:
version "3.14.4"
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.14.4.tgz#68756f17d1b90b9d289341736cb9a567d6882f90"
integrity sha512-AbiSR44J0GoCeV81+oxcy/jDOElO2Bx3d0MfQCUShq7JRXaM4KtQopZsq2vFv8bCq2yMaGrw1FgygUd03RyRDA==
uglify-js@^3.1.4:
version "3.17.4"
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.17.4.tgz#61678cf5fa3f5b7eb789bb345df29afb8257c22c"
integrity sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==

unbox-primitive@^1.0.1:
version "1.0.1"
Expand Down

0 comments on commit 55816db

Please sign in to comment.