Skip to content

Commit

Permalink
remove remaining coldphase interface use and clean up unused i18n
Browse files Browse the repository at this point in the history
  • Loading branch information
jloleysens committed Oct 27, 2020
1 parent 7fff5a8 commit 0637d7d
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/

import { SerializedPhase, ColdPhase, DeletePhase, SerializedPolicy } from '../../../common/types';
import { SerializedPhase, DeletePhase, SerializedPolicy } from '../../../common/types';

export const defaultSetPriority: string = '100';

Expand All @@ -24,17 +24,6 @@ export const defaultPolicy: SerializedPolicy = {
},
};

export const defaultNewColdPhase: ColdPhase = {
phaseEnabled: false,
selectedMinimumAge: '0',
selectedMinimumAgeUnits: 'd',
selectedNodeAttrs: '',
selectedReplicaCount: '',
freezeEnabled: false,
phaseIndexPriority: '0',
dataTierAllocationType: 'default',
};

export const defaultNewDeletePhase: DeletePhase = {
phaseEnabled: false,
selectedMinimumAge: '0',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
UIM_CONFIG_WARM_PHASE,
UIM_CONFIG_SET_PRIORITY,
UIM_CONFIG_FREEZE_INDEX,
defaultNewColdPhase,
defaultPhaseIndexPriority,
} from '../constants/';

Expand All @@ -23,7 +22,7 @@ describe('getUiMetricsForPhases', () => {
min_age: '0ms',
actions: {
set_priority: {
priority: parseInt(defaultNewColdPhase.phaseIndexPriority, 10),
priority: parseInt(defaultPhaseIndexPriority, 10),
},
},
},
Expand Down Expand Up @@ -69,7 +68,7 @@ describe('getUiMetricsForPhases', () => {
actions: {
freeze: {},
set_priority: {
priority: parseInt(defaultNewColdPhase.phaseIndexPriority, 10),
priority: parseInt(defaultPhaseIndexPriority, 10),
},
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import {
UIM_CONFIG_FREEZE_INDEX,
UIM_CONFIG_SET_PRIORITY,
UIM_CONFIG_WARM_PHASE,
defaultNewColdPhase,
defaultSetPriority,
defaultPhaseIndexPriority,
} from '../constants';
Expand Down Expand Up @@ -55,8 +54,7 @@ export function getUiMetricsForPhases(phases: Phases): string[] {
const isColdPhasePriorityChanged =
phases.cold &&
phases.cold.actions.set_priority &&
phases.cold.actions.set_priority.priority !==
parseInt(defaultNewColdPhase.phaseIndexPriority, 10);
phases.cold.actions.set_priority.priority !== parseInt(defaultPhaseIndexPriority, 10);
// If the priority is different than the default, we'll consider it a user interaction,
// even if the user has set it to undefined.
return (
Expand Down
3 changes: 0 additions & 3 deletions x-pack/plugins/translations/translations/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -8509,7 +8509,6 @@
"xpack.indexLifecycleMgmt.editPolicy.coldPhase.freezeIndexExplanationText": "インデックスを読み取り専用にし、メモリー消費量を最小化します。",
"xpack.indexLifecycleMgmt.editPolicy.coldPhase.freezeText": "凍結",
"xpack.indexLifecycleMgmt.editPolicy.coldPhase.numberOfReplicas.switchLabel": "レプリカを設定",
"xpack.indexLifecycleMgmt.editPolicy.common.dataTierAllocation.allocationFieldLabel": "データティアオプション",
"xpack.indexLifecycleMgmt.editPolicy.common.dataTierAllocation.cold.customOption.helpText": "ノード属性に基づいてデータを移動します。",
"xpack.indexLifecycleMgmt.editPolicy.common.dataTierAllocation.cold.customOption.input": "カスタム",
"xpack.indexLifecycleMgmt.editPolicy.common.dataTierAllocation.cold.defaultOption.helpText": "コールドティアのノードにデータを移動します。",
Expand Down Expand Up @@ -8573,7 +8572,6 @@
"xpack.indexLifecycleMgmt.editPolicy.nameLabel": "名前",
"xpack.indexLifecycleMgmt.editPolicy.nodeAllocation.customOption.description": "ノード属性を使用して、シャード割り当てを制御します。{learnMoreLink}。",
"xpack.indexLifecycleMgmt.editPolicy.nodeAllocation.doNotModifyAllocationOption": "割り当て構成を修正しない",
"xpack.indexLifecycleMgmt.editPolicy.nodeAllocationLabel": "ノード属性を選択",
"xpack.indexLifecycleMgmt.editPolicy.nodeAttributesLoadingFailedTitle": "ノード属性を読み込めません",
"xpack.indexLifecycleMgmt.editPolicy.nodeAttributesMissingLabel": "カスタムノード属性が構成されていません",
"xpack.indexLifecycleMgmt.editPolicy.nodeAttributesReloadButton": "再試行",
Expand Down Expand Up @@ -8691,7 +8689,6 @@
"xpack.indexLifecycleMgmt.indexMgmtFilter.managedLabel": "管理中",
"xpack.indexLifecycleMgmt.indexMgmtFilter.unmanagedLabel": "管理対象外",
"xpack.indexLifecycleMgmt.indexMgmtFilter.warmLabel": "ウォーム",
"xpack.indexLifecycleMgmt.indexPriorityLabel": "インデックスの優先順位",
"xpack.indexLifecycleMgmt.learnMore": "その他のリソース",
"xpack.indexLifecycleMgmt.licenseCheckErrorMessage": "ライセンス確認失敗",
"xpack.indexLifecycleMgmt.nodeAttrDetails.hostField": "ホスト",
Expand Down
3 changes: 0 additions & 3 deletions x-pack/plugins/translations/translations/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -8516,7 +8516,6 @@
"xpack.indexLifecycleMgmt.editPolicy.coldPhase.freezeIndexExplanationText": "使索引只读,并最大限度减小其内存占用。",
"xpack.indexLifecycleMgmt.editPolicy.coldPhase.freezeText": "冻结",
"xpack.indexLifecycleMgmt.editPolicy.coldPhase.numberOfReplicas.switchLabel": "设置副本",
"xpack.indexLifecycleMgmt.editPolicy.common.dataTierAllocation.allocationFieldLabel": "数据层选项",
"xpack.indexLifecycleMgmt.editPolicy.common.dataTierAllocation.cold.customOption.helpText": "根据节点属性移动数据。",
"xpack.indexLifecycleMgmt.editPolicy.common.dataTierAllocation.cold.customOption.input": "定制",
"xpack.indexLifecycleMgmt.editPolicy.common.dataTierAllocation.cold.defaultOption.helpText": "将数据移到冷层中的节点。",
Expand Down Expand Up @@ -8580,7 +8579,6 @@
"xpack.indexLifecycleMgmt.editPolicy.nameLabel": "名称",
"xpack.indexLifecycleMgmt.editPolicy.nodeAllocation.customOption.description": "使用节点属性控制分片分配。{learnMoreLink}。",
"xpack.indexLifecycleMgmt.editPolicy.nodeAllocation.doNotModifyAllocationOption": "不要修改分配配置",
"xpack.indexLifecycleMgmt.editPolicy.nodeAllocationLabel": "选择节点属性",
"xpack.indexLifecycleMgmt.editPolicy.nodeAttributesLoadingFailedTitle": "无法加载节点属性",
"xpack.indexLifecycleMgmt.editPolicy.nodeAttributesMissingLabel": "未配置定制节点属性",
"xpack.indexLifecycleMgmt.editPolicy.nodeAttributesReloadButton": "重试",
Expand Down Expand Up @@ -8698,7 +8696,6 @@
"xpack.indexLifecycleMgmt.indexMgmtFilter.managedLabel": "受管",
"xpack.indexLifecycleMgmt.indexMgmtFilter.unmanagedLabel": "未受管",
"xpack.indexLifecycleMgmt.indexMgmtFilter.warmLabel": "温",
"xpack.indexLifecycleMgmt.indexPriorityLabel": "索引优先级",
"xpack.indexLifecycleMgmt.learnMore": "了解详情",
"xpack.indexLifecycleMgmt.licenseCheckErrorMessage": "许可证检查失败",
"xpack.indexLifecycleMgmt.nodeAttrDetails.hostField": "主机",
Expand Down

0 comments on commit 0637d7d

Please sign in to comment.