From 41ab4b88dead801b3fc18dbf85b63a7a31dc7654 Mon Sep 17 00:00:00 2001 From: CJ Cenizal Date: Tue, 11 Feb 2020 11:21:21 -0800 Subject: [PATCH 1/2] Add filter for ILM phase to Index Management (reverting #45486). --- .../np_ready/extend_index_management/index.js | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/x-pack/legacy/plugins/index_lifecycle_management/public/np_ready/extend_index_management/index.js b/x-pack/legacy/plugins/index_lifecycle_management/public/np_ready/extend_index_management/index.js index 422a7986aa057..bbaa8f7770c8d 100644 --- a/x-pack/legacy/plugins/index_lifecycle_management/public/np_ready/extend_index_management/index.js +++ b/x-pack/legacy/plugins/index_lifecycle_management/public/np_ready/extend_index_management/index.js @@ -202,6 +202,40 @@ export const ilmFilterExtension = indices => { }, ], }, + { + type: 'field_value_selection', + field: 'ilm.phase', + name: i18n.translate('xpack.indexLifecycleMgmt.indexMgmtFilter.lifecyclePhaseLabel', { + defaultMessage: 'Lifecycle phase', + }), + multiSelect: 'or', + options: [ + { + value: 'hot', + view: i18n.translate('xpack.indexLifecycleMgmt.indexMgmtFilter.hotLabel', { + defaultMessage: 'Hot', + }), + }, + { + value: 'warm', + view: i18n.translate('xpack.indexLifecycleMgmt.indexMgmtFilter.warmLabel', { + defaultMessage: 'Warm', + }), + }, + { + value: 'cold', + view: i18n.translate('xpack.indexLifecycleMgmt.indexMgmtFilter.coldLabel', { + defaultMessage: 'Cold', + }), + }, + { + value: 'delete', + view: i18n.translate('xpack.indexLifecycleMgmt.indexMgmtFilter.deleteLabel', { + defaultMessage: 'Delete', + }), + }, + ], + }, ]; } }; From 6759a336f68e0b14fbb019ab64228a32ee280c65 Mon Sep 17 00:00:00 2001 From: CJ Cenizal Date: Wed, 12 Feb 2020 14:26:41 -0800 Subject: [PATCH 2/2] Update snapshot. --- .../extend_index_management.test.js.snap | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/x-pack/legacy/plugins/index_lifecycle_management/__jest__/__snapshots__/extend_index_management.test.js.snap b/x-pack/legacy/plugins/index_lifecycle_management/__jest__/__snapshots__/extend_index_management.test.js.snap index 92aaa171551a0..74c3e7408fe7c 100644 --- a/x-pack/legacy/plugins/index_lifecycle_management/__jest__/__snapshots__/extend_index_management.test.js.snap +++ b/x-pack/legacy/plugins/index_lifecycle_management/__jest__/__snapshots__/extend_index_management.test.js.snap @@ -63,6 +63,30 @@ Array [ ], "type": "field_value_selection", }, + Object { + "field": "ilm.phase", + "multiSelect": "or", + "name": "Lifecycle phase", + "options": Array [ + Object { + "value": "hot", + "view": "Hot", + }, + Object { + "value": "warm", + "view": "Warm", + }, + Object { + "value": "cold", + "view": "Cold", + }, + Object { + "value": "delete", + "view": "Delete", + }, + ], + "type": "field_value_selection", + }, ] `;