mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[Enterprise Search][Search Application]Modify indices page warning and remove conflict when all indices are unavailable (#159147)
## Summary
When all the indices are deleted, add warning in Search application and should not show conflict in Schema page
### Screen Recording
cff68550
-9410-4316-b7ac-b96fd1daa570
This commit is contained in:
parent
0e12300945
commit
cb09e8c448
5 changed files with 53 additions and 18 deletions
|
@ -46,6 +46,8 @@ export const EngineIndices: React.FC = () => {
|
|||
if (!engineData) return null;
|
||||
const { indices } = engineData;
|
||||
|
||||
const hasAllUnreachableIndices = indices.every(({ health }) => health === 'unknown');
|
||||
|
||||
const hasUnknownIndices = indices.some(({ health }) => health === 'unknown');
|
||||
|
||||
const removeIndexAction: EuiTableActionsColumnType<EnterpriseSearchEngineIndex>['actions'][0] = {
|
||||
|
@ -174,24 +176,51 @@ export const EngineIndices: React.FC = () => {
|
|||
];
|
||||
return (
|
||||
<>
|
||||
{hasUnknownIndices && (
|
||||
{(hasAllUnreachableIndices || hasUnknownIndices) && (
|
||||
<>
|
||||
<EuiCallOut
|
||||
color="warning"
|
||||
iconType="warning"
|
||||
title={i18n.translate(
|
||||
'xpack.enterpriseSearch.content.engine.indices.unknownIndicesCallout.title',
|
||||
title={
|
||||
hasAllUnreachableIndices ? (
|
||||
<>
|
||||
{i18n.translate(
|
||||
'xpack.enterpriseSearch.content.engine.indices.allUnknownIndicesCallout.title',
|
||||
{ defaultMessage: 'All of your indices are unavailable.' }
|
||||
)}
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
{i18n.translate(
|
||||
'xpack.enterpriseSearch.content.engine.indices.someUnknownIndicesCallout.title',
|
||||
{ defaultMessage: 'Some of your indices are unavailable.' }
|
||||
)}
|
||||
</>
|
||||
)
|
||||
}
|
||||
>
|
||||
<p>
|
||||
{hasAllUnreachableIndices ? (
|
||||
<>
|
||||
{i18n.translate(
|
||||
'xpack.enterpriseSearch.content.engine.indices.unknownIndicesCallout.description',
|
||||
'xpack.enterpriseSearch.content.engine.indices.allUnknownIndicesCallout.description',
|
||||
{
|
||||
defaultMessage:
|
||||
'Your search application has no reachable indices. Add some indices and check for any pending operations or errors on affected indices, or remove indices that should no longer be used by this search application.',
|
||||
}
|
||||
)}
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
{i18n.translate(
|
||||
'xpack.enterpriseSearch.content.engine.indices.someUnknownIndicesCallout.description',
|
||||
{
|
||||
defaultMessage:
|
||||
'Some data might be unreachable from this search application. Check for any pending operations or errors on affected indices, or remove indices that should no longer be used by this search application.',
|
||||
}
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
</p>
|
||||
</EuiCallOut>
|
||||
<EuiSpacer />
|
||||
|
|
|
@ -21,12 +21,24 @@ export const fetchEngineFieldCapabilities = async (
|
|||
engine: EnterpriseSearchEngine
|
||||
): Promise<EnterpriseSearchEngineFieldCapabilities> => {
|
||||
const { name, updated_at_millis, indices } = engine;
|
||||
|
||||
const availableIndicesList = await availableIndices(client, indices);
|
||||
|
||||
if (!availableIndicesList.length) {
|
||||
return {
|
||||
fields: [],
|
||||
name,
|
||||
updated_at_millis,
|
||||
};
|
||||
}
|
||||
|
||||
const fieldCapabilities = await client.asCurrentUser.fieldCaps({
|
||||
fields: '*',
|
||||
filters: '-metadata',
|
||||
include_unmapped: true,
|
||||
index: await availableIndices(client, indices),
|
||||
index: availableIndicesList,
|
||||
});
|
||||
|
||||
const fields = parseFieldsCapabilities(fieldCapabilities);
|
||||
return {
|
||||
fields,
|
||||
|
|
|
@ -12932,8 +12932,6 @@
|
|||
"xpack.enterpriseSearch.content.engine.indices.removeIndexConfirm.text": "Oui, retirer cet index",
|
||||
"xpack.enterpriseSearch.content.engine.indices.removeIndexConfirm.title": "Supprimer cet index de l'application de recherche",
|
||||
"xpack.enterpriseSearch.content.engine.indices.searchPlaceholder": "Filtrer les index",
|
||||
"xpack.enterpriseSearch.content.engine.indices.unknownIndicesCallout.description": "Certaines données peuvent être inaccessibles à partir de cette application de recherche. Recherchez les opérations en attente ou les erreurs sur les index concernés, ou supprimez les index qui ne doivent plus être utilisés par cette application de recherche.",
|
||||
"xpack.enterpriseSearch.content.engine.indices.unknownIndicesCallout.title": "Certains de vos index ne sont pas disponibles.",
|
||||
"xpack.enterpriseSearch.content.engine.indicesSelect.docsLabel": "Documents :",
|
||||
"xpack.enterpriseSearch.content.engine.schema.field_indices.columnTitle": "Dans tous les index ?",
|
||||
"xpack.enterpriseSearch.content.engine.schema.field_indices.moreInfo": "Plus d'infos",
|
||||
|
|
|
@ -12931,8 +12931,6 @@
|
|||
"xpack.enterpriseSearch.content.engine.indices.removeIndexConfirm.text": "はい。このインデックスを削除します",
|
||||
"xpack.enterpriseSearch.content.engine.indices.removeIndexConfirm.title": "このインデックスを検索アプリケーションから削除",
|
||||
"xpack.enterpriseSearch.content.engine.indices.searchPlaceholder": "インデックスのフィルター",
|
||||
"xpack.enterpriseSearch.content.engine.indices.unknownIndicesCallout.description": "この検索アプリケーションからは一部のデータに接続できない場合があります。影響を受けるインデックスで保留中の処理またはエラーがあるかどうかを確認するか、この検索アプリケーションで使用されないインデックスを削除してください。",
|
||||
"xpack.enterpriseSearch.content.engine.indices.unknownIndicesCallout.title": "一部のインデックスが使用できません。",
|
||||
"xpack.enterpriseSearch.content.engine.indicesSelect.docsLabel": "ドキュメント:",
|
||||
"xpack.enterpriseSearch.content.engine.schema.field_indices.columnTitle": "すべてのインデックスにありますか?",
|
||||
"xpack.enterpriseSearch.content.engine.schema.field_indices.moreInfo": "詳細",
|
||||
|
|
|
@ -12931,8 +12931,6 @@
|
|||
"xpack.enterpriseSearch.content.engine.indices.removeIndexConfirm.text": "是,移除此索引",
|
||||
"xpack.enterpriseSearch.content.engine.indices.removeIndexConfirm.title": "从搜索应用程序中移除此索引",
|
||||
"xpack.enterpriseSearch.content.engine.indices.searchPlaceholder": "筛选索引",
|
||||
"xpack.enterpriseSearch.content.engine.indices.unknownIndicesCallout.description": "可能无法从此搜索应用程序访问某些数据。在受影响的索引上检查任何待处理操作或错误,或移除应不再被此搜索应用程序使用的索引。",
|
||||
"xpack.enterpriseSearch.content.engine.indices.unknownIndicesCallout.title": "您的某些索引不可用。",
|
||||
"xpack.enterpriseSearch.content.engine.indicesSelect.docsLabel": "文档:",
|
||||
"xpack.enterpriseSearch.content.engine.schema.field_indices.columnTitle": "在所有索引中?",
|
||||
"xpack.enterpriseSearch.content.engine.schema.field_indices.moreInfo": "更多信息",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue