Skip to content

Commit d600641

Browse files
mattkimeviduni94
authored andcommitted
[index management] Remove index unfreeze code (elastic#205617)
## Summary Remove code related to unfreezing indices since the functionality is being removed from v9 due to elastic/elasticsearch#119227
1 parent fb25c14 commit d600641

File tree

19 files changed

+1
-202
lines changed

19 files changed

+1
-202
lines changed

x-pack/platform/plugins/private/translations/translations/fr-FR.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22348,7 +22348,6 @@
2234822348
"xpack.idxMgmt.indexActionsMenu.showIndexOverviewLabel": "Afficher l'aperçu des index",
2234922349
"xpack.idxMgmt.indexActionsMenu.showIndexSettingsLabel": "Afficher les paramètres des index",
2235022350
"xpack.idxMgmt.indexActionsMenu.showIndexStatsLabel": "Afficher les statistiques des index",
22351-
"xpack.idxMgmt.indexActionsMenu.unfreezeIndexLabel": "Dégeler {selectedIndexCount, plural, one {l'index} other {les index} }",
2235222351
"xpack.idxMgmt.indexDetails.backToIndicesButtonLabel": "Retour aux index",
2235322352
"xpack.idxMgmt.indexDetails.errorDescription": "Une erreur s'est produite lors du chargement des données pour l'index {indexName}. Assurez-vous que le nom de l'index dans l'URL est correct, puis réessayez.",
2235422353
"xpack.idxMgmt.indexDetails.errorTitle": "Impossible de charger les détails d'index",
@@ -23248,8 +23247,6 @@
2324823247
"xpack.idxMgmt.templateValidation.templateNameRequiredError": "Nom de modèle obligatoire.",
2324923248
"xpack.idxMgmt.templateValidation.templateNameSpacesError": "Les espaces ne sont pas autorisés dans un nom de modèle.",
2325023249
"xpack.idxMgmt.templateValidation.templateNameUnderscoreError": "Un nom de modèle ne doit pas commencer par un trait de soulignement.",
23251-
"xpack.idxMgmt.unfreezeIndicesAction.indexUnfrozenMessage": "L'index {indexNames} a été débloqué.",
23252-
"xpack.idxMgmt.unfreezeIndicesAction.successfullyUnfrozeIndicesMessage": "Déverrouillage terminé : [{indexNames}]",
2325323250
"xpack.idxMgmt.validators.string.invalidJSONError": "Format JSON non valide.",
2325423251
"xpack.indexLifecycleMgmt.addLifecyclePolicyActionButtonLabel": "Ajouter une stratégie de cycle de vie",
2325523252
"xpack.indexLifecycleMgmt.appTitle": "Stratégies de cycle de vie des index",

x-pack/platform/plugins/private/translations/translations/ja-JP.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22206,7 +22206,6 @@
2220622206
"xpack.idxMgmt.indexActionsMenu.showIndexOverviewLabel": "インデックス概要を表示",
2220722207
"xpack.idxMgmt.indexActionsMenu.showIndexSettingsLabel": "インデックス設定を表示",
2220822208
"xpack.idxMgmt.indexActionsMenu.showIndexStatsLabel": "インデックス統計を表示",
22209-
"xpack.idxMgmt.indexActionsMenu.unfreezeIndexLabel": "{selectedIndexCount, plural, other {個のインデックス} }の凍結を解除",
2221022209
"xpack.idxMgmt.indexDetails.backToIndicesButtonLabel": "インデックスに戻る",
2221122210
"xpack.idxMgmt.indexDetails.errorDescription": "インデックス{indexName}のデータを読み込む際にエラーが発生しました。URLのインデックス名が正しいことを確認し、もう一度試してください。",
2221222211
"xpack.idxMgmt.indexDetails.errorTitle": "インデックス詳細を読み込めません",
@@ -23107,8 +23106,6 @@
2310723106
"xpack.idxMgmt.templateValidation.templateNameRequiredError": "テンプレート名が必要です。",
2310823107
"xpack.idxMgmt.templateValidation.templateNameSpacesError": "テンプレート名にスペースは使用できません。",
2310923108
"xpack.idxMgmt.templateValidation.templateNameUnderscoreError": "テンプレート名はアンダーラインで始めることはできません。",
23110-
"xpack.idxMgmt.unfreezeIndicesAction.indexUnfrozenMessage": "インデックス{indexNames}が凍結解除されました。",
23111-
"xpack.idxMgmt.unfreezeIndicesAction.successfullyUnfrozeIndicesMessage": "[{indexNames}] の凍結が解除されました",
2311223109
"xpack.idxMgmt.validators.string.invalidJSONError": "無効な JSON フォーマット。",
2311323110
"xpack.indexLifecycleMgmt.addLifecyclePolicyActionButtonLabel": "ライフサイクルポリシーを追加",
2311423111
"xpack.indexLifecycleMgmt.appTitle": "インデックスライフサイクルポリシー",

x-pack/platform/plugins/private/translations/translations/zh-CN.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21851,7 +21851,6 @@
2185121851
"xpack.idxMgmt.indexActionsMenu.showIndexOverviewLabel": "显示索引概览",
2185221852
"xpack.idxMgmt.indexActionsMenu.showIndexSettingsLabel": "显示索引设置",
2185321853
"xpack.idxMgmt.indexActionsMenu.showIndexStatsLabel": "显示索引统计信息",
21854-
"xpack.idxMgmt.indexActionsMenu.unfreezeIndexLabel": "取消冻结{selectedIndexCount, plural, other {索引} }",
2185521854
"xpack.idxMgmt.indexDetails.backToIndicesButtonLabel": "返回到索引",
2185621855
"xpack.idxMgmt.indexDetails.errorDescription": "加载索引 {indexName} 的数据时出现错误。请确保 URL 中的索引名称正确,然后重试。",
2185721856
"xpack.idxMgmt.indexDetails.errorTitle": "无法加载索引详情",
@@ -22744,8 +22743,6 @@
2274422743
"xpack.idxMgmt.templateValidation.templateNameRequiredError": "模板名称必填。",
2274522744
"xpack.idxMgmt.templateValidation.templateNameSpacesError": "模板名称不允许包含空格。",
2274622745
"xpack.idxMgmt.templateValidation.templateNameUnderscoreError": "模板名称不得以下划线开头。",
22747-
"xpack.idxMgmt.unfreezeIndicesAction.indexUnfrozenMessage": "索引 {indexNames} 已取消冻结。",
22748-
"xpack.idxMgmt.unfreezeIndicesAction.successfullyUnfrozeIndicesMessage": "成功取消冻结:[{indexNames}]",
2274922746
"xpack.idxMgmt.validators.string.invalidJSONError": "JSON 格式无效。",
2275022747
"xpack.indexLifecycleMgmt.addLifecyclePolicyActionButtonLabel": "添加生命周期策略",
2275122748
"xpack.indexLifecycleMgmt.appTitle": "索引生命周期策略",

x-pack/platform/plugins/shared/index_management/__jest__/client_integration/helpers/test_subjects.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ export type TestSubjects =
6060
| 'templatesTab'
6161
| 'templateTable'
6262
| 'title'
63-
| 'unfreezeIndexMenuButton'
6463
| 'updateEditIndexSettingsButton'
6564
| 'updateIndexSettingsErrorCallout'
6665
| 'viewButton'

x-pack/platform/plugins/shared/index_management/__jest__/client_integration/home/indices_tab.test.tsx

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -336,38 +336,6 @@ describe('<IndexManagementHome />', () => {
336336
);
337337
});
338338

