Skip to content

Commit

Permalink
[8.x] [ILM] fix remove the unnecessary toast notification (#201524) (#…
Browse files Browse the repository at this point in the history
…202215)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[ILM] fix remove the unnecessary toast notification
(#201524)](#201524)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Jusheng
Huang","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-28T16:58:57Z","message":"[ILM]
fix remove the unnecessary toast notification (#201524)\n\n##
Summary\r\n\r\nFixes #129647 \r\n\r\nAfter fixup:\r\n\r\n<img
width=\"1920\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/9e423bae-63c2-4d4e-8a9f-10a922125eb8\">","sha":"9724c46be1257a4287bb313a1cb85407bf0349e3","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:ILM","Team:Kibana
Management","release_note:skip","💝community","v9.0.0","backport:prev-minor"],"title":"[ILM]
fix remove the unnecessary toast
notification","number":201524,"url":"https://github.com/elastic/kibana/pull/201524","mergeCommit":{"message":"[ILM]
fix remove the unnecessary toast notification (#201524)\n\n##
Summary\r\n\r\nFixes #129647 \r\n\r\nAfter fixup:\r\n\r\n<img
width=\"1920\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/9e423bae-63c2-4d4e-8a9f-10a922125eb8\">","sha":"9724c46be1257a4287bb313a1cb85407bf0349e3"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/201524","number":201524,"mergeCommit":{"message":"[ILM]
fix remove the unnecessary toast notification (#201524)\n\n##
Summary\r\n\r\nFixes #129647 \r\n\r\nAfter fixup:\r\n\r\n<img
width=\"1920\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/9e423bae-63c2-4d4e-8a9f-10a922125eb8\">","sha":"9724c46be1257a4287bb313a1cb85407bf0349e3"}}]}]
BACKPORT-->

Co-authored-by: Jusheng Huang <[email protected]>
  • Loading branch information
kibanamachine and viajes7 authored Nov 28, 2024
1 parent 4581688 commit d45b628
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import {
useKibana,
useFormIsModified,
} from '../../../shared_imports';
import { toasts } from '../../services/notification';
import { getPoliciesListPath, getPolicyViewPath } from '../../services/navigation';
import { UseField } from './form';
import { savePolicy } from './save_policy';
Expand Down Expand Up @@ -137,25 +136,21 @@ export const EditPolicy: React.FunctionComponent = () => {
const { data: policy, isValid } = await form.submit();

if (!isValid) {
toasts.addDanger(
i18n.translate('xpack.indexLifecycleMgmt.editPolicy.formErrorsMessage', {
defaultMessage: 'Please fix the errors on this page.',
})
);
} else {
const name = getPolicyName();
setHasSubmittedForm(true);
const success = await savePolicy(
{
...policy,
name,
},
isNewPolicy || isClonedPolicy
);

if (success) {
backToPolicyList(name);
}
return;
}

const name = getPolicyName();
setHasSubmittedForm(true);
const success = await savePolicy(
{
...policy,
name,
},
isNewPolicy || isClonedPolicy
);

if (success) {
backToPolicyList(name);
}
};

Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/translations/translations/fr-FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -23729,7 +23729,6 @@
"xpack.indexLifecycleMgmt.editPolicy.forceMerge.enableExplanationText": "Réduisez le nombre de segments dans chaque partition d'index et nettoyez les documents supprimés.",
"xpack.indexLifecycleMgmt.editPolicy.forceMerge.enableText": "Forcer la fusion",
"xpack.indexLifecycleMgmt.editPolicy.forcemerge.numberOfSegmentsRequiredError": "Valeur obligatoire du nombre de segments.",
"xpack.indexLifecycleMgmt.editPolicy.formErrorsMessage": "Veuillez corriger les erreurs sur cette page.",
"xpack.indexLifecycleMgmt.editPolicy.frozenPhase.activateFrozenPhaseSwitchLabel": "Activer la phase \"frozen\"",
"xpack.indexLifecycleMgmt.editPolicy.frozenPhase.frozenPhaseDescription": "Transférez les données au niveau \"frozen\" pour les conserver sur le long terme. Le niveau \"frozen\" représente le moyen le plus rentable de conserver vos données tout en permettant d'effectuer des recherches.",
"xpack.indexLifecycleMgmt.editPolicy.frozenPhase.frozenPhaseTitle": "Phase \"frozen\"",
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/translations/translations/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -23701,7 +23701,6 @@
"xpack.indexLifecycleMgmt.editPolicy.forceMerge.enableExplanationText": "各インデックスシャードのセグメント数を減らし、削除したドキュメントをクリーンアップします。",
"xpack.indexLifecycleMgmt.editPolicy.forceMerge.enableText": "強制結合",
"xpack.indexLifecycleMgmt.editPolicy.forcemerge.numberOfSegmentsRequiredError": "セグメント数の評価が必要です。",
"xpack.indexLifecycleMgmt.editPolicy.formErrorsMessage": "このページのエラーを修正してください。",
"xpack.indexLifecycleMgmt.editPolicy.frozenPhase.activateFrozenPhaseSwitchLabel": "フローズンフェーズをアクティブ化",
"xpack.indexLifecycleMgmt.editPolicy.frozenPhase.frozenPhaseDescription": "長期間保持する場合はデータをフローズンティアに移動します。フローズンティアはデータを格納し、検索することもできる最も費用対効果が高い方法です。",
"xpack.indexLifecycleMgmt.editPolicy.frozenPhase.frozenPhaseTitle": "フローズンフェーズ",
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/translations/translations/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -23753,7 +23753,6 @@
"xpack.indexLifecycleMgmt.editPolicy.forceMerge.enableExplanationText": "减少每个索引分片中的分段数目,并清除删除的文档。",
"xpack.indexLifecycleMgmt.editPolicy.forceMerge.enableText": "强制合并",
"xpack.indexLifecycleMgmt.editPolicy.forcemerge.numberOfSegmentsRequiredError": "必须指定分段数的值。",
"xpack.indexLifecycleMgmt.editPolicy.formErrorsMessage": "请修复此页面上的错误。",
"xpack.indexLifecycleMgmt.editPolicy.frozenPhase.activateFrozenPhaseSwitchLabel": "激活冻结阶段",
"xpack.indexLifecycleMgmt.editPolicy.frozenPhase.frozenPhaseDescription": "将数据移到冻层以长期保留。冻层提供最有成本效益的方法存储数据,并且仍能够搜索数据。",
"xpack.indexLifecycleMgmt.editPolicy.frozenPhase.frozenPhaseTitle": "冻结阶段",
Expand Down

0 comments on commit d45b628

Please sign in to comment.