Skip to content

Commit

Permalink
[IM] Changes index mapping api response to plural form (elastic#66012)
Browse files Browse the repository at this point in the history
* changes index mapping api response to plural form

* changes tab title to "Mappings" in Index Management detail panel

* updates index management jest snapshots for "Mappings" title
# Conflicts:
#	x-pack/test/api_integration/apis/management/index_management/mapping.js
  • Loading branch information
yuliacech committed May 13, 2020
1 parent b83498c commit 4a14576
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ describe('index table', () => {
test('show settings button works from context menu', () => {
testEditor(0);
});
test('show mapping button works from context menu', () => {
test('show mappings button works from context menu', () => {
testEditor(1);
});
test('show stats button works from context menu', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const tabToHumanizedMap = {
<FormattedMessage id="xpack.idxMgmt.detailPanel.tabSettingsLabel" defaultMessage="Settings" />
),
[TAB_MAPPING]: (
<FormattedMessage id="xpack.idxMgmt.detailPanel.tabMappingLabel" defaultMessage="Mapping" />
<FormattedMessage id="xpack.idxMgmt.detailPanel.tabMappingLabel" defaultMessage="Mappings" />
),
[TAB_STATS]: (
<FormattedMessage id="xpack.idxMgmt.detailPanel.tabStatsLabel" defaultMessage="Stats" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ const paramsSchema = schema.object({
});

function formatHit(hit: { [key: string]: { mappings: any } }, indexName: string) {
const mapping = hit[indexName].mappings;
const mappings = hit[indexName].mappings;
return {
mapping,
mappings,
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default function({ getService }) {
const { body } = await getIndexMapping(index).expect(200);

// As, on 7.x we require the mappings with type (include_type_name), the default "_doc" type is returned
expect(body.mapping).to.eql({ _doc: mappings });
expect(body.mappings).to.eql({ _doc: mappings });
});
});
}

0 comments on commit 4a14576

Please sign in to comment.