339-
test('should be able to unfreeze a frozen index', async () => {
340-
const { actions, exists, find } = testBed;
341-
342-
httpRequestsMockHelpers.setReloadIndicesResponse([{ ...indexMockA, isFrozen: false }]);
343-
344-
// Open context menu
345-
await actions.clickManageContextMenuButton();
346-
// Check that the unfreeze action exists for the current index and unfreeze it
347-
expect(exists('unfreezeIndexMenuButton')).toBe(true);
348-
await actions.clickContextMenuOption('unfreezeIndexMenuButton');
349-
350-
// After the index is unfrozen, we imediately do a reload. So we need to expect to see
351-
// a reload server call also.
352-
expect(httpSetup.post).toHaveBeenCalledWith(
353-
`${API_BASE_PATH}/indices/unfreeze`,
354-
expect.anything()
355-
);
356-
expect(httpSetup.post).toHaveBeenCalledWith(
357-
`${API_BASE_PATH}/indices/reload`,
358-
expect.anything()
359-
);
360-
361-
find('indexTableRowCheckbox')
362-
.at(0)
363-
.simulate('change', { target: { checked: true } });
364-
365-
// Open context menu once again, since clicking an action will close it.
366-
await actions.clickManageContextMenuButton();
367-
// The unfreeze action should not be present anymore
368-
expect(exists('unfreezeIndexMenuButton')).toBe(false);
369-
});
370-
371339
test('should be able to force merge an index', async () => {
372340
const { actions, exists } = testBed;
373341

x-pack/platform/plugins/shared/index_management/__jest__/client_integration/index_details_page/index_details_page.test.tsx

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1203,29 +1203,6 @@ describe('<IndexDetailsPage />', () => {
12031203
expect(testBed.routerMock.history.push).toHaveBeenCalledTimes(1);
12041204
expect(testBed.routerMock.history.push).toHaveBeenCalledWith('/indices');
12051205
});
1206-
1207-
it(`unfreezes a frozen index`, async () => {
1208-
httpRequestsMockHelpers.setLoadIndexDetailsResponse(testIndexName, {
1209-
...testIndexMock,
1210-
isFrozen: true,
1211-
});
1212-
1213-
await act(async () => {
1214-
testBed = await setup({ httpSetup });
1215-
});
1216-
testBed.component.update();
1217-
1218-
// already sent 6 requests while setting up the component
1219-
const numberOfRequests = 6;
1220-
expect(httpSetup.get).toHaveBeenCalledTimes(numberOfRequests);
1221-
1222-
await testBed.actions.contextMenu.clickManageIndexButton();
1223-
await testBed.actions.contextMenu.clickIndexAction('unfreezeIndexMenuButton');
1224-
expect(httpSetup.post).toHaveBeenCalledWith(`${API_BASE_PATH}/indices/unfreeze`, {
1225-
body: JSON.stringify({ indices: [testIndexName] }),
1226-
});
1227-
expect(httpSetup.get).toHaveBeenCalledTimes(numberOfRequests + 1);
1228-
});
12291206
});
12301207

12311208
describe('index name with a percent sign', () => {

x-pack/platform/plugins/shared/index_management/__jest__/components/index_table.test.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,6 @@ describe('index table', () => {
492492
expect(findTestSubject(rendered, 'refreshIndexMenuButton').length).toBe(0);
493493
expect(findTestSubject(rendered, 'clearCacheIndexMenuButton').length).toBe(0);
494494
expect(findTestSubject(rendered, 'flushIndexMenuButton').length).toBe(0);
495-
expect(findTestSubject(rendered, 'unfreezeIndexMenuButton').length).toBe(0);
496495
});
497496
});
498497
});

x-pack/platform/plugins/shared/index_management/common/constants/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ export {
3636
UIM_INDEX_OPEN_MANY,
3737
UIM_INDEX_REFRESH,
3838
UIM_INDEX_REFRESH_MANY,
39-
UIM_INDEX_UNFREEZE,
40-
UIM_INDEX_UNFREEZE_MANY,
4139
UIM_INDEX_SETTINGS_EDIT,
4240
UIM_TEMPLATE_LIST_LOAD,
4341
UIM_TEMPLATE_DELETE,

x-pack/platform/plugins/shared/index_management/common/constants/ui_metric.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ export const UIM_INDEX_OPEN_MANY = 'index_open_many';
2424
export const UIM_INDEX_REFRESH = 'index_refresh';
2525
export const UIM_INDEX_REFRESH_MANY = 'index_refresh_many';
2626
export const UIM_INDEX_SETTINGS_EDIT = 'index_settings_edit';
27-
export const UIM_INDEX_UNFREEZE = 'index_unfreeze';
28-
export const UIM_INDEX_UNFREEZE_MANY = 'index_unfreeze_many';
2927
export const UIM_TEMPLATE_LIST_LOAD = 'template_list_load';
3028
export const UIM_TEMPLATE_DELETE = 'template_delete';
3129
export const UIM_TEMPLATE_DELETE_MANY = 'template_delete_many';

x-pack/platform/plugins/shared/index_management/public/application/sections/home/index_list/details_page/manage_index_button.tsx

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import {
1818
forcemergeIndices as forcemergeIndicesRequest,
1919
openIndices as openIndicesRequest,
2020
refreshIndices as refreshIndicesRequest,
21-
unfreezeIndices as unfreezeIndicesRequest,
2221
} from '../../../../services';
2322
import { notificationService } from '../../../../services/notification';
2423
import { httpService } from '../../../../services/http';
@@ -162,24 +161,6 @@ export const ManageIndexButton: FunctionComponent<Props> = ({
162161
}
163162
}, [reloadIndices, indexNames]);
164163

165-
const unfreezeIndices = useCallback(async () => {
166-
setIsLoading(true);
167-
try {
168-
await unfreezeIndicesRequest(indexNames);
169-
await reloadIndices();
170-
setIsLoading(false);
171-
notificationService.showSuccessToast(
172-
i18n.translate('xpack.idxMgmt.unfreezeIndicesAction.indexUnfrozenMessage', {
173-
defaultMessage: 'The index {indexNames} was unfrozen.',
174-
values: { indexNames: indexNames.join(', ') },
175-
})
176-
);
177-
} catch (error) {
178-
setIsLoading(false);
179-
notificationService.showDangerToast(error.body.message);
180-
}
181-
}, [reloadIndices, indexNames]);
182-
183164
const forcemergeIndices = useCallback(
184165
async (maxNumSegments: string) => {
185166
setIsLoading(true);
@@ -251,7 +232,6 @@ export const ManageIndexButton: FunctionComponent<Props> = ({
251232
flushIndices={flushIndices}
252233
refreshIndices={refreshIndices}
253234
clearCacheIndices={clearCacheIndices}
254-
unfreezeIndices={unfreezeIndices}
255235
forcemergeIndices={forcemergeIndices}
256236
deleteIndices={deleteIndices}
257237
performExtensionAction={performExtensionAction}

0 commit comments

Comments
 (0)